#
#
-# Copyright (C) 2010 Google Inc.
+# Copyright (C) 2010, 2011 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
group_name = args[0]
node_names = args[1:]
- op = opcodes.OpAssignGroupNodes(group_name=group_name, nodes=node_names,
+ op = opcodes.OpGroupAssignNodes(group_name=group_name, nodes=node_names,
force=opts.force)
SubmitOpCode(op, opts=opts)
return GenericList(constants.QR_GROUP, desired_fields, args, None,
opts.separator, not opts.no_headers,
- format_override=fmtoverride)
+ format_override=fmtoverride, verbose=opts.verbose)
def ListGroupFields(opts, args):
def SetGroupParams(opts, args):
"""Modifies a node group's parameters.
- @param opts: the command line options seletect by the user
+ @param opts: the command line options selected by the user
@type args: list
@param args: should contain only one element, the node group name
ToStderr("Please give at least one of the parameters.")
return 1
- op = opcodes.OpSetGroupParams(group_name=args[0], # pylint: disable-msg=W0142
+ op = opcodes.OpGroupSetParams(group_name=args[0], # pylint: disable-msg=W0142
**all_changes)
result = SubmitOrSend(op, opts)
"""
(group_name,) = args
- op = opcodes.OpRemoveGroup(group_name=group_name)
+ op = opcodes.OpGroupRemove(group_name=group_name)
SubmitOpCode(op, opts=opts)
"""
old_name, new_name = args
- op = opcodes.OpRenameGroup(old_name=old_name, new_name=new_name)
+ op = opcodes.OpGroupRename(old_name=old_name, new_name=new_name)
SubmitOpCode(op, opts=opts)
"<group_name> <node>...", "Assign nodes to a group"),
"list": (
ListGroups, ARGS_MANY_GROUPS,
- [NOHDR_OPT, SEP_OPT, FIELDS_OPT],
+ [NOHDR_OPT, SEP_OPT, FIELDS_OPT, VERBOSE_OPT],
"[<group_name>...]",
"Lists the node groups in the cluster. The available fields can be shown"
" using the \"list-fields\" command (see the man page for details)."