Revision 4b10fb65 qa/qa_group.py
b/qa/qa_group.py | ||
---|---|---|
53 | 53 |
AssertCommand(["gnt-group", "rename", group1, existing_group_with_nodes]) |
54 | 54 |
|
55 | 55 |
|
56 |
def TestGroupAddWithOptions(): |
|
57 |
"""gnt-group add with options""" |
|
58 |
groups = qa_config.get("groups", {}) |
|
59 |
group1 = groups.get("inexistent-groups", ["group1"])[0] |
|
60 |
|
|
61 |
AssertCommand(["gnt-group", "add", "--alloc-policy", "notvalid", group1], |
|
62 |
fail=True) |
|
63 |
|
|
64 |
AssertCommand(["gnt-group", "add", "--alloc-policy", "last_resort", |
|
65 |
"--node-parameters", "oob_program=/bin/true", group1]) |
|
66 |
|
|
67 |
AssertCommand(["gnt-group", "remove", group1]) |
|
68 |
|
|
69 |
|
|
70 |
def TestGroupModify(): |
|
71 |
"""gnt-group modify""" |
|
72 |
groups = qa_config.get("groups", {}) |
|
73 |
group1 = groups.get("inexistent-groups", ["group1"])[0] |
|
74 |
|
|
75 |
AssertCommand(["gnt-group", "add", group1]) |
|
76 |
|
|
77 |
try: |
|
78 |
AssertCommand(["gnt-group", "modify", "--alloc-policy", "unallocable", |
|
79 |
"--node-parameters", "oob_program=/bin/false", group1]) |
|
80 |
AssertCommand(["gnt-group", "modify", |
|
81 |
"--alloc-policy", "notvalid", group1], fail=True) |
|
82 |
finally: |
|
83 |
AssertCommand(["gnt-group", "remove", group1]) |
|
84 |
|
|
85 |
|
|
56 | 86 |
def TestGroupListDefaultFields(): |
57 | 87 |
"""gnt-group list""" |
58 | 88 |
AssertCommand(["gnt-group", "list"]) |
Also available in: Unified diff