#
#
-# Copyright (C) 2007, 2011 Google Inc.
+# Copyright (C) 2007, 2011, 2012 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
node["_added"] = False
+def MakeNodeOffline(node, value):
+ """gnt-node modify --offline=value"""
+ # value in ["yes", "no"]
+ AssertCommand(["gnt-node", "modify", "--offline", value, node["primary"]])
+
+
def TestNodeAddAll():
"""Adding all nodes to cluster."""
master = qa_config.GetMasterNode()
AssertCommand(["gnt-node", "modify", "--master-candidate=yes",
"--auto-promote", node["primary"]])
+ # Test setting secondary IP address
+ AssertCommand(["gnt-node", "modify", "--secondary-ip=%s" % node["secondary"],
+ node["primary"]])
+
def _CreateOobScriptStructure():
"""Create a simple OOB handling script and its structure."""
def TestNodeListFields():
"""gnt-node list-fields"""
qa_utils.GenericQueryFieldsTest("gnt-node", query.NODE_FIELDS.keys())
+
+
+def TestNodeListDrbd(node):
+ """gnt-node list-drbd"""
+ AssertCommand(["gnt-node", "list-drbd", node["primary"]])