Revision 250a9404 qa/qa_node.py
b/qa/qa_node.py | ||
---|---|---|
422 | 422 |
def TestNodeListDrbd(node): |
423 | 423 |
"""gnt-node list-drbd""" |
424 | 424 |
AssertCommand(["gnt-node", "list-drbd", node["primary"]]) |
425 |
|
|
426 |
|
|
427 |
def _BuildSetESCmd(action, value, node_name): |
|
428 |
cmd = ["gnt-node"] |
|
429 |
if action == "add": |
|
430 |
cmd.extend(["add", "--readd"]) |
|
431 |
else: |
|
432 |
cmd.append("modify") |
|
433 |
cmd.extend(["--node-parameters", "exclusive_storage=%s" % value, node_name]) |
|
434 |
return cmd |
|
435 |
|
|
436 |
|
|
437 |
def TestExclStorSingleNode(node): |
|
438 |
"""gnt-node add/modify cannot change the exclusive_storage flag. |
|
439 |
|
|
440 |
""" |
|
441 |
for action in ["add", "modify"]: |
|
442 |
for value in (True, False, "default"): |
|
443 |
AssertCommand(_BuildSetESCmd(action, value, node["primary"]), fail=True) |
Also available in: Unified diff