During the course of testing when an action fails APPC will set the Orchestration Status of the VNF to "Error" in A&AI.  In order to execute another action the Orchestration status must be reset to "running" in A&AI.

In order to reset the Orchestration Status in A&AI the verify.sh script can be used to obtain the "resource-version" for the generic vnf object in A&AI.

  •   Obtain the "resource-version" for the generic-vnf object (the aai1 in the command is the A&AI instance IP or Hostname):
$ ./verify.sh aai1 |python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2848    0  2518  100   330   1158    151  0:00:02  0:00:02 --:--:--  1158
{
    "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": {
.
.
.
  • Copy the resource-version and paste it into the resource-version in the update-vnf-status.json file
{
   "vnf-id": "vCPE_Infrastructure_vGMUX_demo_app",
   "vnf-name": "vCPE_Infrastructure_vGMUX_demo_app",
   "vnf-type": "vCPE",
   "service-id": "vFirewall_demo_app",
   "orchestration-status": "Running",
==>"resource-version" : "1510104391195",<==
   "in-maint": false,
   "is-closed-loop-disabled": false,
   "model-invariant-id": "vCPE_Intrastructure_Metro_vGMUX",
   "model-version-id": "vCPE"
}
  • Execute the update.sh script in order to update the VNF Orchestration Status
$ update.sh aai1
update.sh
#!/bin/bash

HEADERS='-H "X-FromAppId: AAI-Temp-Tool" -H "X-TransactionId: AAI-Temp-Tool" -H "Real-Time: true" -H "Content-Type: application/json" -H "Accept: application/json"';

if [ $# -eq 0 ]; then
    echo "Invalid you need to provide the ip address or hostname of machine to run the requests";
    exit 1;
fi;

RESOURCE_HOSTNAME=$1;

eval curl -k -u AAI:AAI -T update-vnf-status.json -X PUT $HEADERS https://$RESOURCE_HOSTNAME:8443/aai/v11/network/generic-vnfs/generic-vnf/vCPE_Infrastructure_vGMUX_demo_app
  • No labels