---
 lib/cli.py         |    9 +++++++++
 scripts/gnt-backup |    7 ++-----
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/lib/cli.py b/lib/cli.py
index f19b0d3..35eb83b 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -83,6 +83,8 @@ __all__ = [
   "SEP_OPT",
   "SHOWCMD_OPT",
   "SINGLE_NODE_OPT",
+  "SRC_DIR_OPT",
+  "SRC_NODE_OPT",
   "SUBMIT_OPT",
   "STATIC_OPT",
   "SYNC_OPT",
@@ -667,6 +669,13 @@ IGNORE_SIZE_OPT = cli_option("--ignore-size", 
dest="ignore_size",
                              " (useful for forcing activation when"
                              " the recorded size is wrong)")
 
+SRC_NODE_OPT = cli_option("--src-node", dest="src_node", help="Source node",
+                          metavar="<node>",
+                          completion_suggest=OPT_COMPL_ONE_NODE)
+
+SRC_DIR_OPT = cli_option("--src-dir", dest="src_dir", help="Source directory",
+                         metavar="<dir>")
+
 
 def _ParseArgs(argv, commands, aliases):
   """Parser for the command line arguments.
diff --git a/scripts/gnt-backup b/scripts/gnt-backup
index d9bda09..376c3b5 100755
--- a/scripts/gnt-backup
+++ b/scripts/gnt-backup
@@ -219,11 +219,8 @@ import_opts = [
   NET_OPT,
   NONICS_OPT,
   NWSYNC_OPT,
-  cli_option("--src-node", dest="src_node", help="Source node",
-             metavar="<node>",
-             completion_suggest=OPT_COMPL_ONE_NODE),
-  cli_option("--src-dir", dest="src_dir", help="Source directory",
-             metavar="<dir>"),
+  SRC_DIR_OPT,
+  SRC_NODE_OPT,
   NOIPCHECK_OPT,
   IALLOCATOR_OPT,
   FILESTORE_DIR_OPT,
-- 
1.6.3.3

Reply via email to