- 'list': (ListNodes, ARGS_NONE,
- [DEBUG_OPT, NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT],
- "", "Lists the nodes in the cluster. The available fields"
- " are (see the man page for details): name, pinst_cnt, pinst_list,"
- " sinst_cnt, sinst_list, pip, sip, dtotal, dfree, mtotal, mnode,"
- " mfree, bootid, cpu_count. The default field list is"
- " (in order): %s." % ", ".join(_LIST_DEF_FIELDS),
- ),
+ 'list': (ListNodes, ARGS_ANY,
+ [DEBUG_OPT, NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT, SYNC_OPT],
+ "[nodes...]",
+ "Lists the nodes in the cluster. The available fields"
+ " are (see the man page for details): %s"
+ " The default field list is (in order): %s." %
+ (", ".join(_LIST_HEADERS), ", ".join(_LIST_DEF_FIELDS))),
+ 'modify': (SetNodeParams, ARGS_ONE,
+ [DEBUG_OPT, FORCE_OPT,
+ SUBMIT_OPT,
+ make_option("-C", "--master-candidate", dest="master_candidate",
+ choices=('yes', 'no'), default=None,
+ metavar="yes|no",
+ help="Set the master_candidate flag on the node"),
+
+ make_option("-O", "--offline", dest="offline", metavar="yes|no",
+ choices=('yes', 'no'), default=None,
+ help="Set the offline flag on the node"),
+ make_option("-D", "--drained", dest="drained", metavar="yes|no",
+ choices=('yes', 'no'), default=None,
+ help="Set the drained flag on the node"),
+ ],
+ "<instance>", "Alters the parameters of an instance"),