github.com/mirantis/virtlet@v1.5.2-0.20191204181327-1659b8a48e9b/pkg/libvirttools/TestDomainDefinitions__ceph_flexvolume.out.yaml (about)

     1  - name: GetImagePathDigestAndVirtualSize
     2    value: fake/image1
     3  - name: 'storage: CreateStoragePool'
     4    value: |-
     5      <pool type="dir">
     6        <name>volumes</name>
     7        <target>
     8          <path>/var/lib/virtlet/volumes</path>
     9        </target>
    10      </pool>
    11  - name: 'storage: volumes: CreateStorageVol'
    12    value: |-
    13      <volume type="file">
    14        <name>virtlet_root_231700d5-c9a6-5a49-738d-99a954c51550</name>
    15        <allocation unit="b">0</allocation>
    16        <capacity unit="b">424242</capacity>
    17        <target>
    18          <format type="qcow2"></format>
    19        </target>
    20        <backingStore>
    21          <path>/fake/volume/path</path>
    22          <format type="qcow2"></format>
    23        </backingStore>
    24      </volume>
    25  - name: 'domain conn: DefineSecret'
    26    value: |-
    27      <secret ephemeral="no" private="no">
    28        <usage type="ceph">
    29          <name>libvirt-231700d5-c9a6-5a49-738d-99a954c51550-ceph</name>
    30        </usage>
    31      </secret>
    32  - name: 'domain conn: secret libvirt-231700d5-c9a6-5a49-738d-99a954c51550-ceph: SetValue'
    33    value: 66 6f 6f 62 61 72 0a
    34  - name: 'domain conn: DefineDomain'
    35    value: |-
    36      <domain type="kvm">
    37        <name>virtlet-231700d5-c9a6-container1</name>
    38        <uuid>231700d5-c9a6-5a49-738d-99a954c51550</uuid>
    39        <memory unit="MiB">1024</memory>
    40        <vcpu>1</vcpu>
    41        <cputune>
    42          <shares>0</shares>
    43          <period>0</period>
    44          <quota>0</quota>
    45        </cputune>
    46        <os>
    47          <type>hvm</type>
    48          <boot dev="hd"></boot>
    49        </os>
    50        <features>
    51          <acpi></acpi>
    52        </features>
    53        <on_poweroff>destroy</on_poweroff>
    54        <on_reboot>restart</on_reboot>
    55        <on_crash>restart</on_crash>
    56        <devices>
    57          <emulator>/vmwrapper</emulator>
    58          <disk type="file" device="disk">
    59            <driver name="qemu" type="qcow2"></driver>
    60            <source file="/var/lib/virtlet/volumes/virtlet_root_231700d5-c9a6-5a49-738d-99a954c51550"></source>
    61            <target dev="sda" bus="scsi"></target>
    62            <address type="drive" controller="0" bus="0" target="0" unit="0"></address>
    63          </disk>
    64          <disk type="network" device="disk">
    65            <driver name="qemu" type="raw"></driver>
    66            <auth username="libvirt">
    67              <secret type="ceph" usage="libvirt-231700d5-c9a6-5a49-738d-99a954c51550-ceph"></secret>
    68            </auth>
    69            <source protocol="rbd" name="libvirt-pool/rbd-test-image">
    70              <host name="127.0.0.1" port="6789"></host>
    71            </source>
    72            <target dev="sdb" bus="scsi"></target>
    73            <address type="drive" controller="0" bus="0" target="0" unit="1"></address>
    74          </disk>
    75          <disk type="file" device="cdrom">
    76            <driver name="qemu" type="raw"></driver>
    77            <source file="/var/lib/virtlet/config/config-231700d5-c9a6-5a49-738d-99a954c51550.iso"></source>
    78            <target dev="sdc" bus="scsi"></target>
    79            <readonly></readonly>
    80            <address type="drive" controller="0" bus="0" target="0" unit="2"></address>
    81          </disk>
    82          <controller type="scsi" index="0" model="virtio-scsi">
    83            <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"></address>
    84          </controller>
    85          <controller type="pci" model="pci-root"></controller>
    86          <serial type="unix">
    87            <source mode="connect" path="/var/lib/libvirt/streamer.sock">
    88              <reconnect enabled="yes" timeout="1"></reconnect>
    89            </source>
    90            <target port="0"></target>
    91          </serial>
    92          <input type="tablet" bus="usb"></input>
    93          <graphics type="vnc" port="-1"></graphics>
    94          <video>
    95            <model type="cirrus"></model>
    96          </video>
    97        </devices>
    98        <commandline xmlns="http://libvirt.org/schemas/domain/qemu/1.0">
    99          <env name="VIRTLET_EMULATOR" value="/usr/bin/kvm"></env>
   100          <env name="VIRTLET_NET_KEY" value="/tmp/fakenetns"></env>
   101          <env name="VIRTLET_CONTAINER_ID" value="231700d5-c9a6-5a49-738d-99a954c51550"></env>
   102          <env name="VIRTLET_CONTAINER_LOG_PATH" value="/var/log/pods/69eec606-0493-5825-73a4-c5e0c0236155/container1_42.log"></env>
   103        </commandline>
   104      </domain>
   105  - name: 'domain conn: virtlet-231700d5-c9a6-container1: Create'
   106  - name: 'domain conn: virtlet-231700d5-c9a6-container1: iso image'
   107    value:
   108      meta-data: '{"instance-id":"testName_0.default","local-hostname":"testName_0"}'
   109      network-config: |
   110        version: 1
   111      user-data: |
   112        #cloud-config
   113        mounts:
   114        - - /dev/disk/by-path/virtio-pci-0000:00:01.0-scsi-0:0:0:1-part1
   115          - /var/lib/whatever
   116        write_files:
   117        - content: |
   118            #!/bin/sh
   119            if ! mountpoint /var/lib/whatever; then mkdir -p /var/lib/whatever && mount /dev/`ls /sys/devices/pci0000:00/0000:00:01.0/virtio*/host*/target*:0:0/*:0:0:1/block/`1 /var/lib/whatever; fi
   120          path: /etc/cloud/mount-volumes.sh
   121          permissions: "0755"
   122  - name: 'domain conn: virtlet-231700d5-c9a6-container1: Destroy'
   123  - name: 'domain conn: virtlet-231700d5-c9a6-container1: Undefine'
   124  - name: 'storage: volumes: RemoveVolumeByName'
   125    value: virtlet_root_231700d5-c9a6-5a49-738d-99a954c51550
   126  - name: 'domain conn: secret libvirt-231700d5-c9a6-5a49-738d-99a954c51550-ceph: Remove'