Commit f91e255a authored by Iustin Pop's avatar Iustin Pop
Browse files

Add master_capab to gnt-node modify


Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 197e3bb2
......@@ -53,6 +53,7 @@ __all__ = [
"AUTO_REPLACE_OPT",
"BACKEND_OPT",
"BLK_OS_OPT",
"CAPAB_MASTER_OPT",
"CLEANUP_OPT",
"CLUSTER_DOMAIN_SECRET_OPT",
"CONFIRM_OPT",
......@@ -870,6 +871,10 @@ DRAINED_OPT = cli_option("-D", "--drained", dest="drained", metavar=_YORNO,
type="bool", default=None,
help="Set the drained flag on the node")
CAPAB_MASTER_OPT = cli_option("--master-capable", dest="master_capable",
type="bool", default=None, metavar=_YORNO,
help="Set the master_capable flag on the node")
ALLOCATABLE_OPT = cli_option("--allocatable", dest="allocatable",
type="bool", default=None, metavar=_YORNO,
help="Set the allocatable flag on a volume")
......
......@@ -626,6 +626,7 @@
<arg>--master-candidate=<option>yes|no</option></arg>
<arg>--drained=<option>yes|no</option></arg>
<arg>--offline=<option>yes|no</option></arg>
<arg>--master-capable=<option>yes|no</option></arg>
<arg>--auto-promote</arg>
<arg choice="req"><replaceable>node</replaceable></arg>
</cmdsynopsis>
......@@ -634,8 +635,8 @@
This command changes the role of the node. Each options takes
either a literal <literal>yes</literal> or
<literal>no</literal>, and only one option should be given as
<literal>yes</literal>. The meaning of the roles are described
in the manpage <citerefentry>
<literal>yes</literal>. The meaning of the roles and flags are
described in the manpage <citerefentry>
<refentrytitle>ganeti</refentrytitle> <manvolnum>7</manvolnum>
</citerefentry>.
</para>
......
......@@ -659,6 +659,7 @@ def SetNodeParams(opts, args):
master_candidate=opts.master_candidate,
offline=opts.offline,
drained=opts.drained,
master_capable=opts.master_capable,
force=opts.force,
auto_promote=opts.auto_promote)
......@@ -710,7 +711,7 @@ commands = {
(utils.CommaJoin(_LIST_HEADERS), utils.CommaJoin(_LIST_DEF_FIELDS))),
'modify': (
SetNodeParams, ARGS_ONE_NODE,
[FORCE_OPT, SUBMIT_OPT, MC_OPT, DRAINED_OPT, OFFLINE_OPT,
[FORCE_OPT, SUBMIT_OPT, MC_OPT, DRAINED_OPT, OFFLINE_OPT, CAPAB_MASTER_OPT,
AUTO_PROMOTE_OPT, DRY_RUN_OPT, PRIORITY_OPT],
"<node_name>", "Alters the parameters of a node"),
'powercycle': (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment