from qa_utils import AssertEqual, StartSSH
-@qa_utils.DefineHook('node-add')
def _NodeAdd(node, readd=False):
master = qa_config.GetMasterNode()
if not readd and node.get('_added', False):
raise qa_error.Error("Node %s already in cluster" % node['primary'])
elif readd and not node.get('_added', False):
- raise qa_error.Error("Node not yet %s in cluster" % node['primary'])
+ raise qa_error.Error("Node %s not yet in cluster" % node['primary'])
- cmd = ['gnt-node', 'add']
+ cmd = ['gnt-node', 'add', "--no-ssh-key-check"]
if node.get('secondary', None):
cmd.append('--secondary-ip=%s' % node['secondary'])
if readd:
node['_added'] = True
-@qa_utils.DefineHook('node-remove')
def _NodeRemove(node):
master = qa_config.GetMasterNode()
_NodeRemove(node)
-@qa_utils.DefineHook('node-readd')
def TestNodeReadd(node):
"""gnt-node add --readd"""
_NodeAdd(node, readd=True)
-@qa_utils.DefineHook('node-info')
def TestNodeInfo():
"""gnt-node info"""
master = qa_config.GetMasterNode()
utils.ShellQuoteArgs(cmd)).wait(), 0)
-@qa_utils.DefineHook('node-volumes')
def TestNodeVolumes():
"""gnt-node volumes"""
master = qa_config.GetMasterNode()
utils.ShellQuoteArgs(cmd)).wait(), 0)
-@qa_utils.DefineHook('node-failover')
def TestNodeFailover(node, node2):
"""gnt-node failover"""
master = qa_config.GetMasterNode()
utils.ShellQuoteArgs(cmd)).wait(), 0)
-@qa_utils.DefineHook('node-evacuate')
def TestNodeEvacuate(node, node2):
"""gnt-node evacuate"""
master = qa_config.GetMasterNode()