diff --git a/.gitignore b/.gitignore index e46c2e126dff185a8b0bc2219aecabe377fe2041..b4e115c8034a656e8165161bdedf77b48956103b 100644 --- a/.gitignore +++ b/.gitignore @@ -97,6 +97,7 @@ # tools /tools/kvm-ifup +/tools/burnin /tools/ensure-dirs /tools/vcluster-setup /tools/node-cleanup diff --git a/Makefile.am b/Makefile.am index 2d130ef690d62d0c2d1be7758d677b79d5a0be3c..7363eadb772ead1a1e17097c84571d634ce4fbdc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -340,6 +340,7 @@ server_PYTHON = \ pytools_PYTHON = \ lib/tools/__init__.py \ + lib/tools/burnin.py \ lib/tools/ensure_dirs.py \ lib/tools/node_cleanup.py \ lib/tools/node_daemon_setup.py \ @@ -701,6 +702,7 @@ PYTHON_BOOTSTRAP_SBIN = \ PYTHON_BOOTSTRAP = \ $(PYTHON_BOOTSTRAP_SBIN) \ + tools/burnin \ tools/ensure-dirs \ tools/node-cleanup \ tools/node-daemon-setup \ @@ -799,7 +801,6 @@ nodist_sbin_SCRIPTS += src/ganeti-confd endif python_scripts = \ - tools/burnin \ tools/cfgshell \ tools/cfgupgrade \ tools/cfgupgrade12 \ @@ -829,6 +830,7 @@ pkglib_python_scripts = \ tools/check-cert-expired nodist_pkglib_python_scripts = \ + tools/burnin \ tools/ensure-dirs \ tools/node-daemon-setup \ tools/prepare-node-join @@ -1496,6 +1498,7 @@ $(REPLACE_VARS_SED): $(SHELL_ENV_INIT) Makefile stamp-directories daemons/ganeti-%: MODULE = ganeti.server.$(patsubst ganeti-%,%,$(notdir $@)) daemons/ganeti-watcher: MODULE = ganeti.watcher scripts/%: MODULE = ganeti.client.$(subst -,_,$(notdir $@)) +tools/burnin: MODULE = ganeti.tools.burnin tools/ensure-dirs: MODULE = ganeti.tools.ensure_dirs tools/node-daemon-setup: MODULE = ganeti.tools.node_daemon_setup tools/prepare-node-join: MODULE = ganeti.tools.prepare_node_join diff --git a/autotools/build-bash-completion b/autotools/build-bash-completion index 7e24db98fa58d108afbc9b0241e4673a190336d8..49ad9c54159a70c7ce3604a28b569065a970b3e3 100755 --- a/autotools/build-bash-completion +++ b/autotools/build-bash-completion @@ -39,6 +39,8 @@ from ganeti import utils from ganeti import build from ganeti import pathutils +from ganeti.tools import burnin + # _autoconf shouldn't be imported from anywhere except constants.py, but we're # making an exception here because this script is only used at build time. from ganeti import _autoconf @@ -838,7 +840,6 @@ def main(): build.LoadModule(filename))) # Burnin script - burnin = build.LoadModule("tools/burnin") WriteCompletion(sw, "%s/burnin" % pathutils.TOOLSDIR, "_ganeti_burnin", debug, opts=burnin.OPTIONS, args=burnin.ARGUMENTS) diff --git a/tools/burnin b/lib/tools/burnin.py similarity index 99% rename from tools/burnin rename to lib/tools/burnin.py index 42b74d27a2f52388735970f2dd5172e2a2c3a39a..b4fc958a2d6a89a0e434a666a61260727c8bbc4f 100755 --- a/tools/burnin +++ b/lib/tools/burnin.py @@ -1153,7 +1153,7 @@ class Burner(object): return constants.EXIT_SUCCESS -def main(): +def Main(): """Main function. """ @@ -1161,7 +1161,3 @@ def main(): debug=False, stderr_logging=True) return Burner().BurninCluster() - - -if __name__ == "__main__": - main()