---------------------------------
CHECK IF COMPLEX OBJECT EXISTS:
---------------------------------
curl -k --user VID:VID -H "Accept: application/json" -H "Content-Type: application/json" -H "X-TransactionId: AFR" -H "X-FromAppId: AFR" https://aai.onap:8443/aai/v14/cloud-infrastructure/complexes/complex/clli1?depth=3 | jq .
---------------------------------
INSERT COMPLEX OBJECT:
---------------------------------
curl -k --user VID:VID -H "Accept: application/json" -H "Content-Type: application/json" -H "X-TransactionId: AFR" -H "X-FromAppId: AFR" https://aai.onap:8443/aai/v14/cloud-infrastructure/complexes/complex/clli1 -X PUT -d /
'{
"physical-location-id": "clli1",
"data-center-code": "example-data-center-code-val-5556",
"complex-name": "clli1",
"identity-url": "example-identity-url-val-56898",
"physical-location-type": "example-physical-location-type-val-7608",
"street1": "example-street1-val-34205",
"street2": "example-street2-val-99210",
"city": "example-city-val-27150",
"state": "example-state-val-59487",
"postal-code": "68871",
"country": "example-country-val-94173",
"region": "example-region-val-13893",
"latitude": "example-latitude-val-89101",
"longitude": "32.89948",
"elevation": "97.045443",
"lata": "example-lata-val-46073"
}'
---------------------------------
CHECK IF COMPLEX OBJECT EXISTS:
---------------------------------
curl -k --user VID:VID -H "Accept: application/json" -H "Content-Type: application/json" -H "X-TransactionId: AFR" -H "X-FromAppId: AFR" https://aai.onap:8443/aai/v14/cloud-infrastructure/complexes/complex/clli1?depth=3 | jq .
----------------------------------------------------
CHECK IF CLOUD OWNER AND CLOUD REGION OBJECT EXISTS:
----------------------------------------------------
curl -k --user VID:VID -H "Accept: application/json" -H "Content-Type: application/json" -H "X-TransactionId: AFR" -H "X-FromAppId: AFR" https://aai.onap:8443/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ericssoncloud?depth=3 | jq .
----------------------------------------------------
INSERT CLOUD OWNER AND CLOUD REGION OBJECT:
----------------------------------------------------
curl -k --user VID:VID -H "Accept: application/json" -H "Content-Type: application/json" -H "X-TransactionId: AFR" -H "X-FromAppId: AFR" https://aai.onap:8443/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ericssoncloud -X PUT -d \
'{
"cloud-owner": "CloudOwner",
"cloud-region-id": "ericssoncloud",
"cloud-type": "OPENSTACK",
"owner-defined-type": "OwnerType",
"cloud-region-version": "v1",
"cloud-zone": "CloudZone",
"availability-zones": {
"availability-zone": [
{
"availability-zone-name": "nova",
"hypervisor-type": "kvm",
"operational-status": "available"
}
]
}
}
' | jq .
----------------------------------------------------
CHECK IF CLOUD OWNER AND CLOUD REGION OBJECT EXISTS:
----------------------------------------------------
curl -k --user VID:VID -H "Accept: application/json" -H "Content-Type: application/json" -H "X-TransactionId: AFR" -H "X-FromAppId: AFR" https://aai.onap:8443/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ericssoncloud?depth=3 | jq .
----------------------------------------------------
CHECK IF BUSINESS CUSTOMER EXISTS:
----------------------------------------------------
curl -k --user VID:VID -H "Accept: application/json" -H "Content-Type: application/json" -H "X-TransactionId: AFR" -H "X-FromAppId: AFR" https://aai.onap:8443/aai/v14/business/customers/customer/EricssonDemoCustomer?depth=3 | jq .
----------------------------------------------------
INSERT BUSINESS CUSTOMER:
----------------------------------------------------
curl -k --user VID:VID -H "Accept: application/json" -H "Content-Type: application/json" -H "X-TransactionId: AFR" -H "X-FromAppId: AFR" https://aai.onap:8443/aai/v14/business/customers/customer/EricssonDemoCustomer -X PUT -d \
'{
"global-customer-id": "EricssonDemoCustomer",
"subscriber-name": "EricssonDemoCustomer",
"subscriber-type": "INFRA",
"service-subscriptions": {
"service-subscription": [
{
"service-type": "vLB",
"relationship-list": {
"relationship": [
{
"related-to": "tenant",
"relationship-label": "org.onap.relationships.inventory.Uses",
"related-link": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ericssoncloud/tenants/tenant/693c7729b2364a26a3ca602e6f66187d",
"relationship-data": [
{
"relationship-key": "cloud-region.cloud-owner",
"relationship-value": "CloudOwner"
},
{
"relationship-key": "cloud-region.cloud-region-id",
"relationship-value": "ericssoncloud"
},
{
"relationship-key": "tenant.tenant-id",
"relationship-value": "693c7729b2364a26a3ca602e6f66187d"
}
],
"related-to-property": [
{
"property-key": "tenant.tenant-name",
"property-value": "admin"
}
]
}
]
}
},
{
"service-type": "vCPE",
"relationship-list": {
"relationship": [
{
"related-to": "tenant",
"relationship-label": "org.onap.relationships.inventory.Uses",
"related-link": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ericssoncloud/tenants/tenant/693c7729b2364a26a3ca602e6f66187d",
"relationship-data": [
{
"relationship-key": "cloud-region.cloud-owner",
"relationship-value": "CloudOwner"
},
{
"relationship-key": "cloud-region.cloud-region-id",
"relationship-value": "ericssoncloud"
},
{
"relationship-key": "tenant.tenant-id",
"relationship-value": "693c7729b2364a26a3ca602e6f66187d"
}
],
"related-to-property": [
{
"property-key": "tenant.tenant-name",
"property-value": "admin"
}
]
}
]
}
}
]
}
}
' | jq .
----------------------------------------------------
CHECK IF BUSINESS CUSTOMER EXISTS:
----------------------------------------------------
curl -k --user VID:VID -H "Accept: application/json" -H "Content-Type: application/json" -H "X-TransactionId: AFR" -H "X-FromAppId: AFR" https://aai.onap:8443/aai/v14/business/customers/customer/EricssonDemoCustomer?depth=3 | jq .
----------------------------------------------------
CHECK IF ZONE EXISTS:
----------------------------------------------------
curl -k --user VID:VID -H "Accept: application/json" -H "Content-Type: application/json" -H "X-TransactionId: AFR" -H "X-FromAppId: AFR" https://aai.onap:8443/aai/v14/network/zones/zone/nova?depth=3 | jq .
----------------------------------------------------
INSERT ZONE:
----------------------------------------------------
curl -k --user VID:VID -H "Accept: application/json" -H "Content-Type: application/json" -H "X-TransactionId: AFR" -H "X-FromAppId: AFR" https://aai.onap:8443/aai/v14/network/zones/zone/nova -X PUT -d \
'{
"zone-id":"nova",
"zone-name":"nova",
"design-type":"integration",
"zone-context":"labs",
"status": "deployed"
}
' | jq .
----------------------------------------------------
CHECK IF ZONE EXISTS:
----------------------------------------------------
curl -k --user VID:VID -H "Accept: application/json" -H "Content-Type: application/json" -H "X-TransactionId: AFR" -H "X-FromAppId: AFR" https://aai.onap:8443/aai/v14/network/zones/zone/nova?depth=3 | jq .
----------------------------------------------------
CHECK IF SERVICE EXISTS:
----------------------------------------------------
curl -k --user VID:VID -H "Accept: application/json" -H "Content-Type: application/json" -H "X-TransactionId: AFR" -H "X-FromAppId: AFR" https://aai.onap:8443/aai/v14/service-design-and-creation/services/service/f13844f4-dbf8-4d0e-a979-45204f3ddb4e?depth=3
----------------------------------------------------
INSERT SERVICE:
----------------------------------------------------
curl -k --user VID:VID -H "Accept: application/json" -H "Content-Type: application/json" -H "X-TransactionId: AFR" -H "X-FromAppId: AFR" https://aai.onap:8443/aai/v14/service-design-and-creation/services/service/f13844f4-dbf8-4d0e-a979-45204f3ddb4e -X PUT -d '{"service-id":"f13844f4-dbf8-4d0e-a979-45204f3ddb4e","service-description":"vCPE"}'
----------------------------------------------------
CHECK IF TANENT EXISTS:
----------------------------------------------------
curl -k --user VID:VID -H "Accept: application/json" -H "Content-Type: application/json" -H "X-TransactionId: AFR" -H "X-FromAppId: AFR" https://aai.onap:8443/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ericssoncloud/tenants/tenant/693c7729b2364a26a3ca602e6f66187d?depth=3 | jq .
----------------------------------------------------
INSERT TANENT:
----------------------------------------------------
curl -k --user VID:VID -H "Accept: application/json" -H "Content-Type: application/json" -H "X-TransactionId: AFR" -H "X-FromAppId: AFR" https://aai.onap:8443/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ericssoncloud/tenants/tenant/693c7729b2364a26a3ca602e6f66187d -X PUT -d \
'{
"tenant-id": "693c7729b2364a26a3ca602e6f66187d",
"tenant-name": "admin"
}' | jq .
----------------------------------------------------
CHECK IF TANENT EXISTS:
----------------------------------------------------
curl -k --user VID:VID -H "Accept: application/json" -H "Content-Type: application/json" -H "X-TransactionId: AFR" -H "X-FromAppId: AFR" https://aai.onap:8443/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ericssoncloud/tenants/tenant/693c7729b2364a26a3ca602e6f66187d?depth=3 | jq .
----------------------------------------------------
CHECK IF SERVICE SUBSRCIPTION EXISTS:
----------------------------------------------------
curl -k --user VID:VID -H "Accept: application/json" -H "Content-Type: application/json" -H "X-TransactionId: AFR" -H "X-FromAppId: AFR" https://aai.onap:8443/aai/v14/business/customers/customer/EricssonDemoCustomer/service-subscriptions/service-subscription/vCPE/relationship-list/relationship?depth=3 | jq .
----------------------------------------------------
INSERT SERVICE SUBSRCIPTION:
----------------------------------------------------
curl -k --user VID:VID -H "Accept: application/json" -H "Content-Type: application/json" -H "X-TransactionId: AFR" -H "X-FromAppId: AFR" https://aai.onap:8443/aai/v14/business/customers/customer/EricssonDemoCustomer/service-subscriptions/service-subscription/vCPE/relationship-list/relationship -X PUT -d \
'{
"related-to": "tenant",
"relationship-label": "org.onap.relationships.inventory.Uses",
"related-link": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ericssoncloud/tenants/tenant/693c7729b2364a26a3ca602e6f66187d",
"relationship-data": [
{
"relationship-key": "cloud-region.cloud-owner",
"relationship-value": "CloudOwner"
},
{
"relationship-key": "cloud-region.cloud-region-id",
"relationship-value": "ericssoncloud"
},
{
"relationship-key": "tenant.tenant-id",
"relationship-value": "693c7729b2364a26a3ca602e6f66187d"
}
],
"related-to-property": [
{
"property-key": "tenant.tenant-name",
"property-value": "admin"
}
]
}
' | jq .
----------------------------------------------------
CHECK IF SERVICE SUBSRCIPTION EXISTS:
----------------------------------------------------
curl -k --user VID:VID -H "Accept: application/json" -H "Content-Type: application/json" -H "X-TransactionId: AFR" -H "X-FromAppId: AFR" https://aai.onap:8443/aai/v14/business/customers/customer/EricssonDemoCustomer/service-subscriptions/service-subscription/vCPE/relationship-list/relationship?depth=3 | jq .