...
- Add additional resources from the POMBA Context Builders and Data Sources 'yellow' model
Swagger YAML
...
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" 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/VF" dataQuality: VNF" $ref: "#/components/schemas/dataQuality" xml: name: "Service" VFVNF: type: "object" properties: uuid: type: "string" invariantUUID: type: "string" name: type: "string" nfNamingCode: type: "string" type: type: "string" attributeListdataQuality: type $ref: "array#/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" nfNamingCode: type: "string" minInstances: type: "integer" format: "int32" maxInstances: type: "integer" format: "int32" dataQuality: $ref: "#/components/schemas/dataQuality" attributeList: type: "array" items: $ref: "#/components/schemas/attribute" vmList: type: "array" items: $ref: "#/definitions/VM" networkList: type: "array" items: $ref: "#/definitions/Network" dataQuality: $ref: "#/components/schemas/dataQuality" xml: xml: name: "VFModule" VNFC: type: "object" properties: uuid: type: "string" invariantUUID: type: "string" name: type: "string" nfNamingCode: type: "string" attributeListdataQuality: type $ref: "array#/components/schemas/dataQuality" itemsattributeList: $reftype: "#/components/schemas/attributearray" dataQualityitems: $ref: "#/components/schemas/dataQualityattribute" xml: name: "VNFC" VM: type: "object" properties: uuid: type: "string" invariantUUID: type: "string" name: type: "string" nfNamingCode: type: "string" attributeListdataQuality: type$ref: "array" #/components/schemas/dataQuality" itemsattributeList: $reftype: "#/components/schemas/attributearray" dataQualityitems: $ref: "#/components/schemas/dataQualityattribute" xml: namePServerList: "VM" Network: type: "objectarray" properties: items: uuid: type$ref: "string#/definitions/PServer" invariantUUIDIInterfaceList: type: "stringarray" nameitems: type $ref: "string"#/definitions/IInterface" xml: nfNamingCodename: "VM" Network: type: "stringobject" properties: attributeList uuid: type: "arraystring" itemsinvariantUUID: $reftype: "#/components/schemas/attributestring" dataQualityname: $reftype: "#/components/schemas/dataQuality"string" xmlnfNamingCode: name type: "Networkstring" componentsdataQuality: schemas: dataQuality: type$ref: "object#/components/schemas/dataQuality" properties: statusattributeList: type: "stringarray" enumitems: [ok, error] errorText: type$ref: "string" #/components/schemas/attribute" required: xml: - status xmlname: "Network" name: "dataQuality" attributeIInterface: type: "object" properties: nameuuid: $reftype: "#/components/schemas/fieldNamestring" valueinvariantUUID: type: "string" dataQualityname: $reftype: "#/components/schemas/dataQualitystring" required nfNamingCode: - nametype: "string" - dataQuality: xml: $ref: name: ""#/components/schemas/dataQuality" fieldName attributeList: type: string type: "array" enum: -items: adminState - ipAddress $ref: "#/components/schemas/attribute" - hostName PortList: - lockedBoolean type: "array" - macAddress items: - networkType $ref: "#/definitions/Port" -xml: networkTechnology name: "IInterface" - physicalNetworkName PServer: type: -"object" sharedNetworkBoolean properties: - networkRole uuid: - routerExternalBooleantype: "string" ApiResponse: typeinvariantUUID: "object" propertiestype: "string" codename: type: "integer" string" nfNamingCode: format type: "int32string" typedataQuality: type$ref: "string#/components/schemas/dataQuality" messageattributeList: type: "string" externalDocsarray" items: description: "Find out more about Swagger" url$ref: "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.
Example JSON Response
Note the top level objects is a service
Code Block |
---|
[ { "uuid": "string", "invariantUUID": "string", "name": "string", "attributeList": [ {components/schemas/attribute" xml: name: "PServer" Port: 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" 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 - 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
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", "nfNamingCode": "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", "nfNamingCode": "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", "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" } } ] "name": "adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType - networkTechnology - physicalNetworkName - sharedNetworkBoolean -} networkRole - routerExternalBoolean", "value": "string", ], "dataQuality": { "statusIInterfaceList": "ok", [ "errorText": "string" { } } ], "vfListuuid": [ "string", { "uuidinvariantUUID": "string", "invariantUUID "name": "string", "name": "string", "nfNamingCode": "string", "type": "string", "attributeListdataQuality": [ { { "namestatus": "adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType - networkTechnology - physicalNetworkName - sharedNetworkBoolean - networkRole - routerExternalBoolean", ok", "errorText": "string" "value": "string", }, "dataQuality": { "statusattributeList": "ok", [ "errorText": "string" { } } ], "name": "adminState - ipAddress - hostName - "vfModuleList": [ { lockedBoolean - macAddress - networkType - networkTechnology - physicalNetworkName - sharedNetworkBoolean - networkRole - routerExternalBoolean", "uuid": "string", "invariantUUIDvalue": "string", "name": "string", "nfNamingCodedataQuality": "string",{ "minInstances": 0, "maxInstancesstatus": 0, "ok", "attributeList": [ { "errorText": "string" "name": "adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType} - networkTechnology - physicalNetworkName - sharedNetworkBoolean - networkRole - routerExternalBoolean", } "value": "string", ], "dataQuality": { "statusPortList": "ok",[ "errorText": "string" { } } "uuid": "string", ], "vmListinvariantUUID": ["string", { "name": "string", "uuid": "string", "invariantUUIDnfNamingCode": "string", "name": "string", "dataQuality": { "nfNamingCode": "string", "attributeListstatus": ["ok", { "errorText": "string" "name": "adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType - networkTechnology - physicalNetworkName - sharedNetworkBoolean}, - networkRole - routerExternalBoolean", "valueattributeList": "string", [ "dataQuality": { "status": "ok", "name": "adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType - networkTechnology - physicalNetworkName - sharedNetworkBoolean "errorText": "string" - networkRole - routerExternalBoolean", } "value": "string", } ], "dataQuality": { "dataQuality": { "status": "ok", "errorText": "string" "errorText": "string" } } } ], "networkList": [ } { "uuid": "string", ] "invariantUUID": "string", } "name": "string", ] "nfNamingCode": "string", } "attributeList": [ ] { } ], "name": "adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType - networkTechnology - physicalNetworkName - sharedNetworkBoolean - networkRole - routerExternalBoolean","networkList": [ { "valueuuid": "string", "invariantUUID": "string", "dataQuality": { "name": "string", "statusnfNamingCode": "okstring", "errorText"dataQuality": "string"{ "status": "ok", } }"errorText": "string" ]}, "dataQualityattributeList": {[ { "status": "ok", "errorTextname": "string" }adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType - networkTechnology - physicalNetworkName - sharedNetworkBoolean - networkRole - routerExternalBoolean", } "value": "string", ], "dataQuality": { "status": "ok", "errorText": "string" } } ], "vnfcList": [ } { ] "uuid": "string", "invariantUUID": "string",} ] "name": "string", } "nfNamingCode": "string", ], "attributeListvnfcList": [ { "uuid": "string", "name": "adminState - ipAddress - hostName - lockedBoolean - macAddress - networkType - networkTechnology - physicalNetworkName - sharedNetworkBoolean - networkRole - routerExternalBoolean", "invariantUUID": "string", "name": "string", "valuenfNamingCode": "string", "dataQuality": { "status": "ok", "errorText": "string" }, "attributeList": [ } { } "name": "adminState - ipAddress - hostName - lockedBoolean ],- macAddress - networkType - networkTechnology - physicalNetworkName - sharedNetworkBoolean - networkRole - routerExternalBoolean"dataQuality":, { "statusvalue": "okstring", "errorTextdataQuality": "string"{ } "status": "ok", } ], "dataQualityerrorText": {"string" "status": "ok", } "errorText": "string" } } ], "dataQuality": { } "status": "ok", ] "errorText": "string" } ] } ] |