From d6cd74dda37a14cabf669b6884333e4e6bb31c95 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Thu, 6 Jun 2013 16:10:49 +0200 Subject: [PATCH] Add an option to print job id of submitted jobs on stdout When submitting a job, the job id, prefixed by 'JobID: ', is output to stderr. While this is easy to understand for humans, for scripting, it is more convenient to have (additionally) the id on stdout (and only the id). Add an option to provide this. Signed-off-by: Klaus Aehlig Reviewed-by: Thomas Thrainer --- lib/cli.py | 19 ++++++++++++ lib/client/gnt_backup.py | 4 +-- lib/client/gnt_cluster.py | 10 +++---- lib/client/gnt_debug.py | 3 +- lib/client/gnt_group.py | 21 +++++++------- lib/client/gnt_instance.py | 59 +++++++++++++++++++++----------------- lib/client/gnt_network.py | 15 +++++----- lib/client/gnt_node.py | 25 +++++++++------- lib/client/gnt_os.py | 2 +- man/ganeti.rst | 5 +++- man/gnt-backup.rst | 3 +- man/gnt-cluster.rst | 4 +-- man/gnt-group.rst | 13 +++++---- man/gnt-instance.rst | 57 +++++++++++++++++++----------------- man/gnt-network.rst | 6 ++-- man/gnt-node.rst | 10 +++---- man/gnt-os.rst | 3 +- 17 files changed, 150 insertions(+), 109 deletions(-) diff --git a/lib/cli.py b/lib/cli.py index 0bddf432a..062c24bde 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -165,6 +165,7 @@ __all__ = [ "PREALLOC_WIPE_DISKS_OPT", "PRIMARY_IP_VERSION_OPT", "PRIMARY_ONLY_OPT", + "PRINT_JOBID_OPT", "PRIORITY_OPT", "RAPI_CERT_OPT", "READD_OPT", @@ -198,6 +199,7 @@ __all__ = [ "SRC_DIR_OPT", "SRC_NODE_OPT", "SUBMIT_OPT", + "SUBMIT_OPTS", "STARTUP_PAUSED_OPT", "STATIC_OPT", "SYNC_OPT", @@ -832,6 +834,11 @@ SUBMIT_OPT = cli_option("--submit", dest="submit_only", help=("Submit the job and return the job ID, but" " don't wait for the job to finish")) +PRINT_JOBID_OPT = cli_option("--print-jobid", dest="print_jobid", + default=False, action="store_true", + help=("Additionally print the job as first line" + " on stdout (for scripting).")) + SYNC_OPT = cli_option("--sync", dest="do_locking", default=False, action="store_true", help=("Grab locks while doing the queries" @@ -1634,6 +1641,13 @@ INCLUDEDEFAULTS_OPT = cli_option("--include-defaults", dest="include_defaults", #: Options provided by all commands COMMON_OPTS = [DEBUG_OPT, REASON_OPT] +# options related to asynchronous job handling + +SUBMIT_OPTS = [ + SUBMIT_OPT, + PRINT_JOBID_OPT, + ] + # common options for creating instances. add and import then add their own # specific ones. COMMON_CREATE_OPTS = [ @@ -1654,6 +1668,7 @@ COMMON_CREATE_OPTS = [ OSPARAMS_OPT, OS_SIZE_OPT, SUBMIT_OPT, + PRINT_JOBID_OPT, TAG_ADD_OPT, DRY_RUN_OPT, PRIORITY_OPT, @@ -2248,6 +2263,8 @@ def SubmitOpCode(op, cl=None, feedback_fn=None, opts=None, reporter=None): SetGenericOpcodeOpts([op], opts) job_id = SendJob([op], cl=cl) + if opts.print_jobid: + ToStdout("%d" % job_id) op_results = PollJob(job_id, cl=cl, feedback_fn=feedback_fn, reporter=reporter) @@ -2271,6 +2288,8 @@ def SubmitOrSend(op, opts, cl=None, feedback_fn=None): job = [op] SetGenericOpcodeOpts(job, opts) job_id = SendJob(job, cl=cl) + if opts.print_jobid: + ToStdout("%d" % job_id) raise JobSubmittedException(job_id) else: return SubmitOpCode(op, cl=cl, feedback_fn=feedback_fn, opts=opts) diff --git a/lib/client/gnt_backup.py b/lib/client/gnt_backup.py index 4a1859385..e652937ec 100644 --- a/lib/client/gnt_backup.py +++ b/lib/client/gnt_backup.py @@ -150,7 +150,7 @@ commands = { ExportInstance, ARGS_ONE_INSTANCE, [FORCE_OPT, SINGLE_NODE_OPT, NOSHUTDOWN_OPT, SHUTDOWN_TIMEOUT_OPT, REMOVE_INSTANCE_OPT, IGNORE_REMOVE_FAILURES_OPT, DRY_RUN_OPT, - PRIORITY_OPT, SUBMIT_OPT], + PRIORITY_OPT] + SUBMIT_OPTS, "-n [opts...] ", "Exports an instance to an image"), "import": ( @@ -159,7 +159,7 @@ commands = { "Imports an instance from an exported image"), "remove": ( RemoveExport, [ArgUnknown(min=1, max=1)], - [DRY_RUN_OPT, PRIORITY_OPT, SUBMIT_OPT], + [DRY_RUN_OPT, PRIORITY_OPT] + SUBMIT_OPTS, "", "Remove exports of named instance from the filesystem."), } diff --git a/lib/client/gnt_cluster.py b/lib/client/gnt_cluster.py index d469f82da..7a8a7bc34 100644 --- a/lib/client/gnt_cluster.py +++ b/lib/client/gnt_cluster.py @@ -1550,7 +1550,7 @@ commands = { "", "Renames the cluster"), "redist-conf": ( - RedistributeConfig, ARGS_NONE, [SUBMIT_OPT, DRY_RUN_OPT, PRIORITY_OPT], + RedistributeConfig, ARGS_NONE, SUBMIT_OPTS + [DRY_RUN_OPT, PRIORITY_OPT], "", "Forces a push of the configuration file and ssconf files" " to the nodes in the cluster"), "verify": ( @@ -1590,10 +1590,10 @@ commands = { "list-tags": ( ListTags, ARGS_NONE, [], "", "List the tags of the cluster"), "add-tags": ( - AddTags, [ArgUnknown()], [TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT], + AddTags, [ArgUnknown()], [TAG_SRC_OPT, PRIORITY_OPT] + SUBMIT_OPTS, "tag...", "Add tags to the cluster"), "remove-tags": ( - RemoveTags, [ArgUnknown()], [TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT], + RemoveTags, [ArgUnknown()], [TAG_SRC_OPT, PRIORITY_OPT] + SUBMIT_OPTS, "tag...", "Remove tags from the cluster"), "search-tags": ( SearchTags, [ArgUnknown(min=1, max=1)], [PRIORITY_OPT], "", @@ -1617,8 +1617,8 @@ commands = { DRBD_HELPER_OPT, NODRBD_STORAGE_OPT, DEFAULT_IALLOCATOR_OPT, RESERVED_LVS_OPT, DRY_RUN_OPT, PRIORITY_OPT, PREALLOC_WIPE_DISKS_OPT, NODE_PARAMS_OPT, USE_EXTERNAL_MIP_SCRIPT, DISK_PARAMS_OPT, HV_STATE_OPT, - DISK_STATE_OPT, SUBMIT_OPT, ENABLED_DISK_TEMPLATES_OPT, - IPOLICY_STD_SPECS_OPT] + INSTANCE_POLICY_OPTS, + DISK_STATE_OPT] + SUBMIT_OPTS + + [ENABLED_DISK_TEMPLATES_OPT, IPOLICY_STD_SPECS_OPT] + INSTANCE_POLICY_OPTS, "[opts...]", "Alters the parameters of the cluster"), "renew-crypto": ( diff --git a/lib/client/gnt_debug.py b/lib/client/gnt_debug.py index 829ed05ed..ba31adc2b 100644 --- a/lib/client/gnt_debug.py +++ b/lib/client/gnt_debug.py @@ -631,8 +631,7 @@ commands = { action="append", help="Select nodes to sleep on"), cli_option("-r", "--repeat", type="int", default="0", dest="repeat", help="Number of times to repeat the sleep"), - DRY_RUN_OPT, PRIORITY_OPT, SUBMIT_OPT, - ], + DRY_RUN_OPT, PRIORITY_OPT] + SUBMIT_OPTS, "[opts...] ", "Executes a TestDelay OpCode"), "submit-job": ( GenericOpCodes, [ArgFile(min=1)], diff --git a/lib/client/gnt_group.py b/lib/client/gnt_group.py index 5bef4406e..6cf5b6a77 100644 --- a/lib/client/gnt_group.py +++ b/lib/client/gnt_group.py @@ -323,12 +323,12 @@ commands = { "add": ( AddGroup, ARGS_ONE_GROUP, [DRY_RUN_OPT, ALLOC_POLICY_OPT, NODE_PARAMS_OPT, DISK_PARAMS_OPT, - HV_STATE_OPT, DISK_STATE_OPT, PRIORITY_OPT, - SUBMIT_OPT] + INSTANCE_POLICY_OPTS, + HV_STATE_OPT, DISK_STATE_OPT, PRIORITY_OPT] + + SUBMIT_OPTS + INSTANCE_POLICY_OPTS, "", "Add a new node group to the cluster"), "assign-nodes": ( AssignNodes, ARGS_ONE_GROUP + ARGS_MANY_NODES, - [DRY_RUN_OPT, FORCE_OPT, PRIORITY_OPT, SUBMIT_OPT], + [DRY_RUN_OPT, FORCE_OPT, PRIORITY_OPT] + SUBMIT_OPTS, " ...", "Assign nodes to a group"), "list": ( ListGroups, ARGS_MANY_GROUPS, @@ -342,20 +342,21 @@ commands = { "Lists all available fields for node groups"), "modify": ( SetGroupParams, ARGS_ONE_GROUP, - [DRY_RUN_OPT, SUBMIT_OPT, ALLOC_POLICY_OPT, NODE_PARAMS_OPT, HV_STATE_OPT, - DISK_STATE_OPT, DISK_PARAMS_OPT, PRIORITY_OPT] + INSTANCE_POLICY_OPTS, + [DRY_RUN_OPT] + SUBMIT_OPTS + [ALLOC_POLICY_OPT, NODE_PARAMS_OPT, + HV_STATE_OPT, DISK_STATE_OPT, DISK_PARAMS_OPT, PRIORITY_OPT] + + INSTANCE_POLICY_OPTS, "", "Alters the parameters of a node group"), "remove": ( - RemoveGroup, ARGS_ONE_GROUP, [DRY_RUN_OPT, PRIORITY_OPT, SUBMIT_OPT], + RemoveGroup, ARGS_ONE_GROUP, [DRY_RUN_OPT, PRIORITY_OPT] + SUBMIT_OPTS, "[--dry-run] ", "Remove an (empty) node group from the cluster"), "rename": ( RenameGroup, [ArgGroup(min=2, max=2)], - [DRY_RUN_OPT, SUBMIT_OPT, PRIORITY_OPT], + [DRY_RUN_OPT] + SUBMIT_OPTS + [PRIORITY_OPT], "[--dry-run] ", "Rename a node group"), "evacuate": ( EvacuateGroup, [ArgGroup(min=1, max=1)], - [TO_GROUP_OPT, IALLOCATOR_OPT, EARLY_RELEASE_OPT, SUBMIT_OPT, PRIORITY_OPT], + [TO_GROUP_OPT, IALLOCATOR_OPT, EARLY_RELEASE_OPT] + SUBMIT_OPTS, "[-I ] [--to ]", "Evacuate all instances within a group"), "list-tags": ( @@ -363,11 +364,11 @@ commands = { "", "List the tags of the given group"), "add-tags": ( AddTags, [ArgGroup(min=1, max=1), ArgUnknown()], - [TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT], + [TAG_SRC_OPT, PRIORITY_OPT] + SUBMIT_OPTS, " tag...", "Add tags to the given group"), "remove-tags": ( RemoveTags, [ArgGroup(min=1, max=1), ArgUnknown()], - [TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT], + [TAG_SRC_OPT, PRIORITY_OPT] + SUBMIT_OPTS, " tag...", "Remove tags from the given group"), "info": ( GroupInfo, ARGS_MANY_GROUPS, [], "[...]", diff --git a/lib/client/gnt_instance.py b/lib/client/gnt_instance.py index 4d26aac13..657806450 100644 --- a/lib/client/gnt_instance.py +++ b/lib/client/gnt_instance.py @@ -1458,7 +1458,7 @@ commands = { "Creates and adds a new instance to the cluster"), "batch-create": ( BatchCreate, [ArgFile(min=1, max=1)], - [DRY_RUN_OPT, PRIORITY_OPT, IALLOCATOR_OPT, SUBMIT_OPT], + [DRY_RUN_OPT, PRIORITY_OPT, IALLOCATOR_OPT] + SUBMIT_OPTS, "", "Create a bunch of instances based on specs in the file."), "console": ( @@ -1467,7 +1467,8 @@ commands = { "[--show-cmd] ", "Opens a console on the specified instance"), "failover": ( FailoverInstance, ARGS_ONE_INSTANCE, - [FORCE_OPT, IGNORE_CONSIST_OPT, SUBMIT_OPT, SHUTDOWN_TIMEOUT_OPT, + [FORCE_OPT, IGNORE_CONSIST_OPT] + SUBMIT_OPTS + + [SHUTDOWN_TIMEOUT_OPT, DRY_RUN_OPT, PRIORITY_OPT, DST_NODE_OPT, IALLOCATOR_OPT, IGNORE_IPOLICY_OPT], "[-f] ", "Stops the instance, changes its primary node and" @@ -1478,13 +1479,15 @@ commands = { MigrateInstance, ARGS_ONE_INSTANCE, [FORCE_OPT, NONLIVE_OPT, MIGRATION_MODE_OPT, CLEANUP_OPT, DRY_RUN_OPT, PRIORITY_OPT, DST_NODE_OPT, IALLOCATOR_OPT, ALLOW_FAILOVER_OPT, - IGNORE_IPOLICY_OPT, NORUNTIME_CHGS_OPT, SUBMIT_OPT], + IGNORE_IPOLICY_OPT, NORUNTIME_CHGS_OPT] + SUBMIT_OPTS, "[-f] ", "Migrate instance to its secondary node" " (only for mirrored instances)"), "move": ( MoveInstance, ARGS_ONE_INSTANCE, - [FORCE_OPT, SUBMIT_OPT, SINGLE_NODE_OPT, SHUTDOWN_TIMEOUT_OPT, - DRY_RUN_OPT, PRIORITY_OPT, IGNORE_CONSIST_OPT, IGNORE_IPOLICY_OPT], + [FORCE_OPT] + SUBMIT_OPTS + + [SINGLE_NODE_OPT, + SHUTDOWN_TIMEOUT_OPT, DRY_RUN_OPT, PRIORITY_OPT, IGNORE_CONSIST_OPT, + IGNORE_IPOLICY_OPT], "[-f] ", "Move instance to an arbitrary node" " (only for instances of type file and lv)"), "info": ( @@ -1511,30 +1514,31 @@ commands = { ReinstallInstance, [ArgInstance()], [FORCE_OPT, OS_OPT, FORCE_VARIANT_OPT, m_force_multi, m_node_opt, m_pri_node_opt, m_sec_node_opt, m_clust_opt, m_inst_opt, m_node_tags_opt, - m_pri_node_tags_opt, m_sec_node_tags_opt, m_inst_tags_opt, SELECT_OS_OPT, - SUBMIT_OPT, DRY_RUN_OPT, PRIORITY_OPT, OSPARAMS_OPT], + m_pri_node_tags_opt, m_sec_node_tags_opt, m_inst_tags_opt, SELECT_OS_OPT] + + SUBMIT_OPTS + [DRY_RUN_OPT, PRIORITY_OPT, OSPARAMS_OPT], "[-f] ", "Reinstall a stopped instance"), "remove": ( RemoveInstance, ARGS_ONE_INSTANCE, - [FORCE_OPT, SHUTDOWN_TIMEOUT_OPT, IGNORE_FAILURES_OPT, SUBMIT_OPT, - DRY_RUN_OPT, PRIORITY_OPT], + [FORCE_OPT, SHUTDOWN_TIMEOUT_OPT, IGNORE_FAILURES_OPT] + SUBMIT_OPTS + + [DRY_RUN_OPT, PRIORITY_OPT], "[-f] ", "Shuts down the instance and removes it"), "rename": ( RenameInstance, [ArgInstance(min=1, max=1), ArgHost(min=1, max=1)], - [NOIPCHECK_OPT, NONAMECHECK_OPT, SUBMIT_OPT, DRY_RUN_OPT, PRIORITY_OPT], + [NOIPCHECK_OPT, NONAMECHECK_OPT] + SUBMIT_OPTS + + [DRY_RUN_OPT, PRIORITY_OPT], " ", "Rename the instance"), "replace-disks": ( ReplaceDisks, ARGS_ONE_INSTANCE, [AUTO_REPLACE_OPT, DISKIDX_OPT, IALLOCATOR_OPT, EARLY_RELEASE_OPT, - NEW_SECONDARY_OPT, ON_PRIMARY_OPT, ON_SECONDARY_OPT, SUBMIT_OPT, - DRY_RUN_OPT, PRIORITY_OPT, IGNORE_IPOLICY_OPT], + NEW_SECONDARY_OPT, ON_PRIMARY_OPT, ON_SECONDARY_OPT] + SUBMIT_OPTS + + [DRY_RUN_OPT, PRIORITY_OPT, IGNORE_IPOLICY_OPT], "[-s|-p|-a|-n NODE|-I NAME] ", "Replaces disks for the instance"), "modify": ( SetInstanceParams, ARGS_ONE_INSTANCE, - [BACKEND_OPT, DISK_OPT, FORCE_OPT, HVOPTS_OPT, NET_OPT, SUBMIT_OPT, - DISK_TEMPLATE_OPT, SINGLE_NODE_OPT, OS_OPT, FORCE_VARIANT_OPT, + [BACKEND_OPT, DISK_OPT, FORCE_OPT, HVOPTS_OPT, NET_OPT] + SUBMIT_OPTS + + [DISK_TEMPLATE_OPT, SINGLE_NODE_OPT, OS_OPT, FORCE_VARIANT_OPT, OSPARAMS_OPT, DRY_RUN_OPT, PRIORITY_OPT, NWSYNC_OPT, OFFLINE_INST_OPT, ONLINE_INST_OPT, IGNORE_IPOLICY_OPT, RUNTIME_MEM_OPT, NOCONFLICTSCHECK_OPT, NEW_PRIMARY_OPT], @@ -1543,57 +1547,60 @@ commands = { GenericManyOps("shutdown", _ShutdownInstance), [ArgInstance()], [FORCE_OPT, m_node_opt, m_pri_node_opt, m_sec_node_opt, m_clust_opt, m_node_tags_opt, m_pri_node_tags_opt, m_sec_node_tags_opt, - m_inst_tags_opt, m_inst_opt, m_force_multi, TIMEOUT_OPT, SUBMIT_OPT, - DRY_RUN_OPT, PRIORITY_OPT, IGNORE_OFFLINE_OPT, NO_REMEMBER_OPT], + m_inst_tags_opt, m_inst_opt, m_force_multi, TIMEOUT_OPT] + SUBMIT_OPTS + + [DRY_RUN_OPT, PRIORITY_OPT, IGNORE_OFFLINE_OPT, NO_REMEMBER_OPT], "", "Stops an instance"), "startup": ( GenericManyOps("startup", _StartupInstance), [ArgInstance()], [FORCE_OPT, m_force_multi, m_node_opt, m_pri_node_opt, m_sec_node_opt, m_node_tags_opt, m_pri_node_tags_opt, m_sec_node_tags_opt, - m_inst_tags_opt, m_clust_opt, m_inst_opt, SUBMIT_OPT, HVOPTS_OPT, + m_inst_tags_opt, m_clust_opt, m_inst_opt] + SUBMIT_OPTS + + [HVOPTS_OPT, BACKEND_OPT, DRY_RUN_OPT, PRIORITY_OPT, IGNORE_OFFLINE_OPT, NO_REMEMBER_OPT, STARTUP_PAUSED_OPT], "", "Starts an instance"), "reboot": ( GenericManyOps("reboot", _RebootInstance), [ArgInstance()], [m_force_multi, REBOOT_TYPE_OPT, IGNORE_SECONDARIES_OPT, m_node_opt, - m_pri_node_opt, m_sec_node_opt, m_clust_opt, m_inst_opt, SUBMIT_OPT, - m_node_tags_opt, m_pri_node_tags_opt, m_sec_node_tags_opt, + m_pri_node_opt, m_sec_node_opt, m_clust_opt, m_inst_opt] + SUBMIT_OPTS + + [m_node_tags_opt, m_pri_node_tags_opt, m_sec_node_tags_opt, m_inst_tags_opt, SHUTDOWN_TIMEOUT_OPT, DRY_RUN_OPT, PRIORITY_OPT], "", "Reboots an instance"), "activate-disks": ( ActivateDisks, ARGS_ONE_INSTANCE, - [SUBMIT_OPT, IGNORE_SIZE_OPT, PRIORITY_OPT, WFSYNC_OPT], + SUBMIT_OPTS + [IGNORE_SIZE_OPT, PRIORITY_OPT, WFSYNC_OPT], "", "Activate an instance's disks"), "deactivate-disks": ( DeactivateDisks, ARGS_ONE_INSTANCE, - [FORCE_OPT, SUBMIT_OPT, DRY_RUN_OPT, PRIORITY_OPT], + [FORCE_OPT] + SUBMIT_OPTS + [DRY_RUN_OPT, PRIORITY_OPT], "[-f] ", "Deactivate an instance's disks"), "recreate-disks": ( RecreateDisks, ARGS_ONE_INSTANCE, - [SUBMIT_OPT, DISK_OPT, NODE_PLACEMENT_OPT, DRY_RUN_OPT, PRIORITY_OPT, + SUBMIT_OPTS + + [DISK_OPT, NODE_PLACEMENT_OPT, DRY_RUN_OPT, PRIORITY_OPT, IALLOCATOR_OPT], "", "Recreate an instance's disks"), "grow-disk": ( GrowDisk, [ArgInstance(min=1, max=1), ArgUnknown(min=1, max=1), ArgUnknown(min=1, max=1)], - [SUBMIT_OPT, NWSYNC_OPT, DRY_RUN_OPT, PRIORITY_OPT, ABSOLUTE_OPT], + SUBMIT_OPTS + [NWSYNC_OPT, DRY_RUN_OPT, PRIORITY_OPT, ABSOLUTE_OPT], " ", "Grow an instance's disk"), "change-group": ( ChangeGroup, ARGS_ONE_INSTANCE, - [TO_GROUP_OPT, IALLOCATOR_OPT, EARLY_RELEASE_OPT, PRIORITY_OPT, SUBMIT_OPT], + [TO_GROUP_OPT, IALLOCATOR_OPT, EARLY_RELEASE_OPT, PRIORITY_OPT] + + SUBMIT_OPTS, "[-I ] [--to ]", "Change group of instance"), "list-tags": ( ListTags, ARGS_ONE_INSTANCE, [], "", "List the tags of the given instance"), "add-tags": ( AddTags, [ArgInstance(min=1, max=1), ArgUnknown()], - [TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT], + [TAG_SRC_OPT, PRIORITY_OPT] + SUBMIT_OPTS, " tag...", "Add tags to the given instance"), "remove-tags": ( RemoveTags, [ArgInstance(min=1, max=1), ArgUnknown()], - [TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT], + [TAG_SRC_OPT, PRIORITY_OPT] + SUBMIT_OPTS, " tag...", "Remove tags from given instance"), } diff --git a/lib/client/gnt_network.py b/lib/client/gnt_network.py index a8706c1c6..03569b481 100644 --- a/lib/client/gnt_network.py +++ b/lib/client/gnt_network.py @@ -313,7 +313,7 @@ commands = { AddNetwork, ARGS_ONE_NETWORK, [DRY_RUN_OPT, NETWORK_OPT, GATEWAY_OPT, ADD_RESERVED_IPS_OPT, MAC_PREFIX_OPT, NETWORK6_OPT, GATEWAY6_OPT, - NOCONFLICTSCHECK_OPT, TAG_ADD_OPT, PRIORITY_OPT, SUBMIT_OPT], + NOCONFLICTSCHECK_OPT, TAG_ADD_OPT, PRIORITY_OPT] + SUBMIT_OPTS, "", "Add a new IP network to the cluster"), "list": ( ListNetworks, ARGS_MANY_NETWORKS, @@ -330,9 +330,10 @@ commands = { "[...]", "Show information about the network(s)"), "modify": ( SetNetworkParams, ARGS_ONE_NETWORK, - [DRY_RUN_OPT, SUBMIT_OPT, ADD_RESERVED_IPS_OPT, REMOVE_RESERVED_IPS_OPT, - GATEWAY_OPT, MAC_PREFIX_OPT, NETWORK6_OPT, GATEWAY6_OPT, - PRIORITY_OPT], + [DRY_RUN_OPT] + SUBMIT_OPTS + + [ADD_RESERVED_IPS_OPT, + REMOVE_RESERVED_IPS_OPT, GATEWAY_OPT, MAC_PREFIX_OPT, NETWORK6_OPT, + GATEWAY6_OPT, PRIORITY_OPT], "", "Alters the parameters of a network"), "connect": ( ConnectNetwork, @@ -352,7 +353,7 @@ commands = { "Unmap a given network from a specified node group"), "remove": ( RemoveNetwork, ARGS_ONE_NETWORK, - [FORCE_OPT, DRY_RUN_OPT, SUBMIT_OPT, PRIORITY_OPT], + [FORCE_OPT, DRY_RUN_OPT] + SUBMIT_OPTS + [PRIORITY_OPT], "[--dry-run] ", "Remove an (empty) network from the cluster"), "list-tags": ( @@ -360,11 +361,11 @@ commands = { "", "List the tags of the given network"), "add-tags": ( AddTags, [ArgNetwork(min=1, max=1), ArgUnknown()], - [TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT], + [TAG_SRC_OPT, PRIORITY_OPT] + SUBMIT_OPTS, " tag...", "Add tags to the given network"), "remove-tags": ( RemoveTags, [ArgNetwork(min=1, max=1), ArgUnknown()], - [TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT], + [TAG_SRC_OPT, PRIORITY_OPT] + SUBMIT_OPTS, " tag...", "Remove tags from given network"), } diff --git a/lib/client/gnt_node.py b/lib/client/gnt_node.py index 8fd28df54..48ed7dd19 100644 --- a/lib/client/gnt_node.py +++ b/lib/client/gnt_node.py @@ -1090,7 +1090,7 @@ commands = { "evacuate": ( EvacuateNode, ARGS_ONE_NODE, [FORCE_OPT, IALLOCATOR_OPT, NEW_SECONDARY_OPT, EARLY_RELEASE_OPT, - PRIORITY_OPT, PRIMARY_ONLY_OPT, SECONDARY_ONLY_OPT, SUBMIT_OPT], + PRIORITY_OPT, PRIMARY_ONLY_OPT, SECONDARY_ONLY_OPT] + SUBMIT_OPTS, "[-f] {-I | -n } [-p | -s] [options...] ", "Relocate the primary and/or secondary instances from a node"), "failover": ( @@ -1103,7 +1103,7 @@ commands = { MigrateNode, ARGS_ONE_NODE, [FORCE_OPT, NONLIVE_OPT, MIGRATION_MODE_OPT, DST_NODE_OPT, IALLOCATOR_OPT, PRIORITY_OPT, IGNORE_IPOLICY_OPT, - NORUNTIME_CHGS_OPT, SUBMIT_OPT], + NORUNTIME_CHGS_OPT] + SUBMIT_OPTS, "[-f] ", "Migrate all the primary instance on a node away from it" " (only for instances of type drbd)"), @@ -1126,21 +1126,24 @@ commands = { "Lists all available fields for nodes"), "modify": ( SetNodeParams, ARGS_ONE_NODE, - [FORCE_OPT, SUBMIT_OPT, MC_OPT, DRAINED_OPT, OFFLINE_OPT, + [FORCE_OPT] + SUBMIT_OPTS + + [MC_OPT, DRAINED_OPT, OFFLINE_OPT, CAPAB_MASTER_OPT, CAPAB_VM_OPT, SECONDARY_IP_OPT, AUTO_PROMOTE_OPT, DRY_RUN_OPT, PRIORITY_OPT, NODE_PARAMS_OPT, NODE_POWERED_OPT, HV_STATE_OPT, DISK_STATE_OPT], "", "Alters the parameters of a node"), "powercycle": ( PowercycleNode, ARGS_ONE_NODE, - [FORCE_OPT, CONFIRM_OPT, DRY_RUN_OPT, PRIORITY_OPT, SUBMIT_OPT], + [FORCE_OPT, CONFIRM_OPT, DRY_RUN_OPT, PRIORITY_OPT] + SUBMIT_OPTS, "", "Tries to forcefully powercycle a node"), "power": ( PowerNode, [ArgChoice(min=1, max=1, choices=_LIST_POWER_COMMANDS), ArgNode()], - [SUBMIT_OPT, AUTO_PROMOTE_OPT, PRIORITY_OPT, IGNORE_STATUS_OPT, - FORCE_OPT, NOHDR_OPT, SEP_OPT, OOB_TIMEOUT_OPT, POWER_DELAY_OPT], + SUBMIT_OPTS + + [AUTO_PROMOTE_OPT, PRIORITY_OPT, + IGNORE_STATUS_OPT, FORCE_OPT, NOHDR_OPT, SEP_OPT, OOB_TIMEOUT_OPT, + POWER_DELAY_OPT], "on|off|cycle|status [nodes...]", "Change power state of node by calling out-of-band helper."), "remove": ( @@ -1162,14 +1165,14 @@ commands = { [ArgNode(min=1, max=1), ArgChoice(min=1, max=1, choices=_MODIFIABLE_STORAGE_TYPES), ArgFile(min=1, max=1)], - [ALLOCATABLE_OPT, DRY_RUN_OPT, PRIORITY_OPT, SUBMIT_OPT], + [ALLOCATABLE_OPT, DRY_RUN_OPT, PRIORITY_OPT] + SUBMIT_OPTS, " ", "Modify storage volume on a node"), "repair-storage": ( RepairStorage, [ArgNode(min=1, max=1), ArgChoice(min=1, max=1, choices=_REPAIRABLE_STORAGE_TYPES), ArgFile(min=1, max=1)], - [IGNORE_CONSIST_OPT, DRY_RUN_OPT, PRIORITY_OPT, SUBMIT_OPT], + [IGNORE_CONSIST_OPT, DRY_RUN_OPT, PRIORITY_OPT] + SUBMIT_OPTS, " ", "Repairs a storage volume on a node"), "list-tags": ( @@ -1177,11 +1180,11 @@ commands = { "", "List the tags of the given node"), "add-tags": ( AddTags, [ArgNode(min=1, max=1), ArgUnknown()], - [TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT], + [TAG_SRC_OPT, PRIORITY_OPT] + SUBMIT_OPTS, " tag...", "Add tags to the given node"), "remove-tags": ( RemoveTags, [ArgNode(min=1, max=1), ArgUnknown()], - [TAG_SRC_OPT, PRIORITY_OPT, SUBMIT_OPT], + [TAG_SRC_OPT, PRIORITY_OPT] + SUBMIT_OPTS, " tag...", "Remove tags from the given node"), "health": ( Health, ARGS_MANY_NODES, @@ -1193,7 +1196,7 @@ commands = { "[]", "Query the list of used DRBD minors on the given node"), "restricted-command": ( RestrictedCommand, [ArgUnknown(min=1, max=1)] + ARGS_MANY_NODES, - [SYNC_OPT, PRIORITY_OPT, SUBMIT_OPT, SHOW_MACHINE_OPT, NODEGROUP_OPT], + [SYNC_OPT, PRIORITY_OPT] + SUBMIT_OPTS + [SHOW_MACHINE_OPT, NODEGROUP_OPT], " [...]", "Executes a restricted command on node(s)"), } diff --git a/lib/client/gnt_os.py b/lib/client/gnt_os.py index 4bec97659..f5226337f 100644 --- a/lib/client/gnt_os.py +++ b/lib/client/gnt_os.py @@ -289,7 +289,7 @@ commands = { "modify": ( ModifyOS, ARGS_ONE_OS, [HVLIST_OPT, OSPARAMS_OPT, DRY_RUN_OPT, PRIORITY_OPT, - HID_OS_OPT, BLK_OS_OPT, SUBMIT_OPT], + HID_OS_OPT, BLK_OS_OPT] + SUBMIT_OPTS, "", "Modify the OS parameters"), } diff --git a/man/ganeti.rst b/man/ganeti.rst index e3efff9dd..153cd2358 100644 --- a/man/ganeti.rst +++ b/man/ganeti.rst @@ -240,7 +240,7 @@ availability for a certain command can be checked by calling the command using the ``--help`` option. | **gnt-...** *command* [\--dry-run] [\--priority {low | normal | high}] -| [\--submit] +| [\--submit] [\--print-job-id] The ``--dry-run`` option can be used to check whether an operation would succeed. @@ -252,6 +252,9 @@ The ``--submit`` option is used to send the job to the master daemon but not wait for its completion. The job ID will be shown so that it can be examined using **gnt-job info**. +The ``--print-job-id`` option makes the command print the job id as first +line on stdout, so that it is easy to parse by other programs. + Defaults ~~~~~~~~ diff --git a/man/gnt-backup.rst b/man/gnt-backup.rst index bb9851f6a..a17dc515d 100644 --- a/man/gnt-backup.rst +++ b/man/gnt-backup.rst @@ -26,6 +26,7 @@ EXPORT | **export** {-n *node*} [\--shutdown-timeout=*N*] [\--noshutdown] | [\--remove-instance] [\--ignore-remove-failures] [\--submit] +| [\--print-job-id] | {*instance*} Exports an instance to the target node. All the instance data and @@ -75,7 +76,7 @@ IMPORT | [-t [diskless | plain | drbd | file]] | [\--identify-defaults] | [\--ignore-ipolicy] -| [\--submit] +| [\--submit] [\--print-job-id] | {*instance*} Imports a new instance from an export residing on *source-node* in diff --git a/man/gnt-cluster.rst b/man/gnt-cluster.rst index 2c1e2a476..a63d02041 100644 --- a/man/gnt-cluster.rst +++ b/man/gnt-cluster.rst @@ -592,7 +592,7 @@ be 1. MODIFY ~~~~~~ -| **modify** [\--submit] +| **modify** [\--submit] [\--print-job-id] | [\--vg-name *vg-name*] | [\--enabled-hypervisors *hypervisors*] | [{-H|\--hypervisor-parameters} *hypervisor*:*hv-param*=*value*[,*hv-param*=*value*...]] @@ -693,7 +693,7 @@ The ``info`` option shows whether the watcher is currently paused. REDIST-CONF ~~~~~~~~~~~ -**redist-conf** [\--submit] +**redist-conf** [\--submit] [\--print-job-id] This command forces a full push of configuration files from the master node to the other nodes in the cluster. This is normally not diff --git a/man/gnt-group.rst b/man/gnt-group.rst index 12b4c84cc..e10071564 100644 --- a/man/gnt-group.rst +++ b/man/gnt-group.rst @@ -23,7 +23,7 @@ COMMANDS ADD ~~~ -| **add** [\--submit] +| **add** [\--submit] [\--print-job-id] | [\--node-parameters=*NDPARAMS*] | [\--alloc-policy=*POLICY*] | [{-D|\--disk-parameters} *disk-template*:*disk-param*=*value*[,*disk-param*=*value*...]] @@ -75,7 +75,7 @@ ASSIGN-NODES ~~~~~~~~~~~~ | **assign-nodes** -| [\--force] [\--submit] +| [\--force] [\--submit] [\--print-job-id] | {*group*} {*node*...} Assigns one or more nodes to the specified group, moving them from their @@ -93,7 +93,7 @@ options. MODIFY ~~~~~~ -| **modify** [\--submit] +| **modify** [\--submit] [\--print-job-id] | [\--node-parameters=*NDPARAMS*] | [\--alloc-policy=*POLICY*] | [\--hypervisor-state *hvstate*] @@ -124,7 +124,7 @@ options. REMOVE ~~~~~~ -| **remove** [\--submit] {*group*} +| **remove** [\--submit] [\--print-job-id] {*group*} Deletes the indicated node group, which must be empty. There must always be at least one group, so the last group cannot be removed. @@ -176,7 +176,7 @@ List available fields for node groups. RENAME ~~~~~~ -| **rename** [\--submit] {*oldname*} {*newname*} +| **rename** [\--submit] [\--print-job-id] {*oldname*} {*newname*} Renames a given group from *oldname* to *newname*. @@ -187,7 +187,8 @@ options. EVACUATE ~~~~~~~~ -**evacuate** [\--submit] [\--iallocator *NAME*] [\--to *GROUP*...] {*group*} +| **evacuate** [\--submit] [\--print-job-id] +| [\--iallocator *NAME*] [\--to *GROUP*...] {*group*} This command will move all instances out of the given node group. Instances are placed in a new group by an iallocator, either given on diff --git a/man/gnt-instance.rst b/man/gnt-instance.rst index 0942c0b74..07b848d96 100644 --- a/man/gnt-instance.rst +++ b/man/gnt-instance.rst @@ -40,7 +40,7 @@ ADD | [\--file-storage-dir *dir\_path*] [\--file-driver {loop \| blktap}] | {{-n|\--node} *node[:secondary-node]* \| {-I|\--iallocator} *name*} | {{-o|\--os-type} *os-type*} -| [\--submit] +| [\--submit] [\--print-job-id] | [\--ignore-ipolicy] | {*instance*} @@ -945,8 +945,8 @@ follows:: REMOVE ^^^^^^ -**remove** [\--ignore-failures] [\--shutdown-timeout=*N*] [\--submit] -[\--force] {*instance*} +| **remove** [\--ignore-failures] [\--shutdown-timeout=*N*] [\--submit] +| [\--print-job-id] [\--force] {*instance*} Remove an instance. This will remove all data from the instance and there is *no way back*. If you are not sure if you use an instance @@ -1076,7 +1076,7 @@ MODIFY | [\--os-type=*OS* [\--force-variant]] | [{-O|\--os-parameters} *param*=*value*... ] | [\--offline \| \--online] -| [\--submit] +| [\--submit] [\--print-job-id] | [\--ignore-ipolicy] | {*instance*} @@ -1165,7 +1165,8 @@ REINSTALL | **reinstall** [{-o|\--os-type} *os-type*] [\--select-os] [-f *force*] | [\--force-multiple] | [\--instance \| \--node \| \--primary \| \--secondary \| \--all] -| [{-O|\--os-parameters} *OS\_PARAMETERS*] [\--submit] {*instance*...} +| [{-O|\--os-parameters} *OS\_PARAMETERS*] [\--submit] [\--print-job-id] +| {*instance*...} Reinstalls the operating system on the given instance(s). The instance(s) must be stopped when running this command. If the ``-o @@ -1190,7 +1191,7 @@ options. RENAME ^^^^^^ -| **rename** [\--no-ip-check] [\--no-name-check] [\--submit] +| **rename** [\--no-ip-check] [\--no-name-check] [\--submit] [\--print-job-id] | {*instance*} {*new\_name*} Renames the given instance. The instance must be stopped when running @@ -1226,7 +1227,7 @@ STARTUP | \--tags \| \--node-tags \| \--pri-node-tags \| \--sec-node-tags] | [{-H|\--hypervisor-parameters} ``key=value...``] | [{-B|\--backend-parameters} ``key=value...``] -| [\--submit] [\--paused] +| [\--submit] [\--print-job-id] [\--paused] | {*name*...} Starts one or more instances, depending on the following options. The @@ -1324,7 +1325,7 @@ SHUTDOWN | [\--force] [\--force-multiple] [\--ignore-offline] [\--no-remember] | [\--instance \| \--node \| \--primary \| \--secondary \| \--all \| | \--tags \| \--node-tags \| \--pri-node-tags \| \--sec-node-tags] -| [\--submit] +| [\--submit] [\--print-job-id] | {*name*...} Stops one or more instances. If the instance cannot be cleanly stopped @@ -1378,7 +1379,7 @@ REBOOT | [\--force-multiple] | [\--instance \| \--node \| \--primary \| \--secondary \| \--all \| | \--tags \| \--node-tags \| \--pri-node-tags \| \--sec-node-tags] -| [\--submit] +| [\--submit] [\--print-job-id] | [*name*...] Reboots one or more instances. The type of reboot depends on the value @@ -1442,17 +1443,18 @@ Disk management REPLACE-DISKS ^^^^^^^^^^^^^ -**replace-disks** [\--submit] [\--early-release] [\--ignore-ipolicy] {-p} -[\--disks *idx*] {*instance*} +| **replace-disks** [\--submit] [\--print-job-id] [\--early-release] +| [\--ignore-ipolicy] {-p} [\--disks *idx*] {*instance*} -**replace-disks** [\--submit] [\--early-release] [\--ignore-ipolicy] {-s} -[\--disks *idx*] {*instance*} +| **replace-disks** [\--submit] [\--print-job-id] [\--early-release] +| [\--ignore-ipolicy] {-s} [\--disks *idx*] {*instance*} -**replace-disks** [\--submit] [\--early-release] [\--ignore-ipolicy] -{{-I\|\--iallocator} *name* \| {{-n|\--new-secondary} *node* } {*instance*} +| **replace-disks** [\--submit] [\--print-job-id] [\--early-release] +| [\--ignore-ipolicy] +| {{-I\|\--iallocator} *name* \| {{-n|\--new-secondary} *node* } {*instance*} -**replace-disks** [\--submit] [\--early-release] [\--ignore-ipolicy] -{-a\|\--auto} {*instance*} +| **replace-disks** [\--submit] [\--print-job-id] [\--early-release] +| [\--ignore-ipolicy] {-a\|\--auto} {*instance*} This command is a generalized form for replacing disks. It is currently only valid for the mirrored (DRBD) disk template. @@ -1500,7 +1502,8 @@ options. ACTIVATE-DISKS ^^^^^^^^^^^^^^ -**activate-disks** [\--submit] [\--ignore-size] [\--wait-for-sync] {*instance*} +| **activate-disks** [\--submit] [\--print-job-id] [\--ignore-size] +| [\--wait-for-sync] {*instance*} Activates the block devices of the given instance. If successful, the command will show the location and name of the block devices:: @@ -1538,7 +1541,7 @@ options. DEACTIVATE-DISKS ^^^^^^^^^^^^^^^^ -**deactivate-disks** [-f] [\--submit] {*instance*} +**deactivate-disks** [-f] [\--submit] [\--print-job-id] {*instance*} De-activates the block devices of the given instance. Note that if you run this command for an instance with a drbd disk template, while it @@ -1559,7 +1562,8 @@ options. GROW-DISK ^^^^^^^^^ -| **grow-disk** [\--no-wait-for-sync] [\--submit] [\--absolute] +| **grow-disk** [\--no-wait-for-sync] [\--submit] [\--print-job-id] +| [\--absolute] | {*instance*} {*disk*} {*amount*} Grows an instance's disk. This is only possible for instances having a @@ -1617,7 +1621,7 @@ instance. RECREATE-DISKS ^^^^^^^^^^^^^^ -| **recreate-disks** [\--submit] +| **recreate-disks** [\--submit] [\--print-job-id] | [{-n node1:[node2] \| {-I\|\--iallocator *name*}}] | [\--disk=*N*[:[size=*VAL*][,spindles=*VAL*][,mode=*ro\|rw*]]] {*instance*} @@ -1661,7 +1665,7 @@ FAILOVER | **failover** [-f] [\--ignore-consistency] [\--ignore-ipolicy] | [\--shutdown-timeout=*N*] | [{-n|\--target-node} *node* \| {-I|\--iallocator} *name*] -| [\--submit] +| [\--submit] [\--print-job-id] | {*instance*} Failover will stop the instance (if running), change its primary node, @@ -1715,10 +1719,10 @@ MIGRATE | **migrate** [-f] [\--allow-failover] [\--non-live] | [\--migration-mode=live\|non-live] [\--ignore-ipolicy] -| [\--no-runtime-changes] [\--submit] +| [\--no-runtime-changes] [\--submit] [\--print-job-id] | [{-n|\--target-node} *node* \| {-I|\--iallocator} *name*] {*instance*} -| **migrate** [-f] \--cleanup [\--submit] {*instance*} +| **migrate** [-f] \--cleanup [\--submit] [\--print-job-id] {*instance*} Migrate will move the instance to its secondary node without shutdown. As with failover, it works for instances having the drbd disk template @@ -1808,7 +1812,8 @@ MOVE ^^^^ | **move** [-f] [\--ignore-consistency] -| [-n *node*] [\--shutdown-timeout=*N*] [\--submit] [\--ignore-ipolicy] +| [-n *node*] [\--shutdown-timeout=*N*] [\--submit] [\--print-job-id] +| [\--ignore-ipolicy] | {*instance*} Move will move the instance to an arbitrary node in the cluster. This @@ -1841,7 +1846,7 @@ Example:: CHANGE-GROUP ^^^^^^^^^^^^ -| **change-group** [\--submit] +| **change-group** [\--submit] [\--print-job-id] | [\--iallocator *NAME*] [\--to *GROUP*...] {*instance*} This command moves an instance to another node group. The move is diff --git a/man/gnt-network.rst b/man/gnt-network.rst index c53dbac53..26dd168fd 100644 --- a/man/gnt-network.rst +++ b/man/gnt-network.rst @@ -40,7 +40,7 @@ ADD | [\--network6=*NETWORK6*] | [\--gateway6=*GATEWAY6*] | [\--mac-prefix=*MACPREFIX*] -| [\--submit] +| [\--submit] [\--print-job-id] | {*network*} Creates a new network with the given name. The network will be unused @@ -76,7 +76,7 @@ MODIFY | [\--network6=*NETWORK6*] | [\--gateway6=*GATEWAY6*] | [\--mac-prefix=*MACPREFIX*] -| [\--submit] +| [\--submit] [\--print-job-id] | {*network*} Modifies parameters from the network. @@ -91,7 +91,7 @@ options. REMOVE ~~~~~~ -| **remove** [\--submit] {*network*} +| **remove** [\--submit] [\--print-job-id] {*network*} Deletes the indicated network, which must be not connected to any node group. diff --git a/man/gnt-node.rst b/man/gnt-node.rst index af95a27bf..a27820439 100644 --- a/man/gnt-node.rst +++ b/man/gnt-node.rst @@ -81,7 +81,7 @@ Example:: EVACUATE ~~~~~~~~ -| **evacuate** [-f] [\--early-release] [\--submit] +| **evacuate** [-f] [\--early-release] [\--submit] [\--print-job-id] | [{-I|\--iallocator} *NAME* \| {-n|\--new-secondary} *destination\_node*] | [{-p|\--primary-only} \| {-s|\--secondary-only} ] | {*node*} @@ -264,7 +264,7 @@ MIGRATE ~~~~~~~ | **migrate** [-f] [\--non-live] [\--migration-mode=live\|non-live] -| [\--ignore-ipolicy] [\--submit] {*node*} +| [\--ignore-ipolicy] [\--submit] [\--print-job-id] {*node*} This command will migrate all instances having the given node as primary to their secondary nodes. This works only for instances @@ -288,7 +288,7 @@ Example:: MODIFY ~~~~~~ -| **modify** [-f] [\--submit] +| **modify** [-f] [\--submit] [\--print-job-id] | [{-C|\--master-candidate} ``yes|no``] | [{-D|\--drained} ``yes|no``] [{-O|\--offline} ``yes|no``] | [\--master-capable=``yes|no``] [\--vm-capable=``yes|no``] [\--auto-promote] @@ -478,7 +478,7 @@ Example:: MODIFY-STORAGE ~~~~~~~~~~~~~~ -| **modify-storage** [\--allocatable={yes|no}] [\--submit] +| **modify-storage** [\--allocatable={yes|no}] [\--submit] [\--print-job-id] | {*node*} {*storage-type*} {*volume-name*} Modifies storage volumes on a node. Only LVM physical volumes can @@ -518,7 +518,7 @@ Example:: POWERCYCLE ~~~~~~~~~~ -**powercycle** [\--yes] [\--force] [\--submit] {*node*} +**powercycle** [\--yes] [\--force] [\--submit] [\--print-job-id] {*node*} This command (tries to) forcefully reboot a node. It is a command that can be used if the node environment is broken, such that the diff --git a/man/gnt-os.rst b/man/gnt-os.rst index 201804871..c3392aac4 100644 --- a/man/gnt-os.rst +++ b/man/gnt-os.rst @@ -56,7 +56,8 @@ documentations, etc. MODIFY ~~~~~~ -| **modify** [\--submit] [-H *HYPERVISOR*:option=*value*[,...]] +| **modify** [\--submit] [\--print-job-id] +| [-H *HYPERVISOR*:option=*value*[,...]] | [\--hidden=*yes|no*] [\--blacklisted=*yes|no*] | {*OS*} -- GitLab