Move gnt-backup to ganeti.client.gnt_backup
authorMichael Hanselmann <hansmi@google.com>
Wed, 27 Oct 2010 11:41:47 +0000 (13:41 +0200)
committerMichael Hanselmann <hansmi@google.com>
Wed, 27 Oct 2010 11:58:14 +0000 (13:58 +0200)
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

.gitignore
Makefile.am
lib/client/gnt_backup.py [moved from scripts/gnt-backup with 98% similarity, mode: 0644]

index 6fa4458..dd3fe68 100644 (file)
@@ -67,6 +67,7 @@
 /man/*.in
 
 # scripts
+/scripts/gnt-backup
 /scripts/gnt-cluster
 /scripts/gnt-debug
 /scripts/gnt-instance
index faaa2a5..09c4b1b 100644 (file)
@@ -139,6 +139,7 @@ pkgpython_PYTHON = \
 
 client_PYTHON = \
        lib/client/__init__.py \
+       lib/client/gnt_backup.py \
        lib/client/gnt_cluster.py \
        lib/client/gnt_debug.py \
        lib/client/gnt_instance.py \
@@ -261,6 +262,7 @@ gnt_scripts = \
        scripts/gnt-os
 
 PYTHON_BOOTSTRAP = \
+       scripts/gnt-backup \
        scripts/gnt-cluster \
        scripts/gnt-debug \
        scripts/gnt-instance \
@@ -273,8 +275,7 @@ dist_sbin_SCRIPTS = \
        daemons/ganeti-watcher \
        daemons/ganeti-masterd \
        daemons/ganeti-confd \
-       daemons/ganeti-rapi \
-       scripts/gnt-backup
+       daemons/ganeti-rapi
 
 nodist_sbin_SCRIPTS = \
        $(PYTHON_BOOTSTRAP) \
old mode 100755 (executable)
new mode 100644 (file)
similarity index 98%
rename from scripts/gnt-backup
rename to lib/client/gnt_backup.py
index 9fd3aa7..3d13d40
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#
 #
 
 # Copyright (C) 2006, 2007, 2010 Google Inc.
@@ -26,8 +26,6 @@
 # W0614: Unused import %s from wildcard import (since we need cli)
 # C0103: Invalid name gnt-backup
 
-import sys
-
 from ganeti.cli import *
 from ganeti import opcodes
 from ganeti import constants
@@ -163,5 +161,5 @@ commands = {
   }
 
 
-if __name__ == '__main__':
-  sys.exit(GenericMain(commands))
+def Main():
+  return GenericMain(commands)