diff --git a/lib/cli.py b/lib/cli.py index ac72c3428dd3e99746b35560497c3e9ae3d0cad9..5047d5d6d51f7e966198504ce3d7c432965c5317 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -65,6 +65,7 @@ __all__ = [ "NONICS_OPT", "NWSYNC_OPT", "OS_OPT", + "OS_SIZE_OPT", "SEP_OPT", "SUBMIT_OPT", "SYNC_OPT", @@ -554,6 +555,11 @@ DISKIDX_OPT = cli_option("--disks", dest="disks", default=None, " indices to act on (e.g. 0,2) (optional," " defaults to all disks)") +OS_SIZE_OPT = cli_option("-s", "--os-size", dest="sd_size", + help="Enforces a single-disk configuration using the" + " given disk size, in MiB unless a suffix is used", + default=None, type="unit", metavar="<size>") + def _ParseArgs(argv, commands, aliases): """Parser for the command line arguments. diff --git a/scripts/gnt-backup b/scripts/gnt-backup index 242de2ede1c5e70964aecee5b3a1914f214c890e..c7a981e74013452c287dcef12a16d02d6fc43fb8 100755 --- a/scripts/gnt-backup +++ b/scripts/gnt-backup @@ -218,10 +218,7 @@ import_opts = [ BACKEND_OPT, DISK_TEMPLATE_OPT, DISK_OPT, - cli_option("-s", "--os-size", dest="sd_size", help="Disk size for a" - " single-disk configuration, when not using the --disk option," - " in MiB unless a suffix is used", - default=None, type="unit", metavar="<size>"), + OS_SIZE_OPT, NET_OPT, NONICS_OPT, NWSYNC_OPT, diff --git a/scripts/gnt-instance b/scripts/gnt-instance index b825dda7b27830597f10def5419fbb18b1872b03..9c7dd84d6438742f002bd70ce5f6e710aa302546 100755 --- a/scripts/gnt-instance +++ b/scripts/gnt-instance @@ -1370,10 +1370,7 @@ add_opts = [ OS_OPT, BACKEND_OPT, DISK_TEMPLATE_OPT, - cli_option("-s", "--os-size", dest="sd_size", help="Disk size for a" - " single-disk configuration, when not using the --disk option," - " in MiB unless a suffix is used", - default=None, type="unit", metavar="<size>"), + OS_SIZE_OPT, DISK_OPT, NET_OPT, NONICS_OPT,