mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
virtinst: add support for <disk> sgio attribute
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@@ -34,6 +34,12 @@
|
||||
<driver name='phy' error_policy='stop'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
<disk type="block" device="lun">
|
||||
<driver name='qemu' type='raw'/>
|
||||
<source dev='/dev/sda'/>
|
||||
<target dev='hdd' bus='scsi'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
<disk type="block" device="disk">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source dev="/dev/null"/>
|
||||
|
||||
@@ -31,6 +31,12 @@
|
||||
<disk type="block" device="floppy">
|
||||
<target dev="fde" bus="fdc"/>
|
||||
</disk>
|
||||
<disk type="block" device="lun" sgio="unfiltered">
|
||||
<driver name="qemu" type="raw"/>
|
||||
<source dev="/dev/sda"/>
|
||||
<target dev="hdd" bus="scsi"/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
<disk type="block" device="disk">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source dev="/dev/null"/>
|
||||
|
||||
@@ -347,6 +347,12 @@ class XMLParseTest(unittest.TestCase):
|
||||
check("bus", "ide", "fdc")
|
||||
check("error_policy", "stop", None)
|
||||
|
||||
disk = _get_disk("hdd")
|
||||
check = self._make_checker(disk)
|
||||
check("type", "block")
|
||||
check("device", "lun")
|
||||
check("sgio", None, "unfiltered")
|
||||
|
||||
disk = _get_disk("sda")
|
||||
check = self._make_checker(disk)
|
||||
check("path", None, "http://[1:2:3:4:5:6:7:8]:1122/my/file")
|
||||
|
||||
@@ -1532,6 +1532,7 @@ class ParserDisk(VirtCLIParser):
|
||||
self.set_param("iotune_ris", "read_iops_sec")
|
||||
self.set_param("iotune_wis", "write_iops_sec")
|
||||
self.set_param("iotune_tis", "total_iops_sec")
|
||||
self.set_param("sgio", "sgio")
|
||||
|
||||
|
||||
def _parse(self, opts, inst):
|
||||
|
||||
@@ -742,6 +742,7 @@ class VirtualDisk(VirtualDevice):
|
||||
driver_type = XMLProperty("./driver/@type",
|
||||
default_cb=_get_default_driver_type)
|
||||
|
||||
sgio = XMLProperty("./@sgio")
|
||||
|
||||
bus = XMLProperty("./target/@bus")
|
||||
target = XMLProperty("./target/@dev")
|
||||
|
||||
Reference in New Issue
Block a user