summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docker/Dockerfile2
-rw-r--r--docker/Dockerfile.aarch642
-rwxr-xr-xfunctest/ci/check_os.sh24
-rw-r--r--functest/utils/openstack_utils.py12
4 files changed, 21 insertions, 19 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index d3f9d0465..0421e6150 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -130,7 +130,7 @@ RUN find -L ${FUNCTEST_REPO_DIR} -name "*.py" \
RUN /bin/bash ${REPOS_DIR}/parser/tests/parser_install.sh ${REPOS_DIR}
RUN wget -q https://raw.githubusercontent.com/openstack/rally/${RALLY_TAG}/install_rally.sh \
- && bash install_rally.sh --yes && rm install_rally.sh
+ && bash install_rally.sh --branch ${RALLY_TAG} --yes && rm install_rally.sh
RUN add_images.sh
diff --git a/docker/Dockerfile.aarch64 b/docker/Dockerfile.aarch64
index f240523ea..89f45ba05 100644
--- a/docker/Dockerfile.aarch64
+++ b/docker/Dockerfile.aarch64
@@ -120,7 +120,7 @@ RUN find -L ${FUNCTEST_REPO_DIR} -name "*.py" \
RUN /bin/bash ${REPOS_DIR}/parser/tests/parser_install.sh ${REPOS_DIR}
RUN wget -q https://raw.githubusercontent.com/openstack/rally/${RALLY_TAG}/install_rally.sh \
- && bash install_rally.sh --yes && rm install_rally.sh
+ && bash install_rally.sh --branch ${RALLY_TAG} --yes && rm install_rally.sh
RUN add_images.sh
diff --git a/functest/ci/check_os.sh b/functest/ci/check_os.sh
index ce0bc20c6..7b66f3da6 100755
--- a/functest/ci/check_os.sh
+++ b/functest/ci/check_os.sh
@@ -6,12 +6,18 @@
# jose.lausuch@ericsson.com
#
+if [[ ${OS_INSECURE,,} == "true" ]]; then
+ options='--insecure'
+else
+ options=''
+fi
+
declare -A service_cmd_array
-service_cmd_array['nova']='openstack server list'
-service_cmd_array['neutron']='openstack network list'
-service_cmd_array['keystone']='openstack endpoint list'
-service_cmd_array['cinder']='openstack volume list'
-service_cmd_array['glance']='openstack image list'
+service_cmd_array['nova']="openstack $options server list"
+service_cmd_array['neutron']="openstack $options network list"
+service_cmd_array['keystone']="openstack $options endpoint list"
+service_cmd_array['cinder']="openstack $options volume list"
+service_cmd_array['glance']="openstack $options image list"
MANDATORY_SERVICES='nova neutron keystone glance'
OPTIONAL_SERVICES='cinder'
@@ -41,7 +47,7 @@ check_service() {
required=$2
fi
echo ">>Checking ${service} service..."
- if ! openstack service list | grep -i ${service} > /dev/null; then
+ if ! openstack $options service list | grep -i ${service} > /dev/null; then
if [ "$required" == 'false' ]; then
echo "WARN: Optional Service ${service} is not enabled!"
return
@@ -67,7 +73,7 @@ fi
echo "Checking OpenStack endpoints:"
-publicURL=$(openstack catalog show identity |awk '/public/ {print $4}')
+publicURL=$(openstack $options catalog show identity |awk '/public/ {print $4}')
publicIP=$(echo $publicURL|sed 's/^.*http.*\:\/\///'|sed 's/.[^:]*$//')
publicPort=$(echo $publicURL|grep -Po '(?<=:)\d+')
https_enabled=$(echo $publicURL | grep 'https')
@@ -99,11 +105,11 @@ for service in $OPTIONAL_SERVICES; do
done
echo "Checking External network..."
-networks=($(neutron net-list -F id | tail -n +4 | head -n -1 | awk '{print $2}'))
+networks=($(neutron $options net-list -F id | tail -n +4 | head -n -1 | awk '{print $2}'))
is_external=False
for net in "${networks[@]}"
do
- is_external=$(neutron net-show $net|grep "router:external"|awk '{print $4}')
+ is_external=$(neutron $options net-show $net|grep "router:external"|awk '{print $4}')
if [ $is_external == "True" ]; then
echo "External network found: $net"
break
diff --git a/functest/utils/openstack_utils.py b/functest/utils/openstack_utils.py
index f155449d5..a89662648 100644
--- a/functest/utils/openstack_utils.py
+++ b/functest/utils/openstack_utils.py
@@ -181,14 +181,10 @@ def get_endpoint(service_type, endpoint_type='publicURL'):
def get_session(other_creds={}):
auth = get_session_auth(other_creds)
- cacert = os.getenv('OS_CACERT')
- if cacert is not None:
- if not os.path.isfile(cacert):
- raise Exception("The 'OS_CACERT' environment"
- "variable is set to %s but the file"
- "does not exist.", cacert)
-
- return session.Session(auth=auth, verify=cacert)
+ https_cacert = os.getenv('OS_CACERT', '')
+ https_insecure = os.getenv('OS_INSECURE', '').lower() == 'true'
+ return session.Session(auth=auth,
+ verify=(https_cacert or not https_insecure))
# *********************************************