Overview

These test cases cover the commonality between the test data for 5G - PNF Pre-Onboarding & Onboarding and aims to achieve an end to end verification for Pre-Onboarding and Onboarding.

The test data for both test cases will contain a vendor package which will be composed of (amongst others)

  • PNF Descriptor
  • Informational Artefacts
  • Configuration Files
  • VES registration files
  • PM Dictionary & Schema

To ensure compatibility between the code changes made to SDC and VNF-SDK and to support PNF Pre-Onboarding & Onboarding the same test data vendor csar file, i.e. PNF package, will be used.

Sample packages to be used can be found in the ONAP SDC Gerrit PNFs directory, the corresponding root certificates for the secure signed packages can be found in the certs directory.

Manual Test Cases

Test Case ID
PNF-POB-OB-1 
Test Case NameTest Pre-Onboarding of Vendor Supplied Package in VNF-SDK
DescriptionTaking a pre-formed sample csar package mimicking a vendor supplied PNF csar which will contain relevant artefacts verify this package against the VNF-SDK CLI tool (R&D approach)
ReleaseDublin
Preconditions

Sample csar package mimicking vendor csar agreed and available

Sample secured zip file consisting of the csar package, a signature file and a certificate file mimicking vendor csar agreed and available

Testing Steps
StepExpected Result

Install VNF Testing platform (VTP) on Linux machine with Ubuntu 18.04 according to instruction. VTP+Installation.doc

VTP is up and running

Copy csar package at linux machine with VTP. valid_all.csarCsar file is present on linux machine.

Validate csar package using VTP tool by running command:

oclip --product onap-vtp csar-validate --pnf --csar valid_all.csar

Validation doesn't find violations in valid_all.csar package

Copy secured zip file at linux machine with VTP.  valid_all.zip

Zip file s present on linux machine.

Validate secured zip file  with csar package using VTP tool by running command:

oclip --product onap-vtp csar-validate --pnf --csar valid_all.zip

Validation doesn't find violations in valid_all.zip package
Conclusion (Pass/Fail)
Testing LabONAP Lab/standalone linux machine



Test Case ID
PNF-POB-OB-2
Test Case NameTest Onboarding of Vendor Supplied Package in SDC
DescriptionTaking a pre-formed sample csar package mimicking a vendor supplied PNF csar which will contain relevant artefacts verify this package can be onboarded in SDC
ReleaseDublin
PreconditionsSample csar package mimicking vendor csar agreed and available
Testing Steps
StepExpected Result

Using csar package as test data execute test case as per 5G - PNF Onboarding Test Cases and Status#5G-PNFOnboardingTestCasesandStatus-PNF-OB-1

Sample vendor csar package is onboarded and available in SDC catalog



Conclusion (Pass/Fail)PASS
Testing LabONAP Lab/ Local Sanity Test Environment
Test Case ID
PNF-POB-OB-3 
Test Case NameTest Pre-Onboarding of Vendor Supplied Package in (offline) VNF Test Platform installed according to  https://docs.onap.org/en/latest/submodules/vnfsdk/model.git/docs/files/vnf-test-platform.html
DescriptionTaking a pre-formed sample csar package mimicking a vendor supplied PNF csar which will contain relevant artefacts verify this package against the VNF-SDK API
ReleaseDublin
Preconditions

Sample csar package mimicking vendor csar agreed and available

Testing Steps
StepExpected Result

Install VNF Testing platform (VTP) on Linux machine with Ubuntu 18.04 according to instruction. https://docs.onap.org/en/latest/submodules/vnfsdk/model.git/docs/files/vnf-test-platform.html

export NEXUS_DOCKER_REPO=nexus3.onap.org:10001

docker login $NEXUS_DOCKER_REPO -u docker -p docker

export REFREPO_TAG=1.3.0

export POSTGRES_TAG=latest

export MTU=1450

wget https://raw.githubusercontent.com/onap/vnfsdk-refrepo/master/vnfmarket-be/deployment/install/docker-compose.yml

docker-compose up -d

run docker ps and following entries would be reported:

root@oclip-2:~# docker ps

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

246141724b02 nexus3.onap.org:10001/onap/vnfsdk/refrepo:1.3.0 "/service/docker-e..." 2 days ago Up 2 days 0.0.0.0:8000->8000/tcp, 0.0.0.0:8702-8703->8702-8703/tcp, 0.0.0.0:50051->50051/tcp refrepo

20bfa4ba1734 nexus3.onap.org:10001/onap/vnfsdk/refrepo/postgres:latest "docker-entrypoint..." 2 days ago Up 2 days 0.0.0.0:5432->5432/tcp postgres root@oclip-2:~#

REST Endpoint for VTP validation (from local docker compose)
http://<local_docker_host>:8702/onapapi/vnfsdk-marketplace/v1/vtp/executions?requestId=<some_request_id>
REST Endpoint for VTP validation (from ONAP instance)
http://<one_of_ONAP_k8s_hosts>:30297/onapapi/vnfsdk-marketplace/v1/vtp/executions?requestId=<some_request_id>

VTP is up and running.

Endpoint for validation API is available

Open postman application and load VTP_postman_collection.json for VTP validationPostman is available and collection is loaded

Fill parameters in postman:

  • in "file" choose csar/zip file to be validated
  • in "execution" in parameters  put name of file that will be validated "csar": "file://noETSI-Entry-Manifest or ETSI-Entry-Change-Log.csar",
  • in Headers put following value: Content-Type application/x-www-form-urlencoded
  • update host end REST endpoint according to VTP from local docker compose or VTP from ONAP instance


Validation doesn't find violations in valid_all.csar package
Prepare request and validate csar package valid_all.csarValidation doesn't find violations in valid_all.csar package
Prepare request and validate  zip  package valid_all.zipValidation doesn't find violations in valid_all.zip package
Prepare request and validate zip package signed with CMS signed-package-valid-signature.zipvalidations should not find any violations
Prepare request and validate zip package signed with CMS signed-package-invalid-signature.zipvalidation should find violations
Conclusion (Pass/Fail)
Testing LabONAP Lab/standalone linux machine

Automated Test Cases

Test case has bee automated using robot framework. Test Cases are available in robot pod in ONAP system.

In order to execute the run following command at RKE node:

ubuntu@onap-rke-node:~$ oom/kubernetes/robot/ete-k8s.sh onap vnfsdk execscript

Test case definition in testsuite repo

https://gerrit.onap.org/r/gitweb?p=testsuite.git;a=blob;f=robot/testsuites/vnfsdk_validation.robot;h=12e3df3a4325a842cc1b57653f99aa421f03fc97;hb=497430e121685613c450c4f210b1583ea1bb80f3

Full Name:
Testsuites.Vnfsdk Validation.Validate Onboarding allMandatoryEntriesDefinedInTOSCAMeta
Documentation:

This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/allMandatoryEntriesDefinedInTOSCAMeta Imports it as csar VSP package to SDC and comapres with list of expected errors. Runs VNFSDK validation and comapres with list of expected errors. Expected failed requirements from VNFSDK [u'r146092', u'r816745', u'r01123'] Expected errors from SDC Onboarding [u'Manifest contains invalid line: 7: #The manifest file shall include a list of all files contained in or referenced from the VNF package with their location']

Full Name:
Testsuites.Vnfsdk Validation.Validate Onboarding non_mano_artifact_sets_is_mandatory
Documentation:

This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/non_mano_artifact_sets_is_mandatory Imports it as csar VSP package to SDC and comapres with list of expected errors. Runs VNFSDK validation and comapres with list of expected errors. Expected failed requirements from VNFSDK [u'r146092', u'r01123'] Expected errors from SDC Onboarding [u'Manifest contains invalid line: 7: #The manifest file shall include a list of all files contained in or referenced from the VNF package with their location']

Full Name:
Testsuites.Vnfsdk Validation.Validate Onboarding no_pnfd_release_date_time_error
Documentation:

This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/no_pnfd_release_date_time_error Imports it as csar VSP package to SDC and comapres with list of expected errors. Runs VNFSDK validation and comapres with list of expected errors. Expected failed requirements from VNFSDK [u'r57019', u'r01123', u'r816745'] Expected errors from SDC Onboarding [u"Invalid Manifest metadata entry: '#The manifest file shall include a list of all files contained in or referenced from the VNF package with their location'.;\nAt line 6: '#The manifest file shall include a list of all files contained in or referenced from the VNF package with their location'."]

Full Name:
Testsuites.Vnfsdk Validation.Validate Onboarding noETSI-Entry-ManifestOrETSI-Entry-Change-Log
Documentation:

This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/noETSI-Entry-ManifestOrETSI-Entry-Change-Log Imports it as csar VSP package to SDC and comapres with list of expected errors. Runs VNFSDK validation and comapres with list of expected errors. Expected failed requirements from VNFSDK [u'r293901', u'r01123', u'r130206'] Expected errors from SDC Onboarding [u'Manifest contains invalid line: 7: #The manifest file shall include a list of all files contained in or referenced from the VNF package with their location', u'Manifest contains invalid line: 7: #The manifest file shall include a list of all files contained in or referenced from the VNF package with their location']

Full Name:
Testsuites.Vnfsdk Validation.Validate Onboarding PNFD_missing
Documentation:

This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/PNFD_missing Imports it as csar VSP package to SDC and comapres with list of expected errors. Runs VNFSDK validation and comapres with list of expected errors. Expected failed requirements from VNFSDK [u'SOL004', u'r10087', u'r87234', u'r35854', u'r15837', u'r17852', u'r293901', u'r146092', u'r57019', u'r787965', u'r972082', u'r01123', u'r130206', u'r816745'] Expected errors from SDC Onboarding [u'TOSCA.meta file in TOSCA-metadata directory missing entry Created-By']

Full Name:
Testsuites.Vnfsdk Validation.Validate Onboarding test_SDC_and_VNFSDK_API, integrity_check CMS_with_cert
Documentation:

This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API Imports it as csar VSP package to SDC and expects success. Runs VNFSDK validation and and expects success.

Full Name:
Testsuites.Vnfsdk Validation.Validate Onboarding test_SDC_and_VNFSDK_API, integrity_check CMS_without_cert
Documentation:

This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API Imports it as csar VSP package to SDC and expects success. Runs VNFSDK validation and and expects success.

Full Name:
Testsuites.Vnfsdk Validation.Validate Onboarding test_SDC_and_VNFSDK_API, secured csar - CMS only - sdc valid certificate, integrity_check CMS_without_cert
Documentation:

This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API Next sign with certificate that is imported to SDC onabarding POD using CMS only method (CMS file signs csar, zip contains only csar and cms files ) Imports it as zip VSP package to SDC and expects success. Runs VNFSDK validation and and expects success.

Full Name:
Testsuites.Vnfsdk Validation.Validate Onboarding test_SDC_and_VNFSDK_API, secured csar - CMS and CERT - sdc valid certificate, integrity_check CMS_with_cert
Documentation:

This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API Next sign with certificate that is imported to SDC onabarding POD using CMS and CERT method (CMS file signs csar, zip contains csar, certificate and cms files ) Imports it as zip VSP package to SDC and expects success. Runs VNFSDK validation and and expects success.

Full Name:
Testsuites.Vnfsdk Validation.Validate Onboarding test_SDC_and_VNFSDK_API, secured csar - CMS only - sdc invalid certificate, integrity_check CMS_without_cert
Documentation:

This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API Next sign with certificate that is not imported to SDC onabarding POD using CMS only method (CMS file signs csar, zip contains only csar and cms files ) Imports it as zip VSP package to SDC and expects error due to issues with certificate validation. Runs VNFSDK validation and and expects success.

Full Name:
Testsuites.Vnfsdk Validation.Validate Onboarding test_SDC_and_VNFSDK_API, secured csar - CMS and CERT - sdc invalid certificate, integrity_check CMS_with_cert
Documentation:

This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API Next sign with certificate that is not imported to SDC onabarding POD using CMS and CERT method (CMS file signs csar, zip contains csar, certificate and cms files ) Imports it as zip VSP package to SDC and expects error due to issues with certificate validation. Runs VNFSDK validation and and expects success

  • No labels