mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
Merge pull request #664 from fangebee/master
Some fixes regarding Ceph/RBD volumes handling
This commit is contained in:
commit
fd54c68e6b
2 changed files with 3 additions and 1 deletions
|
@ -631,7 +631,7 @@ class wvmInstance(wvmConnect):
|
|||
dev_type = dev.get("type")
|
||||
dev_device = dev.get("device")
|
||||
|
||||
if dev_type == "file":
|
||||
if dev_type == "file" or (dev_device == "disk" and dev_type == "network"):
|
||||
dev_target = dev.find("target").get("dev")
|
||||
|
||||
elif dev_type == "network":
|
||||
|
|
|
@ -34,6 +34,8 @@ class wvmStorages(wvmConnect):
|
|||
stg = wvmStorage(self.host, self.login, self.passwd, self.conn, pool_name)
|
||||
if stg.get_target_path() == target:
|
||||
return self.get_storage(pool_name)
|
||||
if stg.get_type() == "rbd" and stg.get_source_name() == target:
|
||||
return self.get_storage(pool_name)
|
||||
return None
|
||||
|
||||
def create_storage(self, stg_type, name, source, target):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue