Handling insecure connection
Nova lease handler connects through http but it appears that the connection is redirected to the external fqdn which on test systems can cause the connection to fail because of local self signed certificate.
This commit is contained in:
parent
404d865262
commit
9cf5cc13fe
|
@ -24,6 +24,7 @@ class NovaLeaseHandler:
|
|||
tenant_id=self.conf.get("nova", "tenant_uuid"),
|
||||
api_key=self.conf.get("nova", "password"),
|
||||
auth_url=self.conf.get("nova", "auth_url"),
|
||||
insecure=True, # Insecure to handle test systems
|
||||
connection_pool=False)
|
||||
|
||||
def get_all_vms(self, tenant_uuid):
|
||||
|
@ -44,7 +45,7 @@ class NovaLeaseHandler:
|
|||
def _delete_vm(self, nova, vm_uuid):
|
||||
try:
|
||||
logger.info("Deleting VM %s", vm_uuid)
|
||||
nova.server.delete(vm_uuid)
|
||||
nova.servers.delete(vm_uuid)
|
||||
return SUCCESS_OK
|
||||
except novaclient.exceptions.NotFound:
|
||||
return ERR_NOT_FOUND
|
||||
|
@ -67,4 +68,4 @@ class NovaLeaseHandler:
|
|||
return result
|
||||
except Exception as e:
|
||||
logger.exception("Error deleting vm %s", vms)
|
||||
return result
|
||||
return result
|
||||
|
|
Loading…
Reference in New Issue