Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleCreate a Complex Object
collapsetrue
PUT /aai/v11/cloud-infrastructure/complexes/complex/clli2 HTTP/1.1
Host: <AAI_VM1_IP>:8443
X-TransactionId: 9999
X-FromAppId: jimmy-postman
Real-Time: true
Authorization: Basic QUFJOkFBSQ==
Content-Type: application/json
Accept: application/json
Cache-Control: no-cache
Postman-Token: 734b5a2e-2a89-1cd3-596d-d69904bcda0a
 
        {
            "physical-location-id": "clli2",
            "data-center-code": "example-data-center-code-val-6667",
            "complex-name": "clli2",
            "identity-url": "example-identity-url-val-28399",
            "physical-location-type": "example-physical-location-type-val-28399",
            "street1": "example-street1-val-28399",
            "street2": "example-street2-val-28399",
            "city": "example-city-val-28399",
            "state": "example-state-val-28399",
            "postal-code": "example-postal-code-val-28399",
            "country": "example-country-val-28399",
            "region": "example-region-val-28399",
            "latitude": "example-latitude-val-28399",
            "longitude": "example-longitude-val-28399",
            "elevation": "example-elevation-val-28399",
            "lata": "example-lata-val-28399"
                
        }


Subscriber registration is out of scope of ONAP, so that part is done by Robot service.


The VIM/Cloud instance are represented as a cloud region object in A&AI. So registering a VIM/Cloud instance into A&AI basically refers to following actions:


action 1: Create a cloud region object


e.g. create a OpenStack Ocata instance as a cloud region identified by "CloudOwner/RegionTwo" into AAI,

Code Block
titleCreate a Cloud Region Object
collapsetrue
curl -X PUT \
  'https://<AAI_VM1_IP>:8443/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionTwo' \
  -H 'accept: application/json' \
  -H 'authorization: Basic QUFJOkFBSQ==' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: f7c57ec5-ac01-7672-2014-d8dfad883cea' \
  -H 'real-time: true' \
  -H 'x-fromappid: jimmy-postman' \
  -H 'x-transactionid: 9999' \
  -d '{
    "cloud

...

-owner": "CloudOwner",
    "cloud-region-id": "RegionTwo",
    "cloud-type": "openstack",
    "owner-defined-type": "t1",
    "cloud-region-version": "ocata",
    "cloud-zone": "z1",
    "complex-name": "clli2",
    "sriov-automation": false,
    "cloud-extra-info": "",
    "tenants": {
        "tenant": [
            {
                "tenant-id": "48271fcc571449959d7d881a72f4ba10",
                "tenant-name": "onap-01"
            }
        ]
    }
}'


action 2: create Create child object of cloud region object to represent the resources of that VIM/Cloud instance


e.g. Add tenants



action 3: associate Associate this cloud region object with a complex object


Code Block
titleAssociate cloud region with complex
collapsetrue
curl -X PUT \
  https://<AAI_VM1_IP>:8443/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionTwo/relationship-list/relationship \
  -H 'accept: application/json' \
  -H 'authorization: Basic QUFJOkFBSQ==' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: e68fd260-5cac-0570-9b48-c69c512b034f' \
  -H 'real-time: true' \
  -H 'x-fromappid: jimmy-postman' \
  -H 'x-transactionid: 9999' \
  -d '{
{
"related-to": "complex",
"related-link": "/aai/v11/cloud-infrastructure/complexes/complex/clli2",
"relationship-data": [
{
	"relationship-key": "complex.physical-location-id",
	"relationship-value": "clli2"
}
]
}'



action 4: associate this cloud region object with a subscriber's service subscription


e.g. associate the cloud region "CloudOwner/RegionTwo" with subscriber "Demonstration" which subscribe to service "vFWCL"

Code Block
titleAssociate cloud region with a subscription
collapsetrue
curl -X PUT \
  https://<AAI_VM1_IP>:8443/aai/v11/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFWCL/relationship-list/relationship \
  -H 'accept: application/json' \
  -H 'authorization: Basic QUFJOkFBSQ==' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: 4e6e55b9-4d84-6429-67c4-8c96144d1c52' \
  -H 'real-time: true' \
  -H 'x-fromappid: jimmy-postman' \
  -H 'x-transactionid: 9999' \
  -d '{
	"related-to": "tenant",
	"related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionTwo/tenants/tenant/48271fcc571449959d7d881a72f4ba10",
	"relationship-data": [
		{
			"relationship-key": "cloud-region.cloud-owner",
			"relationship-value": "CloudOwner"
		},
		{
			"relationship-key": "cloud-region.cloud-region-id",
			"relationship-value": "RegionTwo"
		},
		{
			"relationship-key": "tenant.tenant-id",
			"relationship-value": "48271fcc571449959d7d881a72f4ba10"
		}
	],
	"related-to-property": [
		{
			"property-key": "tenant.tenant-name",
			"property-value": "onap-01"
		}
	]
}
'




Register VIM/Cloud instance into SO

...