Uploaded image for project: 'External API Framework'
  1. External API Framework
  2. EXTAPI-337

Update SO request to use GR_API instead of VNF_API

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Medium Medium
    • Frankfurt Release
    • None
    • NBI
    • 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":

      { "instanceName": "my_service_instance_006", "source": "VID", "suppressRollback": false, "requestorId": "demo" }

      ,
      "modelInfo":

      { "modelType": "service", "modelInvariantId": "fbfa2dac-544f-4ff4-b4c5-5421af911004", "modelVersionId": "7813db26-be35-4eab-b90e-ae7ec1a1ab18", "modelName": "integration_test_service_ubuntu16", "modelVersion": "1.0" }

      ,
      "cloudConfiguration":

      { "tenantId": "298060ea002941869871cb9ef464d2da", "cloudOwner": "ONAP", "lcpCloudRegionId": "RegionOne" }

      ,
      "requestParameters":

      { "userParams": [], "testApi": "GR_API", "subscriptionServiceType": "integration_test_service_ubuntu16", "aLaCarte": true }

      ,
      "subscriberInfo":

      { "globalSubscriberId": "JohnDoe" }

      ,
      "project":

      { "projectName": "integration_project" }

      ,
      "owningEntity":

      { "owningEntityId": "ad605b48-5b76-445e-ad9b-54a390918464", "owningEntityName": "integration" }

      }
      }'

      response

      {
      "requestReferences":

      { "requestId": "c48c9717-0a24-400d-a7cd-d25e7769bd90", "instanceId": "e23fd365-a463-4eac-a02f-ab3656bb9083", "requestSelfLink": "http://so.api.simpledemo.onap.org:30277/orchestrationRequests/v7/c48c9717-0a24-400d-a7cd-d25e7769bd90" }

      }

      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":

      { "modelInvariantId": "fbfa2dac-544f-4ff4-b4c5-5421af911004", "modelType": "service", "modelName": "integration_test_service_ubuntu16", "modelVersion": "1.0", "modelVersionId": "7813db26-be35-4eab-b90e-ae7ec1a1ab18", "modelUuid": "7813db26-be35-4eab-b90e-ae7ec1a1ab18", "modelInvariantUuid": "fbfa2dac-544f-4ff4-b4c5-5421af911004" }

      ,
      "requestInfo":

      { "source": "VID", "instanceName": "my_service_instance_006", "suppressRollback": false, "requestorId": "demo" }

      ,
      "subscriberInfo":

      { "globalSubscriberId": "JohnDoe" }

      ,
      "cloudConfiguration":

      { "tenantId": "298060ea002941869871cb9ef464d2da", "cloudOwner": "ONAP", "lcpCloudRegionId": "RegionOne" }

      ,
      "requestParameters":

      { "subscriptionServiceType": "integration_test_service_ubuntu16", "aLaCarte": true, "testApi": "GR_API" }

      ,
      "project":

      { "projectName": "integration_project" }

      ,
      "owningEntity":

      { "owningEntityId": "ad605b48-5b76-445e-ad9b-54a390918464", "owningEntityName": "integration" }

      },
      "instanceReferences":

      { "serviceInstanceId": "e23fd365-a463-4eac-a02f-ab3656bb9083", "serviceInstanceName": "my_service_instance_006", "requestorId": "demo" }

      ,
      "requestStatus":

      { "requestState": "COMPLETE", "statusMessage": "STATUS: ALaCarte-Service-createInstance request was executed correctly. FLOW STATUS: Successfully completed all Building Blocks", "percentProgress": 100, "timestamp": "Mon, 21 Oct 2019 13:43:30 GMT" }

      }
      }

       

       

      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 '

      { "owning-entity-name": "OE-Generic", "owning-entity-id": "8874891f-5120-4b98-b452-46284513958d" }' response just 201     To consult the owning-entities:   curl -X GET \ https://\{host}

      :{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": "OE-Generic", "owning-entity-name": "OE-Generic", "resource-version": "1571670741386" }

      ,
      {
      "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": "customer.global-customer-id", "relationship-value": "JohnDoe" }

      ,

      { "relationship-key": "service-subscription.service-type", "relationship-value": "integration_test_service_ubuntu16" }

      ,

      { "relationship-key": "service-instance.service-instance-id", "relationship-value": "e23fd365-a463-4eac-a02f-ab3656bb9083" }

      ],
      "related-to-property": [

      { "property-key": "service-instance.service-instance-name", "property-value": "my_service_instance_006" }

      ]
      }
      ]
      }
      }
      ]
      }

       

       

       

       

       

       

       

       

            rene_robert rene_robert
            rene_robert rene_robert
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: