Commit 58ea8d17 authored by Michael Hanselmann's avatar Michael Hanselmann

Fix wrong option names in QA and cluster-merge

Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 7cbdc2a2
...@@ -183,7 +183,7 @@ def TestClusterEpo(): ...@@ -183,7 +183,7 @@ def TestClusterEpo():
# Assert that OOB is unavailable for all nodes # Assert that OOB is unavailable for all nodes
result_output = GetCommandOutput(master["primary"], result_output = GetCommandOutput(master["primary"],
"gnt-node list --verbose --no-header -o" "gnt-node list --verbose --no-headers -o"
" powered") " powered")
AssertEqual(compat.all(powered == "(unavail)" AssertEqual(compat.all(powered == "(unavail)"
for powered in result_output.splitlines()), True) for powered in result_output.splitlines()), True)
...@@ -201,7 +201,7 @@ def TestClusterEpo(): ...@@ -201,7 +201,7 @@ def TestClusterEpo():
# All instances should have been stopped now # All instances should have been stopped now
result_output = GetCommandOutput(master["primary"], result_output = GetCommandOutput(master["primary"],
"gnt-instance list --no-header -o status") "gnt-instance list --no-headers -o status")
AssertEqual(compat.all(status == "ADMIN_down" AssertEqual(compat.all(status == "ADMIN_down"
for status in result_output.splitlines()), True) for status in result_output.splitlines()), True)
...@@ -210,7 +210,7 @@ def TestClusterEpo(): ...@@ -210,7 +210,7 @@ def TestClusterEpo():
# All instances should have been started now # All instances should have been started now
result_output = GetCommandOutput(master["primary"], result_output = GetCommandOutput(master["primary"],
"gnt-instance list --no-header -o status") "gnt-instance list --no-headers -o status")
AssertEqual(compat.all(status == "running" AssertEqual(compat.all(status == "running"
for status in result_output.splitlines()), True) for status in result_output.splitlines()), True)
......
...@@ -108,7 +108,7 @@ def TestInstanceReboot(instance): ...@@ -108,7 +108,7 @@ def TestInstanceReboot(instance):
AssertCommand(["gnt-instance", "reboot", name]) AssertCommand(["gnt-instance", "reboot", name])
master = qa_config.GetMasterNode() master = qa_config.GetMasterNode()
cmd = ["gnt-instance", "list", "--no-header", "-o", "status", name] cmd = ["gnt-instance", "list", "--no-headers", "-o", "status", name]
result_output = qa_utils.GetCommandOutput(master["primary"], result_output = qa_utils.GetCommandOutput(master["primary"],
utils.ShellQuoteArgs(cmd)) utils.ShellQuoteArgs(cmd))
AssertEqual(result_output.strip(), constants.INSTST_RUNNING) AssertEqual(result_output.strip(), constants.INSTST_RUNNING)
......
...@@ -400,7 +400,7 @@ def _List(listcmd, fields, names): ...@@ -400,7 +400,7 @@ def _List(listcmd, fields, names):
""" """
master = qa_config.GetMasterNode() master = qa_config.GetMasterNode()
cmd = [listcmd, "list", "--separator=|", "--no-header", cmd = [listcmd, "list", "--separator=|", "--no-headers",
"--output", ",".join(fields)] "--output", ",".join(fields)]
if names: if names:
......
...@@ -192,7 +192,7 @@ class Merger(object): ...@@ -192,7 +192,7 @@ class Merger(object):
utils.WriteFile(key_path, mode=0600, data=result.stdout) utils.WriteFile(key_path, mode=0600, data=result.stdout)
result = self._RunCmd(cluster, "gnt-node list -o name,offline" result = self._RunCmd(cluster, "gnt-node list -o name,offline"
" --no-header --separator=,", private_key=key_path) " --no-headers --separator=,", private_key=key_path)
if result.failed: if result.failed:
raise errors.RemoteError("Unable to retrieve list of nodes from %s." raise errors.RemoteError("Unable to retrieve list of nodes from %s."
" Fail reason: %s; output: %s" % " Fail reason: %s; output: %s" %
...@@ -201,7 +201,7 @@ class Merger(object): ...@@ -201,7 +201,7 @@ class Merger(object):
nodes = [node_status[0] for node_status in nodes_statuses nodes = [node_status[0] for node_status in nodes_statuses
if node_status[1] == "N"] if node_status[1] == "N"]
result = self._RunCmd(cluster, "gnt-instance list -o name --no-header", result = self._RunCmd(cluster, "gnt-instance list -o name --no-headers",
private_key=key_path) private_key=key_path)
if result.failed: if result.failed:
raise errors.RemoteError("Unable to retrieve list of instances from" raise errors.RemoteError("Unable to retrieve list of instances from"
......
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