aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docker/Dockerfile5
-rw-r--r--docker/Dockerfile.aarch645
-rw-r--r--docker/thirdparty-requirements.txt5
-rw-r--r--functest/ci/config_functest.yaml2
-rw-r--r--functest/ci/testcases.yaml8
-rw-r--r--functest/opnfv_tests/openstack/rally/rally.py5
-rw-r--r--functest/opnfv_tests/openstack/rally/scenario/opnfv-requests.yaml11
-rw-r--r--functest/opnfv_tests/openstack/rally/task.yaml4
-rwxr-xr-xfunctest/opnfv_tests/openstack/refstack_client/refstack_client.py25
-rw-r--r--functest/tests/unit/openstack/rally/test_rally.py8
-rw-r--r--functest/tests/unit/openstack/refstack_client/test_refstack_client.py22
-rw-r--r--functest/tests/unit/utils/test_openstack_utils.py53
-rw-r--r--functest/utils/openstack_utils.py37
13 files changed, 21 insertions, 169 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index a3ebc1a1..d38713e0 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -90,7 +90,6 @@ RUN ln -s /usr/local/lib/python2.7/dist-packages/functest ${FUNCTEST_REPO_DIR}/f
# OPNFV repositories
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/copper ${REPOS_DIR}/copper
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/domino ${REPOS_DIR}/domino
-RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/parser ${REPOS_DIR}/parser
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/doctor ${REPOS_DIR}/doctor
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/promise ${REPOS_DIR}/promise
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/netready ${REPOS_DIR}/netready
@@ -118,8 +117,7 @@ RUN find -L ${FUNCTEST_REPO_DIR} -name "*.py" \
-not -path "*functest_venv*" \
|xargs grep \#\! |cut -d\: -f 1 |xargs chmod -c 755
-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 \
+RUN wget -q https://git.openstack.org/cgit/openstack/rally/plain/install_rally.sh?h=${RALLY_TAG} -O install_rally.sh \
&& bash install_rally.sh --branch ${RALLY_TAG} --yes && rm install_rally.sh
RUN add_images.sh
@@ -133,6 +131,7 @@ RUN /bin/bash -c ". /usr/local/lib/python2.7/dist-packages/sfc/tests/functest/se
# refstack-client integration
RUN wget -q https://raw.githubusercontent.com/openstack/refstack-client/master/setup_env \
&& bash setup_env -t ${REFSTACK_TAG} && rm setup_env
+RUN ln -s ${HOME}/.tempest /usr/local/lib/python2.7/dist-packages/.tempest
RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
&& cd ${REPOS_VNFS_DIR}/vims-test \
diff --git a/docker/Dockerfile.aarch64 b/docker/Dockerfile.aarch64
index 1a7dc027..77c94b02 100644
--- a/docker/Dockerfile.aarch64
+++ b/docker/Dockerfile.aarch64
@@ -85,7 +85,6 @@ RUN pip install ${PIP_OPTS} \
# OPNFV repositories
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/copper ${REPOS_DIR}/copper
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/domino ${REPOS_DIR}/domino
-RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/parser ${REPOS_DIR}/parser
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/doctor ${REPOS_DIR}/doctor
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/promise ${REPOS_DIR}/promise
@@ -110,8 +109,7 @@ RUN find -L ${FUNCTEST_REPO_DIR} -name "*.py" \
-not -path "*functest_venv*" \
|xargs grep \#\! |cut -d\: -f 1 |xargs chmod -c 755
-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 \
+RUN wget -q https://git.openstack.org/cgit/openstack/rally/plain/install_rally.sh?h=${RALLY_TAG} -O install_rally.sh \
&& bash install_rally.sh --branch ${RALLY_TAG} --yes && rm install_rally.sh
RUN add_images.sh
@@ -125,6 +123,7 @@ RUN /bin/bash -c ". /usr/local/lib/python2.7/dist-packages/sfc/tests/functest/se
# refstack-client integration
RUN wget -q https://raw.githubusercontent.com/openstack/refstack-client/master/setup_env \
&& bash setup_env -t ${REFSTACK_TAG} && rm setup_env
+RUN ln -s ${HOME}/.tempest /usr/local/lib/python2.7/dist-packages/.tempest
RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
&& cd ${REPOS_VNFS_DIR}/vims-test \
diff --git a/docker/thirdparty-requirements.txt b/docker/thirdparty-requirements.txt
index f51a5e29..d1c3a917 100644
--- a/docker/thirdparty-requirements.txt
+++ b/docker/thirdparty-requirements.txt
@@ -3,7 +3,8 @@ git+https://gerrit.opnfv.org/gerrit/sdnvpn#egg=sdnvpn
git+https://gerrit.opnfv.org/gerrit/opera#egg=opera
git+https://gerrit.opnfv.org/gerrit/securityscanning#egg=securityscanning
git+https://gerrit.opnfv.org/gerrit/sfc#egg=sfc
-networking-bgpvpn
+tosca-parser>=0.7.0 # Apache-2.0
+heat-translator>=0.4.0 # Apache-2.0
rally
tempest>=15.0.0 # Apache-2.0
-git+https://github.com/openstack/refstack-client#egg=refstack-client
+git+https://github.com/openstack/refstack-client#egg=refstack-client \ No newline at end of file
diff --git a/functest/ci/config_functest.yaml b/functest/ci/config_functest.yaml
index e02c1975..b93730cd 100644
--- a/functest/ci/config_functest.yaml
+++ b/functest/ci/config_functest.yaml
@@ -11,7 +11,6 @@ general:
repo_barometer: /home/opnfv/repos/barometer
repo_doctor: /home/opnfv/repos/doctor
repo_copper: /home/opnfv/repos/copper
- repo_parser: /home/opnfv/repos/parser
repo_domino: /home/opnfv/repos/domino
repo_fds: /home/opnfv/repos/fds
repo_securityscan: /home/opnfv/repos/securityscanning
@@ -23,7 +22,6 @@ general:
ims_data: /home/opnfv/functest/data/ims/
functest_images: /home/opnfv/functest/images
rally_inst: /home/opnfv/.rally
- refstack_client: /home/opnfv/repos/refstack-client
openstack:
creds: /home/opnfv/functest/conf/openstack.creds
diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml
index 2763d0c2..11af9823 100644
--- a/functest/ci/testcases.yaml
+++ b/functest/ci/testcases.yaml
@@ -198,7 +198,7 @@ tiers:
Robot as the test framework.
dependencies:
installer: 'apex'
- scenario: 'odl_l2-fdio'
+ scenario: 'odl.*-fdio'
run:
module: 'functest.opnfv_tests.sdn.odl.odl'
class: 'ODLTests'
@@ -297,7 +297,7 @@ tiers:
module: 'functest.core.feature'
class: 'BashFeature'
args:
- cmd: 'cd /home/opnfv/repos/sdnvpn/sdnvpn/test/functest && python ./run_tests.py'
+ cmd: 'cd /usr/local/lib/python2.7/dist-packages/sdnvpn/test/functest && python ./run_tests.py'
-
case_name: security_scan
@@ -314,7 +314,7 @@ tiers:
module: 'functest.core.feature'
class: 'BashFeature'
args:
- cmd: '. /home/opnfv/functest/conf/stackrc && cd /home/opnfv/repos/securityscanning && python security_scan.py --config config.ini && cd -'
+ cmd: '. /home/opnfv/functest/conf/stackrc && cd /usr/local/lib/python2.7/dist-packages && python security_scan.py --config config.ini && cd -'
-
case_name: copper
@@ -363,7 +363,7 @@ tiers:
module: 'functest.core.feature'
class: 'BashFeature'
args:
- cmd: 'cd /home/opnfv/repos/sfc/sfc/tests/functest && python ./run_tests.py'
+ cmd: 'cd /usr/local/lib/python2.7/dist-packages/sfc/tests/functest && python ./run_tests.py'
-
case_name: onos_sfc
diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py
index 8970a5c0..24c9147c 100644
--- a/functest/opnfv_tests/openstack/rally/rally.py
+++ b/functest/opnfv_tests/openstack/rally/rally.py
@@ -30,7 +30,7 @@ logger = logging.getLogger(__name__)
class RallyBase(testcase.OSGCTestCase):
TESTS = ['authenticate', 'glance', 'cinder', 'heat', 'keystone',
- 'neutron', 'nova', 'quotas', 'requests', 'vm', 'all']
+ 'neutron', 'nova', 'quotas', 'vm', 'all']
GLANCE_IMAGE_NAME = CONST.__getattribute__('openstack_image_name')
GLANCE_IMAGE_FILENAME = CONST.__getattribute__('openstack_image_file_name')
GLANCE_IMAGE_PATH = os.path.join(
@@ -102,9 +102,6 @@ class RallyBase(testcase.OSGCTestCase):
else:
task_args['netid'] = ''
- # get keystone auth endpoint
- task_args['request_url'] = CONST.__getattribute__('OS_AUTH_URL') or ''
-
return task_args
def _prepare_test_list(self, test_name):
diff --git a/functest/opnfv_tests/openstack/rally/scenario/opnfv-requests.yaml b/functest/opnfv_tests/openstack/rally/scenario/opnfv-requests.yaml
deleted file mode 100644
index 16136978..00000000
--- a/functest/opnfv_tests/openstack/rally/scenario/opnfv-requests.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
- HttpRequests.check_request:
- -
- args:
- url: "{{ request_url }}"
- method: "GET"
- status_code: 200
- allow_redirects: True
- runner:
- {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }}
- sla:
- {{ no_failures_sla() }}
diff --git a/functest/opnfv_tests/openstack/rally/task.yaml b/functest/opnfv_tests/openstack/rally/task.yaml
index c482f120..033edb83 100644
--- a/functest/opnfv_tests/openstack/rally/task.yaml
+++ b/functest/opnfv_tests/openstack/rally/task.yaml
@@ -35,10 +35,6 @@
{%- include "var/opnfv-quotas.yaml"-%}
{% endif %}
-{% if "requests" in service_list %}
-{%- include "var/opnfv-requests.yaml"-%}
-{% endif %}
-
{% if "heat" in service_list %}
{%- include "var/opnfv-heat.yaml"-%}
{% endif %}
diff --git a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
index 30d1cf08..c4618894 100755
--- a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
+++ b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
# matthew.lijun@huawei.com wangwulin@huawei.com
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
@@ -45,31 +45,18 @@ class RefstackClient(testcase.OSGCTestCase):
self.defcorelist = pkg_resources.resource_filename(
'functest', 'opnfv_tests/openstack/refstack_client/defcore.txt')
- def source_venv(self):
-
- cmd = ("cd {0};"
- ". .venv/bin/activate;"
- "cd -;".format(CONST.__getattribute__('dir_refstack_client')))
- ft_utils.execute_command(cmd)
-
def run_defcore(self, conf, testlist):
logger.debug("Generating test case list...")
- cmd = ("cd {0};"
- "./refstack-client test -c {1} -v --test-list {2};"
- "cd -;".format(CONST.__getattribute__('dir_refstack_client'),
- conf,
- testlist))
+ cmd = ("refstack-client test -c {0} -v --test-list {1}"
+ .format(conf, testlist))
ft_utils.execute_command(cmd)
def run_defcore_default(self):
logger.debug("Generating test case list...")
- cmd = ("cd {0};"
- "./refstack-client test -c {1} -v --test-list {2};"
- "cd -;".format(CONST.__getattribute__('dir_refstack_client'),
- self.confpath,
- self.defcorelist))
+ cmd = ("refstack-client test -c {0} -v --test-list {1}"
+ .format(self.confpath, self.defcorelist))
logger.info("Starting Refstack_defcore test case: '%s'." % cmd)
header = ("Refstack environment:\n"
@@ -159,7 +146,6 @@ class RefstackClient(testcase.OSGCTestCase):
try:
tempestconf = TempestConf()
tempestconf.generate_tempestconf()
- self.source_venv()
self.run_defcore_default()
self.parse_refstack_result()
res = testcase.TestCase.EX_OK
@@ -192,7 +178,6 @@ class RefstackClient(testcase.OSGCTestCase):
"%s", e)
return self.EX_RUN_ERROR
try:
- self.source_venv()
self._prep_test()
self.run_defcore(self.confpath, self.testlist)
res = testcase.TestCase.EX_OK
diff --git a/functest/tests/unit/openstack/rally/test_rally.py b/functest/tests/unit/openstack/rally/test_rally.py
index b9e78616..8845f660 100644
--- a/functest/tests/unit/openstack/rally/test_rally.py
+++ b/functest/tests/unit/openstack/rally/test_rally.py
@@ -53,14 +53,6 @@ class OSRallyTesting(unittest.TestCase):
task_args = self.rally_base._build_task_args('test_file_name')
self.assertEqual(task_args['netid'], '')
- def test_build_task_args_missing_auth_url(self):
- CONST.__setattr__('OS_AUTH_URL', None)
- with mock.patch('functest.opnfv_tests.openstack.rally.rally.'
- 'os_utils.get_external_net',
- return_value='test_floating_network'):
- task_args = self.rally_base._build_task_args('test_file_name')
- self.assertEqual(task_args['request_url'], '')
-
def check_scenario_file(self, value):
yaml_file = 'opnfv-{}.yaml'.format('test_file_name')
if yaml_file in value:
diff --git a/functest/tests/unit/openstack/refstack_client/test_refstack_client.py b/functest/tests/unit/openstack/refstack_client/test_refstack_client.py
index 3a121245..f92d2806 100644
--- a/functest/tests/unit/openstack/refstack_client/test_refstack_client.py
+++ b/functest/tests/unit/openstack/refstack_client/test_refstack_client.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python
-
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
+# matthew.lijun@huawei.com wangwulin@huawei.com
# 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
@@ -12,7 +13,6 @@ import unittest
from functest.core import testcase
from functest.opnfv_tests.openstack.refstack_client import refstack_client
-from functest.utils.constants import CONST
class OSRefstackClientTesting(unittest.TestCase):
@@ -28,27 +28,13 @@ class OSRefstackClientTesting(unittest.TestCase):
'testlist': self._testlist}
self.refstackclient = refstack_client.RefstackClient()
- def test_source_venv(self):
- with mock.patch('functest.opnfv_tests.openstack.refstack_client.'
- 'refstack_client.ft_utils.execute_command') as m:
- cmd = ("cd {0};"
- ". .venv/bin/activate;"
- "cd -;"
- .format(CONST.__getattribute__('dir_refstack_client')))
- self.refstackclient.source_venv()
- m.assert_any_call(cmd)
-
def test_run_defcore(self):
config = 'tempest.conf'
testlist = 'testlist'
with mock.patch('functest.opnfv_tests.openstack.refstack_client.'
'refstack_client.ft_utils.execute_command') as m:
- cmd = ("cd {0};"
- "./refstack-client test -c {1} -v --test-list {2};"
- "cd -;"
- .format(CONST.__getattribute__('dir_refstack_client'),
- config,
- testlist))
+ cmd = ("refstack-client test -c {0} -v --test-list {1}"
+ .format(config, testlist))
self.refstackclient.run_defcore(config, testlist)
m.assert_any_call(cmd)
diff --git a/functest/tests/unit/utils/test_openstack_utils.py b/functest/tests/unit/utils/test_openstack_utils.py
index 74b49aaa..828fb3d4 100644
--- a/functest/tests/unit/utils/test_openstack_utils.py
+++ b/functest/tests/unit/utils/test_openstack_utils.py
@@ -255,12 +255,6 @@ class OSUtilsTesting(unittest.TestCase):
'delete_port.return_value': mock.Mock(),
'remove_interface_router.return_value': mock.Mock(),
'remove_gateway_router.return_value': mock.Mock(),
- 'create_bgpvpn.return_value': self.mock_return,
- 'create_network_association.return_value': self.mock_return,
- 'create_router_association.return_value': self.mock_return,
- 'update_bgpvpn.return_value': self.mock_return,
- 'delete_bgpvpn.return_value': self.mock_return,
- 'show_bgpvpn.return_value': self.mock_return,
'list_security_groups.return_value': {'security_groups':
[self.sec_group]},
'list_security_group_rules.'
@@ -1212,53 +1206,6 @@ class OSUtilsTesting(unittest.TestCase):
'router_id'))
self.assertTrue(mock_logger_error.called)
- def test_create_bgpvpn(self):
- self.assertEqual(openstack_utils.
- create_bgpvpn(self.neutron_client),
- self.mock_return)
-
- def test_create_network_association(self):
- self.assertEqual(openstack_utils.
- create_network_association(self.neutron_client,
- 'bgpvpn_id',
- 'network_id'),
- self.mock_return)
-
- def test_create_router_association(self):
- self.assertEqual(openstack_utils.
- create_router_association(self.neutron_client,
- 'bgpvpn_id',
- 'router_id'),
- self.mock_return)
-
- def test_update_bgpvpn(self):
- self.assertEqual(openstack_utils.
- update_bgpvpn(self.neutron_client,
- 'bgpvpn_id'),
- self.mock_return)
-
- def test_delete_bgpvpn(self):
- self.assertEqual(openstack_utils.
- delete_bgpvpn(self.neutron_client,
- 'bgpvpn_id'),
- self.mock_return)
-
- def test_get_bgpvpn(self):
- self.assertEqual(openstack_utils.
- get_bgpvpn(self.neutron_client,
- 'bgpvpn_id'),
- self.mock_return)
-
- def test_get_bgpvpn_routers(self):
- with mock.patch('functest.utils.openstack_utils.'
- 'get_bgpvpn',
- return_value={'bgpvpn':
- {'routers': [self.router]}}):
- self.assertEqual(openstack_utils.
- get_bgpvpn_routers(self.neutron_client,
- 'bgpvpn_id'),
- [self.router])
-
def test_get_security_groups_default(self):
self.assertEqual(openstack_utils.
get_security_groups(self.neutron_client),
diff --git a/functest/utils/openstack_utils.py b/functest/utils/openstack_utils.py
index e7cdfc86..0ab63058 100644
--- a/functest/utils/openstack_utils.py
+++ b/functest/utils/openstack_utils.py
@@ -962,43 +962,6 @@ def create_shared_network_full(net_name, subnt_name, router_name, subnet_cidr):
return network_dic
-def create_bgpvpn(neutron_client, **kwargs):
- # route_distinguishers
- # route_targets
- json_body = {"bgpvpn": kwargs}
- return neutron_client.create_bgpvpn(json_body)
-
-
-def create_network_association(neutron_client, bgpvpn_id, neutron_network_id):
- json_body = {"network_association": {"network_id": neutron_network_id}}
- return neutron_client.create_network_association(bgpvpn_id, json_body)
-
-
-def create_router_association(neutron_client, bgpvpn_id, router_id):
- json_body = {"router_association": {"router_id": router_id}}
- return neutron_client.create_router_association(bgpvpn_id, json_body)
-
-
-def update_bgpvpn(neutron_client, bgpvpn_id, **kwargs):
- json_body = {"bgpvpn": kwargs}
- return neutron_client.update_bgpvpn(bgpvpn_id, json_body)
-
-
-def delete_bgpvpn(neutron_client, bgpvpn_id):
- return neutron_client.delete_bgpvpn(bgpvpn_id)
-
-
-def get_bgpvpn(neutron_client, bgpvpn_id):
- return neutron_client.show_bgpvpn(bgpvpn_id)
-
-
-def get_bgpvpn_routers(neutron_client, bgpvpn_id):
- return get_bgpvpn(neutron_client, bgpvpn_id)['bgpvpn']['routers']
-
-
-def get_bgpvpn_networks(neutron_client, bgpvpn_id):
- return get_bgpvpn(neutron_client, bgpvpn_id)['bgpvpn']['networks']
-
# *********************************************
# SEC GROUPS
# *********************************************