From: selvi.j Date: Fri, 29 Apr 2022 07:15:26 +0000 (+0000) Subject: Feature 10926 - Subscription feature for SOL003 VNF-LCM X-Git-Tag: v12.0.0rc1~1 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F75%2F11975%2F3;p=osm%2FSOL003.git Feature 10926 - Subscription feature for SOL003 VNF-LCM Added the subscription openapi information for SOL003 Life cycle management interface Change-Id: I418ad03775758e4728c4dec7b7a139fc01dc8e05 Signed-off-by: selvi.j --- diff --git a/src/SOL003/VNFLifecycleManagement/VNFLifecycleManagement.yaml b/src/SOL003/VNFLifecycleManagement/VNFLifecycleManagement.yaml index 60bc5af..8b1c061 100644 --- a/src/SOL003/VNFLifecycleManagement/VNFLifecycleManagement.yaml +++ b/src/SOL003/VNFLifecycleManagement/VNFLifecycleManagement.yaml @@ -367,6 +367,149 @@ paths: default: $ref: '../responses/SOL003_resp.yaml#/components/responses/UnexpectedError' + + ############################################################################### + # Subscriptions # + ############################################################################### + /subscriptions: + get: + tags: + - VNF Instances + summary: Query information about multiple VNF instance subscription + description: Query information about multiple VNF instance subscription + responses: + 200: + $ref: '#/components/responses/Subscriptions.Get.200' + 400: + $ref: '../responses/SOL003_resp.yaml#/components/responses/400' + 401: + $ref: '../responses/SOL003_resp.yaml#/components/responses/401' + 403: + $ref: '../responses/SOL003_resp.yaml#/components/responses/403' + 404: + $ref: '../responses/SOL003_resp.yaml#/components/responses/404' + 405: + $ref: '../responses/SOL003_resp.yaml#/components/responses/405' + 406: + $ref: '../responses/SOL003_resp.yaml#/components/responses/406' + 409: + $ref: '../responses/SOL003_resp.yaml#/components/responses/409' + 422: + $ref: '../responses/SOL003_resp.yaml#/components/responses/422' + 500: + $ref: '../responses/SOL003_resp.yaml#/components/responses/500' + 503: + $ref: '../responses/SOL003_resp.yaml#/components/responses/503' + 5XX: + $ref: '../responses/SOL003_resp.yaml#/components/responses/UnexpectedError' + default: + $ref: '../responses/SOL003_resp.yaml#/components/responses/UnexpectedError' + post: + tags: + - VNF Instances + summary: Creates a new subscription + description: The POST method creates a new subscription. + requestBody: + $ref: './definitions/SOL003VNFLifecycleManagement_def.yaml#/definitions/LccnSubscriptionRequest' + responses: + 201: + $ref: '#/components/responses/Subscriptions.Post.201' + 400: + $ref: '../responses/SOL003_resp.yaml#/components/responses/400' + 401: + $ref: '../responses/SOL003_resp.yaml#/components/responses/401' + 403: + $ref: '../responses/SOL003_resp.yaml#/components/responses/403' + 404: + $ref: '../responses/SOL003_resp.yaml#/components/responses/404' + 405: + $ref: '../responses/SOL003_resp.yaml#/components/responses/405' + 406: + $ref: '../responses/SOL003_resp.yaml#/components/responses/406' + 409: + $ref: '../responses/SOL003_resp.yaml#/components/responses/409' + 422: + $ref: '../responses/SOL003_resp.yaml#/components/responses/422' + 500: + $ref: '../responses/SOL003_resp.yaml#/components/responses/500' + 503: + $ref: '../responses/SOL003_resp.yaml#/components/responses/503' + 5XX: + $ref: '../responses/SOL003_resp.yaml#/components/responses/UnexpectedError' + default: + $ref: '../responses/SOL003_resp.yaml#/components/responses/UnexpectedError' + + /subscriptions/{subscriptionId}: + parameters: + - $ref: '#/components/parameters/SubscriptionId' + - $ref: ../components/SOL003_params.yaml#/components/parameters/Authorization + - $ref: ../components/SOL003_params.yaml#/components/parameters/Version + get: + tags: + - VNF Instances + summary: Read information about individual subscription resource + description: | + The GET method retrieves information about a subscription by reading an "Individual subscription" resource. + responses: + 200: + $ref: '#/components/responses/IndividualSubscription.Get.200' + 400: + $ref: '../responses/SOL003_resp.yaml#/components/responses/400' + 401: + $ref: '../responses/SOL003_resp.yaml#/components/responses/401' + 403: + $ref: '../responses/SOL003_resp.yaml#/components/responses/403' + 404: + $ref: '../responses/SOL003_resp.yaml#/components/responses/404' + 405: + $ref: '../responses/SOL003_resp.yaml#/components/responses/405' + 406: + $ref: '../responses/SOL003_resp.yaml#/components/responses/406' + 409: + $ref: '../responses/SOL003_resp.yaml#/components/responses/409' + 422: + $ref: '../responses/SOL003_resp.yaml#/components/responses/422' + 500: + $ref: '../responses/SOL003_resp.yaml#/components/responses/500' + 503: + $ref: '../responses/SOL003_resp.yaml#/components/responses/503' + 5XX: + $ref: '../responses/SOL003_resp.yaml#/components/responses/UnexpectedError' + default: + $ref: '../responses/SOL003_resp.yaml#/components/responses/UnexpectedError' + delete: + tags: + - VNF Instances + summary: Delete an individual subscription resource + description: The DELETE method terminates an individual subscription. + responses: + 204: + description: No Content + 400: + $ref: '../responses/SOL003_resp.yaml#/components/responses/400' + 401: + $ref: '../responses/SOL003_resp.yaml#/components/responses/401' + 403: + $ref: '../responses/SOL003_resp.yaml#/components/responses/403' + 404: + $ref: '../responses/SOL003_resp.yaml#/components/responses/404' + 405: + $ref: '../responses/SOL003_resp.yaml#/components/responses/405' + 406: + $ref: '../responses/SOL003_resp.yaml#/components/responses/406' + 409: + $ref: '../responses/SOL003_resp.yaml#/components/responses/409' + 422: + $ref: '../responses/SOL003_resp.yaml#/components/responses/422' + 500: + $ref: '../responses/SOL003_resp.yaml#/components/responses/500' + 503: + $ref: '../responses/SOL003_resp.yaml#/components/responses/503' + 5XX: + $ref: '../responses/SOL003_resp.yaml#/components/responses/UnexpectedError' + default: + $ref: '../responses/SOL003_resp.yaml#/components/responses/UnexpectedError' + components: parameters: VnfInstanceId: @@ -384,6 +527,13 @@ components: Identifier of the VNF lifecycle management operation occurrence schema: type: string + SubscriptionId: + name: subscriptionId + in: path + required: true + description: Identifier of the VNF subscription occurrence + schema: + type: string responses: VNFInstances.Get.200: @@ -478,3 +628,35 @@ components: application/yaml: schema: $ref: './definitions/SOL003VNFLifecycleManagement_def.yaml#/definitions/VnfLcmOpOcc' + Subscriptions.Post.201: + description: Created + headers: + Location: + schema: + type: string + format: uri + content: + application/json: + schema: + $ref: './definitions/SOL003VNFLifecycleManagement_def.yaml#/definitions/LccnSubscription' + application/yaml: + schema: + $ref: './definitions/SOL003VNFLifecycleManagement_def.yaml#/definitions/LccnSubscription' + Subscriptions.Get.200: + description: OK + content: + application/json: + schema: + $ref: './definitions/SOL003VNFLifecycleManagement_def.yaml#/definitions/ArrayOfLccnSubscription' + application/yaml: + schema: + $ref: './definitions/SOL003VNFLifecycleManagement_def.yaml#/definitions/ArrayOfLccnSubscription' + IndividualSubscription.Get.200: + description: OK + content: + application/json: + schema: + $ref: './definitions/SOL003VNFLifecycleManagement_def.yaml#/definitions/LccnSubscription' + application/yaml: + schema: + $ref: './definitions/SOL003VNFLifecycleManagement_def.yaml#/definitions/LccnSubscription' diff --git a/src/SOL003/VNFLifecycleManagement/definitions/SOL003VNFLifecycleManagement_def.yaml b/src/SOL003/VNFLifecycleManagement/definitions/SOL003VNFLifecycleManagement_def.yaml index 33b6f52..619115c 100644 --- a/src/SOL003/VNFLifecycleManagement/definitions/SOL003VNFLifecycleManagement_def.yaml +++ b/src/SOL003/VNFLifecycleManagement/definitions/SOL003VNFLifecycleManagement_def.yaml @@ -177,4 +177,236 @@ definitions: ArrayOfVnfLcmOpOcc: type: array items: - $ref: '#/definitions/VnfLcmOpOcc' \ No newline at end of file + $ref: '#/definitions/VnfLcmOpOcc' + LccnSubscriptionRequest: + description: > + This type represents a subscription request related to notifications + about VNF lifecycle changes. + type: object + required: + - CallbackUri + properties: + filter: + description: > + Filter settings for this subscription, to define the subset of all + notifications this subscription relates to. A particular + notification is sent to the subscriber if the filter matches, or if + there is no filter. + $ref: '#/definitions/LifecycleChangeNotificationsFilter' + CallbackUri: + description: > + The URI of the endpoint to send the notification to. + type: string + format: uri + authentication: + description: > + Authentication parameters to configure the use of Authorization when + sending notifications corresponding to this subscription. + $ref: '#/definitions/SubscriptionAuthentication' + LccnSubscription: + description: > + This type represents a subscription request related to notifications + about VNF lifecycle changes. + type: object + required: + - id + - CallbackUri + - verbosity + - _links + properties: + id: + description: Identifier of this subscription resource. + type: string + format: uuid + filter: + description: > + Filter settings for this subscription, to define the subset of all + notifications this subscription relates to. A particular + notification is sent to the subscriber if the filter matches, or if + there is no filter. + $ref: "#/definitions/LifecycleChangeNotificationsFilter" + CallbackUri: + description: The URI of the endpoint to send the notification to. + type: string + format: uri + _links: + description: Links to resources related to this resource. + type: object + SubscriptionAuthentication: + type: object + properties: + authType: + type: string + enum: + - basic + paramsBasic: + type: object + properties: + userName: + type: string + password: + type: string + LifecycleChangeNotificationsFilter: + type: object + properties: + vnfInstanceSubscriptionFilter: + description: > + Filter criteria to select VNF instances about which to notify. + $ref: "/definitions/VnfInstanceSubscriptionFilter" + notificationTypes: + description: > + Match particular notification types. + + Permitted values: + - VnfLcmOperationOccurrenceNotification + - VnfIdentifierCreationNotification + - VnfIdentifierDeletionNotification + + type: array + items: + type: string + enum: + - VnfLcmOperationOccurrenceNotification + - VnfIdentifierCreationNotification + - VnfIdentifierDeletionNotification + operationTypes: + description: > + Match particular VNF lifecycle operation types for the notification + of type VnfLcmOperationOccurrenceNotification. + May be present if the "notificationTypes" attribute contains the + value "VnfLcmOperationOccurrenceNotification", and shall be absent + otherwise. + type: array + items: + type: string + enum: + - INSTANTIATE + - SCALE + - SCALE_TO_LEVEL + - CHANGE_FLAVOUR + - TERMINATE + - HEAL + - OPERATE + - CHANGE_EXT_CONN + - MODIFY_INFO + - CREATE_SNAPSHOT + - REVERT_TO_SNAPSHOT + - CHANGE_VNFPKG + operationStates: + description: > + Match particular LCM operation state values as reported in + notifications of type VnfLcmOperationOccurrenceNotification. + May be present if the "notificationTypes" attribute contains the + value "VnfLcmOperationOccurrenceNotification", and shall be absent + otherwise. + type: array + items: + type: string + enum: + - STARTING + - PROCESSING + - COMPLETED + - FAILED_TEMP + - FAILED + - ROLLING_BACK + - ROLLED_BACK + VnfInstanceSubscriptionFilter: + description: > + This type represents subscription filter criteria to match VNF + instances. + * NOTE 1: The attributes "vnfdIds" and "vnfProductsFromProviders" are alternatives to reference to VNF instances + that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, + but one alternative should be chosen. + NOTE 2: The attributes "vnfInstanceIds" and "vnfInstanceNames" are alternatives to reference to particular VNF + instances in a filter. They should not be used both in the same filter instance, but one alternative + should be chosen. + type: object + anyOf: + - oneOf: + - required: + - vnfdId + - required: + - vnfProductsFromProviders + - oneOf: + - required: + - vnfInstanceIds + - required: + - vnfInstanceNames + properties: + vnfdIds: + description: > + If present, match VNF instances that were created based on a VNFD + identified by one of the vnfdId values listed in this attribute. + type: array + items: + type: string + vnfProductsFromProviders: + description: > + If present, match VNF instances that belong to VNF products from + certain providers. + type: array + items: + type: object + required: + - vnfProvider + properties: + vnfProvider: + description: > + Name of the VNF provider to match. + type: string + vnfProducts: + description: > + If present, match VNF instances that belong to VNF products + with certain product names, from one particular provider. + type: array + items: + type: object + required: + - vnfProductName + properties: + vnfProductName: + description: > + Name of the VNF product to match. + type: string + versions: + description: > + If present, match VNF instances that belong to VNF + products with certain versions and a certain product + name, from one particular provider. + type: array + items: + type: object + required: + - vnfSoftwareVersion + properties: + vnfSoftwareVersion: + description: > + Software version to match. + type: string + vnfdVersions: + description: > + If present, match VNF instances that belong to VNF + products with certain VNFD versions, a certain + software version and a certain product name, from + one particular provider. + type: array + items: + type: string + vnfInstanceIds: + description: > + If present, match VNF instances with an instance identifier listed + in this attribute. + type: array + items: + type: string + vnfInstanceNames: + description: > + If present, match VNF instances with a VNF Instance Name listed in + this attribute. + type: array + items: + type: string + ArrayOfLccnSubscription: + type: array + items: + $ref: '#/definitions/LccnSubscription'