" times, if not given defaults to all nodes)",
completion_suggest=OPT_COMPL_ONE_NODE)
-NODEGROUP_OPT = cli_option("-g", "--node-group",
+NODEGROUP_OPT_NAME = "--node-group"
+NODEGROUP_OPT = cli_option("-g", NODEGROUP_OPT_NAME,
dest="nodegroup",
help="Node group (name or uuid)",
metavar="<nodegroup>",
" [%s]" % constants.DEFAULT_VG),
metavar="VG", default=None)
-YES_DOIT_OPT = cli_option("--yes-do-it", dest="yes_do_it",
+YES_DOIT_OPT = cli_option("--yes-do-it", "--ya-rly", dest="yes_do_it",
help="Destroy cluster", action="store_true")
NOVOTING_OPT = cli_option("--no-voting", dest="no_voting",
"""
# Pause watcher by acquiring an exclusive lock on watcher state file
self.feedback_fn("Blocking watcher")
- watcher_block = utils.FileLock.Open(constants.WATCHER_STATEFILE)
+ watcher_block = utils.FileLock.Open(constants.WATCHER_LOCK_FILE)
try:
# TODO: Currently, this just blocks. There's no timeout.
# TODO: Should it be a shared lock?
if not names:
names = None
- if (force_filter or
- (names and len(names) == 1 and qlang.MaybeFilter(names[0]))):
- try:
- (filter_text, ) = names
- except ValueError:
- raise errors.OpPrereqError("Exactly one argument must be given as a"
- " filter")
-
- logging.debug("Parsing '%s' as filter", filter_text)
- filter_ = qlang.ParseFilter(filter_text)
- else:
- filter_ = qlang.MakeSimpleFilter("name", names)
+ filter_ = qlang.MakeFilter(names, force_filter)
response = cl.Query(resource, fields, filter_)