aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docker/components/Dockerfile2
-rw-r--r--docker/features/testcases.yaml1
-rw-r--r--docker/features/thirdparty-requirements.txt2
-rw-r--r--docker/restapi/Dockerfile5
-rw-r--r--docker/restapi/thirdparty-requirements.txt2
-rw-r--r--docker/smoke/Dockerfile2
-rw-r--r--functest/ci/check_deployment.py21
-rw-r--r--functest/ci/testcases.yaml1
-rw-r--r--functest/cli/commands/cli_os.py5
-rw-r--r--functest/opnfv_tests/openstack/snaps/snaps_utils.py10
10 files changed, 31 insertions, 20 deletions
diff --git a/docker/components/Dockerfile b/docker/components/Dockerfile
index 781022ef..a0f7a48e 100644
--- a/docker/components/Dockerfile
+++ b/docker/components/Dockerfile
@@ -27,7 +27,7 @@ RUN apk --no-cache add --virtual .build-deps --update \
rm -r upper-constraints.txt /src/os-faults /src/rally && \
mkdir -p /etc/rally && \
printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \
- mkdir -p /var/lib/rally/database && rally-manage db create && \
+ mkdir -p /var/lib/rally/database && rally db create && \
apk del .build-deps
COPY testcases.yaml /usr/lib/python2.7/site-packages/functest/ci/testcases.yaml
CMD ["bash","-c","prepare_env start && run_tests -t all"]
diff --git a/docker/features/testcases.yaml b/docker/features/testcases.yaml
index d29b8322..ee8e7c7c 100644
--- a/docker/features/testcases.yaml
+++ b/docker/features/testcases.yaml
@@ -27,7 +27,6 @@ tiers:
-
case_name: bgpvpn
project_name: sdnvpn
- enabled: false
criteria: 100
blocking: false
description: >-
diff --git a/docker/features/thirdparty-requirements.txt b/docker/features/thirdparty-requirements.txt
index 1acf63ea..a89fd226 100644
--- a/docker/features/thirdparty-requirements.txt
+++ b/docker/features/thirdparty-requirements.txt
@@ -1,4 +1,4 @@
# baro_tests
-# sdnvpn
+sdnvpn
sfc
# doctor-tests;python_version>='3.0'
diff --git a/docker/restapi/Dockerfile b/docker/restapi/Dockerfile
index dc0119a9..81b79fd8 100644
--- a/docker/restapi/Dockerfile
+++ b/docker/restapi/Dockerfile
@@ -44,10 +44,13 @@ RUN apk --no-cache add --update python3 sshpass \
git clone --depth 1 -b $FDS_TAG https://gerrit.opnfv.org/gerrit/fds /src/fds && \
git clone --depth 1 -b $VIMS_TAG https://github.com/boucherv-orange/clearwater-live-test /src/vims-test && \
ln -s /src/tempest /src/refstack-client/.tempest && \
- virtualenv --system-site-packages /src/tempest/.venv && \
+ virtualenv --system-site-packages /src/tempest/.venv --python=python2.7 && \
(cd /src/vims-test && bundle config build.nokogiri --use-system-libraries && bundle install --system) && \
rm -r upper-constraints.txt thirdparty-requirements.txt /src/refstack-client/.git /src/odl_test/.git \
/src/os-faults /src/rally /src/fds/.git /src/vims-test/.git && \
+ mkdir -p /etc/rally && \
+ printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \
+ mkdir -p /var/lib/rally/database && rally db create && \
apk del .build-deps
EXPOSE 5000
CMD ["functest_restapi"]
diff --git a/docker/restapi/thirdparty-requirements.txt b/docker/restapi/thirdparty-requirements.txt
index 50e0d1c9..8eb82d77 100644
--- a/docker/restapi/thirdparty-requirements.txt
+++ b/docker/restapi/thirdparty-requirements.txt
@@ -1,4 +1,4 @@
# baro_tests
-# sdnvpn
+sdnvpn
sfc
# doctor-tests;python_version>='3.0'
diff --git a/docker/smoke/Dockerfile b/docker/smoke/Dockerfile
index 01414f3e..4485699c 100644
--- a/docker/smoke/Dockerfile
+++ b/docker/smoke/Dockerfile
@@ -36,7 +36,7 @@ RUN apk --no-cache add --virtual .build-deps --update \
rm -r upper-constraints.txt /src/refstack-client/.git /src/odl_test/.git /src/os-faults /src/rally && \
mkdir -p /etc/rally && \
printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \
- mkdir -p /var/lib/rally/database && rally-manage db create && \
+ mkdir -p /var/lib/rally/database && rally db create && \
apk del .build-deps
COPY testcases.yaml /usr/lib/python2.7/site-packages/functest/ci/testcases.yaml
CMD ["bash","-c","prepare_env start && run_tests -t all"]
diff --git a/functest/ci/check_deployment.py b/functest/ci/check_deployment.py
index e1ad137c..db94fd74 100644
--- a/functest/ci/check_deployment.py
+++ b/functest/ci/check_deployment.py
@@ -35,16 +35,20 @@ __author__ = "Jose Lausuch <jose.lausuch@ericsson.com>"
LOGGER = logging.getLogger(__name__)
-def verify_connectivity(adress, port):
+def verify_connectivity(endpoint):
""" Returns true if an ip/port is reachable"""
connection = socket.socket()
connection.settimeout(10)
+ ip = urlparse(endpoint).hostname
+ port = urlparse(endpoint).port
+ if not port:
+ port = 443 if urlparse(endpoint).scheme == "https" else 80
try:
- connection.connect((adress, port))
- LOGGER.debug('%s:%s is reachable!', adress, port)
+ connection.connect((ip, port))
+ LOGGER.debug('%s:%s is reachable!', ip, port)
return True
except socket.error:
- LOGGER.error('%s:%s is not reachable.', adress, port)
+ LOGGER.exception('%s:%s is not reachable.', ip, port)
return False
@@ -67,8 +71,7 @@ class CheckDeployment(object):
def check_auth_endpoint(self):
""" Verifies connectivity to the OS_AUTH_URL given in the RC file """
rc_endpoint = self.os_creds.auth_url
- if not (verify_connectivity(urlparse(rc_endpoint).hostname,
- urlparse(rc_endpoint).port)):
+ if not (verify_connectivity(rc_endpoint)):
raise Exception("OS_AUTH_URL {} is not reachable.".
format(rc_endpoint))
LOGGER.info("Connectivity to OS_AUTH_URL %s ...OK", rc_endpoint)
@@ -78,8 +81,7 @@ class CheckDeployment(object):
public_endpoint = keystone_utils.get_endpoint(self.os_creds,
'identity',
interface='public')
- if not (verify_connectivity(urlparse(public_endpoint).hostname,
- urlparse(public_endpoint).port)):
+ if not (verify_connectivity(public_endpoint)):
raise Exception("Public endpoint {} is not reachable.".
format(public_endpoint))
LOGGER.info("Connectivity to the public endpoint %s ...OK",
@@ -90,8 +92,7 @@ class CheckDeployment(object):
endpoint = keystone_utils.get_endpoint(self.os_creds,
service,
interface='public')
- if not (verify_connectivity(urlparse(endpoint).hostname,
- urlparse(endpoint).port)):
+ if not (verify_connectivity(endpoint)):
raise Exception("{} endpoint {} is not reachable.".
format(service, endpoint))
LOGGER.info("Connectivity to endpoint '%s' %s ...OK",
diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml
index ea9f4e7b..6b1eaa9c 100644
--- a/functest/ci/testcases.yaml
+++ b/functest/ci/testcases.yaml
@@ -236,7 +236,6 @@ tiers:
-
case_name: bgpvpn
project_name: sdnvpn
- enabled: false
criteria: 100
blocking: false
description: >-
diff --git a/functest/cli/commands/cli_os.py b/functest/cli/commands/cli_os.py
index e97ab080..71cd78c5 100644
--- a/functest/cli/commands/cli_os.py
+++ b/functest/cli/commands/cli_os.py
@@ -9,6 +9,7 @@
import os
+from urlparse import urlparse
import click
@@ -27,8 +28,8 @@ class OpenStack(object):
self.openstack_creds = CONST.__getattribute__('openstack_creds')
self.snapshot_file = CONST.__getattribute__('openstack_snapshot_file')
if self.os_auth_url:
- self.endpoint_ip = self.os_auth_url.rsplit("/")[2].rsplit(":")[0]
- self.endpoint_port = self.os_auth_url.rsplit("/")[2].rsplit(":")[1]
+ self.endpoint_ip = urlparse(self.os_auth_url).hostname
+ self.endpoint_port = urlparse(self.os_auth_url).port
def ping_endpoint(self):
if self.os_auth_url is None:
diff --git a/functest/opnfv_tests/openstack/snaps/snaps_utils.py b/functest/opnfv_tests/openstack/snaps/snaps_utils.py
index c3cd6245..284e88b5 100644
--- a/functest/opnfv_tests/openstack/snaps/snaps_utils.py
+++ b/functest/opnfv_tests/openstack/snaps/snaps_utils.py
@@ -5,17 +5,25 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
+from functest.utils.constants import CONST
+
from snaps.openstack.utils import neutron_utils, nova_utils
def get_ext_net_name(os_creds):
"""
- Returns the first external network name
+ Returns the configured external network name or
+ the first retrieved external network name
:param: os_creds: an instance of snaps OSCreds object
:return:
"""
neutron = neutron_utils.neutron_client(os_creds)
ext_nets = neutron_utils.get_external_networks(neutron)
+ if (hasattr(CONST, 'EXTERNAL_NETWORK')):
+ extnet_config = CONST.__getattribute__('EXTERNAL_NETWORK')
+ for ext_net in ext_nets:
+ if ext_net.name == extnet_config:
+ return extnet_config
return ext_nets[0].name if ext_nets else ""