Add Sample data set to AAI for Sparky

This tutorial will focus on adding sample nodes with links once AAI is setup. With this data set, the sparky UI can be showcased.The first section will focus on how to add a sample data set for visualizing the nodes on sparky and the second section will focus on how to add different node type, so that you can build up a data set that suits you.


Step-by-step guide

How to post in data into AAI is covered in Tutorial: Making and Testing a Schema Change in A&AI. This wiki will detail the data that can be inserted for a type of node.

Adding a sample vnf data set

All of the following requests are put requests and the only thing that is changing is the URI and the post data. 

Request type:

PUT

Authorization:

Type: Basic Auth

Credentials: AAI/AAI (Check the robot scripts to get the latest credentials)

Content Type

The content type is JSON

Headers: 

In postman when you add the credentials in Authorization tab and select the data type ad JSON in the body tab,  the required headers will be added in the request


Sample post:

The sequence in which they should be entered should not be altered.

URLData
https://10.247.109.144:8443/aai/v10/cloud-infrastructure/complexes/complex/AMIST-COMPLEX-1

{               "data-center-code":"AMICPL1",

                "complex-name": "AMIST-COMPLEX-1-name",

                "physical-location-id":"AMIST-COMPLEX-1",

                "physical-location-type":"Office",

                "street1":"505",

                "street2":"Terry Fox Drive",

                "city":"Kanata",

                "state":"Ontario",

                "postal-code":"A1A1A1",

                "region": "Eastern",

                "country":"Canada"

}

https://10.247.109.144:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/AMIST/AMCR1

{

  "cloud-owner": "AMIST",

  "cloud-region-id": "AMCR1",

  "cloud-region-version": "11.0",

  "complex-name": "AMIST-COMPLEX-1"

}

https://10.247.109.144:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/AMIST/AMCR1/tenants/tenant/AMIST-TENANT-1

{

  "tenant-id": "AMIST-TENANT-1",

  "tenant-name": "AMIST-TENANT-1-NAME-1"

}



https://10.247.109.144:8443/aai/v10/network/generic-vnfs/generic-vnf/amist456vnf

{

  "vnf-id": "amist456vnf",

  "vnf-name": "amist456vnf",

  "vnf-type": "asbg",

  "prov-status": "junk",

  "equipment-role": "ASBG",

  "orchestration-status": "Running",

  "heat-stack-id": "amist456vnf-12345-678-",

  "ipv4-oam-address": "5.6.7.8",

  "in-maint": false,

  "is-closed-loop-disabled": false

}

 https://10.247.109.144:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/AMIST/AMCR1/tenants/tenant/AMIST-TENANT-1/vservers/vserver/AMIST-VSERVER-1
{
  "vserver-id": "AMIST-VSERVER-1",
  "vserver-name": "AMIST-VSERVER-1-name",
  "vserver-name2": "AMIST-VSERVER-1-name-2",
  "prov-status": "Running",
  "vserver-selflink": "AMT7 VserverLink",
  "in-maint": true,
  "is-closed-loop-disabled": true,
  "relationship-list": {
    "relationship": [
      {
        "related-to": "generic-vnf",
        "related-link": "https://aai-ext1.test.att.com:8443/aai/v9/network/generic-vnfs/generic-vnf/amist456vnf",
        "relationship-data": [
          {
            "relationship-key": "generic-vnf.vnf-id",
            "relationship-value": "amist456vnf"
          }
        ],
        "related-to-property": [
          {
            "property-key": "generic-vnf.vnf-name",
            "property-value": "amist456vnf"
          }
        ]
      },
      {
        "related-to": "pserver",
        "related-link": "https://aai-ext1.test.att.com:8443/aai/v9/cloud-infrastructure/pservers/pserver/amist-pserver-host-1",
        "relationship-data": [
          {
            "relationship-key": "pserver.hostname",
            "relationship-value": "amist-pserver-host-1"
          }
        ],
        "related-to-property": [
          {
            "property-key": "pserver.pserver-name2",
            "property-value": "amist-pserver-host-1-name"
          }
        ]
      }
    ]
  }
}
 https://10.247.109.144:8443/aai/v10/network/vnfcs/vnfc/AMIST-VSERVER-1001vnfc
{
  "vnfc-name": "AMIST-VSERVER-1001vnfc",
  "vnfc-function-code": "VDBE",
  "vnfc-type": "System Controller",
  "prov-status": "Pre-Prov",
  "orchestration-status": "CONFIGURED",
  "in-maint": false,
  "is-closed-loop-disabled": false,
  "relationship-list": {
    "relationship": [
      {
        "related-to": "vserver",
        "related-link": "https://aai-ext1.test.att.com:8443/aai/v9/cloud-infrastructure/cloud-regions/cloud-region/AMIST/AMCR1/tenants/tenant/AMIST-TENANT-1/vservers/vserver/AMIST-VSERVER-1",
        "relationship-data": [
          {
            "relationship-key": "cloud-region.cloud-owner",
            "relationship-value": "AMIST"
          },
          {
            "relationship-key": "cloud-region.cloud-region-id",
            "relationship-value": "AMCR1"
          },
          {
            "relationship-key": "tenant.tenant-id",
            "relationship-value": "AMIST-TENANT-1"
          },
          {
            "relationship-key": "vserver.vserver-id",
            "relationship-value": "AMIST-VSERVER-1"
          }
        ],
        "related-to-property": [
          {
            "property-key": "vserver.vserver-name",
            "property-value": "AMIST-VSERVER-1-name"
          }
        ]
      }
    ]
  }
}
https://10.247.109.144:8443/aai/v10/network/vnfcs/vnfc/AMIST-VSERVER-1001vnfc
{
  "vnfc-name": "AMIST-VSERVER-1001vnfc",
  "vnfc-function-code": "VDBE",
  "vnfc-type": "System Controller",
  "prov-status": "Pre-Prov",
  "orchestration-status": "CONFIGURED",
  "in-maint": false,
  "is-closed-loop-disabled": false,
  "relationship-list": {
    "relationship": [
      {
        "related-to": "vserver",
        "related-link": "https://aai-ext1.test.att.com:8443/aai/v9/cloud-infrastructure/cloud-regions/cloud-region/AMIST/AMCR1/tenants/tenant/AMIST-TENANT-1/vservers/vserver/AMIST-VSERVER-1",
        "relationship-data": [
          {
            "relationship-key": "cloud-region.cloud-owner",
            "relationship-value": "AMIST"
          },
          {
            "relationship-key": "cloud-region.cloud-region-id",
            "relationship-value": "AMCR1"
          },
          {
            "relationship-key": "tenant.tenant-id",
            "relationship-value": "AMIST-TENANT-1"
          },
          {
            "relationship-key": "vserver.vserver-id",
            "relationship-value": "AMIST-VSERVER-1"
          }
        ],
        "related-to-property": [
          {
            "property-key": "vserver.vserver-name",
            "property-value": "AMIST-VSERVER-1-name"
          }
        ]
      }
    ]
  }
}
https://10.247.109.144:8443/aai/v10/network/newvces/newvce/amist123vbc
{
  "vnf-id2": "amist123vbc",
  "vnf-name": "amist123vbc-name",
  "vnf-name2": "amist123vbc-name2",
  "vnf-type": "esx-vce",
  "prov-status": "PRE-PROV",
  "ipv4-oam-address": "4.2.3.4",
  "equipment-role": "VCE",
  "heat-stack-id": "amist123vbc"
}
https://10.247.109.144:8443/aai/v10/network/vces/vce/amist-vce-1/port-groups/port-group/amist-vce-interface-2
{
  "interface-id": "amist-vce-interface-2",
  "neutron-network-id": "amist-net-2",
  "interface-role": "MGMT",
  "orchestration-status": "PROV",
  "heat-stack-id": "amist-vce-interface-2-heat"
}
https://10.247.109.144:8443/aai/v10/network/vces/vce/amist-vce-1/port-groups/port-group/amist-vce-interface-2
{
  "interface-id": "amist-vce-interface-2",
  "neutron-network-id": "amist-net-2",
  "interface-role": "MGMT",
  "orchestration-status": "PROV",
  "heat-stack-id": "amist-vce-interface-2-heat"
}
https://10.247.109.144:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/AMIST/AMCR1/availability-zones/availability-zone/AMIST-AZ-1
{
"cloud-owner":"AMIST",
"cloud-region-id":"AMCR1",
"availability-zone-name":"AMIST-AZ-1",
"hypervisor-type":"OpenStackAmd"
}
https://10.247.109.144:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/AMIST/AMCR1/availability-zones/availability-zone/AMIST-AZ-1
{
"cloud-owner":"AMIST",
"cloud-region-id":"AMCR1",
"availability-zone-name":"AMIST-AZ-1",
"hypervisor-type":"OpenStackAmd"
}
https://10.247.109.144:8443/aai/v10/business/customers/customer/AMIST-CUST-11
{
   "global-customer-id": "AMIST-CUST-11",
   "subscriber-name": "AAIIST-TESTER-11",
   "subscriber-type": "Customer",
   "service-subscriptions": {"service-subscription":    [
            {
         "service-type": "amist-voip"       
      }
   ]}
}
https://10.247.109.144:8443/aai/v10/business/customers/customer/AMIST-CUST-11
{
   "global-customer-id": "AMIST-CUST-11",
   "subscriber-name": "AAIIST-TESTER-11",
   "subscriber-type": "Customer",
   "service-subscriptions": {"service-subscription":    [
            {
         "service-type": "amist-voip"       
      }
   ]}
}
https://10.247.109.144:8443/aai/v10/business/customers/customer/AMIST-CUST-11/service-subscriptions/service-subscription/amist-firewall/service-instances/service-instance/AMIST-SRVINST-11
{
"global-customer-id": "AMIST-CUST-11",
    "subscriber-name": "AAIIST-TESTER-11",
    "subscriber-type": "Customer",
    "service-subscriptions": {
        "service-subscription": [
            {
                "service-type": "amist-firewall"
            },
            {
                "service-instances": {
                    "service-instance": [
                        {
                            "service-instance-id": "AMIST-SRVINST-11",
                            "service-instance-name": "AMIST-SRVINST-11-name",
                            "bandwidth-total": "1Mbps",
                            "operational-status": "Up"
                        }
                    ]
                }
            }
        ]
    }
}
https://10.247.109.144:8443/aai/v10/business/customers/customer/AMIST-CUST-11/service-subscriptions/service-subscription/amist-firewall/service-instances/service-instance/AMIST-SRVINST-11
{
"global-customer-id": "AMIST-CUST-11",
    "subscriber-name": "AAIIST-TESTER-11",
    "subscriber-type": "Customer",
    "service-subscriptions": {
        "service-subscription": [
            {
                "service-type": "amist-firewall"
            },
            {
                "service-instances": {
                    "service-instance": [
                        {
                            "service-instance-id": "AMIST-SRVINST-11",
                            "service-instance-name": "AMIST-SRVINST-11-name",
                            "bandwidth-total": "1Mbps",
                            "operational-status": "Up"
                        }
                    ]
                }
            }
        ]
    }
}
https://10.247.109.144:8443/aai/v10/network/generic-vnfs/generic-vnf/amist457vnf
{
  "vnf-id": "amist457vnf",
  "vnf-name": "amist457vnf",
  "vnf-type": "asbg",
  "prov-status": "junk",
  "equipment-role": "ASBG",
  "orchestration-status": "Running",
  "heat-stack-id": "amist457vnf-12345-678-",
  "ipv4-oam-address": "5.6.7.8",
  "in-maint": false,
  "is-closed-loop-disabled": false
}


Adding Different node types

1. Create Customer.


PUT Request:


URL: https://<host-ip>:8443


Resource: /aai/v8/business/customers/customer/AMTEL-HS-10007


GET: /aai/v8/business/customers/customer/AMTEL-HS-10007/service-subscriptions/service-subscription/voip


 


{


   "global-customer-id": "AMTEL-HS-10007",


   "subscriber-name": "AMTEL-HS-10007",


   "subscriber-type": "Customer",


   "service-subscriptions": {"service-subscription":    [


            {


         "service-type": "voip"       


      }


   ]}


}


 


2. Create Service Instance for the above Customer.


PUT Request:


URL: https://<host-ip>:8443


Resource: /aai/v8/business/customers/customer/AMTEL-HS-10007/service-subscriptions/service-subscription/voip/service-instances/service-instance/SI-AMT-007HS


 


{


"global-customer-id": "AMTEL-HS-10007",


    "subscriber-name": "AMTEL-HS-10007",


    "subscriber-type": "Customer",


    "service-subscriptions": {


        "service-subscription": [


            {


                "service-type": "voip"


            },


            {


                "service-instances": {


                    "service-instance": [


                        {


                            "service-instance-id": "SI-AMT-007HS",


                            "service-instance-name": "AMTEL-VOIP-HS0007",


                            "bandwidth-total": "1Mbps",


                            "operational-status": "Up"


                        }


                    ]


                }


            }


        ]


    }


}


 


 


NOTE! GET /aai/v8/business/customers/customer/AMTEL-HS-10007/service-subscriptions/service-subscription/voip/service-instances/service-instance/SI-AMT-007HS and look for the presence of SI name, BW-total and Op-Status. If not present, do a PUT for each individually …  "service-instance-name": "AMTEL-VOIP-HS0007",  "bandwidth-total": "1Mbps",  &  "operational-status": "Up"


 


4. Create Pserver


PUT Request:


URL: https://<host-ip>:8443


Resource: /aai/v8/cloud-infrastructure/pservers/pserver/amt-server-7MB


 


{


   "hostname": "amt-server-7MB",


   "number-of-cpus": "10",


   "disk-in-gigabytes": "144",


   "ram-in-megabytes": "6291456",


   "equip-type": "Rack Server",


   "equip-vendor": "Dell",


   "equip-model": "PowerEdge R930",


   "serial-number": "S4MPLED474HS",


   "pserver-id": "Pserver-AMT-007HS",


   "in-maint": false


}


 


5.0 Create cloud-region ONLY ONCE!!! Once created, you can add additional Customer graphs on the same cloud.


 


PUT Request:


Resource:  /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Skynet/CL-MR1


 


{


   "cloud-owner": "Skynet",


   "cloud-region-id": "CL-MR1",


   "cloud-region-version": "9.0",


   "complex-name": "CL-MR1"


}


 


 


 


 


5.1 Create Tenant


PUT Request:


URL: https://<host-ip>:8443


Resource: /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Skynet/CL-MR1/tenants/tenant/Tenant-AMT-007HS


 


{


"tenant-id": "Tenant-AMT-007HS",


"tenant-name": "AMT-VOIP-0007HS"


}


 


6. Create Vserver-1 linked with Pserver


PUT Request:


URL: https://<host-ip>:8443


Resource: /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Skynet/CL-MR1/tenants/tenant/Tenant-AMT-007HS/vservers/vserver/Vserver-AMT-007-HSGW


 


{


            "vserver-id": "Vserver-AMT-007-HSGW",


            "vserver-name": "AMT-VOIP-0007-HSGW",


            "vserver-name2": "Vs7-HSGW-OTT",


            "prov-status": "Provisioned",


            "in-maint": false,


            "is-close-loop-disabled": false,


            "vserver-selflink": "AMT7 VserverLink",


"relationship-list": {


"relationship": [


{


"related-to": "pserver",


"relationship-data": [


{


"relationship-key": "pserver.hostname",


"relationship-value": "amt-server-7MB"


}]}]}}


 


7. Create Vserver-2 linked with Pserver


PUT Request:


URL: https://<host-ip>:8443


Resource: /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Skynet/CL-MR1/tenants/tenant/Tenant-AMT-007HS/vservers/vserver/Vserver-AMT-007-HSFW


 


{


            "vserver-id": "Vserver-AMT-007-HSFW",


            "vserver-name": "AMT-VOIP-0007-HSFW",


            "vserver-name2": "Vs7HS-FW-OTT",


            "prov-status": "Provisioned",


            "in-maint": false,


            "is-close-loop-disabled": false,


            "vserver-selflink": "AMT7 VserverLink",


"relationship-list": {


"relationship": [


{


"related-to": "pserver",


"relationship-data": [


{


"relationship-key": "pserver.hostname",


"relationship-value": "amt-server-7MB"


}]}]}}


 


8. Create Vserver-3 linked with Pserver


PUT Request:


URL: https://<host-ip>:8443


Resource: /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Skynet/CL-MR1/tenants/tenant/Tenant-AMT-007HS/vservers/vserver/Vserver-AMT-007-HSRT


 


{


            "vserver-id": "Vserver-AMT-007-HSRT",


            "vserver-name": "AMT-VOIP-0007-HSRT",


            "vserver-name2": "Vs7HS-RT-OTT",


            "prov-status": "Provisioned",


            "in-maint": false,


            "is-close-loop-disabled": false,


            "vserver-selflink": "AMT7 VserverLink",


"relationship-list": {


"relationship": [


{


"related-to": "pserver",


"relationship-data": [


{


"relationship-key": "pserver.hostname",


"relationship-value": "amt-server-7MB"


}]}]}}


 


9. Create GVNF: Type1, linked to Vserver GW.


PUT Request


URL: https://<host-ip>:8443


Resource: /aai/v8/network/generic-vnfs/generic-vnf/SI-AMT-007-HSGW


 


{


      "vnf-id": "SI-AMT-007-HSGW",


      "vnf-name": "AMT-VOIP-0007-HSGW",


      "vnf-type": "Voip Gateway",


      "equipment-role" : "Voip Gateway",


      "service-id": "SVC-id-7-amdocs-ottawa",


      "prov-status": "Provisioned",


      "operational-state": "Up",


      "license-key": "SVC-id-7-amdocs-ottawa",


      "orchestration-status": "created",


      "ipv4-oam-address": "122.32.12.40",


      "vcpu": "4",


      "vcpu-units": "vcpu",


      "vmemory": "8",


      "vmemory-units": "GB",


      "vdisk": "40",


      "vdisk-units": "GB",


      "in-maint": "false",


      "is-closed-loop-disabled": "false",     


      "relationship-list": {"relationship":       [


                  {


            "related-to": "vserver",


            "related-link": "https://<host-ip>:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Skynet/CL-MR1/tenants/tenant/Tenant-AMT-007HS/vservers/vserver/Vserver-AMT-007-HSGW",


            "relationship-data": [            {


               "relationship-key": "vserver.hostname",


               "relationship-value": "Vserver-AMT-007-HSGW"


            }],


            "related-to-property": [            {


               "property-key": "vserver.vserver-name",


               "property-value": "AMT-VOIP-0007-HSGW"


            }]


         }]}}


 


 


10. Create GVNF: Type2, linked to Vserver FW


PUT Request


URL: https://<host-ip>:8443


Resource: /aai/v8/network/generic-vnfs/generic-vnf/SI-AMT-007-HSFW


 


{


      "vnf-id": "SI-AMT-007-HSFW",


      "vnf-name": "AMT-VOIP-0007-HSFW",


      "vnf-type": "Firewall",


      "equipment-role" : "Firewall",


      "service-id": "SVC-id-7-amdocs-ottawa",


      "prov-status": "Provisioned",


      "operational-state": "Up",


      "license-key": "SVC-id-7-amdocs-ottawa",


      "orchestration-status": "created",


      "ipv4-oam-address": "172.22.3.34",


      "vcpu": "4",


      "vcpu-units": "vcpu",


      "vmemory": "8",


      "vmemory-units": "GB",


      "vdisk": "40",


      "vdisk-units": "GB",


      "in-maint": "false",


      "is-closed-loop-disabled": "false",     


      "relationship-list": {"relationship":       [


                  {


            "related-to": "vserver",


            "related-link": "https://<host-ip>:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Skynet/CL-MR1/tenants/tenant/Tenant-AMT-007HS/vservers/vserver/Vserver-AMT-007-HSFW",


            "relationship-data": [            {


               "relationship-key": "vserver.hostname",


               "relationship-value": "Vserver-AMT-007-HSFW"


            }],


            "related-to-property": [            {


               "property-key": "vserver.vserver-name",


               "property-value": "AMT-VOIP-0007-HSFW"


            }]


         }]}}


 


 


11. Create GVNF: Type3, linked to Vserver RT


PUT Request


URL: https://<host-ip>:8443


Resource: /aai/v8/network/generic-vnfs/generic-vnf/SI-AMT-007-HSRT


 


{


      "vnf-id": "SI-AMT-007-HSRT",


      "vnf-name": "AMT-VOIP-0007-HSRT",


      "vnf-type": "Router",


      "equipment-role" : "Router",


      "service-id": "SVC-id-7-amdocs-ottawa",


      "prov-status": "Provisioned",


      "operational-state": "Up",


      "license-key": "SVC-id-7-amdocs-ottawa",


      "orchestration-status": "created",


      "ipv4-oam-address": "172.22.3.37",


      "vcpu": "4",


      "vcpu-units": "vcpu",


      "vmemory": "8",


      "vmemory-units": "GB",


      "vdisk": "40",


      "vdisk-units": "GB",


      "in-maint": "false",


      "is-closed-loop-disabled": "false",     


      "relationship-list": {"relationship":       [


                  {


            "related-to": "vserver",


            "related-link": "https://<host-ip>:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Skynet/CL-MR1/tenants/tenant/Tenant-AMT-007HS/vservers/vserver/Vserver-AMT-007-HSRT",


            "relationship-data": [            {


               "relationship-key": "vserver.hostname",


               "relationship-value": "Vserver-AMT-007-HSRT"


            }],


            "related-to-property": [            {


               "property-key": "vserver.vserver-name",


               "property-value": "AMT-VOIP-0007-HSRT"


            }]


         }]}}


 


 


12. Perform a GET on Customer to get Resource Versions:


GET Request:


URL: https://<host-ip>:8443


Resource: /aai/v8/business/customers/customer/AMTEL-HS-10007


 


Copy the response as below to get the latest resource versions:


 


{


   "global-customer-id": "AMTEL-HS-10007",


   "subscriber-name": "AMTEL-HS-10007",


   "subscriber-type": "Customer",


   "resource-version": "1479921960",


   "service-subscriptions": {"service-subscription": [   {


      "service-type": "voip",


      "resource-version": "1479909750",


      "service-instances": {"service-instance": [      {


         "service-instance-id": "SI-AMT-007HS",


         "resource-version": "1479911940",


 


 


13. Link the 3 GVNF with the created Customer.


 


PUT Request:


URL: https://<host-ip>:8443


Resource: /aai/v8/business/customers/customer/AMTEL-HS-10007


 


{


   "global-customer-id": "AMTEL-HS-10007",


   "subscriber-name": "AMTEL-HS-10007",


   "subscriber-type": "Customer",


   "resource-version": "1479921960",


   "service-subscriptions": {"service-subscription": [   {


      "service-type": "voip",


      "resource-version": "1479909750",


      "service-instances": {"service-instance": [      {


         "service-instance-id": "SI-AMT-007HS",


         "resource-version": "1479911940",


         "relationship-list": {"relationship":      


           [{


            "related-to": "generic-vnf",


            "related-link": "https://<host-ip>:8443/aai/v8/network/generic-vnfs/generic-vnf/SI-AMT-007-HSFW",


            "relationship-data": [            {


               "relationship-key": "generic-vnf.vnf-id",


               "relationship-value": "SI-AMT-007-HSFW"


            }],


            "related-to-property": [            {


               "property-key": "generic-vnf.vnf-name",


               "property-value": "AMT-VOIP-0007-HSFW"


            }]


         },


         {


         "related-to": "generic-vnf",


            "related-link": "https://<host-ip>:8443/aai/v8/network/generic-vnfs/generic-vnf/SI-AMT-007-HSGW",


            "relationship-data": [            {


               "relationship-key": "generic-vnf.vnf-id",


               "relationship-value": "SI-AMT-007-HSGW"


            }],


            "related-to-property": [            {


               "property-key": "generic-vnf.vnf-name",


               "property-value": "AMT-VOIP-0007-HSGW"


            }]


         },


         {


         "related-to": "generic-vnf",


            "related-link": "https://<host-ip>:8443/aai/v8/network/generic-vnfs/generic-vnf/SI-AMT-007-HSRT",


            "relationship-data": [            {


               "relationship-key": "generic-vnf.vnf-id",


               "relationship-value": "SI-AMT-007-HSRT"


            }],


            "related-to-property": [            {


               "property-key": "generic-vnf.vnf-name",


               "property-value": "AMT-VOIP-0007-HSRT"


            }]


         }


               


         ]}


           


         }]}


      }]}




1. Create Customer.PUT Request:URL: https://<host-ip>:8443Resource: /aai/v8/business/customers/customer/AMTEL-HS-10007GET: /aai/v8/business/customers/customer/AMTEL-HS-10007/service-subscriptions/service-subscription/voip {   "global-customer-id": "AMTEL-HS-10007",   "subscriber-name": "AMTEL-HS-10007",   "subscriber-type": "Customer",   "service-subscriptions": {"service-subscription":    [            {         "service-type": "voip"             }   ]}} 2. Create Service Instance for the above Customer.PUT Request:URL: https://<host-ip>:8443Resource: /aai/v8/business/customers/customer/AMTEL-HS-10007/service-subscriptions/service-subscription/voip/service-instances/service-instance/SI-AMT-007HS {"global-customer-id": "AMTEL-HS-10007",    "subscriber-name": "AMTEL-HS-10007",    "subscriber-type": "Customer",    "service-subscriptions": {        "service-subscription": [            {                "service-type": "voip"            },            {                "service-instances": {                    "service-instance": [                        {                            "service-instance-id": "SI-AMT-007HS",                            "service-instance-name": "AMTEL-VOIP-HS0007",                            "bandwidth-total": "1Mbps",                            "operational-status": "Up"                        }                    ]                }            }        ]    }}  NOTE! GET /aai/v8/business/customers/customer/AMTEL-HS-10007/service-subscriptions/service-subscription/voip/service-instances/service-instance/SI-AMT-007HS and look for the presence of SI name, BW-total and Op-Status. If not present, do a PUT for each individually …  "service-instance-name": "AMTEL-VOIP-HS0007",  "bandwidth-total": "1Mbps",  &  "operational-status": "Up" 4. Create PserverPUT Request:URL: https://<host-ip>:8443Resource: /aai/v8/cloud-infrastructure/pservers/pserver/amt-server-7MB {   "hostname": "amt-server-7MB",   "number-of-cpus": "10",   "disk-in-gigabytes": "144",   "ram-in-megabytes": "6291456",   "equip-type": "Rack Server",   "equip-vendor": "Dell",   "equip-model": "PowerEdge R930",   "serial-number": "S4MPLED474HS",   "pserver-id": "Pserver-AMT-007HS",   "in-maint": false} 5.0 Create cloud-region ONLY ONCE!!! Once created, you can add additional Customer graphs on the same cloud. PUT Request:Resource:  /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Skynet/CL-MR1 {   "cloud-owner": "Skynet",   "cloud-region-id": "CL-MR1",   "cloud-region-version": "9.0",   "complex-name": "CL-MR1"}    5.1 Create TenantPUT Request:URL: https://<host-ip>:8443Resource: /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Skynet/CL-MR1/tenants/tenant/Tenant-AMT-007HS {"tenant-id": "Tenant-AMT-007HS","tenant-name": "AMT-VOIP-0007HS"} 6. Create Vserver-1 linked with PserverPUT Request:URL: https://<host-ip>:8443Resource: /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Skynet/CL-MR1/tenants/tenant/Tenant-AMT-007HS/vservers/vserver/Vserver-AMT-007-HSGW {            "vserver-id": "Vserver-AMT-007-HSGW",            "vserver-name": "AMT-VOIP-0007-HSGW",            "vserver-name2": "Vs7-HSGW-OTT",            "prov-status": "Provisioned",            "in-maint": false,            "is-close-loop-disabled": false,            "vserver-selflink": "AMT7 VserverLink","relationship-list": {"relationship": [{"related-to": "pserver","relationship-data": [{"relationship-key": "pserver.hostname","relationship-value": "amt-server-7MB"}]}]}} 7. Create Vserver-2 linked with PserverPUT Request:URL: https://<host-ip>:8443Resource: /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Skynet/CL-MR1/tenants/tenant/Tenant-AMT-007HS/vservers/vserver/Vserver-AMT-007-HSFW {            "vserver-id": "Vserver-AMT-007-HSFW",            "vserver-name": "AMT-VOIP-0007-HSFW",            "vserver-name2": "Vs7HS-FW-OTT",            "prov-status": "Provisioned",            "in-maint": false,            "is-close-loop-disabled": false,            "vserver-selflink": "AMT7 VserverLink","relationship-list": {"relationship": [{"related-to": "pserver","relationship-data": [{"relationship-key": "pserver.hostname","relationship-value": "amt-server-7MB"}]}]}} 8. Create Vserver-3 linked with PserverPUT Request:URL: https://<host-ip>:8443Resource: /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Skynet/CL-MR1/tenants/tenant/Tenant-AMT-007HS/vservers/vserver/Vserver-AMT-007-HSRT {            "vserver-id": "Vserver-AMT-007-HSRT",            "vserver-name": "AMT-VOIP-0007-HSRT",            "vserver-name2": "Vs7HS-RT-OTT",            "prov-status": "Provisioned",            "in-maint": false,            "is-close-loop-disabled": false,            "vserver-selflink": "AMT7 VserverLink","relationship-list": {"relationship": [{"related-to": "pserver","relationship-data": [{"relationship-key": "pserver.hostname","relationship-value": "amt-server-7MB"}]}]}} 9. Create GVNF: Type1, linked to Vserver GW.PUT RequestURL: https://<host-ip>:8443Resource: /aai/v8/network/generic-vnfs/generic-vnf/SI-AMT-007-HSGW {      "vnf-id": "SI-AMT-007-HSGW",      "vnf-name": "AMT-VOIP-0007-HSGW",      "vnf-type": "Voip Gateway",      "equipment-role" : "Voip Gateway",      "service-id": "SVC-id-7-amdocs-ottawa",      "prov-status": "Provisioned",      "operational-state": "Up",      "license-key": "SVC-id-7-amdocs-ottawa",      "orchestration-status": "created",      "ipv4-oam-address": "122.32.12.40",      "vcpu": "4",      "vcpu-units": "vcpu",      "vmemory": "8",      "vmemory-units": "GB",      "vdisk": "40",      "vdisk-units": "GB",      "in-maint": "false",      "is-closed-loop-disabled": "false",           "relationship-list": {"relationship":       [                  {            "related-to": "vserver",            "related-link": "https://<host-ip>:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Skynet/CL-MR1/tenants/tenant/Tenant-AMT-007HS/vservers/vserver/Vserver-AMT-007-HSGW",            "relationship-data": [            {               "relationship-key": "vserver.hostname",               "relationship-value": "Vserver-AMT-007-HSGW"            }],            "related-to-property": [            {               "property-key": "vserver.vserver-name",               "property-value": "AMT-VOIP-0007-HSGW"            }]         }]}}  10. Create GVNF: Type2, linked to Vserver FWPUT RequestURL: https://<host-ip>:8443Resource: /aai/v8/network/generic-vnfs/generic-vnf/SI-AMT-007-HSFW {      "vnf-id": "SI-AMT-007-HSFW",      "vnf-name": "AMT-VOIP-0007-HSFW",      "vnf-type": "Firewall",      "equipment-role" : "Firewall",      "service-id": "SVC-id-7-amdocs-ottawa",      "prov-status": "Provisioned",      "operational-state": "Up",      "license-key": "SVC-id-7-amdocs-ottawa",      "orchestration-status": "created",      "ipv4-oam-address": "172.22.3.34",      "vcpu": "4",      "vcpu-units": "vcpu",      "vmemory": "8",      "vmemory-units": "GB",      "vdisk": "40",      "vdisk-units": "GB",      "in-maint": "false",      "is-closed-loop-disabled": "false",           "relationship-list": {"relationship":       [                  {            "related-to": "vserver",            "related-link": "https://<host-ip>:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Skynet/CL-MR1/tenants/tenant/Tenant-AMT-007HS/vservers/vserver/Vserver-AMT-007-HSFW",            "relationship-data": [            {               "relationship-key": "vserver.hostname",               "relationship-value": "Vserver-AMT-007-HSFW"            }],            "related-to-property": [            {               "property-key": "vserver.vserver-name",               "property-value": "AMT-VOIP-0007-HSFW"            }]         }]}}  11. Create GVNF: Type3, linked to Vserver RTPUT RequestURL: https://<host-ip>:8443Resource: /aai/v8/network/generic-vnfs/generic-vnf/SI-AMT-007-HSRT {      "vnf-id": "SI-AMT-007-HSRT",      "vnf-name": "AMT-VOIP-0007-HSRT",      "vnf-type": "Router",      "equipment-role" : "Router",      "service-id": "SVC-id-7-amdocs-ottawa",      "prov-status": "Provisioned",      "operational-state": "Up",      "license-key": "SVC-id-7-amdocs-ottawa",      "orchestration-status": "created",      "ipv4-oam-address": "172.22.3.37",      "vcpu": "4",      "vcpu-units": "vcpu",      "vmemory": "8",      "vmemory-units": "GB",      "vdisk": "40",      "vdisk-units": "GB",      "in-maint": "false",      "is-closed-loop-disabled": "false",           "relationship-list": {"relationship":       [                  {            "related-to": "vserver",            "related-link": "https://<host-ip>:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Skynet/CL-MR1/tenants/tenant/Tenant-AMT-007HS/vservers/vserver/Vserver-AMT-007-HSRT",            "relationship-data": [            {               "relationship-key": "vserver.hostname",               "relationship-value": "Vserver-AMT-007-HSRT"            }],            "related-to-property": [            {               "property-key": "vserver.vserver-name",               "property-value": "AMT-VOIP-0007-HSRT"            }]         }]}}  12. Perform a GET on Customer to get Resource Versions:GET Request:URL: https://<host-ip>:8443Resource: /aai/v8/business/customers/customer/AMTEL-HS-10007 Copy the response as below to get the latest resource versions: {   "global-customer-id": "AMTEL-HS-10007",   "subscriber-name": "AMTEL-HS-10007",   "subscriber-type": "Customer",   "resource-version": "1479921960",   "service-subscriptions": {"service-subscription": [   {      "service-type": "voip",      "resource-version": "1479909750",      "service-instances": {"service-instance": [      {         "service-instance-id": "SI-AMT-007HS",         "resource-version": "1479911940",  13. Link the 3 GVNF with the created Customer. PUT Request:URL: https://<host-ip>:8443Resource: /aai/v8/business/customers/customer/AMTEL-HS-10007 {   "global-customer-id": "AMTEL-HS-10007",   "subscriber-name": "AMTEL-HS-10007",   "subscriber-type": "Customer",   "resource-version": "1479921960",   "service-subscriptions": {"service-subscription": [   {      "service-type": "voip",      "resource-version": "1479909750",      "service-instances": {"service-instance": [      {         "service-instance-id": "SI-AMT-007HS",         "resource-version": "1479911940",         "relationship-list": {"relationship":                 [{            "related-to": "generic-vnf",            "related-link": "https://<host-ip>:8443/aai/v8/network/generic-vnfs/generic-vnf/SI-AMT-007-HSFW",            "relationship-data": [            {               "relationship-key": "generic-vnf.vnf-id",               "relationship-value": "SI-AMT-007-HSFW"            }],            "related-to-property": [            {               "property-key": "generic-vnf.vnf-name",               "property-value": "AMT-VOIP-0007-HSFW"            }]         },         {         "related-to": "generic-vnf",            "related-link": "https://<host-ip>:8443/aai/v8/network/generic-vnfs/generic-vnf/SI-AMT-007-HSGW",            "relationship-data": [            {               "relationship-key": "generic-vnf.vnf-id",               "relationship-value": "SI-AMT-007-HSGW"            }],            "related-to-property": [            {               "property-key": "generic-vnf.vnf-name",               "property-value": "AMT-VOIP-0007-HSGW"            }]         },         {         "related-to": "generic-vnf",            "related-link": "https://<host-ip>:8443/aai/v8/network/generic-vnfs/generic-vnf/SI-AMT-007-HSRT",            "relationship-data": [            {               "relationship-key": "generic-vnf.vnf-id",               "relationship-value": "SI-AMT-007-HSRT"            }],            "related-to-property": [            {               "property-key": "generic-vnf.vnf-name",               "property-value": "AMT-VOIP-0007-HSRT"            }]         }                        ]}                    }]}      }]}   }