xtesting.core.vnf module¶
Define the parent class of all VNF TestCases.
-
exception
xtesting.core.vnf.
OrchestratorDeploymentException
¶ Bases:
Exception
Raise when orchestrator cannot be deployed.
-
exception
xtesting.core.vnf.
VnfDeploymentException
¶ Bases:
Exception
Raise when VNF cannot be deployed.
-
class
xtesting.core.vnf.
VnfOnBoarding
(**kwargs)¶ Bases:
xtesting.core.testcase.TestCase
Base model for 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:
Returns base.TestCase.EX_OK if preparation is successfull
Raise VnfPreparationException in case of problem
-
run
(**kwargs)¶ Run of the VNF test case:
- Deploy an orchestrator if needed (e.g. heat, cloudify, ONAP,…),
- Deploy the VNF,
- Perform tests on the VNF
A VNF test case is successfull when the 3 steps are PASS If one of the step is FAIL, the test case is FAIL
- Returns:
- TestCase.EX_OK if result is ‘PASS’. TestCase.EX_TESTCASE_FAILED otherwise.
-
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
xtesting.core.vnf.
VnfPreparationException
¶ Bases:
Exception
Raise when VNF preparation cannot be executed.
-
exception
xtesting.core.vnf.
VnfTestException
¶ Bases:
Exception
Raise when VNF cannot be tested.