diff --git a/tests/xmlparse.py b/tests/xmlparse.py index 50ae63004..bfa29fb6a 100644 --- a/tests/xmlparse.py +++ b/tests/xmlparse.py @@ -355,7 +355,7 @@ class XMLParseTest(unittest.TestCase): check = self._make_checker(disk6) check("path", None, "/dev/default-pool/default-vol") disk6.sync_path_props() - check("sourceStartupPolicy", None, "optional") + check("startup_policy", None, "optional") check("shareable", False, True) check("driver_cache", None, "writeback") check("driver_io", None, "threads") @@ -372,7 +372,7 @@ class XMLParseTest(unittest.TestCase): check("order", None, 7, None) check = self._make_checker(disk9) - check("sourcePool", "defaultPool", "anotherPool") + check("source_pool", "defaultPool", "anotherPool") self._alter_compare(guest.get_xml_config(), outfile) diff --git a/virtManager/delete.py b/virtManager/delete.py index ed75d8924..2addcfa02 100644 --- a/virtManager/delete.py +++ b/virtManager/delete.py @@ -233,9 +233,9 @@ def populate_storage_list(storage_list, vm, conn): model.clear() def get_path(disk): - if disk.sourcePool: + if disk.source_pool: try: - pool = conn.get_pool(disk.sourcePool) + pool = conn.get_pool(disk.source_pool) vol = pool.get_volume(disk.path) return vol.get_target_path() except KeyError: diff --git a/virtManager/details.py b/virtManager/details.py index 08026fab6..907b0c4e2 100644 --- a/virtManager/details.py +++ b/virtManager/details.py @@ -2601,7 +2601,7 @@ class vmmDetails(vmmGObjectUI): return path = disk.path - source_pool = disk.sourcePool + source_pool = disk.source_pool devtype = disk.device ro = disk.read_only share = disk.shareable diff --git a/virtinst/cli.py b/virtinst/cli.py index 3449e68ed..204db8079 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -1539,7 +1539,7 @@ class ParserDisk(VirtCLIParser): self.set_param("error_policy", "error_policy") self.set_param("serial", "serial") self.set_param("target", "target") - self.set_param("sourceStartupPolicy", "startup_policy") + self.set_param("startup_policy", "startup_policy") self.set_param("read_only", "readonly", is_onoff=True) self.set_param("shareable", "shareable", is_onoff=True) self.set_param("boot.order", "boot_order") diff --git a/virtinst/devicedisk.py b/virtinst/devicedisk.py index d29ac11fa..9fe70341b 100644 --- a/virtinst/devicedisk.py +++ b/virtinst/devicedisk.py @@ -624,8 +624,9 @@ class VirtualDisk(VirtualDevice): propname = self._disk_type_to_object_prop_name() return setattr(self, propname, val) - sourcePool = XMLProperty("./source/@pool") - sourceStartupPolicy = XMLProperty("./source/@startupPolicy") + source_pool = XMLProperty("./source/@pool") + startup_policy = XMLProperty("./source/@startupPolicy") + device = XMLProperty("./@device", default_cb=lambda s: s.DEVICE_DISK) type = XMLProperty("./@type", default_cb=_get_default_type)