Example #1
0
File: vm.py Project: hfm/maglica
def stop(args):
    options = {
        "mandatory": ["name"],
        "optional" : [],
    }
    check_args(args, options)

    virt = Virt(hosts())
    virt.stop(args["name"])
Example #2
0
def stop(args):
    options = {
        "mandatory": ["name"],
        "optional": [],
    }
    check_args(args, options)

    virt = Virt(hosts())
    virt.stop(args["name"])
Example #3
0
File: virt.py Project: hfm/maglica
def test_stop_not_exist_exception():
    virt = Virt()
    virt.stop("not_exist")
Example #4
0
File: virt.py Project: hfm/maglica
def test_already_stopped_exception():
    virt = Virt()
    virt.stop("test")
    virt.stop("test")
Example #5
0
File: virt.py Project: hfm/maglica
def test_start_and_stop():
    virt = Virt()
    eq_(virt.stop("test"), 0)
    eq_(virt.start("test"), 0)