summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/testing/user/userguide/test_details.rst33
-rw-r--r--docs/testing/user/userguide/test_overview.rst11
-rw-r--r--functest/opnfv_tests/vnf/epc/juju_epc.py103
-rw-r--r--functest/opnfv_tests/vnf/router/cloudify_vrouter.py2
4 files changed, 110 insertions, 39 deletions
diff --git a/docs/testing/user/userguide/test_details.rst b/docs/testing/user/userguide/test_details.rst
index 543f66a19..38d35a697 100644
--- a/docs/testing/user/userguide/test_details.rst
+++ b/docs/testing/user/userguide/test_details.rst
@@ -422,13 +422,41 @@ The vyos-vrouter architecture is described in `[14]`_
juju_epc
^^^^^^^^
+The Evolved Packet Core (EPC) is the main component of the System Architecture
+Evolution (SAE) which forms the core of the 3GPP LTE specification.
+vEPC has been integrated in Functest to demonstrate the capability to deploy a
+complex mobility-specific NFV scenario on the OPNFV platform. The OAI EPC
+supports most of the essential functions defined by the 3GPP Technical Specs;
+hence the successful execution of functional tests on the OAI EPC provides a
+good endorsement of the underlying NFV platform.
+
+This integration also includes ABot, a Test Orchestration system that enables
+test scenarios to be defined in high-level DSL. ABot is also deployed as a
+VM on the OPNFV platform; and this provides an example of the automation
+driver and the Test VNF being both deployed as separate VNFs on the underlying
+OPNFV platform.
+
+The Workflow is as follows:
+ * Deploy Orchestrator
+ Deploy Juju controller using Bootstrap command.
+ * Deploy VNF
+ Deploy ABot orchestrator and OAI EPC as Juju charms.
+ Configuration of ABot and OAI EPC components is handled through
+ built-in Juju relations.
+ * Test VNF
+ Execution of ABot feature files triggered by Juju actions.
+ This executes a suite of LTE signalling tests on the OAI EPC.
+ * Reporting
+ ABot test results are parsed accordingly and pushed to Functest Db.
+
+Details of the ABot test orchestration tool may be found in `[15]`_
Kubernetes (K8s)
----------------
Kubernetes testing relies on sets of tests, which are part of the Kubernetes
-source tree, such as the Kubernetes End-to-End (e2e) tests `[15]`_.
+source tree, such as the Kubernetes End-to-End (e2e) tests `[16]`_.
The kubernetes testcases are distributed across various Tiers:
@@ -460,4 +488,5 @@ The kubernetes testcases are distributed across various Tiers:
.. _`[12]`: http://docs.opnfv.org/en/latest/submodules/functest/docs/testing/user/userguide/index.html
.. _`[13]`: https://wiki.opnfv.org/display/PROJ/SNAPS-OO
.. _`[14]`: https://github.com/oolorg/opnfv-functest-vrouter
-.. _`[15]`: https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-tests.md
+.. _`[15]`: https://www.rebaca.com/abot-test-orchestration-tool/
+.. _`[16]`: https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-tests.md
diff --git a/docs/testing/user/userguide/test_overview.rst b/docs/testing/user/userguide/test_overview.rst
index 4644109a5..b88a99caf 100644
--- a/docs/testing/user/userguide/test_overview.rst
+++ b/docs/testing/user/userguide/test_overview.rst
@@ -147,8 +147,15 @@ validate the scenario for the release.
| | | vyos | vRouter testing |
| | | \_vrouter | |
| | +------------+----------------------------------+
-| | | juju_epc | vEPC validation with Juju as VNF |
-| | | | manager and ABoT as test executor|
+| | | juju_epc | Validates deployment of a complex|
+| | | | mobility VNF on OPNFV Platform. |
+| | | | Uses Juju for deploying the OAI |
+| | | | EPC and ABot for defining test |
+| | | | scenarios using high-level DSL. |
+| | | | VNF tests reference 3GPP |
+| | | | Technical Specs and are executed |
+| | | | through protocol drivers provided|
+| | | | by ABot. |
| | +------------+----------------------------------+
| | | cloudify | Based on cloudify_ims test case |
| | | \_ims_perf | cloudify_ims_perf substitutes |
diff --git a/functest/opnfv_tests/vnf/epc/juju_epc.py b/functest/opnfv_tests/vnf/epc/juju_epc.py
index 50253ccac..224d71114 100644
--- a/functest/opnfv_tests/vnf/epc/juju_epc.py
+++ b/functest/opnfv_tests/vnf/epc/juju_epc.py
@@ -137,7 +137,7 @@ class JujuEpc(vnf.VnfOnBoarding):
name=name,
password=str(uuid.uuid4()),
project_name=self.tenant_name,
- domain=self.snaps_creds.user_domain_name,
+ domain_name=self.snaps_creds.user_domain_name,
roles={'_member_': self.tenant_name}))
user_creator.create()
self.created_object.append(user_creator)
@@ -218,8 +218,12 @@ class JujuEpc(vnf.VnfOnBoarding):
if ex.errno != errno.EEXIST:
self.__logger.exception("Cannot create %s", self.res_dir)
raise vnf.VnfPreparationException
+
+ self.__logger.info("ENV:\n%s", env.string())
+
self.public_auth_url = keystone_utils.get_endpoint(
self.snaps_creds, 'identity')
+
# it enforces a versioned public identity endpoint as juju simply
# adds /auth/tokens wich fails vs an unversioned endpoint.
if not self.public_auth_url.endswith(('v3', 'v3/', 'v2.0', 'v2.0/')):
@@ -236,7 +240,7 @@ class JujuEpc(vnf.VnfOnBoarding):
Bootstrap juju
"""
- self.__logger.info("Deployed Orchestrator")
+ self.__logger.info("Deploying Juju Orchestrator")
private_net_name = getattr(
config.CONF, 'vnf_{}_private_net_name'.format(self.case_name))
private_subnet_name = '{}-{}'.format(
@@ -249,7 +253,8 @@ class JujuEpc(vnf.VnfOnBoarding):
getattr(config.CONF,
'vnf_{}_external_router'.format(self.case_name)),
self.uuid)
- self.__logger.info("Creating full network ...")
+ self.__logger.info("Creating full network with nameserver: %s",
+ env.get('NAMESERVER'))
subnet_settings = SubnetConfig(
name=private_subnet_name,
cidr=private_subnet_cidr,
@@ -277,6 +282,7 @@ class JujuEpc(vnf.VnfOnBoarding):
flavor_creator = OpenStackFlavor(self.snaps_creds, flavor_settings)
flavor_creator.create()
self.created_object.append(flavor_creator)
+
self.__logger.info("Upload some OS images if it doesn't exist")
images = get_config("tenant_images", self.config_file)
self.__logger.info("Images needed for vEPC: %s", images)
@@ -287,8 +293,7 @@ class JujuEpc(vnf.VnfOnBoarding):
name=image_name, image_user='cloud', img_format='qcow2',
image_file=image_file))
image_id = image_creator.create().id
- cmd = ['timeout', '-t', JujuEpc.juju_timeout,
- 'juju', 'metadata', 'generate-image', '-d', '/root',
+ cmd = ['juju', 'metadata', 'generate-image', '-d', '/root',
'-i', image_id, '-s', image_name,
'-r', self.snaps_creds.region_name,
'-u', self.public_auth_url]
@@ -296,18 +301,30 @@ class JujuEpc(vnf.VnfOnBoarding):
self.__logger.info("%s\n%s", " ".join(cmd), output)
self.created_object.append(image_creator)
self.__logger.info("Network ID : %s", net_id)
- cmd = ['timeout', '-t', JujuEpc.juju_timeout,
- 'juju', 'bootstrap', 'abot-epc', 'abot-controller',
- '--metadata-source', '/root',
- '--constraints', 'mem=2G',
- '--bootstrap-series', 'xenial',
- '--config', 'network={}'.format(net_id),
- '--config', 'ssl-hostname-verification=false',
- '--config', 'use-floating-ip=true',
- '--config', 'use-default-secgroup=true',
- '--debug']
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
- self.__logger.info("%s\n%s", " ".join(cmd), output)
+
+ self.__logger.info("Starting Juju Bootstrap process...")
+ try:
+ cmd = ['timeout', '-t', JujuEpc.juju_timeout,
+ 'juju', 'bootstrap', 'abot-epc', 'abot-controller',
+ '--metadata-source', '/root',
+ '--constraints', 'mem=2G',
+ '--bootstrap-series', 'xenial',
+ '--config', 'network={}'.format(net_id),
+ '--config', 'ssl-hostname-verification=false',
+ '--config', 'use-floating-ip=true',
+ '--config', 'use-default-secgroup=true',
+ '--debug']
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+ self.__logger.info("%s\n%s", " ".join(cmd), output)
+ except subprocess.CalledProcessError as cpe:
+ self.__logger.error(
+ "Exception with Juju Bootstrap: %s\n%s",
+ cpe.cmd, cpe.output)
+ return False
+ except Exception: # pylint: disable=broad-except
+ self.__logger.exception("Some issue with Juju Bootstrap ...")
+ return False
+
return True
def check_app(self, name='abot-epc-basic', status='active'):
@@ -336,15 +353,32 @@ class JujuEpc(vnf.VnfOnBoarding):
flavor_creator.create()
self.created_object.append(flavor_creator)
self.__logger.info("Deploying Abot-epc bundle file ...")
- cmd = ['timeout', '-t', JujuEpc.juju_timeout,
- 'juju', 'deploy', '{}'.format(descriptor.get('file_name'))]
+ cmd = ['juju', 'deploy', '{}'.format(descriptor.get('file_name'))]
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
self.__logger.info("%s\n%s", " ".join(cmd), output)
self.__logger.info("Waiting for instances .....")
- cmd = ['timeout', '-t', JujuEpc.juju_timeout, 'juju-wait']
+ try:
+ cmd = ['timeout', '-t', JujuEpc.juju_timeout, 'juju-wait']
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+ self.__logger.info("%s\n%s", " ".join(cmd), output)
+ self.__logger.info("Deployed Abot-epc on Openstack")
+ except subprocess.CalledProcessError as cpe:
+ self.__logger.error(
+ "Exception with Juju VNF Deployment: %s\n%s",
+ cpe.cmd, cpe.output)
+ return False
+ except Exception: # pylint: disable=broad-except
+ self.__logger.exception("Some issue with the VNF Deployment ..")
+ return False
+
+ self.__logger.info("Checking status of ABot and EPC units ...")
+ cmd = ['juju', 'status']
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
- self.__logger.info("%s\n%s", " ".join(cmd), output)
- self.__logger.info("Deployed Abot-epc on Openstack")
+ self.__logger.debug("%s\n%s", " ".join(cmd), output)
+ for app in ['abot-epc-basic', 'oai-epc', 'oai-hss']:
+ if not self.check_app(app):
+ return False
+
nova_client = nova_utils.nova_client(self.snaps_creds)
instances = get_instances(nova_client)
self.__logger.info("List of Instance: %s", instances)
@@ -360,22 +394,18 @@ class JujuEpc(vnf.VnfOnBoarding):
# This will add sctp rule to a common Security Group Created
# by juju and shared to all deployed units.
self._add_custom_rule(sec_group)
- cmd = ['juju', 'status']
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
- self.__logger.debug("%s\n%s", " ".join(cmd), output)
- for app in ['abot-epc-basic', 'oai-epc', 'oai-hss']:
- if not self.check_app(app):
- return False
- self.__logger.info("Copying the feature files to Abot_node ")
+
+ self.__logger.info("Transferring the feature files to Abot_node ...")
cmd = ['timeout', '-t', JujuEpc.juju_timeout,
'juju', 'scp', '--', '-r', '-v',
'{}/featureFiles'.format(self.case_dir), 'abot-epc-basic/0:~/']
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
self.__logger.info("%s\n%s", " ".join(cmd), output)
- self.__logger.info("Copying the feature files in Abot_node ")
+
+ self.__logger.info("Copying the feature files within Abot_node ")
cmd = ['timeout', '-t', JujuEpc.juju_timeout,
'juju', 'ssh', 'abot-epc-basic/0',
- 'sudo', 'rsync', '-azvv', '~/featureFiles',
+ 'sudo', 'cp', '-vfR', '~/featureFiles/*',
'/etc/rebaca-test-suite/featureFiles']
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
self.__logger.info("%s\n%s", " ".join(cmd), output)
@@ -385,14 +415,15 @@ class JujuEpc(vnf.VnfOnBoarding):
"""Run test on ABoT."""
start_time = time.time()
self.__logger.info("Running VNF Test cases....")
- cmd = ['timeout', '-t', JujuEpc.juju_timeout,
- 'juju', 'run-action', 'abot-epc-basic/0', 'run',
+ cmd = ['juju', 'run-action', 'abot-epc-basic/0', 'run',
'tagnames={}'.format(self.details['test_vnf']['tag_name'])]
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
self.__logger.info("%s\n%s", " ".join(cmd), output)
+
cmd = ['timeout', '-t', JujuEpc.juju_timeout, 'juju-wait']
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
self.__logger.info("%s\n%s", " ".join(cmd), output)
+
duration = time.time() - start_time
self.__logger.info("Getting results from Abot node....")
cmd = ['timeout', '-t', JujuEpc.juju_timeout,
@@ -429,8 +460,12 @@ class JujuEpc(vnf.VnfOnBoarding):
'--destroy-all-models']
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
self.__logger.info("%s\n%s", " ".join(cmd), output)
+ except subprocess.CalledProcessError as cpe:
+ self.__logger.error(
+ "Exception with Juju Cleanup: %s\n%s",
+ cpe.cmd, cpe.output)
except Exception: # pylint: disable=broad-except
- self.__logger.exception("Some issue during the undeployment ..")
+ self.__logger.exception("General issue during the undeployment ..")
if not self.orchestrator['requirements']['preserve_setup']:
self.__logger.info('Remove the Abot_epc OS object ..')
diff --git a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
index 769c2a4cf..af77f5caf 100644
--- a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
+++ b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
@@ -324,7 +324,7 @@ class CloudifyVrouter(vrouter_base.VrouterOnBoardingBase):
name='cloudify_network_bug-{}'.format(self.uuid),
password=str(uuid.uuid4()),
project_name=self.tenant_name,
- domain=self.snaps_creds.user_domain_name,
+ domain_name=self.snaps_creds.user_domain_name,
roles={'_member_': self.tenant_name}))
user_creator.create()
self.created_object.append(user_creator)