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

Unify the “--os-size” option


Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 4b038a1e
...@@ -65,6 +65,7 @@ __all__ = [ ...@@ -65,6 +65,7 @@ __all__ = [
"NONICS_OPT", "NONICS_OPT",
"NWSYNC_OPT", "NWSYNC_OPT",
"OS_OPT", "OS_OPT",
"OS_SIZE_OPT",
"SEP_OPT", "SEP_OPT",
"SUBMIT_OPT", "SUBMIT_OPT",
"SYNC_OPT", "SYNC_OPT",
...@@ -554,6 +555,11 @@ DISKIDX_OPT = cli_option("--disks", dest="disks", default=None, ...@@ -554,6 +555,11 @@ DISKIDX_OPT = cli_option("--disks", dest="disks", default=None,
" indices to act on (e.g. 0,2) (optional," " indices to act on (e.g. 0,2) (optional,"
" defaults to all disks)") " 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): def _ParseArgs(argv, commands, aliases):
"""Parser for the command line arguments. """Parser for the command line arguments.
......
...@@ -218,10 +218,7 @@ import_opts = [ ...@@ -218,10 +218,7 @@ import_opts = [
BACKEND_OPT, BACKEND_OPT,
DISK_TEMPLATE_OPT, DISK_TEMPLATE_OPT,
DISK_OPT, DISK_OPT,
cli_option("-s", "--os-size", dest="sd_size", help="Disk size for a" OS_SIZE_OPT,
" single-disk configuration, when not using the --disk option,"
" in MiB unless a suffix is used",
default=None, type="unit", metavar="<size>"),
NET_OPT, NET_OPT,
NONICS_OPT, NONICS_OPT,
NWSYNC_OPT, NWSYNC_OPT,
......
...@@ -1370,10 +1370,7 @@ add_opts = [ ...@@ -1370,10 +1370,7 @@ add_opts = [
OS_OPT, OS_OPT,
BACKEND_OPT, BACKEND_OPT,
DISK_TEMPLATE_OPT, DISK_TEMPLATE_OPT,
cli_option("-s", "--os-size", dest="sd_size", help="Disk size for a" OS_SIZE_OPT,
" single-disk configuration, when not using the --disk option,"
" in MiB unless a suffix is used",
default=None, type="unit", metavar="<size>"),
DISK_OPT, DISK_OPT,
NET_OPT, NET_OPT,
NONICS_OPT, NONICS_OPT,
......
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