# ============LICENSE_START=======================================================
-# Copyright (C) 2021-2022 Nordix Foundation
+# Copyright (C) 2021-2024 Nordix Foundation
# Modifications Copyright (C) 2021 Pantheon.tech
# Modifications Copyright (C) 2022 Bell Canada
# ================================================================================
properties:
message:
type: string
- example: "Bad Gateway Error Message NCMP"
+ example: 'Bad Gateway Error Message NCMP'
dmi-response:
type: object
properties:
items:
type: string
example: [ my-cm-handle1, my-cm-handle2, my-cm-handle3 ]
+ upgradedCmHandles:
+ $ref: '#/components/schemas/UpgradedCmHandles'
DmiPluginRegistrationErrorResponse:
type: object
properties:
type: array
items:
$ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
+ failedUpgradeCmHandles:
+ type: array
+ items:
+ $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
CmHandlerRegistrationErrorResponse:
type: object
properties:
$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: "my-alternate-id"
+ 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:
example: |
module stores {
yang-version 1.1;
- namespace "org:onap:ccsdk:sample";
+ namespace 'org:onap:ccsdk:sample';
prefix book-store;
- revision "2020-09-15" {
+ revision '2020-09-15' {
description
- "Sample Model";
+ 'Sample Model';
}
}
cmHandleQueryParameters:
type: array
items:
- type: object
$ref: '#/components/schemas/ConditionProperties'
conditions:
deprecated: true
type: array
items:
- type: object
$ref: '#/components/schemas/OldConditionProperties'
description: not necessary, it is just for backward compatibility
conditionParameters:
type: array
items:
- type: object
$ref: '#/components/schemas/ModuleNameAsJsonObject'
ModuleNameAsJsonObject:
properties:
$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: my-alternate-id
+ dataProducerIdentifier:
+ type: string
+ example: my-data-producer-identifier
CmHandlePublicProperties:
- type: array
+ type: object
items:
type: object
additionalProperties:
type: string
- example: Book Type
+ example: 'Book Type'
CmHandleCompositeState:
type: object
properties:
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:
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=schemas/schema)'
+ resourceIdentifier:
+ type: string
+ example: 'parent/child'
+ targetIds:
+ type: array
+ items:
+ type: string
+ description: targeted cm handles, maximum of 50 supported. If this limit is exceeded the request wil be refused.
+ example: [ "da310eecdb8d44c2acc0ddaae01174b1","c748c58f8e0b438f9fd1f28370b17d47" ]
examples:
dataSampleRequest:
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
+ 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
in: query
description: The format of resource identifier depend on the associated DMI Plugin implementation. For ONAP DMI Plugin it will be RESTConf paths but it can really be anything.
required: true
- allowReserved: true
schema:
type: string
examples:
required: false
schema:
type: string
- allowReserved: true
examples:
sample 1:
value:
required: false
schema:
type: string
- allowReserved: true
+ 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:
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
required: true
schema:
type: string
- example: ncmp-datastore:operational
+ example: ncmp-datastore:running
responses:
NotFound:
schema:
$ref: '#/components/schemas/ErrorMessage'
example:
- status: 400 BAD_REQUEST
+ status: 400
message: Bad request error message
details: Bad request error details
Conflict:
schema:
$ref: '#/components/schemas/ErrorMessage'
example:
- status: 409 CONFLICT
+ 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: