Adding VNF Data in A&AI

When testing VNF actions in A&AI it might be necessary to load the VNF data in A&AI required to test the VNF.  One method is to use the below put_closed_loop.sh to submit the data to A&AI.

The syntax for executing the put_closed_loop.sh command is:

$ ./put_closed_loop.sh aai-ip-hostname
put_closed_loop.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 model.json -X PUT $HEADERS https://$RESOURCE_HOSTNAME:8443/aai/v11/service-design-and-creation/models/model/vCPE_Intrastructure_Metro_vGMUX eval curl -k -u AAI:AAI -T generic-vnf.json -X PUT $HEADERS https://$RESOURCE_HOSTNAME:8443/aai/v11/network/generic-vnfs/generic-vnf/vCPE_Infrastructure_vGMUX_demo_app eval curl -k -u AAI:AAI -T cloud-region.json -X PUT $HEADERS https://$RESOURCE_HOSTNAME:8443/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/pod25/RegionOne eval curl -k -u AAI:AAI -T vserver-generic-vnf-relationship.json -X PUT $HEADERS https://$RESOURCE_HOSTNAME:8443/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/pod25/RegionOne/tenants/tenant/466979b815b5415ba14ada713e6e1846/vservers/vserver/e8020a03-5cd9-4f8c-b2d8-9972a256cf6a/relationship-list/relationship eval curl -k -u AAI:AAI -T VNFC-VNF-info.json -X PUT $HEADERS https://$RESOURCE_HOSTNAME:8443/aai/v11/network/vnfcs/vnfc/VNFC_vGMUX_demo_app
model.json
{ "model-invariant-id": "vCPE_Intrastructure_Metro_vGMUX", "model-type": "sometype", "model-vers": { "model-ver": [ { "model-version-id": "vCPE", "model-name": "vCPE", "model-version": "vCPE" } ] } }
generic-vnf.json
cloud-region.json
vserver-generic-vnf-relationship.json
VNFC-VNF-info.json



Updated files used for Casablanca testing October 2018: