Revision decd5f45 scripts/gnt-instance
b/scripts/gnt-instance | ||
---|---|---|
239 | 239 |
return 0 |
240 | 240 |
|
241 | 241 |
|
242 |
def RenameInstance(opts, args): |
|
243 |
"""Reinstall an instance. |
|
244 |
|
|
245 |
Args: |
|
246 |
opts - class with options as members |
|
247 |
args - list containing two elements, the instance name and the new name |
|
248 |
|
|
249 |
""" |
|
250 |
op = opcodes.OpRenameInstance(instance_name=args[0], |
|
251 |
new_name=args[1], |
|
252 |
ignore_ip=opts.ignore_ip) |
|
253 |
SubmitOpCode(op) |
|
254 |
|
|
255 |
return 0 |
|
256 |
|
|
257 |
|
|
242 | 258 |
def ActivateDisks(opts, args): |
243 | 259 |
"""Activate an instance's disks. |
244 | 260 |
|
... | ... | |
270 | 286 |
|
271 | 287 |
|
272 | 288 |
def StartupInstance(opts, args): |
273 |
"""Shutdown an instance.
|
|
289 |
"""Startup an instance.
|
|
274 | 290 |
|
275 | 291 |
Args: |
276 | 292 |
opts - class with options as members |
... | ... | |
634 | 650 |
], |
635 | 651 |
"-b disk -p port <instance>", |
636 | 652 |
"Removes a mirror from the instance"), |
653 |
'rename': (RenameInstance, ARGS_FIXED(2), |
|
654 |
[DEBUG_OPT, |
|
655 |
make_option("--no-ip-check", dest="ignore_ip", |
|
656 |
help="Do not check that the IP of the new name" |
|
657 |
" is alive", |
|
658 |
default=False, action="store_true"), |
|
659 |
], |
|
660 |
"<instance> <new_name>", "Rename the instance"), |
|
637 | 661 |
'replace-disks': (ReplaceDisks, ARGS_ONE, |
638 | 662 |
[DEBUG_OPT, |
639 | 663 |
make_option("-n", "--new-secondary", dest="new_secondary", |
... | ... | |
655 | 679 |
default=None, type="string", metavar="<ADDRESS>"), |
656 | 680 |
make_option("-b", "--bridge", dest="bridge", |
657 | 681 |
help="Bridge to connect this instance to", |
658 |
default=None, type="string", metavar="<bridge>") |
|
682 |
default=None, type="string", metavar="<bridge>"),
|
|
659 | 683 |
], |
660 | 684 |
"<instance>", "Alters the parameters of an instance"), |
661 | 685 |
'shutdown': (ShutdownInstance, ARGS_ANY, |
Also available in: Unified diff