mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-05-26 07:08:05 +00:00
Merge pull request #664 from fangebee/master
Some fixes regarding Ceph/RBD volumes handling
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user