diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-06-30 06:24:11 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-06-30 14:32:52 +0200 |
commit | 678609610f4ccbcb19438cbce5d84bd376010596 (patch) | |
tree | f79c8abd8f04d99e586317e426fc05a68992badf /functest/utils | |
parent | c426ee40d40434ea3a5d085f7b98d28fcdb063ff (diff) |
Define console_scripts
Only prepare_env.py and run_tests.py remain executable to avoid
breaking the gate.
As soon as the jenkins jobs are updated to run them from $PATH, tox
will be updated to protect against chmod a+x py files. Dockerfile
will be simplified as well.
Change-Id: Iac1a7ceb6b344e800177226ea39919826f6d3735
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/utils')
-rw-r--r--[-rwxr-xr-x] | functest/utils/openstack_clean.py | 7 | ||||
-rw-r--r--[-rwxr-xr-x] | functest/utils/openstack_snapshot.py | 7 |
2 files changed, 2 insertions, 12 deletions
diff --git a/functest/utils/openstack_clean.py b/functest/utils/openstack_clean.py index e88245d6..d7df8f84 100755..100644 --- a/functest/utils/openstack_clean.py +++ b/functest/utils/openstack_clean.py @@ -23,7 +23,6 @@ # import logging -import sys import time import yaml @@ -382,6 +381,7 @@ def remove_tenants(keystone_client, default_tenants): def main(): + logging.basicConfig() logger.info("Cleaning OpenStack resources...") nova_client = os_utils.get_nova_client() @@ -430,8 +430,3 @@ def main(): remove_tenants(keystone_client, default_tenants) separator() return 0 - - -if __name__ == '__main__': - logging.basicConfig() - sys.exit(main()) diff --git a/functest/utils/openstack_snapshot.py b/functest/utils/openstack_snapshot.py index f4ef751c..3dc6f80c 100755..100644 --- a/functest/utils/openstack_snapshot.py +++ b/functest/utils/openstack_snapshot.py @@ -22,7 +22,6 @@ import logging import yaml -import sys import functest.utils.openstack_utils as os_utils from functest.utils.constants import CONST @@ -131,6 +130,7 @@ def get_tenants(keystone_client): def main(): + logging.basicConfig() logger.info("Generating OpenStack snapshot...") nova_client = os_utils.get_nova_client() @@ -163,8 +163,3 @@ def main(): logger.debug("NOTE: These objects will NOT be deleted after " + "running the test.") return 0 - - -if __name__ == '__main__': - logging.basicConfig() - sys.exit(main()) |