Revision bc696589
b/qa/ganeti-qa.py | ||
---|---|---|
204 | 204 |
|
205 | 205 |
""" |
206 | 206 |
if qa_config.TestEnabled('instance-export'): |
207 |
RunTest(qa_instance.TestInstanceExportNoTarget, instance) |
|
208 |
|
|
207 | 209 |
expnode = qa_config.AcquireNode(exclude=pnode) |
208 | 210 |
try: |
209 | 211 |
name = RunTest(qa_instance.TestInstanceExport, instance, expnode) |
b/qa/qa_instance.py | ||
---|---|---|
280 | 280 |
|
281 | 281 |
|
282 | 282 |
def TestInstanceExport(instance, node): |
283 |
"""gnt-backup export""" |
|
283 |
"""gnt-backup export -n ..."""
|
|
284 | 284 |
master = qa_config.GetMasterNode() |
285 | 285 |
|
286 | 286 |
cmd = ['gnt-backup', 'export', '-n', node['primary'], instance['name']] |
... | ... | |
300 | 300 |
utils.ShellQuoteArgs(cmd)).wait(), 0) |
301 | 301 |
|
302 | 302 |
|
303 |
def TestInstanceExportNoTarget(instance): |
|
304 |
"""gnt-backup export (without target node, should fail)""" |
|
305 |
master = qa_config.GetMasterNode() |
|
306 |
|
|
307 |
cmd = ["gnt-backup", "export", instance["name"]] |
|
308 |
AssertNotEqual(StartSSH(master['primary'], |
|
309 |
utils.ShellQuoteArgs(cmd)).wait(), 0) |
|
310 |
|
|
311 |
|
|
303 | 312 |
def TestInstanceImport(node, newinst, expnode, name): |
304 | 313 |
"""gnt-backup import""" |
305 | 314 |
master = qa_config.GetMasterNode() |
b/scripts/gnt-backup | ||
---|---|---|
31 | 31 |
from ganeti.cli import * |
32 | 32 |
from ganeti import opcodes |
33 | 33 |
from ganeti import constants |
34 |
from ganeti import errors |
|
34 | 35 |
|
35 | 36 |
|
36 | 37 |
_VALUE_TRUE = "true" |
... | ... | |
73 | 74 |
""" |
74 | 75 |
ignore_remove_failures = opts.ignore_remove_failures |
75 | 76 |
|
77 |
if not opts.node: |
|
78 |
raise errors.OpPrereqError("Target node must be specified") |
|
79 |
|
|
76 | 80 |
op = opcodes.OpExportInstance(instance_name=args[0], |
77 | 81 |
target_node=opts.node, |
78 | 82 |
shutdown=opts.shutdown, |
Also available in: Unified diff