Commit e42b5307 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Insert hook calls.

Reviewed-by: schreiberal
parent 663ed0ce
......@@ -51,6 +51,7 @@ def _CheckFileOnAllNodes(filename, content):
content)
@qa_utils.DefineHook('cluster-init')
def TestClusterInit():
"""gnt-cluster init"""
master = qa_config.GetMasterNode()
......@@ -71,6 +72,7 @@ def TestClusterInit():
utils.ShellQuoteArgs(cmd)).wait(), 0)
@qa_utils.DefineHook('cluster-verify')
def TestClusterVerify():
"""gnt-cluster verify"""
master = qa_config.GetMasterNode()
......@@ -80,6 +82,7 @@ def TestClusterVerify():
utils.ShellQuoteArgs(cmd)).wait(), 0)
@qa_utils.DefineHook('cluster-info')
def TestClusterInfo():
"""gnt-cluster info"""
master = qa_config.GetMasterNode()
......@@ -89,6 +92,7 @@ def TestClusterInfo():
utils.ShellQuoteArgs(cmd)).wait(), 0)
@qa_utils.DefineHook('cluster-getmaster')
def TestClusterGetmaster():
"""gnt-cluster getmaster"""
master = qa_config.GetMasterNode()
......@@ -98,6 +102,7 @@ def TestClusterGetmaster():
utils.ShellQuoteArgs(cmd)).wait(), 0)
@qa_utils.DefineHook('cluster-version')
def TestClusterVersion():
"""gnt-cluster version"""
master = qa_config.GetMasterNode()
......@@ -107,6 +112,7 @@ def TestClusterVersion():
utils.ShellQuoteArgs(cmd)).wait(), 0)
@qa_utils.DefineHook('cluster-burnin')
def TestClusterBurnin():
"""Burnin"""
master = qa_config.GetMasterNode()
......@@ -143,6 +149,7 @@ def TestClusterBurnin():
qa_config.ReleaseInstance(inst)
@qa_utils.DefineHook('cluster-master-failover')
def TestClusterMasterFailover():
"""gnt-cluster masterfailover"""
master = qa_config.GetMasterNode()
......@@ -160,6 +167,7 @@ def TestClusterMasterFailover():
qa_config.ReleaseNode(failovermaster)
@qa_utils.DefineHook('cluster-copyfile')
def TestClusterCopyfile():
"""gnt-cluster copyfile"""
master = qa_config.GetMasterNode()
......@@ -184,6 +192,7 @@ def TestClusterCopyfile():
_RemoveFileFromAllNodes(testname)
@qa_utils.DefineHook('cluster-command')
def TestClusterCommand():
"""gnt-cluster command"""
master = qa_config.GetMasterNode()
......@@ -201,6 +210,7 @@ def TestClusterCommand():
_RemoveFileFromAllNodes(rfile)
@qa_utils.DefineHook('cluster-destroy')
def TestClusterDestroy():
"""gnt-cluster destroy"""
master = qa_config.GetMasterNode()
......
......@@ -63,22 +63,26 @@ def _DiskTest(node, disk_template):
raise
@qa_utils.DefineHook('instance-add-plain-disk')
def TestInstanceAddWithPlainDisk(node):
"""gnt-instance add -t plain"""
return _DiskTest(node['primary'], 'plain')
@qa_utils.DefineHook('instance-add-local-mirror-disk')
def TestInstanceAddWithLocalMirrorDisk(node):
"""gnt-instance add -t local_raid1"""
return _DiskTest(node['primary'], 'local_raid1')
@qa_utils.DefineHook('instance-add-remote-raid-disk')
def TestInstanceAddWithRemoteRaidDisk(node, node2):
"""gnt-instance add -t remote_raid1"""
return _DiskTest("%s:%s" % (node['primary'], node2['primary']),
'remote_raid1')
@qa_utils.DefineHook('instance-remove')
def TestInstanceRemove(instance):
"""gnt-instance remove"""
master = qa_config.GetMasterNode()
......@@ -90,6 +94,7 @@ def TestInstanceRemove(instance):
qa_config.ReleaseInstance(instance)
@qa_utils.DefineHook('instance-startup')
def TestInstanceStartup(instance):
"""gnt-instance startup"""
master = qa_config.GetMasterNode()
......@@ -99,6 +104,7 @@ def TestInstanceStartup(instance):
utils.ShellQuoteArgs(cmd)).wait(), 0)
@qa_utils.DefineHook('instance-shutdown')
def TestInstanceShutdown(instance):
"""gnt-instance shutdown"""
master = qa_config.GetMasterNode()
......@@ -108,6 +114,7 @@ def TestInstanceShutdown(instance):
utils.ShellQuoteArgs(cmd)).wait(), 0)
@qa_utils.DefineHook('instance-reinstall')
def TestInstanceReinstall(instance):
"""gnt-instance reinstall"""
master = qa_config.GetMasterNode()
......@@ -117,6 +124,7 @@ def TestInstanceReinstall(instance):
utils.ShellQuoteArgs(cmd)).wait(), 0)
@qa_utils.DefineHook('instance-failover')
def TestInstanceFailover(instance):
"""gnt-instance failover"""
master = qa_config.GetMasterNode()
......@@ -126,6 +134,7 @@ def TestInstanceFailover(instance):
utils.ShellQuoteArgs(cmd)).wait(), 0)
@qa_utils.DefineHook('instance-info')
def TestInstanceInfo(instance):
"""gnt-instance info"""
master = qa_config.GetMasterNode()
......@@ -135,6 +144,7 @@ def TestInstanceInfo(instance):
utils.ShellQuoteArgs(cmd)).wait(), 0)
@qa_utils.DefineHook('instance-list')
def TestInstanceList():
"""gnt-instance list"""
master = qa_config.GetMasterNode()
......@@ -144,6 +154,7 @@ def TestInstanceList():
utils.ShellQuoteArgs(cmd)).wait(), 0)
@qa_utils.DefineHook('backup-export')
def TestInstanceExport(instance, node):
"""gnt-backup export"""
master = qa_config.GetMasterNode()
......@@ -155,6 +166,7 @@ def TestInstanceExport(instance, node):
return qa_utils.ResolveInstanceName(instance)
@qa_utils.DefineHook('backup-import')
def TestInstanceImport(node, newinst, expnode, name):
"""gnt-backup import"""
master = qa_config.GetMasterNode()
......@@ -171,6 +183,7 @@ def TestInstanceImport(node, newinst, expnode, name):
utils.ShellQuoteArgs(cmd)).wait(), 0)
@qa_utils.DefineHook('backup-list')
def TestBackupList(expnode):
"""gnt-backup list"""
master = qa_config.GetMasterNode()
......
......@@ -25,6 +25,7 @@ import qa_utils
from qa_utils import AssertEqual, StartSSH
@qa_utils.DefineHook('node-add')
def _NodeAdd(node):
master = qa_config.GetMasterNode()
......@@ -41,6 +42,7 @@ def _NodeAdd(node):
node['_added'] = True
@qa_utils.DefineHook('node-remove')
def _NodeRemove(node):
master = qa_config.GetMasterNode()
......@@ -66,6 +68,7 @@ def TestNodeRemoveAll():
_NodeRemove(node)
@qa_utils.DefineHook('node-info')
def TestNodeInfo():
"""gnt-node info"""
master = qa_config.GetMasterNode()
......@@ -75,6 +78,7 @@ def TestNodeInfo():
utils.ShellQuoteArgs(cmd)).wait(), 0)
@qa_utils.DefineHook('node-volumes')
def TestNodeVolumes():
"""gnt-node volumes"""
master = qa_config.GetMasterNode()
......@@ -84,6 +88,7 @@ def TestNodeVolumes():
utils.ShellQuoteArgs(cmd)).wait(), 0)
@qa_utils.DefineHook('node-failover')
def TestNodeFailover(node, node2):
"""gnt-node failover"""
master = qa_config.GetMasterNode()
......@@ -104,6 +109,7 @@ def TestNodeFailover(node, node2):
utils.ShellQuoteArgs(cmd)).wait(), 0)
@qa_utils.DefineHook('node-evacuate')
def TestNodeEvacuate(node, node2):
"""gnt-node evacuate"""
master = qa_config.GetMasterNode()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment