719.1.1
by John George
Add start_libvirt_domain.py, stop_libvirt_domain.py and consolidate verify_libvirt_domain functions. |
1 |
#!/usr/bin/env python
|
2 |
from argparse import ArgumentParser |
|
719.1.3
by John George
Move libvirt_domain functions from jujupy to substrate. |
3 |
from substrate import stop_libvirt_domain |
719.1.1
by John George
Add start_libvirt_domain.py, stop_libvirt_domain.py and consolidate verify_libvirt_domain functions. |
4 |
|
5 |
||
6 |
def main(): |
|
7 |
parser = ArgumentParser() |
|
8 |
parser.add_argument('--URI', help='Hypervisor URI', |
|
9 |
default='qemu+ssh://localhost/system') |
|
10 |
parser.add_argument('domain', help='The name of the libvirt domain to ' |
|
11 |
'stop.') |
|
12 |
args = parser.parse_args() |
|
13 |
print("Attempting to stop %s at %s" % (args.domain, args.URI)) |
|
14 |
status_msg = stop_libvirt_domain(args.URI, args.domain) |
|
15 |
print("%s" % status_msg) |
|
16 |
||
17 |
if __name__ == '__main__': |
|
18 |
main() |