Revision 8d8d650c scripts/gnt-backup
b/scripts/gnt-backup | ||
---|---|---|
71 | 71 |
@return: the desired exit code |
72 | 72 |
|
73 | 73 |
""" |
74 |
ignore_remove_failures = opts.ignore_remove_failures |
|
75 |
|
|
74 | 76 |
op = opcodes.OpExportInstance(instance_name=args[0], |
75 | 77 |
target_node=opts.node, |
76 | 78 |
shutdown=opts.shutdown, |
77 |
shutdown_timeout=opts.shutdown_timeout) |
|
79 |
shutdown_timeout=opts.shutdown_timeout, |
|
80 |
remove_instance=opts.remove_instance, |
|
81 |
ignore_remove_failures=ignore_remove_failures) |
|
78 | 82 |
|
79 | 83 |
fin_resu, dlist = SubmitOpCode(op) |
80 | 84 |
if not isinstance(dlist, list): |
... | ... | |
97 | 101 |
rcode = 1 |
98 | 102 |
return rcode |
99 | 103 |
|
104 |
|
|
100 | 105 |
def ImportInstance(opts, args): |
101 | 106 |
"""Add an instance to the cluster. |
102 | 107 |
|
... | ... | |
144 | 149 |
SUBMIT_OPT, |
145 | 150 |
] |
146 | 151 |
|
152 |
|
|
147 | 153 |
commands = { |
148 | 154 |
'list': ( |
149 | 155 |
PrintExportList, ARGS_NONE, |
... | ... | |
151 | 157 |
"", "Lists instance exports available in the ganeti cluster"), |
152 | 158 |
'export': ( |
153 | 159 |
ExportInstance, ARGS_ONE_INSTANCE, |
154 |
[FORCE_OPT, SINGLE_NODE_OPT, NOSHUTDOWN_OPT, SHUTDOWN_TIMEOUT_OPT], |
|
160 |
[FORCE_OPT, SINGLE_NODE_OPT, NOSHUTDOWN_OPT, SHUTDOWN_TIMEOUT_OPT, |
|
161 |
REMOVE_INSTANCE_OPT, IGNORE_REMOVE_FAILURES_OPT], |
|
155 | 162 |
"-n <target_node> [opts...] <name>", |
156 | 163 |
"Exports an instance to an image"), |
157 | 164 |
'import': ( |
Also available in: Unified diff