XML mapping: <disk type=... rawio="yes"> ... </disk> Signed-off-by: Athina Plaskasoviti <athina.plaskasoviti@xxxxxxxxx> --- tests/cli-test-xml/compare/virt-install-many-devices.xml | 2 +- tests/clitest.py | 2 +- tests/xmlparse-xml/change-disk-out.xml | 2 +- tests/xmlparse.py | 1 + virtinst/cli.py | 1 + virtinst/devices/disk.py | 1 + 6 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/cli-test-xml/compare/virt-install-many-devices.xml b/tests/cli-test-xml/compare/virt-install-many-devices.xml index 4dd4efe6..c30b16d2 100644 --- a/tests/cli-test-xml/compare/virt-install-many-devices.xml +++ b/tests/cli-test-xml/compare/virt-install-many-devices.xml @@ -70,7 +70,7 @@ <source file="/var/lib/libvirt/images/foobar.qcow2"/> <target dev="vdc" bus="virtio"/> </disk> - <disk type="block" device="lun" sgio="unfiltered"> + <disk type="block" device="lun" sgio="unfiltered" rawio="yes"> <driver name="qemu" type="raw"/> <source dev="/iscsi-pool/diskvol1"/> <target dev="sdab" bus="scsi"/> diff --git a/tests/clitest.py b/tests/clitest.py index f286d172..84d6ec90 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -550,7 +550,7 @@ vcpus.vcpu1.id=2,vcpus.vcpu1.enabled=yes --disk %(NEWIMG1)s,sparse=false,size=.001,perms=ro,error_policy=enospace,discard=unmap,detect_zeroes=unmap,address.type=drive,address.controller=0,address.target=2,address.unit=0 --disk device=cdrom,bus=sata,read_bytes_sec=1,read_iops_sec=2,write_bytes_sec=5,write_iops_sec=6,driver.copy_on_read=on,geometry.cyls=16383,geometry.heads=16,geometry.secs=63,geometry.trans=lba --disk size=1 ---disk /iscsi-pool/diskvol1,total_bytes_sec=10,total_iops_sec=20,bus=scsi,device=lun,sgio=unfiltered +--disk /iscsi-pool/diskvol1,total_bytes_sec=10,total_iops_sec=20,bus=scsi,device=lun,sgio=unfiltered,rawio=yes --disk /dev/default-pool/iso-vol,seclabel.model=dac,seclabel1.model=selinux,seclabel1.relabel=no,seclabel0.label=foo,bar,baz,iotune.read_bytes_sec=1,iotune.read_iops_sec=2,iotune.write_bytes_sec=5,iotune.write_iops_sec=6 --disk /dev/default-pool/iso-vol,format=qcow2,startup_policy=optional,iotune.total_bytes_sec=10,iotune.total_iops_sec=20, --disk source_pool=rbd-ceph,source_volume=some-rbd-vol,size=.1,driver_type=raw diff --git a/tests/xmlparse-xml/change-disk-out.xml b/tests/xmlparse-xml/change-disk-out.xml index 66416306..07652318 100644 --- a/tests/xmlparse-xml/change-disk-out.xml +++ b/tests/xmlparse-xml/change-disk-out.xml @@ -37,7 +37,7 @@ <disk type="file" device="floppy"> <target dev="fde" bus="fdc"/> </disk> - <disk type="block" device="lun" sgio="unfiltered"> + <disk type="block" device="lun" sgio="unfiltered" rawio="yes"> <driver name="qemu" type="raw"/> <source dev="/dev/sda"/> <target dev="hdd" bus="scsi"/> diff --git a/tests/xmlparse.py b/tests/xmlparse.py index 1d614ccc..4c353576 100644 --- a/tests/xmlparse.py +++ b/tests/xmlparse.py @@ -403,6 +403,7 @@ class XMLParseTest(unittest.TestCase): check("type", "block") check("device", "lun") check("sgio", None, "unfiltered") + check("rawio", None, "yes") disk = _get_disk("sda") check = self._make_checker(disk) diff --git a/virtinst/cli.py b/virtinst/cli.py index da4c5736..5356e7b4 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -2911,6 +2911,7 @@ class ParserDisk(VirtCLIParser): cls.add_arg("device", "device") cls.add_arg("snapshot", "snapshot_policy") cls.add_arg("sgio", "sgio") + cls.add_arg("rawio", "rawio") cls.add_arg("serial", "serial") cls.add_arg("wwn", "wwn") cls.add_arg("readonly", "read_only", is_onoff=True) diff --git a/virtinst/devices/disk.py b/virtinst/devices/disk.py index 6556c8cd..cfe57cb7 100644 --- a/virtinst/devices/disk.py +++ b/virtinst/devices/disk.py @@ -643,6 +643,7 @@ class DeviceDisk(Device): driver_copy_on_read = XMLProperty("./driver/@copy_on_read", is_onoff=True) sgio = XMLProperty("./@sgio") + rawio = XMLProperty("./@rawio") bus = XMLProperty("./target/@bus") target = XMLProperty("./target/@dev") -- 2.20.1 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list