Revision bcee9cb4 scripts/gnt-instance
b/scripts/gnt-instance | ||
---|---|---|
333 | 333 |
if opts.multi_mode is None: |
334 | 334 |
opts.multi_mode = _SHUTDOWN_INSTANCES |
335 | 335 |
inames = _ExpandMultiNames(opts.multi_mode, args) |
336 |
if not inames: |
|
337 |
raise errors.OpPrereqError("Selection filter does not match any instances") |
|
336 | 338 |
multi_on = opts.multi_mode != _SHUTDOWN_INSTANCES or len(inames) > 1 |
337 | 339 |
if not (opts.force_multi or not multi_on |
338 | 340 |
or _ConfirmOperation(inames, "startup")): |
... | ... | |
357 | 359 |
if opts.multi_mode is None: |
358 | 360 |
opts.multi_mode = _SHUTDOWN_INSTANCES |
359 | 361 |
inames = _ExpandMultiNames(opts.multi_mode, args) |
362 |
if not inames: |
|
363 |
raise errors.OpPrereqError("Selection filter does not match any instances") |
|
360 | 364 |
multi_on = opts.multi_mode != _SHUTDOWN_INSTANCES or len(inames) > 1 |
361 | 365 |
if not (opts.force_multi or not multi_on |
362 | 366 |
or _ConfirmOperation(inames, "reboot")): |
... | ... | |
380 | 384 |
if opts.multi_mode is None: |
381 | 385 |
opts.multi_mode = _SHUTDOWN_INSTANCES |
382 | 386 |
inames = _ExpandMultiNames(opts.multi_mode, args) |
387 |
if not inames: |
|
388 |
raise errors.OpPrereqError("Selection filter does not match any instances") |
|
383 | 389 |
multi_on = opts.multi_mode != _SHUTDOWN_INSTANCES or len(inames) > 1 |
384 | 390 |
if not (opts.force_multi or not multi_on |
385 | 391 |
or _ConfirmOperation(inames, "shutdown")): |
... | ... | |
469 | 475 |
opts.multi_mode = _SHUTDOWN_INSTANCES |
470 | 476 |
inames = _ExpandMultiNames(opts.multi_mode, args) |
471 | 477 |
if not inames: |
472 |
logger.ToStderr("No instances match the selected options") |
|
473 |
return 1 |
|
478 |
raise errors.OpPrereqError("Selection filter does not match any instances") |
|
474 | 479 |
multi_on = opts.multi_mode != _SHUTDOWN_INSTANCES or len(inames) > 1 |
475 | 480 |
if not (opts.force_multi or not multi_on |
476 | 481 |
or _ConfirmOperation(inames, "failover (including shutdown)")): |
Also available in: Unified diff