def stop(args): options = { "mandatory": ["name"], "optional" : [], } check_args(args, options) virt = Virt(hosts()) virt.stop(args["name"])
def stop(args): options = { "mandatory": ["name"], "optional": [], } check_args(args, options) virt = Virt(hosts()) virt.stop(args["name"])
def test_stop_not_exist_exception(): virt = Virt() virt.stop("not_exist")
def test_already_stopped_exception(): virt = Virt() virt.stop("test") virt.stop("test")
def test_start_and_stop(): virt = Virt() eq_(virt.stop("test"), 0) eq_(virt.start("test"), 0)