The following is a work in progress. It does not show the following
- Error Handling
- Returned attributes
TO DO
- Add additional resources from the POMBA Context Builders and Data Sources 'yellow' model
Swagger YAML
Created using https://swagger.io/swagger-editor/
Code Block | ||
---|---|---|
| ||
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" requiredtype: true"string" - typename: "stringmodelVersionId" responses: in: "query" 200: description: "Model UUID as published in service model description: metadata"successful operation" type: "string" schema: - name: "modelInvariantId" type in: "arrayquery" description: "SDC generated invariant items:id as published in service model metadata" $reftype: "#/definitions/Service" string" responses: 400 200: description: "Invalidsuccessful status valueoperation" security: schema: - petstore_auth: -type: "write:petsarray" - "read:pets" items: securityDefinitions: petstore_auth: type: "oauth2" authorizationUrl$ref: "http:#//petstore.swagger.io/oauth/dialogdefinitions/Service" flow: "implicit" 400: scopes: write:petsdescription: "modify petsMissing manadatory field in yourthe account"request or HTTP header." read:pets: "read your pets" 404: api_key: type: "apiKey" namedescription: "api_key" in: "header" definitions: Service:Error: Requested '%1' resource was not found." type405: "object" properties: description: "Method uuid: Not Allowed : Invalid HTTP method type: "string"used ( PUT,DELETE,POST will be rejected)" description: "Univseral indentifier" 500: invariantUUID: typedescription: "string"The GET request failed either due to name:internal Context Builder problem." typesecurity: "string" description: "Service Name"- petstore_auth: vfList:- "write:pets" type:- "arrayread:pets" securityDefinitions: itemspetstore_auth: type: "oauth2" $refauthorizationUrl: "#/definitions/VFhttp://petstore.swagger.io/oauth/dialog" flow: "implicit" dataQualityscopes: $refwrite:pets: "#/components/schemas/dataQuality" xml:modify pets in your account" read:pets: "read name:your "Servicepets" VFapi_key: type: "objectapiKey" propertiesname: "api_key" uuidin: "header" definitions: Service: type: "stringobject" properties: invariantUUID uuid: type: "string" name: typedescription: "stringUnivseral indentifier" nfNamingCodeinvariantUUID: type: "string" typename: type: "string" vfModuleList: description: "Service Name" type: "array" itemsdataQuality: $ref: "#/definitionscomponents/schemas/VFModuledataQuality" vnfcList attributeList: type: "array" items: $ref: "#/components/definitionsschemas/VNFCattribute" dataQuality: vfList: $ref type: "array" items: $ref: "#/componentsdefinitions/schemas/dataQuality"VNF" xml: name: "VFService" VFModuleVNF: type: "object" properties: uuid: type: "string" invariantUUID: type: "string" name: type: "string" nfNamingCodetype: type: "string" minInstancesdataQuality: type $ref: "integer#/components/schemas/dataQuality" attributeList: format: "int32" maxInstances: type: "integerarray" formatitems: "int32" dataQuality: $ref: "#/components/schemas/dataQualityattribute" xml: namevfModuleList: "VFModule" VNFC: type: "objectarray" properties: items: uuid: type$ref: "string#/definitions/VFModule" invariantUUIDvnfcList: type: "stringarray" name items: type $ref: "string""#/definitions/VNFC" xml: nfNamingCode name: "VF" VFModule: type: "stringobject" properties: dataQuality: uuid: $ref type: "#/components/schemas/dataQuality"string" xmlinvariantUUID: name type: "VNFCstring" components: schemasname: dataQuality: type: "objectstring" properties: statusminInstances: type: "stringinteger" enumformat: [ok, error]"int32" errorTextmaxInstances: type: "stringinteger" required format: "int32" - status dataQuality: xml: name$ref: "#/components/schemas/dataQuality" ApiResponseattributeList: type: "objectarray" properties: items: code: type$ref: "integer#/components/schemas/attribute" format vmList: "int32" type: "array" type: "string" message: items: $ref: "#/definitions/VM" networkList: type: "array" items: $ref: "#/definitions/Network" xml: name: "VFModule" VNFC: 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: "VNFC" VM: type: "object" properties: uuid: type: "string" invariantUUID: type: "string" name: type: "string" nfNamingCode: type: "string" dataQuality: $ref: "#/components/schemas/dataQuality" attributeList: type: "array" items: $ref: "#/components/schemas/attribute" PServerList: type: "array" items: $ref: "#/definitions/PServer" IInterfaceList: type: "array" items: $ref: "#/definitions/IInterface" xml: name: "VM" Network: 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: "Network" IInterface: 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" PortList: type: "array" items: $ref: "#/definitions/Port" xml: 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
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.
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", "dataQuality": { "status": "ok", "errorText": "string" } } ], "PortList": [ { "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" } } ] } ] } ] } ], "networkList": [ { "uuid": "string", "invariantUUID": "string", "name": "string", "dataQuality": { "status": "ok", "errorText": "string" }, "attributeList": [ { "name": "adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType - networkTechnology - physicalNetworkName - sharedNetworkBoolean - networkRole - routerExternalBoolean", type: "string" externalDocs: description: "Find out more about Swagger" url"value": "http://swagger.io" |
Example JSON
Code Block |
---|
[string", { "uuid": "string", "invariantUUID": "string", "namedataQuality": "string",{ "vfList": [ { "uuidstatus": "stringok", "invariantUUID": "string", "nameerrorText": "string", "nfNamingCode": "string", } "type": "string", "vfModuleList": [ } { "uuid": "string",] "invariantUUID": "string", } "name": "string",] } "nfNamingCode": "string", ], "minInstancesvnfcList": 0,[ "maxInstances": 0,{ "dataQualityuuid": { "string", "statusinvariantUUID": "okstring", "errorTextname": "string", }"dataQuality": { } "status": "ok", ], "vnfcListerrorText": ["string" {}, "uuidattributeList": "string", [ { "invariantUUID": "string", "name": "string",adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType - networkTechnology "nfNamingCode": "string", "dataQuality": {- physicalNetworkName - sharedNetworkBoolean - networkRole - routerExternalBoolean", "statusvalue": "okstring", "errorText": "stringdataQuality": { } "status": "ok", } ], "dataQualityerrorText": {"string" "status": "ok", } "errorText": "string" } } ], "dataQuality": { } "status": "ok", ] "errorText": "string" } ] } ] |