# ============LICENSE_START======================================================= # Copyright (C) 2021-2024 Nordix Foundation # Modifications Copyright (C) 2021 Pantheon.tech # Modifications Copyright (C) 2022 Bell Canada # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # SPDX-License-Identifier: Apache-2.0 # ============LICENSE_END========================================================= components: schemas: # Common Schemas ErrorMessage: type: object title: Error properties: status: type: string message: type: string details: type: string # DMI Server Exception Schema DmiErrorMessage: title: DMI Error Message type: object properties: message: type: string example: 'Bad Gateway Error Message NCMP' dmi-response: type: object properties: http-code: type: integer example: 400 body: type: string example: Bad Request # Request Schemas RestDmiPluginRegistration: type: object properties: dmiPlugin: type: string example: my-dmi-plugin default: "" dmiDataPlugin: type: string example: my-dmi-data-plugin default: "" dmiModelPlugin: type: string example: my-dmi-model-plugin default: "" createdCmHandles: type: array items: $ref: '#/components/schemas/RestInputCmHandle' updatedCmHandles: type: array items: $ref: '#/components/schemas/RestInputCmHandle' example: cmHandle: my-cm-handle cmHandleProperties: add-my-property: add-property update-my-property: updated-property delete-my-property: '~' publicCmHandleProperties: add-my-property: add-property update-my-property: updated-property delete-my-property: '~' removedCmHandles: type: array items: type: string example: [ my-cm-handle1, my-cm-handle2, my-cm-handle3 ] upgradedCmHandles: $ref: '#/components/schemas/UpgradedCmHandles' DmiPluginRegistrationErrorResponse: type: object properties: failedCreatedCmHandles: type: array items: $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse' failedUpdatedCmHandles: type: array items: $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse' failedRemovedCmHandles: type: array items: $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse' failedUpgradeCmHandles: type: array items: $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse' CmHandlerRegistrationErrorResponse: type: object properties: cmHandle: type: string example: my-cm-handle errorCode: type: string example: '00' errorText: type: string example: 'Unknown error. ' RestInputCmHandle: required: - cmHandle type: object properties: cmHandle: type: string example: my-cm-handle cmHandleProperties: $ref: '#/components/schemas/RestCmHandleProperties' publicCmHandleProperties: $ref: '#/components/schemas/RestCmHandleProperties' moduleSetTag: type: string example: "my-module-set-tag" trustLevel: type: string enum: [COMPLETE, NONE] example: "COMPLETE" alternateId: type: string example: "Subnetwork=Europe,ManagedElement=X123" dataProducerIdentifier: type: string example: "my-data-producer-identifier" RestCmHandleProperties: type: object additionalProperties: type: string example: my-property #Module upgrade schema UpgradedCmHandles: required: - cmHandles type: object properties: cmHandles: type: array items: type: string example: [ my-cm-handle1, my-cm-handle2, my-cm-handle3 ] moduleSetTag: type: string default: "" example: 'my-module-set-tag' #Response Schemas RestModuleReference: type: object title: Module reference details properties: moduleName: type: string example: my-module-name revision: type: string example: my-module-revision RestModuleDefinition: type: object title: Module definitions properties: moduleName: type: string example: my-module-name revision: type: string example: 2020-09-15 content: type: string example: | module _3gpp-nr-nrm-gnbdufunction { yang-version 1.1; namespace 'urn:3gpp:sa5:_3gpp-nr-nrm-gnbdufunction'; prefix gnbdu3gpp; revision '2020-09-15' { description 'Defines the YANG mapping of the GNBDUFunction Information Object Class (IOC) that is part of the NR Network Resource Model (NRM). Copyright 2024, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.'; } } CmHandleQueryParameters: type: object title: Cm Handle query parameters for executing cm handle search properties: cmHandleQueryParameters: type: array items: $ref: '#/components/schemas/ConditionProperties' conditions: deprecated: true type: array items: $ref: '#/components/schemas/OldConditionProperties' description: not necessary, it is just for backward compatibility ConditionProperties: properties: conditionName: type: string conditionParameters: type: array items: type: object additionalProperties: type: string OldConditionProperties: deprecated: true properties: name: type: string conditionParameters: type: array items: $ref: '#/components/schemas/ModuleNameAsJsonObject' ModuleNameAsJsonObject: properties: moduleName: type: string example: my-module RestOutputCmHandle: type: object title: CM handle Details properties: cmHandle: type: string example: my-cm-handle1 publicCmHandleProperties: $ref: '#/components/schemas/CmHandlePublicProperties' state: $ref: '#/components/schemas/CmHandleCompositeState' trustLevel: $ref: '#/components/schemas/CmHandleTrustLevel' moduleSetTag: type: string example: my-module-set-tag alternateId: type: string example: "Subnetwork=Europe,ManagedElement=X123" dataProducerIdentifier: type: string example: my-data-producer-identifier CmHandlePublicProperties: type: object items: type: object additionalProperties: type: string example: '3gpp Type' CmHandleCompositeState: type: object properties: cmHandleState: type: string example: ADVISED lockReason: $ref: '#/components/schemas/lock-reason' lastUpdateTime: type: string example: 2022-12-31T20:30:40.000+0000 dataSyncEnabled: type: boolean example: false dataSyncState: $ref: '#/components/schemas/dataStores' CmHandleTrustLevel: type: string description: Current trust level of the relevant CM handle ID. example: COMPLETE lock-reason: type: object properties: reason: type: string example: LOCKED_MISBEHAVING details: type: string example: locked due to failure in module sync dataStores: type: object properties: operational: $ref: '#/components/schemas/sync-state' running: $ref: '#/components/schemas/sync-state' sync-state: type: object properties: syncState: type: string example: NONE_REQUESTED lastSyncTime: type: string example: 2022-12-31T20:30:40.000+0000 RestOutputCmHandlePublicProperties: type: object properties: publicCmHandleProperties: $ref: '#/components/schemas/CmHandlePublicProperties' RestOutputCmHandleCompositeState: type: object properties: state: $ref: '#/components/schemas/CmHandleCompositeState' # Data Operation Request Schemas DataOperationRequest: type: object title: execute data operation for given array of operations properties: operations: type: array items: $ref: '#/components/schemas/DataOperationDefinition' description: contains group of data operation requests DataOperationDefinition: required: - operation - datastore - operationId properties: operation: type: string example: 'read' operationId: type: string example: '12' datastore: type: string example: 'ncmp-datastore:passthrough-operational' options: type: string example: '(fields=NRCellDU/attributes/cellLocalId)' resourceIdentifier: type: string example: 'NRCellDU/attributes/cellLocalId' targetIds: type: array items: type: string description: targeted cm handle references, maximum of 200 supported. If this limit is exceeded the request will be refused. example: [ "da310eecdb8d44c2acc0ddaae01174b1","c748c58f8e0b438f9fd1f28370b17d47" ] examples: dataSampleRequest: summary: Sample request description: Sample request body for GNBDUFunction configuration value: gnbdu3gpp:GNBDUFunction: gNBId: 12345 gNBIdLength: 32 gNBDUId: 67890 gNBDUName: "DU-1" rimRSReportConf: reportIndicator: "enabled" reportInterval: 1000 nrofRIMRSReportInfo: 5 maxPropagationDelay: 32767 RimRSReportInfoList: - detectedSetID: 1 propagationDelay: 20 functionalityOfRIMRS: "RS1" - detectedSetID: 2 propagationDelay: 15 functionalityOfRIMRS: "RS2" dataSamplePatchRequest: summary: Sample patch request description: Sample patch request to modify GNBDUFunction value: ietf-restconf:yang-patch: patch-id: patch-1 edit: - edit-id: edit1 operation: replace target: /gnbdu3gpp:GNBDUFunction value: gnbdu3gpp:GNBDUFunction: gNBId: 54321 gNBIdLength: 32 gNBDUId: 98765 gNBDUName: "DU-2" rimRSReportConf: reportIndicator: "disabled" reportInterval: 2000 nrofRIMRSReportInfo: 3 maxPropagationDelay: 20000 - edit-id: edit2 operation: merge target: /gnbdu3gpp:GNBDUFunction value: gnbdu3gpp:GNBDUFunction: configurable5QISetRef: "/5QISet-001" dynamic5QISetRef: "/Dynamic5QISet-001" dataSampleResponse: summary: Sample response description: Sample response with GNBDUFunction configuration value: gnbdu3gpp:GNBDUFunction: gNBId: 12345 gNBIdLength: 32 gNBDUId: 67890 gNBDUName: "DU-1" rimRSReportConf: reportIndicator: "enabled" reportInterval: 1000 nrofRIMRSReportInfo: 5 maxPropagationDelay: 32767 RimRSReportInfoList: - detectedSetID: 1 propagationDelay: 20 functionalityOfRIMRS: "RS1" - detectedSetID: 2 propagationDelay: 15 functionalityOfRIMRS: "RS2" configurable5QISetRef: "/5QISet-001" dynamic5QISetRef: "/Dynamic5QISet-001" allCmHandleQueryParameters: value: cmHandleQueryParameters: - conditionName: hasAllModules conditionParameters: - { "moduleName": "my-module-1" } - { "moduleName": "my-module-2" } - { "moduleName": "my-module-3" } - conditionName: hasAllProperties conditionParameters: - { "Color": "yellow" } - { "Shape": "circle" } - { "Size": "small" } - conditionName: cmHandleWithCpsPath conditionParameters: - { "cpsPath": "//state[@cm-handle-state='ADVISED']" } pubPropCmHandleQueryParameters: value: cmHandleQueryParameters: - conditionName: hasAllProperties conditionParameters: - { "Color": "yellow" } - { "Shape": "circle" } - { "Size": "small" } modulesCmHandleQueryParameters: value: cmHandleQueryParameters: - conditionName: hasAllModules conditionParameters: - { "moduleName": "my-module-1" } - { "moduleName": "my-module-2" } - { "moduleName": "my-module-3" } cpsPathCmHandleStateQueryParameters: value: cmHandleQueryParameters: - conditionName: cmHandleWithCpsPath conditionParameters: - { "cpsPath": "//state[@cm-handle-state='LOCKED']" } cpsPathCmHandleDataSyncQueryParameters: value: cmHandleQueryParameters: - conditionName: cmHandleWithCpsPath conditionParameters: - { "cpsPath": "//state[@data-sync-enabled='true']" } parameters: cmHandleInPath: name: cm-handle in: path description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy required: true schema: type: string example: my-cm-handle cmHandleReferenceInPath: name: cm-handle in: path description: The identifier (cmHandle or alternate) for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy required: true schema: type: string example: my-cm-handle-reference outputAlternateIdOptionInQuery: name: outputAlternateId in: query description: Boolean parameter to determine if returned value(s) will be cm handle ids or alternate ids for a given query required: false schema: type: boolean default: false moduleNameInQuery: name: module-name in: query description: Filter for a module name.This is an optional parameter required: false schema: type: string example: my-module revisionInQuery: name: revision in: query description: Filter for a module revision.This is an optional parameter and ignored when no module name is supplied required: false schema: type: string example: 2024-01-22 dataSyncEnabled: name: dataSyncEnabled in: query description: Is used to enable or disable the data synchronization flag required: true schema: type: boolean example: true xpathInQuery: name: xpath in: query description: xpath required: false schema: type: string default: / requiredXpathInQuery: name: xpath in: query description: xpath required: true schema: type: string includeDescendantsOptionInQuery: name: include-descendants in: query description: Determines if descendants are included in response required: false schema: type: boolean default: false cpsPathInQuery: name: cps-path in: query description: | The `cps-path` parameter allows referencing elements in the GNBDUFunctionConfig data model. For more details on cps path, please refer to: [CPS Path Documentation](https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html). Example paths: - Root GNBDUFunction: `/GNBDUFunction` - Specific gNB ID: `/GNBDUFunction[@gNBId='1001']` - RIM-RS Reporting Config: `/GNBDUFunction[@gNBId='1001']/rimRSReportConf` required: false schema: type: string default: "/GNBDUFunction" examples: GNBDUFunction Root: value: "//GNBDUFunction" Specific gNB ID: value: "//GNBDUFunction[@gNBId='1001']" RIM-RS Reporting Config: value: "//GNBDUFunction[@gNBId='1001']/rimRSReportConf" dmiPluginIdentifierInQuery: name: dmi-plugin-identifier in: query description: dmi-plugin-identifier required: true schema: type: string example: my-dmi-plugin resourceIdentifierInQuery: name: resourceIdentifier in: query description: | The `resourceIdentifier` parameter specifies the target resource in the GNBDUFunctionConfig model. For ONAP DMI Plugin, the format will follow RESTConf paths. Examples: - All GNBDUFunctions: `/GNBDUFunction` - Specific GNBDUFunction by gNBId: `/GNBDUFunction[@gNBId='1001']` - RIM-RS Reporting Configuration: `/GNBDUFunction[@gNBId='1001']/rimRSReportConf` required: true schema: type: string examples: sample 1: value: resourceIdentifier: \GNBDUFunction sample 2: value: resourceIdentifier: \GNBDUFunction[@gNBId='1001'] sample 3: value: resourceIdentifier: \GNBDUFunction[@gNBId='1001']\rimRSReportConf sample 4: value: resourceIdentifier: parent=GNBDUFunction,child=gNBId:1001 optionsParamInQuery: name: options in: query description: | The `options` parameter specifies additional query options. It is mandatory to wrap key(s)=value(s) in parentheses `()`. Examples for GNBDUFunctionConfig queries: - Limit depth of returned sub-tree: `(depth=2)` - Select specific fields: `(fields=gNBId,gNBDUName)` - Combine options: `(depth=3,fields=gNBId,gNBDUName)` required: false schema: type: string examples: Limit Depth: value: options: (depth=2) Select Specific Fields: value: options: (fields=gNBId,gNBDUName) Combine Depth and Fields: value: options: (depth=3,fields=gNBId,gNBDUName) topicParamInQuery: name: topic in: query description: topic parameter in query. required: false schema: type: string examples: sample 1: value: topic: my-topic-name requiredTopicParamInQuery: name: topic in: query description: mandatory topic parameter in query. required: true schema: type: string examples: sample 1: value: topic: my-topic-name contentParamInHeader: name: Content-Type in: header required: false description: Content parameter for request, if content parameter is null, default value is application/json. schema: type: string default: application/json example: application/yang-data+json authorizationParamInHeader: name: Authorization in: header required: false description: Authorization parameter for request. schema: type: string datastoreName: name: datastore-name in: path description: The type of the requested data required: true schema: type: string example: ncmp-datastore:running responses: NotFound: description: The specified resource was not found content: application/json: schema: $ref: '#/components/schemas/ErrorMessage' example: status: 400 message: Not found error message details: Not found error details Unauthorized: description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorMessage' example: status: 401 message: Unauthorized error message details: Unauthorized error details Forbidden: description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorMessage' example: status: 403 message: Forbidden error message details: Forbidden error details BadRequest: description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessage' example: status: 400 message: Bad request error message details: Bad request error details Conflict: description: Conflict content: application/json: schema: $ref: '#/components/schemas/ErrorMessage' example: status: 409 message: Conflict error message details: Conflict error details PayloadTooLarge: description: The request is larger than the server is willing or able to process content: application/json: schema: $ref: '#/components/schemas/ErrorMessage' example: status: 413 message: Payload Too Large error message details: Payload Too Large error details NotImplemented: description: The given path has not been implemented content: application/json: schema: $ref: '#/components/schemas/ErrorMessage' example: status: 501 message: Not implemented error message details: Not implemented error details Ok: description: OK content: application/json: schema: type: object Created: description: Created content: { } NoContent: description: No Content content: { } InternalServerError: description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/ErrorMessage" example: status: 500 message: Internal Server Error details: Internal Server Error occurred BadGateway: description: Bad Gateway content: application/json: schema: $ref: "#/components/schemas/DmiErrorMessage" example: message: "Bad Gateway Error Message NCMP" dmi-response: http-code: 400 body: "Bad Request"