[PATCH virt-install] virtinst: Support rotation_rate attrib in target
Han Han
hhan at redhat.com
Thu May 20 01:42:43 UTC 2021
On Thu, May 20, 2021 at 6:28 AM Cole Robinson <crobinso at redhat.com> wrote:
> On 5/18/21 2:36 AM, Han Han wrote:
> > Support rotation_rate attrib which is introduced since libvirt v7.3.
> >
> > Signed-off-by: Han Han <hhan at redhat.com>
>
> Thanks! But you need to extend tests/test_cli.py --disk examples as well
> otherwise test suite is failing (but I didn't confirm)
>
OK. I will have a try in v2
>
> Thanks,
> Cole
>
> > ---
> > 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)
> >
>
>
> - Cole
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20210520/684af020/attachment.htm>
More information about the virt-tools-list
mailing list