diff options
-rw-r--r-- | tests/xmlparse-xml/pool-dir-vol-out.xml | 1 | ||||
-rw-r--r-- | tests/xmlparse.py | 1 | ||||
-rw-r--r-- | virtinst/storage.py | 3 |
3 files changed, 4 insertions, 1 deletions
diff --git a/tests/xmlparse-xml/pool-dir-vol-out.xml b/tests/xmlparse-xml/pool-dir-vol-out.xml index 629155ad..fed927ba 100644 --- a/tests/xmlparse-xml/pool-dir-vol-out.xml +++ b/tests/xmlparse-xml/pool-dir-vol-out.xml @@ -27,4 +27,5 @@ <ctime>1380037213.225753249</ctime> </timestamps> </backingStore> + <key>fookey</key> </volume> diff --git a/tests/xmlparse.py b/tests/xmlparse.py index f7c7db5f..7cfdbbbf 100644 --- a/tests/xmlparse.py +++ b/tests/xmlparse.py @@ -994,6 +994,7 @@ class XMLParseTest(unittest.TestCase): vol = virtinst.StorageVolume(conn, parsexml=file(infile).read()) check = self._make_checker(vol) + check("key", None, "fookey") check("capacity", 10737418240, 2000) check("allocation", 5368709120, 1000) check("format", "raw", "qcow2") diff --git a/virtinst/storage.py b/virtinst/storage.py index 4b6e5817..e7bfabba 100644 --- a/virtinst/storage.py +++ b/virtinst/storage.py @@ -580,9 +580,10 @@ class StorageVolume(_StorageObject): ################## _XML_ROOT_NAME = "volume" - _XML_PROP_ORDER = ["name", "capacity", "allocation", "format", + _XML_PROP_ORDER = ["name", "key", "capacity", "allocation", "format", "target_path", "permissions"] + key = XMLProperty("./key") capacity = XMLProperty("./capacity", is_int=True, validate_cb=_validate_capacity) allocation = XMLProperty("./allocation", is_int=True, |