forked from 3wordchant/capsul-flask
first try at implementing the vm start and stop feature
This commit is contained in:
@ -144,8 +144,8 @@ class CapsulFlaskHub(VirtualizationInterface):
|
||||
for result in results:
|
||||
try:
|
||||
result_body = json.loads(result.body)
|
||||
if isinstance(result_body, dict) and ('ipv4' in result_body or 'ipv6' in result_body):
|
||||
return VirtualMachine(id, host=host, ipv4=result_body['ipv4'], ipv6=result_body['ipv6'], ssh_host_keys=result_body['ssh_host_keys'])
|
||||
if isinstance(result_body, dict) and ('state' in result_body):
|
||||
return VirtualMachine(id, host=host, state=result_body['state'], ipv4=result_body['ipv4'], ipv6=result_body['ipv6'], ssh_host_keys=result_body['ssh_host_keys'])
|
||||
except:
|
||||
pass
|
||||
|
||||
|
Reference in New Issue
Block a user