APPC Generic_Restart Test


Verify VNF Data in A&AI

  • Using the verify.sh script validate the VNF data is in A&AI as well as the Orchestration Status of the VNF (Should be Running).

  • More details are available at Verify VNF Data is in A&AI.
     

Typical Output of verify.sh
{ "inventory-response-item": [ { "extra-properties": {}, "generic-vnf": { "in-maint": false, "is-closed-loop-disabled": false, "model-invariant-id": "vCPE_Intrastructure_Metro_vGMUX", "model-version-id": "vCPE", "orchestration-status": "Running", "resource-version": "1510104391195", "service-id": "vFirewall_demo_app", "vnf-id": "vCPE_Infrastructure_vGMUX_demo_app", "vnf-name": "vCPE_Infrastructure_vGMUX_demo_app", "vnf-type": "vCPE" }, "inventory-response-items": { "inventory-response-item": [ { "extra-properties": {}, "inventory-response-items": { "inventory-response-item": [ { "extra-properties": {}, "vnfc": { "in-maint": false, "is-closed-loop-disabled": false, "nfc-function": "vGMUX", "nfc-naming-code": "vGMUXCODE", "orchestration-status": "Running", "prov-status": "Running", "resource-version": "1509725780164", "vnfc-name": "VNFC_vGMUX_demo_app" } }, { "extra-properties": {}, "inventory-response-items": { "inventory-response-item": [ { "cloud-region": { "cloud-owner": "pod25", "cloud-region-id": "RegionOne", "cloud-region-version": "titanium_cloud", "cloud-type": "openstack", "cloud-zone": "cloud zone", "complex-name": "complex name", "identity-url": "http://10.0.14.1:9005/api/multicloud-titanium_cloud/v0/pod25_RegionOne/identity/v2.0", "owner-defined-type": "owner-defined-type", "resource-version": "1509725696928", "sriov-automation": true }, "extra-properties": {}, "inventory-response-items": { "inventory-response-item": [ { "esr-system-info": { "cloud-domain": "Default", "default-tenant": "Integration", "esr-system-info-id": "432ac032-e996-41f2-84ed-9c7a1766eb29", "ip-address": "example-ip-address-val-44431", "password": "onapdemo", "port": "example-port-val-93234", "resource-version": "1509725697438", "service-url": "http://10.12.25.2:5000/v3", "ssl-cacert": "example-ssl-cacert-val-75021", "ssl-insecure": true, "system-name": "example-system-name-val-29070", "system-type": "VIM", "type": "example-type-val-85254", "user-name": "demo", "vendor": "example-vendor-val-94515", "version": "example-version-val-71880" }, "extra-properties": {} } ] } } ] }, "tenant": { "resource-version": "1509725696999", "tenant-id": "466979b815b5415ba14ada713e6e1846", "tenant-name": "Integration" } } ] }, "vserver": { "in-maint": false, "is-closed-loop-disabled": false, "prov-status": "Running", "resource-version": "1509725717054", "vserver-id": "e8020a03-5cd9-4f8c-b2d8-9972a256cf6a", "vserver-name": "zdcpe1cpe01mux01", "vserver-name2": "zdcpe1cpe01mux01", "vserver-selflink": "http://10.0.14.1:80/api/multicloud-titanium_cloud/v0/pod25_RegionOne/compute/v2.1/466979b815b5415ba14ada713e6e1846/servers/e8020a03-5cd9-4f8c-b2d8-9972a256cf6a" } } ] }, "model-name": "vCPE" } ] }



Reset Data

  • Update the VNF Orchestration Status using the update.sh script.

  • More details are available at Resetting A&AI VNF Orchestration Status.   

  • If the VNF Orchestration Status is "Error" it will need to be reset following the process in the link above for resetting the orchestration status.

Output of verify.sh - VNF in "Error" status
{ "inventory-response-item": [ { "extra-properties": {}, "generic-vnf": { "in-maint": false, "is-closed-loop-disabled": false, "model-invariant-id": "vCPE_Intrastructure_Metro_vGMUX", "model-version-id": "vCPE", "orchestration-status": "Error", ===========> "resource-version": "1510104391195", <==================== "service-id": "vFirewall_demo_app", "vnf-id": "vCPE_Infrastructure_vGMUX_demo_app", "vnf-name": "vCPE_Infrastructure_vGMUX_demo_app", "vnf-type": "vCPE" }, "inventory-response-items": { . . .
  •  The resource-version can be obtained from the verify.sh then used to update the udpate-vnf-status.json prior to executing the update.sh script.  For me details go to Resetting A&AI VNF Orchestration Status.

$ update.sh aai1



Update APPC DB

  • Remove any VNF - VNF_LOCK_MANAGEMENT or VNF - VNF_STATE_MANAGEMENT entries from any prior executed tests.

  • During test execution sometimes the action fails and the VNF's state is not stable and the VNF might still be locked.  In that case, you may remove the State and Lock info for the VNF.

VNF_STATE_MANAGEMENT List
  • The SQL for the VNF_LOCK_MANAGEMENT will be similar to the example of the VNF_STATE_MANAGEMENT above.

Login to API Doc Explorer

Create VNF Restart Request

  • Create your request with the VNF info as well as a current date/time.
     

    Sample API Doc Explorer VNF Restart

Submit Your Request

  • Submit your request making sure you're submitting the request to the /opterations/appc-provider-lcm:restart


Look for Request Accepted

  • In the response body you should see "ACCEPTED - request accepted" 


Monitor the Karaf Log

  • Monitor the karaf.log in the /opt/opendaylight/current/data/log directory using "tail -f karaf.log" or view the file itself. You should observe "os-stop" and "os-start" in the log.

    os-stop/os-start example from karaf.log



Monitor SvcLogic Log

  • The SvcLogic log is in the /opt/opendaylight/current/data/log "SvcLogicGraph [module=APPC, rpc=Generic_Restart, mode=sync, version=3.0.0].log"

    Sample SvcLogic for Generic_Restart



Look for Success in SvcLogic or Karaf Log

  • In the Generic_Restart SVCLogic log you should observe "2017-11-03 14:51:40,592 | DEBUG | SvcLogicGraph [module=APPC, rpc=Generic_Restart, mode=sync, version=3.0.0] | Returning status success" once the Restart has occured for all VMs in the VNF.
     

    Sample SvcLogic for Generic_Restart Success

Verify Restart in Cloud Dashboard

  • Verify the VNF/VMs were restart in the Cloud Provider dashboard. Currently, that is OpenStack and the status can be viewed in the Horizon dashboard. Look at the Action Log observing a stop then a start.