Revision 1ba25bad
b/qa/qa_instance.py | ||
---|---|---|
422 | 422 |
# check no-modify |
423 | 423 |
AssertCommand(["gnt-instance", "modify", instance["name"]], fail=True) |
424 | 424 |
|
425 |
# Marking offline/online while instance is running must fail |
|
426 |
for arg in ["--online", "--offline"]: |
|
427 |
AssertCommand(["gnt-instance", "modify", arg, instance["name"]], fail=True) |
|
425 |
# Marking offline while instance is running must fail... |
|
426 |
AssertCommand(["gnt-instance", "modify", "--offline", instance["name"]], |
|
427 |
fail=True) |
|
428 |
|
|
429 |
# ...while making it online is ok, and should work |
|
430 |
AssertCommand(["gnt-instance", "modify", "--online", instance["name"]]) |
|
428 | 431 |
|
429 | 432 |
|
430 | 433 |
@InstanceCheck(INST_DOWN, INST_DOWN, FIRST_ARG) |
... | ... | |
438 | 441 |
# Mark instance as offline |
439 | 442 |
AssertCommand(["gnt-instance", "modify", "--offline", name]) |
440 | 443 |
|
444 |
# When the instance is offline shutdown should only work with --force, |
|
445 |
# while start should never work |
|
446 |
AssertCommand(["gnt-instance", "shutdown", name], fail=True) |
|
447 |
AssertCommand(["gnt-instance", "shutdown", "--force", name]) |
|
448 |
AssertCommand(["gnt-instance", "start", name], fail=True) |
|
449 |
AssertCommand(["gnt-instance", "start", "--force", name], fail=True) |
|
450 |
|
|
451 |
# Also do offline to offline |
|
452 |
AssertCommand(["gnt-instance", "modify", "--offline", name]) |
|
453 |
|
|
441 | 454 |
# And online again |
442 | 455 |
AssertCommand(["gnt-instance", "modify", "--online", name]) |
443 | 456 |
|
Also available in: Unified diff