Implement command running through pylxd
parent
ac11b1c359
commit
f3e0495f12
|
@ -24,3 +24,10 @@ def destroy_instance(container_name: str):
|
|||
instance.delete(wait=True)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
def execute_command(container_name: str, command: str):
|
||||
instance = lxd_client.instances.get(container_name)
|
||||
result_tuple = instance.execute([command])
|
||||
|
||||
return result_tuple
|
||||
|
|
Loading…
Reference in New Issue