---
 lib/cli.py           |    6 ++++++
 scripts/gnt-backup   |    5 +----
 scripts/gnt-instance |    5 +----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/cli.py b/lib/cli.py
index ac72c34..5047d5d 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 242de2e..c7a981e 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 b825dda..9c7dd84 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,
-- 
1.6.3.3

Reply via email to