Move gnt-os to ganeti.client.gnt_os
authorMichael Hanselmann <hansmi@google.com>
Wed, 27 Oct 2010 11:02:13 +0000 (13:02 +0200)
committerMichael Hanselmann <hansmi@google.com>
Wed, 27 Oct 2010 11:19:11 +0000 (13:19 +0200)
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

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

index daa1b39..a244da3 100644 (file)
@@ -68,3 +68,4 @@
 
 # scripts
 /scripts/gnt-debug
+/scripts/gnt-os
index ce4796c..3d300d6 100644 (file)
@@ -139,7 +139,8 @@ pkgpython_PYTHON = \
 
 client_PYTHON = \
        lib/client/__init__.py \
-       lib/client/gnt_debug.py
+       lib/client/gnt_debug.py \
+       lib/client/gnt_os.py
 
 hypervisor_PYTHON = \
        lib/hypervisor/__init__.py \
@@ -256,7 +257,8 @@ gnt_scripts = \
        scripts/gnt-os
 
 PYTHON_BOOTSTRAP = \
-       scripts/gnt-debug
+       scripts/gnt-debug \
+       scripts/gnt-os
 
 dist_sbin_SCRIPTS = \
        daemons/ganeti-noded \
@@ -268,8 +270,7 @@ dist_sbin_SCRIPTS = \
        scripts/gnt-cluster \
        scripts/gnt-instance \
        scripts/gnt-job \
-       scripts/gnt-node \
-       scripts/gnt-os
+       scripts/gnt-node
 
 nodist_sbin_SCRIPTS = \
        $(PYTHON_BOOTSTRAP) \
old mode 100755 (executable)
new mode 100644 (file)
similarity index 98%
rename from scripts/gnt-os
rename to lib/client/gnt_os.py
index f74213a..9808d5e
@@ -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-os
 
-import sys
-
 from ganeti.cli import *
 from ganeti import constants
 from ganeti import opcodes
@@ -298,5 +296,6 @@ commands = {
     "", "Modify the OS parameters"),
   }
 
-if __name__ == '__main__':
-  sys.exit(GenericMain(commands))
+
+def Main():
+  return GenericMain(commands)