Versions Compared

Key

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

The following is a work in progress. TO DO

Swagger YAML

Created using https://swagger.io/swagger-editor/

Image RemovedImage Added

Code Block
collapsetrue
swagger: "2.0"
info:
  description: "This is the POMBA Context Builder API. It must be supported by all Context Builders"
  version: "0.0.1"
  title: "POMBA Context Builder"
  termsOfService: "http://onap.org"
  contact:
    email: "sharon.chisholm@amdocs.com"
host: "onap.org"
basePath: "/v1"
tags:
- name: "service"
  description: "Service Instances"
  externalDocs:
    description: "Find out more"
    url: "http://onap.org"
schemes:
- "http"
paths:
  /service/context:
    get:
      tags:
      - "pet"
      summary: "Get service instance"
      description: "Retrieve information about a particular service instance using information avaialble to this specific context builder."
      operationId: "findServiceByInstance"
      produces:
      - "application/json"
      parameters:
      - name: "ServiceInstanceId"
        in: "query"
        description: "Service Instance Id of service you are interested in"
        type: "string"
      - name: "modelVersionId"
        in: "query"
        description: "Model UUID as published in service model metadata"
        type: "string"
      - name: "modelInvariantId"
        in: "query"
        description: "SDC generated invariant id as published in service model metadata"
        type: "string"
      responses:
        200:
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Service"
        400:
          description: "Missing  manadatory field in the request or HTTP header."
        404:
          description: "Error: Requested '%1' resource was not found."
        405:
          description: "Method  Not Allowed  :  Invalid HTTP method type used ( PUT,DELETE,POST will be rejected)"
        500:
          description: "The GET request failed either due to internal Context Builder problem."
      security:
      - petstore_auth:
        - "write:pets"
        - "read:pets"
  
securityDefinitions:
  petstore_auth:
    type: "oauth2"
    authorizationUrl: "http://petstore.swagger.io/oauth/dialog"
    flow: "implicit"
    scopes:
      write:pets: "modify pets in your account"
      read:pets: "read your pets"
  api_key:
    type: "apiKey"
    name: "api_key"
    in: "header"
definitions:
  Service:
    type: "object"
    properties:
      uuid:
        type: "string"
        description: "Univseral indentifier"
      invariantUUID:
        type: "string"
      name:
        type: "string"
        description: "Service Name"        
      dataQuality:
          $ref: "#/components/schemas/dataQuality" 
      attributeList:
        type: "array"
        items:
          $ref: "#/components/schemas/attribute"   
      vfList:
        type: "array"
        items:
          $ref: "#/definitions/VFVNF"        

     dataQualityxml:
          $refname: "#/components/schemas/dataQualityService"
     xmlVNF:
    type:  name: "Service"
  VF:
    type: "object"
    properties:
      uuid:
        type: "string"
      invariantUUID:
        type: "string"
      name:
        type: "string"
      nfNamingCodetype:
        type: "string"
      typedataQuality:
         type $ref: "string#/components/schemas/dataQuality"
      attributeList:
        type: "array"
        items:
          $ref: "#/components/schemas/attribute"   
      vfModuleList:
        type: "array"
        items:
          $ref: "#/definitions/VFModule"
      vnfcList:
        type: "array"
        items:
          $ref: "#/definitions/VNFC"
      dataQuality:
          $ref: "#/components/schemas/dataQuality"
    xml:
      name: "VF"
  VFModule:
    type: "object"
    properties:
      uuid:
        type: "string"
      invariantUUID:
        type: "string"
      name:
        type: "string"        
      nfNamingCodeminInstances:
        type: "stringinteger"
      minInstances  format: "int32"
      maxInstances:
type: "integer"         formattype: "int32integer"
      maxInstances  format: "int32"
      dataQuality:
type: "integer"         format$ref: "int32#/components/schemas/dataQuality"
      attributeList:
        type: "array"
        items:
          $ref: "#/components/schemas/attribute"   
      dataQualityvmList:
          $reftype: "#/components/schemas/dataQualityarray"
    xml:    items:
  name: "VFModule"   VNFC:     type$ref: "object#/definitions/VM"
    properties:       uuidnetworkList:
        type: "stringarray"
        invariantUUIDitems:
        type:  "string$ref: "#/definitions/Network"
    xml:
      name: "VFModule"
  VNFC:
    type: "stringobject"
    properties:
  nfNamingCode    uuid:
        type: "string"
      vmListinvariantUUID:
        type: "array"string"
      name:
        itemstype: "string"
      dataQuality:
          $ref: "#/definitionscomponents/schemas/VMdataQuality"
      attributeList:
        type: "array"
        items:
          $ref: "#/components/schemas/attribute"     
    xml:
 dataQuality:     name: "VNFC"
  VM:
    $reftype: "#/components/schemas/dataQualityobject"
    xmlproperties:
      nameuuid:
"VNFC"   VM:     type: "objectstring"
    properties:       uuidinvariantUUID:
        type: "string"
      invariantUUIDname:
        type: "string"
      namenfNamingCode:
        type: "string"
      nfNamingCodedataQuality:
        type  $ref: "string#/components/schemas/dataQuality"
      attributeList:
        type: "array"
        items:
          $ref: "#/components/schemas/attribute"     
      dataQualityPServerList:
          $reftype: "#/components/schemas/dataQuality"array"
     xml:   items:
         name $ref: "VM"
components:#/definitions/PServer"
  schemas:    dataQualityIInterfaceList:
        type: "objectarray"
    properties:    items:
  status:         type$ref: "string#/definitions/IInterface"
        enumxml:
[ok, error]       errorTextname: "VM"
  Network:
    type: "stringobject"
    requiredproperties:
      uuid:
-   status     xmltype: "string"
     name: "dataQuality" invariantUUID:
   attribute:     type: "objectstring"
    properties:       name:
        $reftype: "#/components/schemas/fieldNamestring"
      valuedataQuality:
          type$ref: "string#/components/schemas/dataQuality"
      dataQualityattributeList:
          $reftype: "#/components/schemas/dataQualityarray"
    required    items:
      -  name  $ref: "#/components/schemas/attribute"    - dataQuality
    xml:
      name: "dataQualityNetwork"      fieldName
  IInterface:
    type: string"object"
    enumproperties:
      uuid:
- adminState       type: "string"
- ipAddress     invariantUUID:
   - hostName    type: "string"
   - lockedBoolean  name:
      - macAddress type: "string"
      -dataQuality:
networkType         - physicalNetworkName
$ref: "#/components/schemas/dataQuality"
       - sharedNetworkBoolean
        - routerExternalBooleanattributeList:
   ApiResponse:     type: "objectarray"
    properties:    items:
  code:         type$ref: "integer#/components/schemas/attribute"     
   format: "int32"       typePortList:
        type: "stringarray"
       message items:
        type  $ref: "string#/definitions/Port"
externalDocs:    xml:
    description  name: "Find out more about Swagger"
  url: "http://swagger.io"

Inputs

Note that each instantiation of this API within a particular context builder may define each of these parameters as either mandatory, optional or not supported.

Image Removed

Example JSON Response

Note the top level objects is a service

Code Block
[
  {
    "uuid": "string",
    "invariantUUID": "string",
    "name"IInterface"   
  PServer:
    type: "object"
    properties:
      uuid:
        type: "string"
      invariantUUID:
        type: "string"
      name:
        type: "string"
      dataQuality:
          $ref: "#/components/schemas/dataQuality"
      attributeList:
        type: "array"
        items:
          $ref: "#/components/schemas/attribute"     
    xml:
      name: "PServer"            
  Port:
    type: "object"
    properties:
      uuid:
        type: "string"
      invariantUUID:
        type: "string"
      name:
        type: "string"
      dataQuality:
          $ref: "#/components/schemas/dataQuality"
      attributeList:
        type: "array"
        items:
          $ref: "#/components/schemas/attribute"     
    xml:
      name: "Port"      
components:
  schemas:
   dataQuality:
    type: "object"
    properties:
      status:
        type: "string"
        enum: [ok, error]
      errorText:
        type: "string"
    required:
      - status
    xml:
      name: "dataQuality"
   attribute:
    type: "object"
    properties:
      name:
        $ref: "#/components/schemas/fieldName"
      value:
        type: "string"
      dataQuality:
          $ref: "#/components/schemas/dataQuality"
    required:
      - name
      - dataQuality
    xml:
      name: "dataQuality"  
   fieldName:
    type: string
    enum:
       - adminState
        - ipAddress
        - hostName
        - imageId
        - lockedBoolean
        - macAddress
        - networkType
        - networkTechnology
        - physicalNetworkName
        - sharedNetworkBoolean
        - networkRole
        - routerExternalBoolean
  ApiResponse:
    type: "object"
    properties:
      code:
        type: "integer"
        format: "int32"
      type:
        type: "string"
      message:
        type: "string"
externalDocs:
  description: "Find out more about Swagger"
  url: "http://swagger.io"

Inputs

Header

Image Added

Query Parameters

Note that each instantiation of this API within a particular context builder may define each of these parameters as either mandatory, optional or not supported.

Image Added

Example JSON Response

Note the top level objects is a service

Code Block
[
  {
    "uuid": "string",
    "invariantUUID": "string",
    "name": "string",
    "dataQuality": {
      "status": "ok",
      "errorText": "string"
    },
    "attributeList": [
      {
        "name": "adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType - networkTechnology - physicalNetworkName - sharedNetworkBoolean - networkRole - routerExternalBoolean",
        "value": "string",
        "dataQuality": {
          "status": "ok",
          "errorText": "string"
        }
      }
    ],
    "vfList": [
      {
        "uuid": "string",
        "invariantUUID": "string",
        "name": "string",
        "type": "string",
        "dataQuality": {
          "status": "ok",
          "errorText": "string"
        },
        "attributeList": [
          {
            "name": "adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType - networkTechnology - physicalNetworkName - sharedNetworkBoolean - networkRole - routerExternalBoolean",
            "value": "string",
            "dataQuality": {
              "status": "ok",
              "errorText": "string"
            }
          }
        ],
        "vfModuleList": [
          {
            "uuid": "string",
            "invariantUUID": "string",
            "name": "string",
            "minInstances": 0,
            "maxInstances": 0,
            "dataQuality": {
              "status": "ok",
              "errorText": "string"
            },
            "attributeList": [
              {
                "name": "adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType - networkTechnology - physicalNetworkName - sharedNetworkBoolean - networkRole - routerExternalBoolean",
                "value": "string",
                "dataQuality": {
                  "status": "ok",
                  "errorText": "string"
                }
              }
            ],
            "vmList": [
              {
                "uuid": "string",
                "invariantUUID": "string",
                "name": "string",
                "nfNamingCode": "string",
                "dataQuality": {
                  "status": "ok",
                  "errorText": "string"
                },
                "attributeList": [
                  {
                    "name": "adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType - networkTechnology - physicalNetworkName - sharedNetworkBoolean - networkRole - routerExternalBoolean",
                    "value": "string",
                    "dataQuality": {
                      "status": "ok",
                      "errorText": "string"
                    }
                  }
                ],
                "PServerList": [
                  {
                    "uuid": "string",
                    "invariantUUID": "string",
                    "name": "string",
                    "dataQuality": {
                      "status": "ok",
                      "errorText": "string"
                    },
                    "attributeList": [
                      {
                        "name": "adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType - networkTechnology - physicalNetworkName - sharedNetworkBoolean - networkRole - routerExternalBoolean",
                        "value": "string",
                        "dataQuality": {
                          "status": "ok",
                          "errorText": "string"
                        }
                      }
                    ]
                  }
                ],
                "IInterfaceList": [
                  {
                    "uuid": "string",
                    "invariantUUID": "string",
                    "name": "string",
                    "dataQuality": {
                      "status": "ok",
                      "errorText": "string"
                    },
                    "attributeList": [
                      {
                        "name": "adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType - networkTechnology - physicalNetworkName - sharedNetworkBoolean - networkRole - routerExternalBoolean",
                        "value": "string",
    "attributeList": [           {         "name": "adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType - physicalNetworkName - sharedNetworkBoolean - routerExternalBoolean",dataQuality": {
                          "valuestatus": "stringok",
        "dataQuality": {                  "statuserrorText": "ok",string"
              "errorText": "string"         }
      }     ],     "vfList": [      }
{         "uuid": "string",         "invariantUUID": "string" ],
        "name": "string",            "nfNamingCodePortList": "string",[
            "type": "string",         "attributeList":{
[           {             "nameuuid": "adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType - physicalNetworkName - sharedNetworkBoolean - routerExternalBoolean",string",
                        "valueinvariantUUID": "string",
 
          "dataQuality": {               "statusname": "okstring",
    
         "errorText": "string"             }  "dataQuality": {
       }          ],         "vfModuleListstatus": [ "ok",
             {             "uuiderrorText": "string",
            "invariantUUID": "string",             "name": "string"},
            "nfNamingCode": "string",             "minInstancesattributeList": 0,
[
           "maxInstances": 0,             "attributeList": [{
              {                 "name": "adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType networkType- networkTechnology - physicalNetworkName - sharedNetworkBoolean - networkRole - routerExternalBoolean",
                            "value": "string",
                            "dataQuality": {
                              "status": "ok",
                   "errorText": "string"          "errorText": "string"
     }               }        }
    ],             "dataQuality": {        }
      "status": "ok",               "errorText": "string" ]
           }           }
        ],         "vnfcList": [  ]
        {          }
  "uuid": "string",             "invariantUUID": "string",]
             "name": "string", }
            "nfNamingCode": "string"],
            "vmListnetworkList": [
              {
                "uuid": "string",
                "invariantUUID": "string",
                "name": "string",
                "nfNamingCodedataQuality": "string",{
                  "attributeListstatus": ["ok",
                  {
"errorText": "string"
                   "name": "adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType - physicalNetworkName - sharedNetworkBoolean - routerExternalBoolean",
  },
                "attributeList": [
                 "value": "string", {
                    "dataQualityname": {"adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType - networkTechnology - physicalNetworkName - sharedNetworkBoolean - networkRole     "status": "ok- routerExternalBoolean",
                      "errorTextvalue": "string",
                    }
  "dataQuality": {
               }          "status": "ok",
     ],                 "dataQualityerrorText": {"string"
                  "status": "ok", }
                 "errorText": "string" }
                }]
              }
            ],
          }
   "attributeList": [    ],
        "vnfcList": [
{          {
      "name": "adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType - physicalNetworkName - sharedNetworkBoolean - routerExternalBoolean",
   "uuid": "string",
            "invariantUUID": "string",
            "valuename": "string",
                "dataQuality": {
 
                "status": "ok",
  
               "errorText": "string"
            },
   }         "attributeList": [
    }          {
   ],              "dataQuality": {"name": "adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType - networkTechnology - physicalNetworkName - sharedNetworkBoolean - networkRole - routerExternalBoolean",
                "statusvalue": "okstring",
                "errorTextdataQuality": "string"{
            }      "status": "ok",
   }         ],         "dataQualityerrorText": {
"string"
         "status": "ok",      }
    "errorText": "string"         }
      }      ],
    "dataQuality": {     }
 "status": "ok",      ]
"errorText": "string"     }
    ]
  }
]


Error