From 5f8cc2199bea22f6b525a0b517396e64801c9163 Mon Sep 17 00:00:00 2001 From: PCoder Date: Thu, 11 Apr 2019 01:39:06 +0200 Subject: [PATCH] Change vm_pool infoextended to retrieve VMs in any state except DONE --- datacenterlight/tasks.py | 2 ++ opennebula_api/models.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/datacenterlight/tasks.py b/datacenterlight/tasks.py index 2779f79b..5f12b7df 100644 --- a/datacenterlight/tasks.py +++ b/datacenterlight/tasks.py @@ -245,6 +245,8 @@ def create_vm_task(self, vm_template_id, user, specs, template, order_id): } email = EmailMessage(**email_data) email.send() + else: + logger.debug("VM's ipv6 is None. Hence not created VMDetail") except Exception as e: logger.error(str(e)) try: diff --git a/opennebula_api/models.py b/opennebula_api/models.py index a348cf86..73dc4405 100644 --- a/opennebula_api/models.py +++ b/opennebula_api/models.py @@ -179,7 +179,7 @@ class OpenNebulaManager(): vm_pool.infoextended( filter_key_value_str='ID={vm_id}'.format(vm_id=vm_id) if vm_id is not None else '', - vm_state=3 # look for VMs only in ACTIVE state + vm_state=-1 # Look for VMs in any state, except DONE ) else: vm_pool.info()