virtinst: expose disk/source startupPolicy attribute
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
b2e962fcf3
commit
f5a7476497
|
@ -51,7 +51,7 @@
|
|||
<total_bytes_sec>6</total_bytes_sec>
|
||||
</iotune>
|
||||
<driver cache="writeback" io="native"/>
|
||||
<source file="/dev/default-pool/default-vol"/>
|
||||
<source file="/dev/default-pool/default-vol" startupPolicy="optional"/>
|
||||
<shareable/>
|
||||
</disk>
|
||||
<disk type="block" device="floppy">
|
||||
|
|
|
@ -289,6 +289,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("shareable", False, True)
|
||||
check("driver_cache", None, "writeback")
|
||||
check("driver_io", None, "threads")
|
||||
|
|
|
@ -522,6 +522,7 @@ class VirtualDisk(VirtualDevice):
|
|||
clear_first=["./source/@" + target for target in
|
||||
_TARGET_PROPS])
|
||||
|
||||
sourceStartupPolicy = XMLProperty("./source/@startupPolicy")
|
||||
device = XMLProperty("./@device",
|
||||
default_cb=lambda s: s.DEVICE_DISK)
|
||||
type = XMLProperty("./@type", default_cb=_get_default_type)
|
||||
|
|
Loading…
Reference in New Issue