#
#
-# Copyright (C) 2010 Google Inc.
+# Copyright (C) 2010, 2011 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
# 02110-1301, USA.
+"""QA tests for node groups.
+
+"""
+
from ganeti import constants
from ganeti import query
from ganeti import utils
from qa_utils import AssertCommand, AssertEqual, GetCommandOutput
+def GetDefaultGroup():
+ """Returns the default node group.
+
+ """
+ groups = qa_config.get("groups", {})
+ return groups.get("group-with-nodes", constants.INITIAL_NODE_GROUP_NAME)
+
+
def TestGroupAddRemoveRename():
"""gnt-group add/remove/rename"""
groups = qa_config.get("groups", {})
- existing_group_with_nodes = groups.get("group-with-nodes",
- constants.INITIAL_NODE_GROUP_NAME)
+ existing_group_with_nodes = GetDefaultGroup()
+
group1, group2, group3 = groups.get("inexistent-groups",
["group1", "group2", "group3"])[:3]