Uploaded image for project: 'Active and Available Inventory'
  1. Active and Available Inventory
  2. AAI-2001

AAI REST API documentation contains incorrect type definition for relationship-list

XMLWordPrintable

      As raised by mmis on https://wiki.onap.org/display/DW/AAI+REST+API+Documentation+-+Casablanca

      There appears to be a mismatch between the REST documentation and what is actually returned from AAI, for example:

      The generic-vnf object contains

      relationship-list:
      type: array
      items:
      $ref: "#/definitions/relationship"

      which indicates the relationship-list is an array, however when I make a call to /aai/v14/network/generic-vnfs/generic-vnf/<vnfId>/ the relationship-list in the returned generic-vnf is a json object rather than an array

      Is this a fault in the documentation or the implementation? or am I reading this wrong?

      {
          "vnf-id": "c617497e-53d9-4fe1-a3f1-572501881a7a",
          "vnf-name": "SimpleServiceAlaCarte010",
          "vnf-type": "SimpleServiceAlaCarte/SimpleServiceVSP 0",
          "service-id": "34131fa7-6d37-466c-9e93-971f76c071d1",
          "prov-status": "PREPROV",
          "orchestration-status": "Created",
          "in-maint": false,
          "is-closed-loop-disabled": false,
          "resource-version": "1543488843765",
          "model-invariant-id": "1cd6c63b-0277-4d18-813e-6d85d3735472",
          "model-version-id": "28619bc5-889e-4427-87ce-d952c063b7aa",
          "model-customization-id": "1cf7c5a6-c202-4b8d-adb7-fc341c7eb4a7",
          "nf-type": "UserDefinedNfType",
          "nf-function": "UserDefinedNfFunction",
          "nf-role": "UserDefinedNfRole",
          "nf-naming-code": "UserDefinedNfCode",
          "relationship-list": {                                         ←  note "{" rather than "["
               "relationship": [
                  {
                       "related-to": "service-instance",
                       "relationship-label": "org.onap.relationships.inventory.ComposedOf",
                       "related-link": "/aai/v14/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/84003b26-6b76-4c75-b805-7b14ab4ffaef",
                       "relationship-data": [
                           {
                               "relationship-key": "customer.global-customer-id",
                               "relationship-value": "Demonstration"
                           },
                           {
                               "relationship-key": "service-subscription.service-type",
                               "relationship-value": "vCPE"
                           },
                           {
                               "relationship-key": "service-instance.service-instance-id",
                               "relationship-value": "84003b26-6b76-4c75-b805-7b14ab4ffaef"
                            }
                       ],
                       "related-to-property": [
                           {
                               "property-key": "service-instance.service-instance-name",
                               "property-value": "NewFlow"
                            }
                       ]
                 },
                 {
                       "related-to": "platform",
                       "relationship-label": "org.onap.relationships.inventory.Uses",
                       "related-link": "/aai/v14/business/platforms/platform/PLATFORM_APP_ID_1",
                       "relationship-data": [
                           {
                               "relationship-key": "platform.platform-name",
                                "relationship-value": "PLATFORM_APP_ID_1"
                           }
                       ]
                 }
             ]
          }
      }
       

            keong keong
            keong keong
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: