summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/xmlparse.py1
-rw-r--r--virtinst/storage.py4
2 files changed, 4 insertions, 1 deletions
diff --git a/tests/xmlparse.py b/tests/xmlparse.py
index 6d6e0f38..4724f222 100644
--- a/tests/xmlparse.py
+++ b/tests/xmlparse.py
@@ -1027,6 +1027,7 @@ class XMLParseTest(unittest.TestCase):
check("capacity", 984373075968, 200000)
check("allocation", 756681687040, 150000)
check("available", 227691388928, 50000)
+ check("source_dir", None, None)
check("format", "auto", "ext3")
check("source_path", "/some/source/path", "/dev/foo/bar")
diff --git a/virtinst/storage.py b/virtinst/storage.py
index 559b20aa..8e0f8f9c 100644
--- a/virtinst/storage.py
+++ b/virtinst/storage.py
@@ -348,7 +348,7 @@ class StoragePool(_StorageObject):
"capacity", "allocation", "available",
"format", "host",
"source_path", "source_name", "target_path",
- "permissions"]
+ "source_dir", "permissions"]
type = XMLProperty("./@type",
doc=_("Storage device type the pool will represent."))
@@ -373,6 +373,7 @@ class StoragePool(_StorageObject):
target_path = XMLProperty("./target/path",
default_cb=_get_default_target_path)
+ source_dir = XMLProperty("./source/dir/@path")
######################
@@ -385,6 +386,7 @@ class StoragePool(_StorageObject):
self.TYPE_DISK, self.TYPE_ISCSI, self.TYPE_SCSI],
"source_name": [self.TYPE_LOGICAL],
"host": [self.TYPE_NETFS, self.TYPE_ISCSI],
+ "source_dir" : [self.TYPE_NETFS],
"format": [self.TYPE_FS, self.TYPE_NETFS, self.TYPE_DISK],
"iqn": [self.TYPE_ISCSI],
"target_path" : [self.TYPE_DIR, self.TYPE_FS, self.TYPE_NETFS,