aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKubi <jean.gaoliang@huawei.com>2017-07-05 02:58:30 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-07-05 02:58:30 +0000
commite4f9020a21ed9508b177d9764e585bf7c88aa2c6 (patch)
treef1f2ee47d4de538c1c81cd87040ca17082b601cf
parentffe83c920736716f0caea36dceeff7b7e910db7c (diff)
parenta2176af5514fc55ad8421635ad70ce4f26890ed6 (diff)
Merge "Use "OS_INSECURE" variable as the insecure mode indicator"
-rwxr-xr-xtests/ci/clean_images.sh2
-rwxr-xr-xtests/ci/load_images.sh2
-rw-r--r--yardstick/benchmark/scenarios/availability/ha_tools/nova/create_flavor.bash2
-rw-r--r--yardstick/benchmark/scenarios/availability/ha_tools/nova/delete_flavor.bash2
-rw-r--r--yardstick/benchmark/scenarios/availability/ha_tools/nova/show_flavors.bash2
-rw-r--r--yardstick/benchmark/scenarios/availability/monitor/monitor_command.py4
-rw-r--r--yardstick/common/openstack_utils.py3
7 files changed, 9 insertions, 8 deletions
diff --git a/tests/ci/clean_images.sh b/tests/ci/clean_images.sh
index 5cb0700df..832ade252 100755
--- a/tests/ci/clean_images.sh
+++ b/tests/ci/clean_images.sh
@@ -15,7 +15,7 @@ cleanup()
echo
echo "========== Cleanup =========="
- if [ $OS_CACERT ] && [ "$(echo $OS_CACERT | tr '[:upper:]' '[:lower:]')" = "false" ]; then
+ if [ $OS_INSECURE ] && [ "$(echo $OS_INSECURE | tr '[:upper:]' '[:lower:]')" = "true" ]; then
SECURE="--insecure"
else
SECURE=""
diff --git a/tests/ci/load_images.sh b/tests/ci/load_images.sh
index 8e0a2f68a..c2ae4fe7b 100755
--- a/tests/ci/load_images.sh
+++ b/tests/ci/load_images.sh
@@ -258,7 +258,7 @@ main()
RAW_IMAGE='/home/opnfv/images/yardstick-image.tar.gz'
fi
- if [ $OS_CACERT ] && [ "$(echo $OS_CACERT | tr '[:upper:]' '[:lower:]')" = "false" ]; then
+ if [ $OS_INSECURE ] && [ "$(echo $OS_INSECURE | tr '[:upper:]' '[:lower:]')" = "true" ]; then
SECURE="--insecure"
else
SECURE=""
diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/nova/create_flavor.bash b/yardstick/benchmark/scenarios/availability/ha_tools/nova/create_flavor.bash
index 8737836e2..aee516ea9 100644
--- a/yardstick/benchmark/scenarios/availability/ha_tools/nova/create_flavor.bash
+++ b/yardstick/benchmark/scenarios/availability/ha_tools/nova/create_flavor.bash
@@ -14,7 +14,7 @@
set -e
-if [ $OS_CACERT ] && [ "$(echo $OS_CACERT | tr '[:upper:]' '[:lower:]')" = "false" ]; then
+if [ $OS_INSECURE ] && [ "$(echo $OS_INSECURE | tr '[:upper:]' '[:lower:]')" = "true" ]; then
SECURE="--insecure"
else
SECURE=""
diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/nova/delete_flavor.bash b/yardstick/benchmark/scenarios/availability/ha_tools/nova/delete_flavor.bash
index 617dcf8a3..d39926fc5 100644
--- a/yardstick/benchmark/scenarios/availability/ha_tools/nova/delete_flavor.bash
+++ b/yardstick/benchmark/scenarios/availability/ha_tools/nova/delete_flavor.bash
@@ -14,7 +14,7 @@
set -e
-if [ $OS_CACERT ] && [ "$(echo $OS_CACERT | tr '[:upper:]' '[:lower:]')" = "false" ]; then
+if [ $OS_INSECURE ] && [ "$(echo $OS_INSECURE | tr '[:upper:]' '[:lower:]')" = "true" ]; then
SECURE="--insecure"
else
SECURE=""
diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/nova/show_flavors.bash b/yardstick/benchmark/scenarios/availability/ha_tools/nova/show_flavors.bash
index 9b413c965..bd61ba9bb 100644
--- a/yardstick/benchmark/scenarios/availability/ha_tools/nova/show_flavors.bash
+++ b/yardstick/benchmark/scenarios/availability/ha_tools/nova/show_flavors.bash
@@ -13,7 +13,7 @@
set -e
-if [ $OS_CACERT ] && [ "$(echo $OS_CACERT | tr '[:upper:]' '[:lower:]')" = "false" ]; then
+if [ $OS_INSECURE ] && [ "$(echo $OS_INSECURE | tr '[:upper:]' '[:lower:]')" = "true" ]; then
SECURE="--insecure"
else
SECURE=""
diff --git a/yardstick/benchmark/scenarios/availability/monitor/monitor_command.py b/yardstick/benchmark/scenarios/availability/monitor/monitor_command.py
index d757bd88d..a0777f94e 100644
--- a/yardstick/benchmark/scenarios/availability/monitor/monitor_command.py
+++ b/yardstick/benchmark/scenarios/availability/monitor/monitor_command.py
@@ -56,11 +56,11 @@ class MonitorOpenstackCmd(basemonitor.BaseMonitor):
self.cmd = self._config["command_name"]
try:
- cacert = os.environ['OS_CACERT']
+ insecure = os.environ['OS_INSECURE']
except KeyError:
pass
else:
- if cacert.lower() == "false":
+ if insecure.lower() == "true":
self.cmd = self.cmd + " --insecure"
def monitor_func(self):
diff --git a/yardstick/common/openstack_utils.py b/yardstick/common/openstack_utils.py
index 1f08344e4..8787e605a 100644
--- a/yardstick/common/openstack_utils.py
+++ b/yardstick/common/openstack_utils.py
@@ -79,7 +79,8 @@ def get_session():
except KeyError:
return session.Session(auth=auth)
else:
- cacert = False if cacert.lower() == "false" else cacert
+ insecure = os.getenv('OS_INSECURE', '').lower() == 'true'
+ cacert = False if insecure else cacert
return session.Session(auth=auth, verify=cacert)