summaryrefslogtreecommitdiffstats
path: root/utils/infra_setup/heat
diff options
context:
space:
mode:
Diffstat (limited to 'utils/infra_setup/heat')
-rwxr-xr-xutils/infra_setup/heat/common.py16
-rwxr-xr-xutils/infra_setup/heat/consts/__init__.py0
-rwxr-xr-xutils/infra_setup/heat/consts/files.py36
-rwxr-xr-xutils/infra_setup/heat/consts/parameters.py16
4 files changed, 9 insertions, 59 deletions
diff --git a/utils/infra_setup/heat/common.py b/utils/infra_setup/heat/common.py
index a0d6d83c..f0512b0f 100755
--- a/utils/infra_setup/heat/common.py
+++ b/utils/infra_setup/heat/common.py
@@ -66,14 +66,16 @@ def get_session_auth():
def get_session():
auth = get_session_auth()
- try:
- cacert = os.environ['OS_CACERT']
- except KeyError:
- return session.Session(auth=auth)
- else:
- insecure = os.getenv('OS_INSECURE', '').lower() == 'true'
- cacert = False if insecure else cacert
+ if os.getenv('OS_INSECURE', '').lower() == 'true':
+ cacert = False
return session.Session(auth=auth, verify=cacert)
+ else:
+ try:
+ cacert = os.environ['OS_CACERT']
+ except KeyError:
+ return session.Session(auth=auth)
+ else:
+ return session.Session(auth=auth, verify=cacert)
def get_endpoint(service_type, endpoint_type='publicURL'):
diff --git a/utils/infra_setup/heat/consts/__init__.py b/utils/infra_setup/heat/consts/__init__.py
deleted file mode 100755
index e69de29b..00000000
--- a/utils/infra_setup/heat/consts/__init__.py
+++ /dev/null
diff --git a/utils/infra_setup/heat/consts/files.py b/utils/infra_setup/heat/consts/files.py
deleted file mode 100755
index f148f103..00000000
--- a/utils/infra_setup/heat/consts/files.py
+++ /dev/null
@@ -1,36 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-# ------------------------------------------------------
-# Configuration File
-# ------------------------------------------------------
-GENERAL = 'General'
-
-
-def get_sections():
- return [
- GENERAL,
- # Add here new configurations...
- ]
-
-
-def get_sections_api():
- return [
- GENERAL,
- # Add here new configurations...
- ]
-
-# ------------------------------------------------------
-# General section parameters
-# ------------------------------------------------------
-ITERATIONS = 'iterations'
-TEMPLATE_DIR = 'template_dir'
-TEMPLATE_NAME = 'template_base_name'
-BENCHMARKS = 'benchmarks'
-DEBUG = 'debug'
diff --git a/utils/infra_setup/heat/consts/parameters.py b/utils/infra_setup/heat/consts/parameters.py
deleted file mode 100755
index 15aa5b5d..00000000
--- a/utils/infra_setup/heat/consts/parameters.py
+++ /dev/null
@@ -1,16 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-
-# ------------------------------------------------------
-# Directories and file locations
-# ------------------------------------------------------
-HEAT_DIR = 'heat/'
-TEST_TEMPLATE_NAME = 'test_template'
-TEMPLATE_EXTENSION = '.yaml'