From bcd47d647167397fa2b9462d494a70e3273f08cd Mon Sep 17 00:00:00 2001 From: "Fred A. Kemp" Date: Fri, 4 Oct 2013 03:38:58 +0200 Subject: [PATCH] virtinst: Expose disk/target/@removable --- tests/xmlparse-xml/change-disk-out.xml | 2 +- tests/xmlparse.py | 2 ++ virtinst/devicedisk.py | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/xmlparse-xml/change-disk-out.xml b/tests/xmlparse-xml/change-disk-out.xml index d5de699f1..e27a821e7 100644 --- a/tests/xmlparse-xml/change-disk-out.xml +++ b/tests/xmlparse-xml/change-disk-out.xml @@ -20,7 +20,7 @@ /usr/lib/xen/bin/qemu-dm - + frob diff --git a/tests/xmlparse.py b/tests/xmlparse.py index 83ed94846..fdff0e56e 100644 --- a/tests/xmlparse.py +++ b/tests/xmlparse.py @@ -275,6 +275,8 @@ class XMLParseTest(unittest.TestCase): check("driver_name", None, "test") check("driver_type", None, "raw") check("serial", "WD-WMAP9A966149", "frob") + check("bus", "ide", "usb") + check("removable", None, False, True) check = self._make_checker(disk3) check("type", "block", "dir", "file", "block") diff --git a/virtinst/devicedisk.py b/virtinst/devicedisk.py index 48261cf93..1b154af36 100644 --- a/virtinst/devicedisk.py +++ b/virtinst/devicedisk.py @@ -534,6 +534,7 @@ class VirtualDisk(VirtualDevice): bus = XMLProperty("./target/@bus") target = XMLProperty("./target/@dev") + removable = XMLProperty("./target/@removable", is_onoff=True) read_only = XMLProperty("./readonly", is_bool=True) shareable = XMLProperty("./shareable", is_bool=True)