RunTest(qa_instance.TestInstanceReinstall, instance)
RunTest(qa_instance.TestInstanceStartup, instance)
+ if qa_config.TestEnabled('instance-reboot'):
+ RunTest(qa_instance.TestInstanceReboot, instance)
+
if qa_config.TestEnabled('tags'):
RunTest(qa_tags.TestInstanceTags, instance)
utils.ShellQuoteArgs(cmd)).wait(), 0)
+@qa_utils.DefineHook('instance-reboot')
+def TestInstanceReboot(instance):
+ """gnt-instance reboot"""
+ master = qa_config.GetMasterNode()
+
+ for reboottype in ["soft", "hard", "full"]:
+ cmd = ['gnt-instance', 'reboot', '--type=%s' % reboottype,
+ instance['name']]
+ AssertEqual(StartSSH(master['primary'],
+ utils.ShellQuoteArgs(cmd)).wait(), 0)
+
+
@qa_utils.DefineHook('instance-reinstall')
def TestInstanceReinstall(instance):
"""gnt-instance reinstall"""