From 0b85784fd3fa5726fadd63c56fdd9d718d2d6058 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 11 May 2019 01:56:00 +0200 Subject: [PATCH] No need to manage ssh keys after VM is created The ssh keys are added at the time the VM is created or later --- datacenterlight/tasks.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/datacenterlight/tasks.py b/datacenterlight/tasks.py index a4d2ebe7..808f6c61 100644 --- a/datacenterlight/tasks.py +++ b/datacenterlight/tasks.py @@ -190,17 +190,8 @@ def create_vm_task(self, vm_template_id, user, specs, template, order_id): email = BaseEmail(**email_data) email.send() - # try to see if we have the IPv6 of the new vm and that if the ssh - # keys can be configured - vm_ipv6 = manager.get_ipv6(vm_id) logger.debug("New VM ID is {vm_id}".format(vm_id=vm_id)) - if vm_ipv6 is not None: - get_or_create_vm_detail(custom_user, manager, vm_id) - if custom_user is not None: - public_keys = get_all_public_keys(custom_user) - manager.save_key_in_opennebula('\n'.join(public_keys)) - else: - logger.debug("VM's ipv6 is None. Hence not created VMDetail") + get_or_create_vm_detail(custom_user, manager, vm_id) except Exception as e: logger.error(str(e)) try: