-
Task
-
Resolution: Done
-
Medium
-
None
-
None
When NBI is sending a POST message to ONAP SO using the "serviceInstances" API
Field : "testApi"
current value: "VNF_API"
new value: "GR_API"
This API is used by SO to ccommunicate with ONAP SDNC.
example :
create service instance
curl -X POST \
http://so.api.simpledemo.onap.org:30277/onap/so/infra/serviceInstantiation/v7/serviceInstances \
-H 'Accept: application/json' \
-H 'Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==' \
-H 'Content-Type: application/json' \
-H 'X-ONAP-PartnerName: NBI' \
-H 'cache-control: no-cache' \
-d '{
"requestDetails": {
"requestInfo":
,
"modelInfo":
,
"cloudConfiguration":
,
"requestParameters":
,
"subscriberInfo":
,
"project":
,
"owningEntity":
}
}'
response
{
"requestReferences":
}
consult
curl -X GET \
http://so.api.simpledemo.onap.org:30277/onap/so/infra/orchestrationRequests/v7/c48c9717-0a24-400d-a7cd-d25e7769bd90 \
-H 'Accept: application/json' \
-H 'Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==' \
-H 'Content-Type: application/json' \
-H 'X-ONAP-PartnerName: NBI' \
-H 'cache-control: no-cache'
response
{
"request": {
"requestId": "c48c9717-0a24-400d-a7cd-d25e7769bd90",
"startTime": "Mon, 21 Oct 2019 13:43:28 GMT",
"finishTime": "Mon, 21 Oct 2019 13:43:30 GMT",
"requestScope": "service",
"requestType": "createInstance",
"requestDetails": {
"modelInfo":
,
"requestInfo":
,
"subscriberInfo":
,
"cloudConfiguration":
,
"requestParameters":
,
"project":
,
"owningEntity":
},
"instanceReferences":
,
"requestStatus":
}
}
This service instantiation request need to use a valid "OwningEntity", declared in ONAP AAI
My proposal is to check in ONAP AAI if it exists an owningEntity named "OE-Generic".
If not,then NBI will have to create that Owning entity in ONAP AAI :
curl -X PUT \
https://aai.api.sparky.simpledemo.onap.org:30233/aai/v13/business/owning-entities/owning-entity/8874891f-5120-4b98-b452-46284513958d \
-H 'Accept: application/json' \
-H 'Authorization: Basic QUFJOkFBSQ==' \
-H 'Content-Type: application/json' \
-H 'X-FromAppId: AAI' \
-H 'X-TransactionId: get_aai_subscr' \
-H 'cache-control: no-cache' \
-d '
:{port}/aai/v13/business/owning-entities \
-H 'Accept: application/json' \
-H 'Authorization: Basic QUFJOkFBSQ==' \
-H 'Content-Type: application/json' \
-H 'X-FromAppId: AAI' \
-H 'X-TransactionId: get_aai_subscr' \
-H 'cache-control: no-cache'
response
{
"owning-entity": [
,
{
"owning-entity-id": "ad605b48-5b76-445e-ad9b-54a390918464",
"owning-entity-name": "integration",
"resource-version": "1571665409907",
"relationship-list": {
"relationship": [
{
"related-to": "service-instance",
"relationship-label": "org.onap.relationships.inventory.BelongsTo",
"related-link": "/aai/v13/business/customers/customer/JohnDoe/service-subscriptions/service-subscription/integration_test_service_ubuntu16/service-instances/service-instance/e23fd365-a463-4eac-a02f-ab3656bb9083",
"relationship-data": [
,
,
{ "relationship-key": "service-instance.service-instance-id", "relationship-value": "e23fd365-a463-4eac-a02f-ab3656bb9083" } ],
"related-to-property": [
]
}
]
}
}
]
}
- mentioned in
-
Page Loading...