From b69f8e6b01cb40a73a9703d473049f035fb757c9 Mon Sep 17 00:00:00 2001 From: Miguel Caballer Date: Fri, 22 Jul 2022 13:31:24 +0200 Subject: [PATCH 1/3] Fix markdownlint --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3b0409490..5fee8d0d3 100644 --- a/README.md +++ b/README.md @@ -106,8 +106,8 @@ However, if you install IM from sources you should install: * The RADL parser (), available in pip as the ``RADL`` package. * The paramiko ssh2 protocol library for python version 1.14 or later -(), typically available as the -``python-paramiko`` package. + (), typically available as the + ``python-paramiko`` package. * The YAML library for Python, typically available as the ``python-yaml`` or ``PyYAML`` package. * The suds library for Python, typically available as the ``python-suds`` From b8faad486334540b187b683473ae104767f713ae Mon Sep 17 00:00:00 2001 From: Miguel Caballer Date: Fri, 2 Sep 2022 09:21:54 +0200 Subject: [PATCH 2/3] Fix #1404 --- IM/connectors/OpenNebula.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/IM/connectors/OpenNebula.py b/IM/connectors/OpenNebula.py index ae3298087..9b996117d 100644 --- a/IM/connectors/OpenNebula.py +++ b/IM/connectors/OpenNebula.py @@ -570,7 +570,11 @@ def finalize(self, vm, last, auth_data): self.delete_snapshots(vm, auth_data) if vm.id: - success, err = server.one.vm.action(session_id, 'delete', int(vm.id))[0:2] + one_ver = self.getONEVersion(auth_data) + op = 'terminate' + if one_ver <= LooseVersion("4.14.0"): + op = 'delete' + success, err = server.one.vm.action(session_id, op, int(vm.id))[0:2] else: self.log_warn("No VM ID. Ignoring") err = "" From d9a0c4b17b506931b299365576b7b2060a89698e Mon Sep 17 00:00:00 2001 From: Miguel Caballer Date: Fri, 2 Sep 2022 10:04:10 +0200 Subject: [PATCH 3/3] Fix #1406 --- IM/connectors/OpenNebula.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IM/connectors/OpenNebula.py b/IM/connectors/OpenNebula.py index 9b996117d..83ce0caa6 100644 --- a/IM/connectors/OpenNebula.py +++ b/IM/connectors/OpenNebula.py @@ -1180,7 +1180,7 @@ def create_snapshot(self, vm, disk_num, image_name, auto_delete, auth_data): image_type = "" # Use the default one one_ver = self.getONEVersion(auth_data) - if one_ver.startswith("5."): + if one_ver >= LooseVersion("5.0"): success, res_info = server.one.vm.disksaveas(session_id, int(vm.id), disk_num, image_name, image_type, -1)[0:2] else: