OVP-VTP
VNF Test Platform (VTP) provides an platform to on-board different test cases required for OVP for various VNF testing provided by VNFSDK (for TOSCA) and VVP(for HEAT) projects in ONAP. And it generates the test case outputs which would be uploaded into OVP portal for VNF badging.
NOTE: This guide provides steps for TOSCA based VNF testing.
Admin guide
Installation
Install the latest VTP by using script https:/github.com/onap/vnfsdk-refrepo/blob/master/vnfmarket-be/deployment/install/vtp_install.sh
Follow the steps as below (in sequence)
vtp_install.sh --download : It will download all required artifacts into /opt/vtp_stage
vtp_install.sh --install : It will install VTP (/opt/controller) and CLI (/opt/oclip)
vtp_install.sh --start : It will start VTP controller as tomcat service and CLI as oclip service
vtp_install.sh --verify : It will verify the setup is done properly by running some test cases.
Last step (verify) would check the health of VTP components and TOSCA VNF compliance and validation test cases.
Check available test cases
Compliance Test cases
VTP supports to check the compliance of VNF and PNF based on ONAP VNFREQS.
To check:
Go to command console
Run command oclip
Now it will provide a command prompt:
oclip:open-cli>
Now run command as below and check the supported compliance testcases for VNFREQS.
csar-validate - Helps to validate given VNF CSAR for all configured VNFREQS.
csar-validate-rxxx - Helps to validate given VNF CSAR for a given VNFREQS xxx.
oclip:open-cli>schema-list --product onap-dublin --service vnf-compliance
+--------------+----------------+------------------------+--------------+----------+------+
|product |service |command |ocs-version |enabled |rpc |
+--------------+----------------+------------------------+--------------+----------+------+
|onap-dublin |vnf-compliance |csar-validate-r10087 |1.0 |true | |
+--------------+----------------+------------------------+--------------+----------+------+
|onap-dublin |vnf-compliance |csar-validate |1.0 |true | |
+--------------+----------------+------------------------+--------------+----------+------+
|onap-dublin |vnf-compliance |csar-validate-r26885 |1.0 |true | |
+--------------+----------------+------------------------+--------------+----------+------+
|onap-dublin |vnf-compliance |csar-validate-r54356 |1.0 |true | |
.......
To know the details of each VNFREQS, run as below.
oclip:open-cli>use onap-dublin
oclip:onap-dublin>csar-validate-r54356 --help
usage: oclip csar-validate-r54356
Data types used by NFV node and is based on TOSCA/YAML constructs specified in draft GS NFV-SOL 001.
The node data definitions/attributes used in VNFD MUST comply.
......
oclip:onap-dublin>
Validation test cases
To check:
Go to command console
Run command oclip
Now it will provide a command prompt:
oclip:open-cli>
Now run command as below and check the supported validation testcases
oclip:onap-dublin>use open-cli
oclip:open-cli>schema-list --product onap-dublin --service vnf-validation
+--------------+----------------+----------------------+--------------+----------+------+
|product |service |command |ocs-version |enabled |rpc |
+--------------+----------------+----------------------+--------------+----------+------+
|onap-dublin |vnf-validation |vnf-tosca-provision |1.0 |true | |
+--------------+----------------+----------------------+--------------+----------+------+
NOTE: vnf-tosca-lcm would be used in place of vnf-tosca-provision some time.
Configure ONAP with required VNFM and cloud details.
1.Setup the OCOMP profile onap-dublin
Run following command to configure the ONAP service URL and creadentials as given below, which will be used by VTP while executing the test cases
NOTE: Mostly all above entries value would be same execept the IP address used in the URL, which would be ONAP k8s cluser IP.
By default, SDC onboarding service does not provide node port, which is available to access from external ONAP network. so to enable for external access, register the SDC onboarding service into MSB and use MSB url for sdc.onboarding:host-url.
NOTE: To find the node-ip and node-port, use the following steps.
Find out SDC onboarding service IP and port details as given here:
Note down the IP address for sdc-onboarding-be 172.16.1.0
Note down the port for sdc-onboarding-be 8445 8081
Similarly, other service IP and Port could be discovered like above, in case not know earlier :)
Verify these details once by typing 'set'
This profile would be used by user while running the test cases with ONAP setup configured in it, as below
oclip --profile onap-dublin vnf-tosca-provision ....
Exit from the interactive console by typing 'exit'
2. Setup SDC consumer
SDC uses consumer concept to configure required VN model and service model artifacts. So following commands required to run, which will create consumer named ocomp, which is already configured in onap-dublin profile created in above steps.
NOTE: command oclip could be used in scripting mode as above or in interactive mode as used in earlier steps
3. Update the cloud and vnfm driver details
In the configuration file /opt/oclip/conf/vnf-tosca-provision.json, update the cloud and VNFM details.
4.Configure the decided VNFRES (optional)
VTP allows to configure the set of VNFREQS to be considered while running the VNF compliance test cases in the configuration file /opt/oclip/conf/vnfreqs.properties.
If not available, please create this file with following entries:
This completes the required installation and configuration required for running compliance and validation test cases for TOSCA VNF. Now its ready for executing the test cases.
VNF test environment:
As pre-requestiests steps, Its assumed that, successful ONAP, Vendor VNFM and OpenStack cloud are already available.
And above steps help to setup VTP components and CLI.
NOTE: For OVP badging, Test cases can be triggered using CLI.
User guide
Every test provided in VTP is given with guidelines on how to use it. On every execution of test cases, use the following additional arguments based on requirements
--product onap-dublin - It helps VTP choose the test cases written for onap-dublin version
--profile onap-dublin - It helps VTP to use the profile settings provided by admin (optional)
--request-id - It helps VTP to track the progress of the test cases execution and user could use this id for same. (optional)
so, final test case execution would be as below
To find the test case arguments details, run below command
To Run compliance Test case
Run compliance test as below with given CSAR file
It will produce the result format as below:
In case of error case, the errors section will have list of erros details as below:
Each error block, will be given with error code and error details. Error code would be very useful to provide the troubleshooting guide in future.
NOTE: To generate the test result in OVP format, its recommended to run this compliance test with request-id similar to running validation test as below.
To Run validationTest case
VTP provides validation test case with following modes:
setup: Create requires Vendor, Service Subscription and VNF cloud in ONAP
standup: From the given VSP csar, VNF csar and NS csar, it creates VF Model, NS Model and NS service
cleanup: Remove those entries created during provision
provision: Runs setup -> standup
validate: Runs setup -> standup -> cleanup
checkup: mode helps to verify automation is deployed properly.
For OVP badging, validate mode would be used as below
Validation testing would take for a while to complete the test execution, so user could use the above given request-id, to tracking the progress as below:
while executing the test cases, VTP provides unique execution-id (2nd column) for each step. As you note here, some steps are in-progress, while others are completed already. if there is error then status will be set to failed
To find out the foot-print of each step, following commands are available
Track the progress of the vnf-tosca-provision test cases until its completed. Then the out of the validation test cases could be retrieved as below:
It will provides the output format as below:
How to submit the results to OVP Portal
VTP provides translation tool to migrate the VTP result into OVP format and generates the tar file for the given test case execution.
Please refer https://github.com/onap/vnfsdk-refrepo/tree/master/vnfmarket-be/deployment/vtp2ovp for more details.
Once tar is generated, it can be used to submit into OVP portal https://vnf-verified.lfnetworking.org/