mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-08 05:57:43 +03:00
storage: make "target_path" optional
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
1401cda924
commit
dd0af85d5a
@ -275,8 +275,10 @@ class vmmCreatePool(vmmGObjectUI):
|
|||||||
show_row("pool-build", buildsens)
|
show_row("pool-build", buildsens)
|
||||||
show_row("pool-iqn", iqn)
|
show_row("pool-iqn", iqn)
|
||||||
|
|
||||||
|
if tgt:
|
||||||
self.widget("pool-target-path").get_child().set_text(
|
self.widget("pool-target-path").get_child().set_text(
|
||||||
self._pool.target_path)
|
self._pool.target_path)
|
||||||
|
|
||||||
self.widget("pool-target-button").set_sensitive(tgt_b)
|
self.widget("pool-target-button").set_sensitive(tgt_b)
|
||||||
self.widget("pool-source-button").set_sensitive(src_b)
|
self.widget("pool-source-button").set_sensitive(src_b)
|
||||||
self.widget("pool-build").set_active(builddef)
|
self.widget("pool-build").set_active(builddef)
|
||||||
|
@ -284,6 +284,8 @@ class StoragePool(_StorageObject):
|
|||||||
name))
|
name))
|
||||||
|
|
||||||
def _get_default_target_path(self):
|
def _get_default_target_path(self):
|
||||||
|
if not self.supports_property("target_path"):
|
||||||
|
return None
|
||||||
if (self.type == self.TYPE_DIR or
|
if (self.type == self.TYPE_DIR or
|
||||||
self.type == self.TYPE_NETFS or
|
self.type == self.TYPE_NETFS or
|
||||||
self.type == self.TYPE_FS):
|
self.type == self.TYPE_FS):
|
||||||
@ -385,6 +387,9 @@ class StoragePool(_StorageObject):
|
|||||||
"host": [self.TYPE_NETFS, self.TYPE_ISCSI],
|
"host": [self.TYPE_NETFS, self.TYPE_ISCSI],
|
||||||
"format": [self.TYPE_FS, self.TYPE_NETFS, self.TYPE_DISK],
|
"format": [self.TYPE_FS, self.TYPE_NETFS, self.TYPE_DISK],
|
||||||
"iqn": [self.TYPE_ISCSI],
|
"iqn": [self.TYPE_ISCSI],
|
||||||
|
"target_path" : [self.TYPE_DIR, self.TYPE_FS, self.TYPE_NETFS,
|
||||||
|
self.TYPE_LOGICAL, self.TYPE_DISK, self.TYPE_ISCSI,
|
||||||
|
self.TYPE_SCSI, self.TYPE_MPATH]
|
||||||
}
|
}
|
||||||
|
|
||||||
if users.get(propname):
|
if users.get(propname):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user