Skip to end of metadata
Go to start of metadata

Please note the values currently used in the test data may not be representative of actually values in ONAP A&AI.

Request Headers:

X-FromAppId : AAA-Temp-Tool

X-TransactionId : AAI-Temp-Tool

Real-Time : true

Content-Type : application/json

Accept : application/json


Create Cloud Region

PUT https://aai-ip:8443/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/pod25/RegionOne

{

    "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.12.25.2:5000/v3",

    "owner-defined-type": "owner-defined-type",

    "sriov-automation": true

}


Create Tenant

PUT https://aai-ip:8443/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/pod25/RegionOne/tenants/tenant/cf142fb96ce24770946c0f7117c0aeb3

{

    "tenant-id": " cf142fb96ce24770946c0f7117c0aeb3 ",

    "tenant-name": "APPC"

}


Create Flavor

PUT https://aai-ip:8443/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/pod25/RegionOne/flavors/flavor/764efb04-5a46-4806-a766-2bdd24559f39

{

  "flavor-id": "764efb04-5a46-4806-a766-2bdd24559f39",

  "flavor-name": "m1.medium",

  "flavor-vcpus": 2,

  "flavor-ram": 4096,

  "flavor-disk": 40,

  "flavor-ephemeral": 0,

  "flavor-selflink": http://10.12.25.2:8774/v2.1/cf142fb96ce24770946c0f7117c0aeb3/flavors/764efb04-5a46-4806-a766-2bdd24559f39

}


Create Image

PUT https://aai-ip:8443/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/pod25/RegionOne/images/image/6e219e86-cd94-4989-9119-def29aa10b12

{

  "image-id": "6e219e86-cd94-4989-9119-def29aa10b12",

  "image-name": "unknown",

  "image-architecture": "unknown",

  "image-os-distro": "unknown",

  "image-os-version": "unknown",

  "application": "unknown",

  "application-vendor": "unknown",

  "application-version": "unknown",

  "image-selflink": http://10.12.25.2:8774/cf142fb96ce24770946c0f7117c0aeb3/images/6e219e86-cd94-4989-9119-def29aa10b12

}


Create vServer 1

PUT https://aai-ip:8443/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/pod25/RegionOne/tenants/tenant/cf142fb96ce24770946c0f7117c0aeb3/vservers/vserver/06e8ea84-60b1-4e93-99da-73e589da9b69

{

    "vserver-id": "06e8ea84-60b1-4e93-99da-73e589da9b69",

    "vserver-name": "zdfw1lb01dns01",

    "vserver-name2": "zdfw1lb01dns01",

    "prov-status": "Running",

    "vserver-selflink": "http://10.12.25.2:8774/v2.1/cf142fb96ce24770946c0f7117c0aeb3/servers/06e8ea84-60b1-4e93-99da-73e589da9b69",

    "in-maint": false,

    "is-closed-loop-disabled": false

}


Create vServer 2 (with image and flavor)

PUT https://10.12.5.114:8443/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/pod25/RegionOne/images/image/6e219e86-cd94-4989-9119-def29aa10b12

{

  "vserver-id": "7d2b1698-9b23-4a62-9aab-27629f15a2cc",

  "vserver-name": "zdfw1lb01lb01",

  "vserver-name2": "zdfw1lb01lb01",

  "prov-status": "ACTIVE",

  "vserver-selflink": "http://10.12.25.2:8774/v2.1/cf142fb96ce24770946c0f7117c0aeb3/servers/7d2b1698-9b23-4a62-9aab-27629f15a2cc",

  "in-maint": false,

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

  "resource-version": "1525988514674",

  "relationship-list": {

    "relationship": [{

      "related-to": "flavor",

      "relationship-label": "org.onap.relationships.inventory.Uses",

      "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/pod25/RegionOne/flavors/flavor/764efb04-5a46-4806-a766-2bdd24559f39",

      "relationship-data": [{

        "relationship-key": "cloud-region.cloud-owner",

        "relationship-value": "pod25"

      }, {

        "relationship-key": "cloud-region.cloud-region-id",

        "relationship-value": "RegionOne"

      }, {

        "relationship-key": "flavor.flavor-id",

        "relationship-value": "764efb04-5a46-4806-a766-2bdd24559f39"

      }],

      "related-to-property": [{

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

        "property-value": "m1.medium"

      }]

    }, {

      "related-to": "image",

      "relationship-label": "org.onap.relationships.inventory.Uses",

      "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/pod25/RegionOne/images/image/6e219e86-cd94-4989-9119-def29aa10b12",

      "relationship-data": [{

        "relationship-key": "cloud-region.cloud-owner",

        "relationship-value": "pod25"

      }, {

        "relationship-key": "cloud-region.cloud-region-id",

        "relationship-value": "RegionOne"

      }, {

        "relationship-key": "image.image-id",

        "relationship-value": "6e219e86-cd94-4989-9119-def29aa10b12"

      }],

      "related-to-property": [{

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

        "property-value": "unknown"

      }]

    }]

  }

}

Create Base Model

PUT https://aai-ip:8443/aai/v13/service-design-and-creation/models/model/APPC-vLB

{

  "model-invariant-id": " APPC-vLB ",

  "model-type": "resource"

}


Create Model Version

PUT https://aai-ip:8443/aai/v13/service-design-and-creation/models/model/APPC-vLB/model-vers/model-ver/APPC-vLB-1

{

    "model-version-id": "APPC-vLB-1",

    "model-name": "vLB",

    "model-version": "1",

    "distribution-status": "DISTRIBUTION_COMPLETE_OK",

    "model-description": ""

}


PUT https://10.12.5.114:8443/aai/v13/network/generic-vnfs/generic-vnf/APPC-test-vLB

{

  "vnf-id": "APPC-test-vLB",

  "vnf-name": "vLoadBalancer-Vnf-APPC",

  "vnf-type": "vLoadBalancer/vLoadBalancer-test 0",

  "service-id": "f521546b-ca59-4a10-80b0-19967aa55eeb",

  "prov-status": "PREPROV",

  "orchestration-status": "Created",

  "in-maint": false,

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

  "resource-version": "1525983742318",

  "model-invariant-id": "a3aafde1-cac9-4767-8390-a96940d526fe",

  "model-version-id": "4aec2309-4c45-40ce-b79e-6d2b958c19cc",

  "model-customization-id": "84efad25-bb91-43bb-a465-552cee5665d0",

  "nf-type": "",

  "nf-function": "",

  "nf-role": "",

  "nf-naming-code": "",

  "vf-modules": {

      "vf-module": [

          {

              "vf-module-id": "zdfw1lb01lb01",

              "vf-module-name": "zdfw1lb01lb01",

              "heat-stack-id": "example-heat-stack-id-val-63769",

              "orchestration-status": "example-orchestration-status-val-19362",

              "is-base-vf-module": true,

              "model-invariant-id": "APPC-vLB",

              "model-version-id": "APPC-vLB-1",

              "model-customization-id": "example-model-customization-id-val-86783",

              "widget-model-id": "example-widget-model-id-val-60885",

              "widget-model-version": "example-widget-model-version-val-35378",

              "contrail-service-instance-fqdn": "example-contrail-service-instance-fqdn-val-94046",

              "module-index": 2204,

              "selflink": "example-selflink-val-44435"

          }

    ]

},

"relationship-list": {

    "relationship": [{

      "related-to": "vserver",

      "relationship-label": "tosca.relationships.HostedOn",

      "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/pod25/RegionOne/tenants/tenant/cf142fb96ce24770946c0f7117c0aeb3/vservers/vserver/06e8ea84-60b1-4e93-99da-73e589da9b69",

      "relationship-data": [{

        "relationship-key": "cloud-region.cloud-owner",

        "relationship-value": "pod25"

      }, {

        "relationship-key": "cloud-region.cloud-region-id",

        "relationship-value": "RegionOne"

      }, {

        "relationship-key": "tenant.tenant-id",

        "relationship-value": "cf142fb96ce24770946c0f7117c0aeb3"

      }, {

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

        "relationship-value": "06e8ea84-60b1-4e93-99da-73e589da9b69"

      }],

      "related-to-property": [{

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

        "property-value": "zdfw1lb01dns01"

      }]

    }, {

      "related-to": "vserver",

      "relationship-label": "tosca.relationships.HostedOn",

      "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/pod25/RegionOne/tenants/tenant/cf142fb96ce24770946c0f7117c0aeb3/vservers/vserver/7d2b1698-9b23-4a62-9aab-27629f15a2cc",

      "relationship-data": [{

        "relationship-key": "cloud-region.cloud-owner",

        "relationship-value": "pod25"

      }, {

        "relationship-key": "cloud-region.cloud-region-id",

        "relationship-value": "RegionOne"

      }, {

        "relationship-key": "tenant.tenant-id",

        "relationship-value": "cf142fb96ce24770946c0f7117c0aeb3"

      }, {

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

        "relationship-value": "7d2b1698-9b23-4a62-9aab-27629f15a2cc"

      }],

      "related-to-property": [{

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

        "property-value": "zdfw1lb01lb01"

      }]

    }]

  }

}


  • No labels