_SetupColours()
+def AssertIn(item, sequence):
+ """Raises an error when item is not in sequence.
+
+ """
+ if item not in sequence:
+ raise qa_error.Error('%r not in %r' % (item, sequence))
+
+
def AssertEqual(first, second):
"""Raises an error when values aren't equal.
- strict: Whether to enable strict host key checking
"""
- args = [ 'ssh', '-oEscapeChar=none', '-oBatchMode=yes', '-l', 'root' ]
+ args = [ 'ssh', '-oEscapeChar=none', '-oBatchMode=yes', '-l', 'root', '-t' ]
if strict:
tmp = 'yes'
args.append('-oClearAllForwardings=yes')
args.append('-oForwardAgent=yes')
args.append(node)
-
- if qa_config.options.dry_run:
- prefix = 'exit 0; '
- else:
- prefix = ''
-
- args.append(prefix + cmd)
+ args.append(cmd)
print 'SSH:', utils.ShellQuoteArgs(args)