Change vm_pool infoextended to retrieve VMs in any state except DONE

This commit is contained in:
PCoder 2019-04-11 01:39:06 +02:00
parent 3f75fac158
commit 5f8cc2199b
2 changed files with 3 additions and 1 deletions

View file

@ -245,6 +245,8 @@ def create_vm_task(self, vm_template_id, user, specs, template, order_id):
} }
email = EmailMessage(**email_data) email = EmailMessage(**email_data)
email.send() email.send()
else:
logger.debug("VM's ipv6 is None. Hence not created VMDetail")
except Exception as e: except Exception as e:
logger.error(str(e)) logger.error(str(e))
try: try:

View file

@ -179,7 +179,7 @@ class OpenNebulaManager():
vm_pool.infoextended( vm_pool.infoextended(
filter_key_value_str='ID={vm_id}'.format(vm_id=vm_id) if filter_key_value_str='ID={vm_id}'.format(vm_id=vm_id) if
vm_id is not None else '', 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: else:
vm_pool.info() vm_pool.info()