OVP LCM Support
VTP already provides required compliance test cases for TOSCA and HEAT based VNF. And this page provides the details on the LCM test cases required to on-board and instantiate VNF (TOSCA & HEAT) in ONAP.
Problem Statement
https://wiki.lfnetworking.org/display/LN/VNF+Validation+Minimum+Viable+Product
Solution
ONAP VNF Test Platform (VTP) provides the required platform for deploying and excuting the required ONAP test cases, which could be of nature compliance, Life-cycle and performance & functional as well. In dublin, We have VVP and VNFSDK as apporved projects under ONAP, which handles the VNF related test cases for HEAT and TOSCA respectively and in dublin, we have unified the usage of these cases over VNF Test platform (VTP). This helps to run these test cases from where ever required, such as OVP, ONAP SDC. During the ONS 2019 events, these integrations are demonstrated. (in SDC for VSP compliance check before on-boarding the VNF and dovetail for running the test cases in ONAP for OVP). so VTP would be better option to run the LCM MVP test cases over ONAP.
Complete Life-cycle actions of VNF
The Life-cycle of VNF invovles following actions
A. Desgin-Time Life cycle operations
- on-boarding of the VNF packages
- modeling
B. Run-Time Life cycle operations
- instantiation of the VNF
- Configuration of VNF
- upgrade of VNF
- Termination of VNF
C. Closed-Loop Life cycle operations
- Auto / Manual Healing
- Auto / Manual Scaling
Planned Life-cycle actions of VNF for LCM MVP
As part of requirement defined by CVC for LCM MVP, A.1, A.2 and B.1 actions are required for both HEAT and TOSCA VNF.
Test case availability for LCM MVP actions
In dublin release, ONAP community enabled all required commands for doing end-end service provisioning as given below:
- available commands for the ONAP till today, here https://github.com/onap/cli/tree/master/products/onap-dublin/features.
- End to end integration of HEAT and TOSCA based HPA services using ONAP commands: https://github.com/onap/integration/tree/master/test/hpa_automation
These commands are super set of required actions in LCM MVP. And VTP has capability to directly consumes these commands as test cases, MVP could be achieved easily by levarging these commands in VTP.
ONAP does not provide option for end-user to instantiate VNF directly, but thru' Network Service (NS) via SO and E2E Service via VFC. so VTP will perform instantiation of VNF using SO and VFC.
How Heat based VNF is instatiated
The required commands for running the LCM MVP test cases are mentioned as part of the workflow given below for HEAT based ONAP ECOMP appr oach.
Sample available here: https://github.com/onap/integration/blob/master/test/hpa_automation/heat/hpa_automation.py
As VTP could levarage each of these commands as test cases , all these test cases for LCM is available as it is
How TOSCA based VNF is instatiated
Here, This flow is based on end-end automation done during the dublin release using script .
NOTE: TBD commands to be implemented while others are already exists
TOSCA Based VNF validation in VTP - ElAlto
Architecture
Sequence diagram of VNF validation
Refer here
VTP LCM test case used for testing the VNF life-cycle
- Create new java package for VNF-LCM testing in VNFSDK
- Create new scenario in VTP called "lfn-ovp-vnf"
- Create new testsuite in VTP named "vnf-validation" under scenario "lfn-ovp-vnf"
- Add new test case with name "onap-vnf-lcm" under testsuite "vnf-validation" with following details
- Execution block : use script to run the LCM testing using ONAP CLI
Inputs: Update the script to take following additional parameters as arguments if not available from config file
parameter name description config entry action notes request_id On every testing, to track the progress and results, this parameter is added NA - update all oclip command used in the script with --request-id parameter with value given using this request-id.
vnf_csar_path TOSCA VNF CSAR used for testing.
SDC will upload this file to VTP using execute API and VTP will store it in local file system and use it while invoking the script with this parameter.
vnfs.vgw.path
- comment this property in config file
- update the script to use the value given using this parameter instead from config file
ns_csar_path TOSCA NSCSAR used for testing.
SDC will upload this file to VTP using execute API and VTP will store it in local file system and use it while invoking the script with this parameter.
vnfs.vgw.path
- comment this property in config file
- update the script to use the value given using this parameter instead from config file
Optional.
vnf_csar_iddynamically generated CSAR ID (uuid)ns. csar-idTBDNot required as input. After step-3, CLI will find the csar id and use it step 6. ns_csar_iddynamically generated CSAR ID (uuid)vnfs.vgw.csar-idTBD- Outputs: Update the script to produce following outputs
Output description action notes vnf-id VNF ID update the script to generate the output json with this value ns-id NS ID update the script to generate the output json with this value vnf_status VNF status update the script to report the status of VNF stretch goal ns_status NSstatus update the script to report the status of NS stretch goal NOTE: Once VNF is created, how to test the health of VNF, these outputs would be useful, if VFC provides health check REST API for given VNF
- Errors: Update the script to write the errors in error stream, so that OCLIP will automatically read it. Use the format : <error-code>: <error-message>
Enhance VTP to query test results based on request-id
as LCM test case will take considerable time, its important for the user to track the progress of testing. so Update VTP executions API to retrieve the test case progress using query parameter 'request-id'.
/v1/vtp/executions?request-id=<uuid>
-- Already supported
Options
Currently every action is available as indivual test cases and to run complete LCM operation including on-boarding and instantiation, this automation script to be modelled as test case, so complete LCM actions could be executed in one shot. so OVP can invoke these test cases either direclty invoking given LCM action or as a whole operation.