From 22d3b1f83c465dd1bbda416c731de1b3692dfba4 Mon Sep 17 00:00:00 2001 From: PCoder Date: Thu, 10 Dec 2020 09:05:04 +0530 Subject: [PATCH] Add vm_type to the log info --- datacenterlight/management/commands/check_vm_templates.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/datacenterlight/management/commands/check_vm_templates.py b/datacenterlight/management/commands/check_vm_templates.py index 6346be50..6424df80 100644 --- a/datacenterlight/management/commands/check_vm_templates.py +++ b/datacenterlight/management/commands/check_vm_templates.py @@ -41,15 +41,17 @@ class Command(BaseCommand): ) if vm_id and vm_id > 0: result_dict[vm_name] = "%s OK, created VM %s" % ( - '%s %s' % (vm_template.opennebula_vm_template_id, - vm_template.name), + '%s %s %s' % (vm_template.opennebula_vm_template_id, + vm_template.name, vm_template.vm_type), vm_id ) self.stdout.write(self.style.SUCCESS(result_dict[vm_name])) manager.delete_vm(vm_id) else: result_dict[vm_name] = '''Error creating VM %s, template_id - %s ''' % (vm_name, vm_template.opennebula_vm_template_id) + %s %s''' % (vm_name, + vm_template.opennebula_vm_template_id, + vm_template.vm_type) self.stdout.write(self.style.ERROR(result_dict[vm_name])) sleep(1) date_str = datetime.datetime.strftime(