def TestGroupAddRemoveRename():
"""gnt-group add/remove/rename"""
- groups = qa_config.get("groups", {})
-
existing_group_with_nodes = GetDefaultGroup()
- group1, group2, group3 = groups.get("inexistent-groups",
- ["group1", "group2", "group3"])[:3]
+ (group1, group2, group3) = qa_utils.GetNonexistentGroups(3)
AssertCommand(["gnt-group", "add", group1])
AssertCommand(["gnt-group", "add", group2])
def TestGroupAddWithOptions():
"""gnt-group add with options"""
- groups = qa_config.get("groups", {})
- group1 = groups.get("inexistent-groups", ["group1"])[0]
+ (group1, ) = qa_utils.GetNonexistentGroups(1)
AssertCommand(["gnt-group", "add", "--alloc-policy", "notvalid", group1],
fail=True)
def TestGroupModify():
"""gnt-group modify"""
- groups = qa_config.get("groups", {})
- group1 = groups.get("inexistent-groups", ["group1"])[0]
+ (group1, ) = qa_utils.GetNonexistentGroups(1)
AssertCommand(["gnt-group", "add", group1])
"min=%s,max=%s,std=0" % (min_v, max_v), group1], fail=True)
AssertCommand(["gnt-group", "modify", "--specs-mem-size",
"min=%s,max=%s" % (min_v, max_v), group1])
+ AssertCommand(["gnt-group", "modify", "--specs-mem-size",
+ "min=default,max=default", group1])
+ AssertCommand(["gnt-group", "modify", "--ipolicy-vcpu-ratio",
+ "3.5", group1])
+ AssertCommand(["gnt-group", "modify", "--ipolicy-vcpu-ratio",
+ "default", group1])
AssertCommand(["gnt-group", "modify",
"--node-parameters", "spindle_count=10", group1])
if qa_config.TestEnabled("htools"):
"""
assert node1 != node2
- groups = qa_config.get("groups", {})
- other_group = groups.get("inexistent-groups", ["group1"])[0]
+
+ (other_group, ) = qa_utils.GetNonexistentGroups(1)
master_node = qa_config.GetMasterNode()["primary"]