functest.core.vnf module

Define the parent class of all VNF TestCases.

exception functest.core.vnf.OrchestratorDeploymentException

Bases: xtesting.core.vnf.OrchestratorDeploymentException

Raise when orchestrator cannot be deployed.

exception functest.core.vnf.VnfDeploymentException

Bases: xtesting.core.vnf.VnfDeploymentException

Raise when VNF cannot be deployed.

class functest.core.vnf.VnfOnBoarding(**kwargs)

Bases: xtesting.core.vnf.VnfOnBoarding

Base model for OpenStack VNF test cases.

clean()

Clean VNF test case.

It is up to the test providers to delete resources used for the tests. By default we clean:

  • the user,
  • the tenant
deploy_orchestrator()

Deploy an orchestrator (optional).

If this method is overriden then raise orchestratorDeploymentException if error during orchestrator deployment

deploy_vnf()

Deploy the VNF

This function MUST be implemented by vnf test cases. The details section MAY be updated in the vnf test cases.

The deployment can be executed via a specific orchestrator or using build-in orchestrators such as heat, OpenBaton, cloudify, juju, onap, …

Returns:
True if the VNF is properly deployed False if the VNF is not deployed

Raise VnfDeploymentException if error during VNF deployment

prepare()

Prepare the environment for VNF testing:

  • Creation of a user,
  • Creation of a tenant,
  • Allocation admin role to the user on this tenant

Returns base.TestCase.EX_OK if preparation is successfull

Raise VnfPreparationException in case of problem

test_vnf()

Test the VNF

This function MUST be implemented by vnf test cases. The details section MAY be updated in the vnf test cases.

Once a VNF is deployed, it is assumed that specific test suite can be run to validate the VNF. Please note that the same test suite can be used on several test case (e.g. clearwater test suite can be used whatever the orchestrator used for the deployment)

Returns:
True if VNF tests are PASS False if test suite is FAIL

Raise VnfTestException if error during VNF test

exception functest.core.vnf.VnfPreparationException

Bases: xtesting.core.vnf.VnfPreparationException

Raise when VNF preparation cannot be executed.

exception functest.core.vnf.VnfTestException

Bases: xtesting.core.vnf.VnfTestException

Raise when VNF cannot be tested.