Revision fe508a9d
b/qa/ganeti-qa.py | ||
---|---|---|
298 | 298 |
RunTestIf("group-rwops", qa_group.TestGroupAddWithOptions) |
299 | 299 |
RunTestIf("group-rwops", qa_group.TestGroupModify) |
300 | 300 |
RunTestIf(["group-rwops", "rapi"], qa_rapi.TestRapiNodeGroups) |
301 |
RunTestIf(["group-rwops", "tags"], qa_tags.TestGroupTags, |
|
302 |
qa_group.GetDefaultGroup()) |
|
301 | 303 |
|
302 | 304 |
|
303 | 305 |
def RunExportImportTests(instance, pnode, snode): |
b/qa/qa_group.py | ||
---|---|---|
33 | 33 |
from qa_utils import AssertCommand, AssertEqual, GetCommandOutput |
34 | 34 |
|
35 | 35 |
|
36 |
def GetDefaultGroup(): |
|
37 |
"""Returns the default node group. |
|
38 |
|
|
39 |
""" |
|
40 |
groups = qa_config.get("groups", {}) |
|
41 |
return groups.get("group-with-nodes", constants.INITIAL_NODE_GROUP_NAME) |
|
42 |
|
|
43 |
|
|
36 | 44 |
def TestGroupAddRemoveRename(): |
37 | 45 |
"""gnt-group add/remove/rename""" |
38 | 46 |
groups = qa_config.get("groups", {}) |
39 | 47 |
|
40 |
existing_group_with_nodes = groups.get("group-with-nodes",
|
|
41 |
constants.INITIAL_NODE_GROUP_NAME) |
|
48 |
existing_group_with_nodes = GetDefaultGroup()
|
|
49 |
|
|
42 | 50 |
group1, group2, group3 = groups.get("inexistent-groups", |
43 | 51 |
["group1", "group2", "group3"])[:3] |
44 | 52 |
|
b/qa/qa_rapi.py | ||
---|---|---|
415 | 415 |
uri = "/2/nodes/%s/tags" % name |
416 | 416 |
elif kind == constants.TAG_INSTANCE: |
417 | 417 |
uri = "/2/instances/%s/tags" % name |
418 |
elif kind == constants.TAG_NODEGROUP: |
|
419 |
uri = "/2/groups/%s/tags" % name |
|
418 | 420 |
else: |
419 | 421 |
raise errors.ProgrammerError("Unknown tag kind") |
420 | 422 |
|
b/qa/qa_tags.py | ||
---|---|---|
34 | 34 |
constants.TAG_CLUSTER: "gnt-cluster", |
35 | 35 |
constants.TAG_NODE: "gnt-node", |
36 | 36 |
constants.TAG_INSTANCE: "gnt-instance", |
37 |
constants.TAG_NODEGROUP: "gnt-group", |
|
37 | 38 |
} |
38 | 39 |
|
39 | 40 |
|
... | ... | |
71 | 72 |
_TestTags(constants.TAG_NODE, node["primary"]) |
72 | 73 |
|
73 | 74 |
|
75 |
def TestGroupTags(group): |
|
76 |
"""gnt-group tags""" |
|
77 |
_TestTags(constants.TAG_NODEGROUP, group) |
|
78 |
|
|
79 |
|
|
74 | 80 |
def TestInstanceTags(instance): |
75 | 81 |
"""gnt-instance tags""" |
76 | 82 |
_TestTags(constants.TAG_INSTANCE, instance["name"]) |
Also available in: Unified diff