aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/testing/user/userguide/test_details.rst2
-rw-r--r--functest/ci/add_proxy.sh56
-rw-r--r--functest/opnfv_tests/vnf/ims/cloudify_ims.py2
-rw-r--r--functest/opnfv_tests/vnf/router/cloudify_vrouter.py8
4 files changed, 49 insertions, 19 deletions
diff --git a/docs/testing/user/userguide/test_details.rst b/docs/testing/user/userguide/test_details.rst
index 25102c55d..0fefb98c0 100644
--- a/docs/testing/user/userguide/test_details.rst
+++ b/docs/testing/user/userguide/test_details.rst
@@ -455,5 +455,5 @@ The kubernetes testcases are distributed across various Tiers:
.. _`[13]`: https://wiki.opnfv.org/display/PROJ/SNAPS-OO
.. _`[14]`: https://github.com/oolorg/opnfv-functest-vrouter
.. _`[15]`: https://www.rebaca.com/what-we-do/abot-5g-network-simulator/
-.. _`[16]`: https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-tests.md
+.. _`[16]`: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-testing/e2e-tests.md
.. _`[17]`: https://github.com/Metaswitch/clearwater-heat/blob/release-129/clearwater.yaml
diff --git a/functest/ci/add_proxy.sh b/functest/ci/add_proxy.sh
index 3244f246a..f815ef09b 100644
--- a/functest/ci/add_proxy.sh
+++ b/functest/ci/add_proxy.sh
@@ -4,28 +4,32 @@ set -e
pushd "${1:-/home/opnfv/functest/images}" > /dev/null
+http_proxy=${http_proxy:-http://proxy:8080}
+https_proxy=${https_proxy:-${http_proxy:-http://proxy:8080}}
+ftp_proxy=${ftp_proxy:-${http_proxy:-http://proxy:8080}}
+no_proxy=${no_proxy:-"10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"}
+
images=${images-"\
-cloudify-manager-premium-4.0.1.qcow2 \
ubuntu-14.04-server-cloudimg-amd64-disk1.img \
ubuntu-16.04-server-cloudimg-amd64-disk1.img"}
add_proxy () {
cat << EOF >> "$1"
-http_proxy=${http_proxy:-http://proxy:8080}
-HTTP_PROXY=${http_proxy:-http://proxy:8080}
-https_proxy=${https_proxy:-${http_proxy:-http://proxy:8080}}
-HTTPS_PROXY=${https_proxy:-${http_proxy:-http://proxy:8080}}
-ftp_proxy=${ftp_proxy:-${http_proxy:-http://proxy:8080}}
-FTP_PROXY=${ftp_proxy:-${http_proxy:-http://proxy:8080}}
-no_proxy=${no_proxy:-"10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"}
-NO_PROXY=${no_proxy:-"10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"}
+http_proxy=${http_proxy}
+HTTP_PROXY=${http_proxy}
+https_proxy=${https_proxy}
+HTTPS_PROXY=${https_proxy}
+ftp_proxy=${ftp_proxy}
+FTP_PROXY=${ftp_proxy}
+no_proxy=${no_proxy}
+NO_PROXY=${no_proxy}
EOF
}
add_proxy_apt () {
cat << EOF >> "$1"
-Acquire::http::Proxy "${http_proxy:-http://proxy:8080}";
-Acquire::https::Proxy "${https_proxy:-http://proxy:8080}";
+Acquire::http::Proxy "${http_proxy}";
+Acquire::https::Proxy "${https_proxy}";
EOF
}
@@ -37,17 +41,35 @@ for image in $images; do
fi
guestmount -a "${image}" -i --rw "${tmpdir}"
add_proxy "${tmpdir}/etc/environment"
- if [[ ${image} == *"cloudify-manager"* ]]; then
- echo >> "${tmpdir}/etc/sysconfig/cloudify-mgmtworker"
- add_proxy "${tmpdir}/etc/sysconfig/cloudify-mgmtworker"
- echo >> "${tmpdir}/etc/sysconfig/cloudify-restservice"
- add_proxy "${tmpdir}/etc/sysconfig/cloudify-restservice"
- fi
if [[ ${image} == "ubuntu"* ]]; then
add_proxy_apt "${tmpdir}/etc/apt/apt.conf"
fi
guestunmount "${tmpdir}"
done
+sudo docker load -i cloudify-docker-manager-community-19.01.24.tar
+dockerfile=${tmpdir}/Dockerfile
+cat << EOF > $dockerfile
+FROM docker-cfy-manager:latest
+ENV HTTP_PROXY "${http_proxy}"
+ENV HTTPS_PROXY "${https_proxy}"
+ENV NO_PROXY "${no_proxy}"
+EOF
+for f in /etc/sysconfig/cloudify-mgmtworker /etc/sysconfig/cloudify-restservice; do \
+ cat << EOF >> $dockerfile
+RUN echo >> $f
+RUN echo "http_proxy=${http_proxy}" >> $f
+RUN echo "https_proxy=${https_proxy}" >> $f
+RUN echo "HTTP_PROXY=${http_proxy}" >> $f
+RUN echo "HTTPS_PROXY=${https_proxy}" >> $f
+RUN echo "no_proxy=${no_proxy}" >> $f
+EOF
+done
+sudo docker build -t docker-cfy-manager -f $dockerfile ${tmpdir}
+sudo docker save \
+ docker-cfy-manager > cloudify-docker-manager-community-19.01.24.tar
+sudo docker rmi docker-cfy-manager
+
+rm "${dockerfile}"
rmdir "${tmpdir}"
popd > /dev/null
diff --git a/functest/opnfv_tests/vnf/ims/cloudify_ims.py b/functest/opnfv_tests/vnf/ims/cloudify_ims.py
index 288e0316c..0f6adf96a 100644
--- a/functest/opnfv_tests/vnf/ims/cloudify_ims.py
+++ b/functest/opnfv_tests/vnf/ims/cloudify_ims.py
@@ -105,7 +105,7 @@ class CloudifyIms(cloudify.Cloudify):
if env.get('NEW_USER_ROLE').lower() == "admin":
self.__logger.warn(
"Defining NEW_USER_ROLE=admin will easily break the testcase "
- "because Cloudify doesn't manage tenancy (e.g. subnet "
+ "because Cloudify doesn't manage tenancy (e.g. subnet "
"overlapping)")
def execute(self):
diff --git a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
index ee2921066..b449d2d81 100644
--- a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
+++ b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
@@ -21,6 +21,7 @@ from functest.core import cloudify
from functest.opnfv_tests.vnf.router import vrouter_base
from functest.opnfv_tests.vnf.router.utilvnf import Utilvnf
from functest.utils import config
+from functest.utils import env
from functest.utils import functest_utils
@@ -110,6 +111,13 @@ class CloudifyVrouter(cloudify.Cloudify):
self.image_alt = None
self.flavor_alt = None
+ def check_requirements(self):
+ if env.get('NEW_USER_ROLE').lower() == "admin":
+ self.__logger.warn(
+ "Defining NEW_USER_ROLE=admin will easily break the testcase "
+ "because Cloudify doesn't manage tenancy (e.g. subnet "
+ "overlapping)")
+
def execute(self):
# pylint: disable=too-many-locals,too-many-statements
"""