From 0e057acf0cce634f0ab4e472184d2af2d46689fd Mon Sep 17 00:00:00 2001 From: Linda Wang Date: Wed, 30 Aug 2017 09:00:27 +0000 Subject: Disable urllib3 warnings 1. When running in compass OSA, lots of SubjectAltNameWarnings are shown in console, so just disable the warnings here. See https://github.com/shazow/urllib3/issues/497 for details 2. Redirect warnings issued by the warnings module to the logging system via logging.captureWarnings(True) 3. But urllib3 warning is still there for two cmds about rally/tempest. Change-Id: Ic22cf8e2babc10c9d55a7ed46b841312a4e430a7 Signed-off-by: Linda Wang --- functest/ci/prepare_env.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'functest/ci/prepare_env.py') diff --git a/functest/ci/prepare_env.py b/functest/ci/prepare_env.py index a354dbe83..36d042968 100644 --- a/functest/ci/prepare_env.py +++ b/functest/ci/prepare_env.py @@ -37,14 +37,14 @@ pod_arch = os.getenv("POD_ARCH", None) arch_filter = ['aarch64'] CONFIG_FUNCTEST_PATH = pkg_resources.resource_filename( - 'functest', 'ci/config_functest.yaml') + 'functest', 'ci/config_functest.yaml') CONFIG_PATCH_PATH = pkg_resources.resource_filename( - 'functest', 'ci/config_patch.yaml') + 'functest', 'ci/config_patch.yaml') CONFIG_AARCH64_PATCH_PATH = pkg_resources.resource_filename( - 'functest', 'ci/config_aarch64_patch.yaml') + 'functest', 'ci/config_aarch64_patch.yaml') RALLY_CONF_PATH = "/etc/rally/rally.conf" RALLY_AARCH64_PATCH_PATH = pkg_resources.resource_filename( - 'functest', 'ci/rally_aarch64_patch.conf') + 'functest', 'ci/rally_aarch64_patch.conf') class PrepareEnvParser(object): @@ -358,6 +358,7 @@ def prepare_env(**kwargs): def main(): logging.config.fileConfig(pkg_resources.resource_filename( 'functest', 'ci/logging.ini')) + logging.captureWarnings(True) parser = PrepareEnvParser() args = parser.parse_args(sys.argv[1:]) return prepare_env(**args) -- cgit 1.2.3-korg