Revision 819cbfe5

b/lib/cli.py
360 360
  kind = opts.tag_type
361 361
  if kind == constants.TAG_CLUSTER:
362 362
    retval = kind, kind
363
  elif kind == constants.TAG_NODE or kind == constants.TAG_INSTANCE:
363
  elif kind in (constants.TAG_NODEGROUP,
364
                constants.TAG_NODE,
365
                constants.TAG_INSTANCE):
364 366
    if not args:
365 367
      raise errors.OpPrereqError("no arguments passed to the command")
366 368
    name = args.pop(0)
b/lib/client/gnt_group.py
209 209
  "rename": (
210 210
    RenameGroup, [ArgGroup(min=2, max=2)], [DRY_RUN_OPT],
211 211
    "[--dry-run] <group-name> <new-name>", "Rename a node group"),
212
}
212
  "list-tags": (
213
    ListTags, ARGS_ONE_GROUP, [PRIORITY_OPT],
214
    "<instance_name>", "List the tags of the given instance"),
215
  "add-tags": (
216
    AddTags, [ArgGroup(min=1, max=1), ArgUnknown()],
217
    [TAG_SRC_OPT, PRIORITY_OPT],
218
    "<instance_name> tag...", "Add tags to the given instance"),
219
  "remove-tags": (
220
    RemoveTags, [ArgGroup(min=1, max=1), ArgUnknown()],
221
    [TAG_SRC_OPT, PRIORITY_OPT],
222
    "<instance_name> tag...", "Remove tags from given instance"),
223
  }
213 224

  
214 225

  
215 226
def Main():
216
  return GenericMain(commands)
227
  return GenericMain(commands,
228
                     override={"tag_type": constants.TAG_NODEGROUP})
b/man/gnt-group.rst
137 137

  
138 138
Renames a given group from *oldname* to *newname*.
139 139

  
140

  
141
TAGS
142
~~~~
143

  
144
ADD-TAGS
145
^^^^^^^^
146

  
147
**add-tags** [--from *file*] {*groupname*} {*tag*...}
148

  
149
Add tags to the given node group. If any of the tags contains invalid
150
characters, the entire operation will abort.
151

  
152
If the ``--from`` option is given, the list of tags will be extended
153
with the contents of that file (each line becomes a tag). In this case,
154
there is not need to pass tags on the command line (if you do, both
155
sources will be used). A file name of ``-`` will be interpreted as
156
stdin.
157

  
158
LIST-TAGS
159
^^^^^^^^^
160

  
161
**list-tags** {*groupname*}
162

  
163
List the tags of the given node group.
164

  
165
REMOVE-TAGS
166
^^^^^^^^^^^
167

  
168
**remove-tags** [--from *file*] {*groupname*} {*tag*...}
169

  
170
Remove tags from the given node group. If any of the tags are not
171
existing on the node, the entire operation will abort.
172

  
173
If the ``--from`` option is given, the list of tags to be removed will
174
be extended with the contents of that file (each line becomes a tag). In
175
this case, there is not need to pass tags on the command line (if you
176
do, tags from both sources will be removed). A file name of ``-`` will
177
be interpreted as stdin.
178

  
140 179
.. vim: set textwidth=72 :
141 180
.. Local Variables:
142 181
.. mode: rst

Also available in: Unified diff