1
0
Fork 0
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:
catborise 2025-05-02 10:07:48 +03:00 committed by GitHub
commit fd54c68e6b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -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":

View file

@ -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):