[PATCH virt-install] virtinst: Support rotation_rate attrib in target

Han Han hhan at redhat.com
Tue May 18 06:36:08 UTC 2021


Support rotation_rate attrib which is introduced since libvirt v7.3.

Signed-off-by: Han Han <hhan at redhat.com>
---
 virtinst/cli.py          | 2 ++
 virtinst/devices/disk.py | 1 +
 2 files changed, 3 insertions(+)

diff --git a/virtinst/cli.py b/virtinst/cli.py
index 4ce3abf9..e4676bc9 100644
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -3252,6 +3252,7 @@ class ParserDisk(VirtCLIParser):
         "snapshot": "snapshot_policy",
         "target.dev": "target",
         "target.removable": "removable",
+        "target.rotation_rate": "rotation_rate",
 
         "driver.discard": "discard",
         "driver.detect_zeroes": "detect_zeroes",
@@ -3443,6 +3444,7 @@ class ParserDisk(VirtCLIParser):
         cls.add_arg("target.bus", "bus")
         cls.add_arg("target.removable", "removable", is_onoff=True)
         cls.add_arg("target.dev", "target")
+        cls.add_arg("target.rotation_rate", "rotation_rate")
 
         cls.add_arg("driver.cache", "driver_cache")
         cls.add_arg("driver.discard", "driver_discard")
diff --git a/virtinst/devices/disk.py b/virtinst/devices/disk.py
index a8971581..77f10340 100644
--- a/virtinst/devices/disk.py
+++ b/virtinst/devices/disk.py
@@ -471,6 +471,7 @@ class DeviceDisk(Device):
     bus = XMLProperty("./target/@bus")
     target = XMLProperty("./target/@dev")
     removable = XMLProperty("./target/@removable", is_onoff=True)
+    rotation_rate = XMLProperty("./target/@rotation_rate", is_int=True)
 
     read_only = XMLProperty("./readonly", is_bool=True)
     shareable = XMLProperty("./shareable", is_bool=True)
-- 
2.31.1




More information about the virt-tools-list mailing list