diff options
Diffstat (limited to 'subplot/vmadm.py')
-rw-r--r-- | subplot/vmadm.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/subplot/vmadm.py b/subplot/vmadm.py index 6997c5b..dcdcbb6 100644 --- a/subplot/vmadm.py +++ b/subplot/vmadm.py @@ -81,6 +81,22 @@ def delete_vm(ctx, config=None, filename=None): runcmd_exit_code_is_zero(ctx) +def shutdown_vm(ctx, config=None, filename=None): + runcmd_run = globals()["runcmd_run"] + runcmd_exit_code_is_zero = globals()["runcmd_exit_code_is_zero"] + + runcmd_run(ctx, ["vmadm", "shutdown", "--config", config, filename]) + runcmd_exit_code_is_zero(ctx) + + +def start_vm(ctx, config=None, filename=None): + runcmd_run = globals()["runcmd_run"] + runcmd_exit_code_is_zero = globals()["runcmd_exit_code_is_zero"] + + runcmd_run(ctx, ["vmadm", "start", "--config", config, filename]) + runcmd_exit_code_is_zero(ctx) + + def run_hostname_over_ssh(ctx, config=None, target=None, args=None): runcmd_run = globals()["runcmd_run"] runcmd_exit_code_is_zero = globals()["runcmd_exit_code_is_zero"] |