Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This page will walk through the robot framework automated creation of the vFirewall Closed Loop (vFWCL) use case to show how the overall vFWCL works and to high light the confirmation steps and training that can be derived from the robot automated test.


Preconditions:

  1. The demonstration VNFs like vFWCL assume that the ONAP OAM network is setup in your environment as a 10.0.0.0/16 with a prefix cidr of 10.0. Robot will assign OAM IP addresses in this range.
  2. The demonstration VNF heat templates assume that the PUBLIC neutron network (openStackPublicNetId) provided in the robot section of the override.yaml  / values.yaml chart is setup so that new interfaces can be created via the VNF Heat template on that public interface. It need not be an external public network and many environments use  a separate external network with floating IPs to assign an external IP to the VNFs external facing ip address/ports after instantiation if they have that setup.
  3. ONAP has been installed

...

  1. robot init

...

  1. has been run ((e.g., ./demo-k8s.sh onap init)) to setup the customer , cloud configurations, distribution of models  and set the owning entity/project/line of business  in VID for tracking the Service and VNF
  2. Additionally a distribution

...

  1. should  be run

...

  1. ( ./ete-k8s.sh onap

...

  1. healthdist) to confirm that model distribution succeeds


cd /root/onap/kubernetes/robot
./ete-k8s.sh onap health
./ete-k8s.sh onap healthdist
./demo-k8s.sh onap init
./demo-k8s.sh onap init_robot 

...

Select one of the test cases from the list and then open log.html (e.g., http://<k8host-ip>:30209/logs/0005_ete_instantiateVFWCL/log.html )

View filenameTestsuites Test Log vFWCL TestsuitesTestLogvFWCL_Dublin.htmhtml


height150Image Added


./ete-k8s.sh onap instantiateVFWC

Expand
titlerobot console output

root@onap-rancher:~/oom/kubernetes/robot# ./ete-k8s.sh onap instantiateVFWCL

++ export NAMESPACE=onap

++ NAMESPACE=onap

+++ kubectl --namespace onap get pods

+++ sed 's/ .*//'

+++ grep robot

++ POD=dev-robot-robot-7bf98dfb65-k2p65

++ TAGS='-i instantiateVFWCL'

++ ETEHOME=/var/opt/ONAP

+++ kubectl --namespace onap exec dev-robot-robot-7bf98dfb65-k2p65 -- bash -c 'ls -1q /share/logs/ | wc -l'

++ export GLOBAL_BUILD_NUMBER=1921

++ GLOBAL_BUILD_NUMBER=1921

+++ printf %04d 1921

++ OUTPUT_FOLDER=00190021_ete_instantiateVFWCL

++ DISPLAY_NUM=109111

++ VARIABLEFILES='-V /share/config/vm_properties.py -V /share/config/integration_robot_properties.py -V /share/config/integration_preload_parameters.py'

++ VARIABLES='-v GLOBAL_BUILD_NUMBER:1189912049'

++ kubectl --namespace onap exec dev-robot-robot-7bf98dfb65-k2p65 -- /var/opt/ONAP/runTags.sh -V /share/config/vm_properties.py -V /share/config/integration_robot_properties.py -V /share/config/integration_preload_parameters.py -v GLOBAL_BUILD_NUMBER:11899 12049 -d /share/logs/00190021_ete_instantiateVFWCL -i instantiateVFWCL --display 109111

Starting Xvfb on display :109 111 with res 1280x1024x24

Executing robot tests at log level TRACE

==============================================================================

Testsuites

==============================================================================

Testsuites.Demo :: Executes the VNF Orchestration Test cases including setu...

==============================================================================

Instantiate VFWCL

Downloaded:service-Vfwcl201907101445Vfwcl201907101631-csar.csar

Set VNF ProvStatus: bfa216fbe26ed2db-23ac43a4-460e40bd-9b639880-aec3e06ddd2f 65a02dbf734f to ACTIVE

Set VNF ProvStatus: 3d931dabfc482c95-35e93d58-4e3745e5-a7e0b6c0-e8d1d166db34 bc0321c049a1 to ACTIVE

Customer Name=DemoCust_0d3a3c71aec5b5b9-ff3b6e62-449d4e07-8d78bef6-6627a972632888bddacd5132

VNF Module Name=Vfmodule_Ete_vFWCLvFWSNK_0d3a3c71aec5b5b9_0

VNF Module Name=Vfmodule_Ete_vFWCLvPKG_0d3a3c71aec5b5b9_1

Update old vFWCL Policy for ModelInvariantID=283e1a720b663b8a-52712b4a-4d5642d8-9a3d9ea6-2dc9a8d558b6f965602be1fc

Create vFWCL Monitoring Policy

Create vFWCL Operational Policy

{u'content': u'controlLoop%3A%0A++++version%3A+2.0.0%0A++++controlLoopName%3A+ControlLoop-vFirewall-283e1a720b663b8a-52712b4a-4d5642d8-9a3d9ea6-2dc9a8d558b6%0Af965602be1fc%0A++++trigger_policy%3A+unique-policy-id-1-modifyConfig%0A++++timeout%3A+1200%0A++++abatement%3A+false%0Apolicies%3A%0A++++-+id%3A+unique-policy-id-1-modifyConfig%0A++++++name%3A+modify_packet_gen_config%0A++++++description%3A%0A++++++actor%3A+APPC%0A++++++recipe%3A+ModifyConfig%0A++++++target%3A%0A++++++++++resourceID%3A+283e1a720b663b8a-52712b4a-4d5642d8-9a3d9ea6-2dc9a8d558b6%0Af965602be1fc%0A++++++++++type%3A+VNF%0A++++++payload%3A%0A++++++++++streams%3A+%27%7B%22active-streams%22%3A5%7D%27%0A++++++retry%3A+0%0A++++++timeout%3A+300%0A++++++success%3A+final_success%0A++++++failure%3A+final_failure%0A++++++failure_timeout%3A+final_failure_timeout%0A++++++failure_retries%3A+final_failure_retries%0A++++++failure_exception%3A+final_failure_exception%0A++++++failure_guard%3A+final_failure_guard%0A', u'policy-id': u'operational.modifyconfig'}

Push vFWCL To PDP Group

Validate vFWCL Policy

APPC Mount Point for VNF Module Name=Vfmodule_Ete_vFWCLvFWSNK_0d3a3c71aec5b5b9_0

APPC Mount Point for VNF Module Name=Vfmodule_Ete_vFWCLvPKG_0d3a3c71aec5b5b9_1

| PASS |

------------------------------------------------------------------------------

Testsuites.Demo :: Executes the VNF Orchestration Test cases inclu... | PASS |

1 critical test, 1 passed, 0 failed

1 test total, 1 passed, 0 failed

==============================================================================

Testsuites | PASS |

1 critical test, 1 passed, 0 failed

1 test total, 1 passed, 0 failed

==============================================================================

Output: /share/logs/00190021_ete_instantiateVFWCL/output.xml

Log: /share/logs/00190021_ete_instantiateVFWCL/log.html

Report: /share/logs/00190021_ete_instantiateVFWCL/report.html



...


Description (Keyword)Comment
1.0Setup Orchestrate VNFThese steps will pull data from openstack and create the data in A&AI if it does not exist for the tenant, region, network zone and complex.

         Initialize Tenant From OpenstackSet the tenant_name and tenant_id

         Initialize Regions From OpenstackGet the regions

         Inventory the Region If Not ExistsFor all regions (RegionOne) under the tenant check A&AI and creates them if they do not exist

        Inventory Zones If Not ExistsChecks A&AI for the network zone (zone1) and creates it if it does not exist

        Inventory Complex If Not ExistsChecks A&AI for the complex (clli1) and creates it if it does not exist
2.0Orchestrate the VNFThis will onboard the vendor software product (vFWCL) , create a service and distribute the service

       Get the Region

      Generate a unique Customer Name

      Generate a unique Service Name

      Model Distribution For  Directory

This step will onboard the vendor software products (heat templates) in the directory requested which in this case is for the vFWCL  (heat templates are from the ONAP demo repository.

For vFWCL there are two v VNFs in the service. vFWSNK (vFW and traffic sink)  and vFWPKG (a packet generator).

The VES telemetry will come from the vFW and the control loop will modify the packet generator to control the traffic.

These steps are start the process of the service designer role as "cs0008"


         vFWCL/vFWSNK → . Create Zip From Files In DirectoryThese steps will create a zip file with the .yaml, .env and the manifest from the vFWCL/vFWSNK directory

         vFWCL/vPKG . Create Zip From Files In DirectoryThese steps will create a zip file with the .yaml, .env and the manifest from the vFWCL/vPKG directory

         Distribute Model From ASDCThis will start to use the zip files just created to onboard the vendor software product

                          Add ASDC Catalog ServiceRobot creates the service first to have a bucket in which to put artifacts. In the GUI , the service is created last.

                         vFWSNK:  Setup ASDC Catalog Resourcefor each VNF robot will create a license

                                                      Add ASDC License Model

                                                      Add ASDC License Group

                                                      Add ASDC Entitlement Pool

                                                      Add ASDC Feature Group

                                                      Add ASDC License Agreement

                                                      Submit ASDC License ModelWith all the parts of the license added the license model is submitted.

                                          Add ASDC Software ProductThe vendor software product meta data is created

                                          Upload ASDC Heat PackageThe zip file is uploaded

                                          Validate ASDC Software ProductAsk SDC to parse the uploaded zip file

                                          Submit ASDC Software ProductSubmit the vendor software product

                                          Package ASDC Software Product

                                          Add ASDC Catalog ResourceTurn the vendor software product into a catalog resource

                                         Certify ASDC Catalog ResourceMake the catalog resource available for use in a service

                      vFWCL_vPKG:


                                        (repeat above steps from the vFWCL_vFWSNK) from Setup to Certify


                      Checkin ASDC Catalog ServiceSince robot already created the service and attach the catalog resource to it we only need to checkin the catalog service so that it is available for testing, governance approval and distribution

                      Request Certify ASDC Catalog ServiceLast step by service designer (cs0008)

                      Start Certify ASDC Catalog ServiceService tester role (jm0007) opens the service

                     Certify ASDC Catalog ServiceService tester role certifies the service.

.                    Approve ASDC Catalog ServiceGovernance role approves the service (gv0001)

                     Distribute ASDC Catalog ServiceOperations role distributes the service (op0001)


Distribution occurs to AAI, SDNC, SO and other components.



                     Loop Over Check Catalog Service DistributedThis will loop over the get Distribution Details and look for the results of SO to mark the distribution complete  when AAI, SDNC and SO have indicated DEPLOY_OK and no other component has raised a DEPLOY_ERROR in teh watchdog timer interval (typcially 5 minutes) . VID queries AAI to see service in the DISTRIBUTION_COMPLETE_OK state in order to know to display the DEPLOY button.






3.0Instantiate the Service (this is not a keyword but a change from SDC onboarding to using VID

Create Customer For VNF 

This is the first step on the VID screen. Robot creates a unique customer for each run of the test case to avoid conflicts and to make it easier to find the VNFs created in this test case.

Robot creates the customer in A&AI via the REST  interface


Login To VID GUIRobot got to the VID GUI directly

              Select From List By Label  (VNF-API)
This test case uses the original VNF-API. You have to select this on the VID Home Screen

Create VID Service Instance  (Wait for Success)

              Go To VID HOMEThis is the strating point for robot VID interactions (the selected VNF-API is remembered in VID for this session

             Go To VID Browse Service ModelsThe wait for is intended to handle delays in the model being available to VID from the AAI query for DISTRIBUTION_COMPLETE_OK models

                         Filter on the service model name:  FWCL 2019-06-24 15:49:

                         Wait Until Page Contains Element .. "DEPLOY'


                         Press Key ( Click on Deploy button)The create service "Instance Name" screen should now come up

                        Select From List When Enabled //select[@prompt='Select Subscriber Name'],

                        Select From List When Enabled //select[@prompt='Select Service Type'],

                         Select From List When Enabled //select[@prompt='Select Project Name']

                        Select From List When Enabled //select[@prompt='Select Owning Entity']

                        Input Text When Enabled, //input[@parameter-name='Instance Name']

Image RemovedImage Added


                    Click on the Confirm buttonVID will now submit the request to create the service to SO

.                   Poll MSO Get Request

Image Added


                    Validate Service InstanceQuery A&AI to make sure the service instance is created
3.1                    vFWCLvFWSNKFor each VNF in the service create the VNF and the VF Module

                                  Create a unique VNF name

                                  Create VID VNF

.                                                Click Element button=Add node instanceSelect the drop down of VNFs in the service

                                                Click Element xpath=//a[contains(text(), '${vnf_type}')]

Select the vFWCLvFWSNK VNF

This will cause the Create VNF Dialog Box to pop up


                                               Input Text xpath=//input[@parameter-id='instanceName']

                                               Select From List By Label xpath=//select[@parameter-id='productFamily'],

                                              Select From List By Label xpath=//select[@parameter-id='lcpRegion'],

                                              Select From List By Label xpath=//select[@parameter-id='tenant'],

                                              Click Element xpath=//multiselect[@parameter-id='lineOfBusiness']

                                               Select From List By Label xpath=//select[@parameter-id='platform'],



                                               Click Element button=Confirm

This will cause VID to send the Create VNF Instance request to SO

Image RemovedImage Added


                                               Wait for Success and Close Dialog

                                Preload Vnf (SDNC) 

Now that a VNF is created we can set the data that will be used for the VFModules keyed by VNF instance name. Robot will use the REST API into SDNC to insert the preload data.

This is a POST to submit and  a GET to confirm.


                               Create VID VNF module (VID)


                               Wait for the Add VF Module button to be visible

                               Click Element xpath=//div[contains(.,'${vnf_name}')]/div/button[contains(.,'Add VF-Module')]

                               Click Element link=${vnf_type}This will cause the Add VF Module dialog to appear

                                      Input Text xpath=//input[@parameter-id='instanceName'],

                                      Select From List By Label xpath=//select[@parameter-id='lcpRegion']

                                      Select From List By Label xpath=//select[@parameter-id='tenant']

                                      Select Checkbox xpath=//input[@parameter-id='sdncPreload']

Image RemovedImage Added


                                      Click Element button=Confirm

This will cause VID to send the Create VF Module to SO. SO will query SDNC for preload and then call the Openstack API's to create the stack


Image RemovedImage Added


.                                      Poll MSO Get Requestthis can take minutes based on when the Openstack heat engine returns success to SO

.                      

The VNF should now exist

                              Validate Generic VNFQuery A&AI to see artifacts that SO and SDNC have written

                               Execute Heatbridge

This will query openstack and update A&AI with items like the dhcp addresses assigned to the VM's

It also does a reverse update of AAI with openstack data.

3.2           vFWCLvPKG  :


                              repeat the above steps for the second VNF  from:

                                             Create a unique VNF name to Execute Heatbridge

Image Added

4.0 Update vVFWCL PolicyThis will create and push the control loop policy to the DROOLS engine in policy

                              Create vFirewall Monitoring PolicyThis is a future capability that is not effective  since DCAE doesnt pickup this policy in Dublin

                              Create vFirewall Operational PolicyThe Control Loop Name is created and the resourceID inserted into the policy so that Policy can find the VNF data during its processing for control loops

                               Push vFirewall Policies To PDP Group

                              Validate the vFWCL Policy
5.0

For each vfmodule that has a defined variable for the mount

${vf_module_name} = Vfmodule_Ete_vFWCLvPKG_c7fca777_1 has a vpg_name_0 variable (vFWSNK does not)



                 Create the APPC Mount PointCreate the NETCONF mount point in APPC for closed loop control

                             Get the IP address from Openstack

.                            Run APPC Put Request

<END>

The Virtual Machines and networks are created from the two heat stack, A&AI has been updated and marked the service as Active ,  the policy has been pushed and the APPC netconf mount has been created.

The DCAE TCA Policy needs to be updated with the matching Control Loop Name from the Operation

vFW Closed Loop operation testing can begin as soon as the VNF finishes its application install and configuration.

Traffic should be visible on port 667 of the traffic sink VM.










...