From 0338b7775687470a8d7641843fc38bd7c6ba53f0 Mon Sep 17 00:00:00 2001 From: Gergely Csatari Date: Mon, 27 Nov 2017 15:25:19 +0100 Subject: [PATCH] VNF Performance Management interface Change-Id: Ie44a72a9e9ded5acf6014dcf8018224149bb7e3c Signed-off-by: Gergely Csatari --- .../VNFLifecycleManagement_def.yaml | 34 +- .../VNFPerformanceManagement.yaml | 814 ++++++++++++++++++ .../VNFPerformanceManagement_def.yaml | 67 ++ .../VNFPerformanceManagementNotification.yaml | 172 ++++ ...OL002SOL003VNFLifecycleManagement_def.yaml | 97 +-- ...002SOL003VNFPerformanceManagement_def.yaml | 517 +++++++++++ src/definitions/SOL002SOL003_def.yaml | 165 ++++ src/responses/SOL002SOL003_resp.yaml | 37 + 8 files changed, 1794 insertions(+), 109 deletions(-) create mode 100644 src/SOL003/VNFPerformanceManagement/VNFPerformanceManagement.yaml create mode 100644 src/SOL003/VNFPerformanceManagement/definitions/VNFPerformanceManagement_def.yaml create mode 100644 src/SOL003/VNFPerformanceManagementNotification/VNFPerformanceManagementNotification.yaml create mode 100644 src/definitions/SOL002SOL003VNFPerformanceManagement_def.yaml diff --git a/src/SOL003/VNFLifecycleManagement/definitions/VNFLifecycleManagement_def.yaml b/src/SOL003/VNFLifecycleManagement/definitions/VNFLifecycleManagement_def.yaml index 5006bc28..6fede611 100644 --- a/src/SOL003/VNFLifecycleManagement/definitions/VNFLifecycleManagement_def.yaml +++ b/src/SOL003/VNFLifecycleManagement/definitions/VNFLifecycleManagement_def.yaml @@ -322,63 +322,63 @@ definitions: properties: self: description: URI of this resource. - $ref: "../../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/Link" + $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link" indicators: description: Indicators related to this VNF instance, if applicable. - $ref: "../../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/Link" + $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link" instantiate: description: > Link to the "instantiate" task resource, if the related operation is possible based on the current status of this VNF instance resource (i.e. VNF instance in NOT_INSTANTIATED state). - $ref: "../../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/Link" + $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link" terminate: description: > Link to the "terminate" task resource, if the related operation is possible based on the current status of this VNF instance resource (i.e. VNF instance is in INSTANTIATED state). - $ref: "../../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/Link" + $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link" scale: description: > Link to the "scale" task resource, if the related operation is supported for this VNF instance, and is possible based on the current status of this VNF instance resource (i.e. VNF instance is in INSTANTIATED state). - $ref: "../../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/Link" + $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link" scaleToLevel: description: > Link to the "scale_to_level" task resource, if the related operation is supported for this VNF instance, and is possible based on the current status of this VNF instance resource (i.e. VNF instance is in INSTANTIATED state). - $ref: "../../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/Link" + $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link" changeFlavour: description: > Link to the "change_flavour" task resource, if the related operation is supported for this VNF instance, and is possible based on the current status of this VNF instance resource (i.e. VNF instance is in INSTANTIATED state). - $ref: "../../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/Link" + $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link" heal: description: > Link to the "heal" task resource, if the related operation is supported for this VNF instance, and is possible based on the current status of this VNF instance resource (i.e. VNF instance is in INSTANTIATED state). - $ref: "../../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/Link" + $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link" operate: description: > Link to the "operate" task resource, if the related operation is supported for this VNF instance, and is possible based on the current status of this VNF instance resource (i.e. VNF instance is in INSTANTIATED state). - $ref: "../../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/Link" + $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link" changeExtConn: description: > Link to the "change_ext_conn" task resource, if the related operation is possible based on the current status of this VNF instance resource (i.e. VNF instance is in INSTANTIATED state). - $ref: "../../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/Link" + $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link" MonitoringParameter: type: object @@ -928,39 +928,39 @@ definitions: self: description: > URI of this resource. - $ref: "../../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/Link" + $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link" vnfInstance: description: > Link to the VNF instance that the operation applies to. - $ref: "../../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/Link" + $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link" grant: description: > Link to the grant for this operation, if one exists. - $ref: "../../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/Link" + $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link" cancel: description: > Link to the task resource that represents the "cancel" operation for this VNF LCM operation occurrence, if cancelling is currently allowed. - $ref: "../../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/Link" + $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link" retry: description: > Link to the task resource that represents the "retry" operation for this VNF LCM operation occurrence, if retrying is currently allowed. - $ref: "../../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/Link" + $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link" rollback: description: > Link to the task resource that represents the "rollback" operation for this VNF LCM operation occurrence, if rolling back is currently allowed. - $ref: "../../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/Link" + $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link" fail: description: > Link to the task resource that represents the "fail" operation for this VNF LCM operation occurrence, if declaring as failed is currently allowed. - $ref: "../../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/Link" + $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link" VnfLinkPort: type: object diff --git a/src/SOL003/VNFPerformanceManagement/VNFPerformanceManagement.yaml b/src/SOL003/VNFPerformanceManagement/VNFPerformanceManagement.yaml new file mode 100644 index 00000000..d84499ff --- /dev/null +++ b/src/SOL003/VNFPerformanceManagement/VNFPerformanceManagement.yaml @@ -0,0 +1,814 @@ +swagger: "2.0" + +info: + version: "2.3.0" + title: SOL003 + license: + name: "ETSI Forge copyright notice" + url: https://forge.etsi.org/etsi-forge-copyright-notice.txt + +basePath: "/vnfpm/v1" + +schemes: + - https + +consumes: + - "application/json" +produces: + - "application/json" + +paths: +############################################################################### +# PM jobs # +############################################################################### + '/pm_jobs': + #SOL003 location: 6.4.2 + post: + description: > + The POST method creates a PM job. + parameters: + - name: CreatePmJobRequest + description: The VNF creation parameters + in: body + required: true + schema: + $ref: "../../definitions/SOL002SOL003VNFPerformanceManagement_def.yaml#/definitions/CreatePmJobRequest" + - name: Accept + description: > + Content-Types that are acceptable for the response. + Reference: IETF RFC 7231 + in: header + required: true + type: string + - name: Content-Type + description: > + The MIME type of the body of the request. + Reference: IETF RFC 7231 + in: header + required: true + type: string + - name: Authorization + description: > + The authorization token for the request. + Reference: IETF RFC 7235 + in: header + required: true + type: string + responses: + 201: + description: > + The PM job was created successfully. The response body shall + contain a representation of the created PM job resource. + The HTTP response shall include a "Location" HTTP header that + points to the created PM job resource. + headers: + Location: + description: The resource URI of the created PM Job + type: string + format: url + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + type: string + maximum: 1 + minimum: 0 + schema: + $ref: "../../definitions/SOL002SOL003VNFPerformanceManagement_def.yaml#/definitions/PmJob" + 400: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400" + 401: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401" + 403: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403" + 405: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405" + 406: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406" + 500: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500" + 503: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503" + get: + description: > + The client can use this method to retrieve information about PM jobs. + parameters: + - name: Accept + description: > + Content-Types that are acceptable for the response. + Reference: IETF RFC 7231 + in: header + required: true + type: string + - name: Authorization + description: > + The authorization token for the request. + Reference: IETF RFC 7235 + in: header + required: true + type: string + - name: Content-Type + description: > + The MIME type of the body of the request. + Reference: IETF RFC 7231 + in: header + required: true + type: string + responses: + 200: + description: > + Information about zero or more PM jobs was queried successfully. + The response body shall contain representations of zero or more PM + jobs. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + type: string + maximum: 1 + minimum: 0 + schema: + type: array + items: + $ref: "../../definitions/SOL002SOL003VNFPerformanceManagement_def.yaml#/definitions/PmJob" + 400: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400-attr-based-filtering-error" + 401: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401" + 403: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403" + 405: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405" + 406: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406" + 500: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500" + 503: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503" +############################################################################### +# Individual PM job # +############################################################################### + '/pm_jobs/{pmJobId}': + #SOL003 location: 6.4.3 + parameters: + - name: pmJobId + description: > + Identifier of the PM job. + This identifier can be retrieved from the resource referenced by the + "Location" HTTP header in the response to a POST request creating a + new PM job resource. It can also be retrieved from the "id" + attribute in the payload body of that response. + in: path + type: string + required: true + get: + description: > + The client can use this method for reading an individual PM job. + parameters: + - name: Accept + description: > + Content-Types that are acceptable for the response. + Reference: IETF RFC 7231 + in: header + required: true + type: string + - name: Authorization + description: > + The authorization token for the request. + Reference: IETF RFC 7235 + in: header + required: true + type: string + responses: + 200: + description: > + Information about an individual PM job was queried successfully. + The response body shall contain a representation of the PM job + resource. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + type: string + maximum: 1 + minimum: 0 + schema: + $ref: "../../definitions/SOL002SOL003VNFPerformanceManagement_def.yaml#/definitions/PmJob" + 400: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400" + 401: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401" + 403: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403" + 405: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405" + 406: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406" + 500: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500" + 503: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503" + delete: + description: > + This method terminates an individual PM job. + parameters: + - name: Authorization + description: > + The authorization token for the request. + Reference: IETF RFC 7235 + in: header + required: true + type: string + responses: + 204: + description: > + The PM job was deleted successfully. + The response body shall be empty. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + type: string + maximum: 1 + minimum: 0 + 400: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400" + 401: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401" + 403: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403" + 405: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405" + 406: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406" + 500: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500" + 503: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503" +############################################################################### +# Individual performance report # +############################################################################### + '/pm_jobs/{pmJobId}/reports/{reportId}': + #SOL003 location: 6.4.4 + parameters: + - name: pmJobId + description: > + Identifier of the PM job. + in: path + type: string + required: true + - name: reportId + description: > + Identifier of the performance report. + in: path + type: string + required: true + get: + description: > + The client can use this method for reading an individual performance + report. + parameters: + - name: Accept + description: > + Content-Types that are acceptable for the response. + Reference: IETF RFC 7231 + in: header + required: true + type: string + - name: Authorization + description: > + The authorization token for the request. + Reference: IETF RFC 7235 + in: header + required: true + type: string + responses: + 200: + description: > + Information of an individual performance report was read + successfully. + The response body shall contain a representation of the + performance report resource. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + type: string + maximum: 1 + minimum: 0 + schema: + $ref: "definitions/VNFPerformanceManagement_def.yaml#/definitions/PerformanceReport" + 400: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400" + 401: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401" + 403: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403" + 405: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405" + 406: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406" + 500: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500" + 503: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503" +############################################################################### +# Thresholds # +############################################################################### + '/thresholds': + #SOL003 location: 6.4.5 + post: + description: > + The POST method can be used by the client to create a threshold. + parameters: + - name: CreateThresholdRequest + description: > + Request parameters to create a threshold resource. + in: body + required: true + schema: + $ref: "../../definitions/SOL002SOL003VNFPerformanceManagement_def.yaml#/definitions/CreateThresholdRequest" + - name: Accept + description: > + Content-Types that are acceptable for the response. + Reference: IETF RFC 7231 + in: header + required: true + type: string + - name: Authorization + description: > + The authorization token for the request. + Reference: IETF RFC 7235 + in: header + required: true + type: string + - name: Content-Type + description: > + The MIME type of the body of the request. + Reference: IETF RFC 7231 + in: header + required: true + type: string + responses: + 201: + description: > + A threshold was created successfully. The response body shall + contain a representation of the created threshold resource. + The HTTP response shall include a "Location" HTTP header that + contains the resource URI of the created threshold resource. + headers: + Location: + description: The resource URI of the created VNF instance + type: string + format: url + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + type: string + maximum: 1 + minimum: 0 + schema: + $ref: "../../definitions/SOL002SOL003VNFPerformanceManagement_def.yaml#/definitions/Threshold" + 400: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400" + 401: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401" + 403: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403" + 405: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405" + 406: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406" + 500: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500" + 503: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503" + get: + description: > + The client can use this method to query information about thresholds. + parameters: + - name: Accept + description: > + Content-Types that are acceptable for the response. + Reference: IETF RFC 7231 + in: header + required: true + type: string + - name: Authorization + description: > + The authorization token for the request. + Reference: IETF RFC 7235 + in: header + required: true + type: string + responses: + 200: + description: > + Information about zero or more thresholds was queried + successfully. + The response body shall contain representations of zero + or more thresholds. + headers: + Location: + description: The resource URI of the created VNF instance + type: string + format: url + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + type: string + maximum: 1 + minimum: 0 + schema: + type: array + items: + $ref: "../../definitions/SOL002SOL003VNFPerformanceManagement_def.yaml#/definitions/Threshold" + 400: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400-attr-based-filtering-error" + 401: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401" + 403: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403" + 405: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405" + 406: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406" + 500: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500" + 503: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503" +############################################################################### +# Individual threshold # +############################################################################### + '/thresholds/{thresholdId}': + #SOL003 location: 6.4.6 + parameters: + - name: thresholdId + description: > + Identifier of the threshold. + This identifier can be retrieved from the resource referenced by the + "Location" HTTP header in the response to a POST request creating a + new threshold resource. It can also be retrieved from the "id" + attribute in the payload body of that response. + in: path + type: string + required: true + get: + description: > + The client can use this method for reading an individual threshold. + parameters: + - name: Accept + description: > + Content-Types that are acceptable for the response. + Reference: IETF RFC 7231 + in: header + required: true + type: string + - name: Authorization + description: > + The authorization token for the request. + Reference: IETF RFC 7235 + in: header + required: true + type: string + responses: + 200: + description: > + Information about an individual threshold was queried + successfully. The response body shall contain a + representation of the threshold. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + type: string + maximum: 1 + minimum: 0 + schema: + $ref: "../../definitions/SOL002SOL003VNFPerformanceManagement_def.yaml#/definitions/Threshold" + 400: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400" + 401: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401" + 403: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403" + 405: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405" + 406: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406" + 500: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500" + 503: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503" + delete: + description: > + This method allows to delete a threshold. + parameters: + - name: Accept + description: > + Content-Types that are acceptable for the response. + Reference: IETF RFC 7231 + in: header + required: true + type: string + - name: Authorization + description: > + The authorization token for the request. + Reference: IETF RFC 7235 + in: header + required: true + type: string + responses: + 204: + description: > + The threshold was deleted successfully. + The response body shall be empty. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + type: string + maximum: 1 + minimum: 0 + 400: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400" + 401: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401" + 403: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403" + 405: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405" + 406: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406" + 500: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500" + 503: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503" +############################################################################### +# Subscriptions # +############################################################################### + '/subscriptions': + #SOL003 location: 6.4.7 + post: + description: > + The POST method creates a new subscription. + parameters: + - name: PmSubscriptionRequest + description: > + Details of the subscription to be created. + in: body + required: true + schema: + $ref: "../../definitions/SOL002SOL003VNFPerformanceManagement_def.yaml#/definitions/PmSubscriptionRequest" + - name: Accept + description: > + Content-Types that are acceptable for the response. + Reference: IETF RFC 7231 + in: header + required: true + type: string + - name: Authorization + description: > + The authorization token for the request. + Reference: IETF RFC 7235 + in: header + required: true + type: string + - name: Content-Type + description: > + The MIME type of the body of the request. + Reference: IETF RFC 7231 + in: header + required: true + type: string + responses: + 201: + description: > + The subscription was created successfully. A representation of the + created subscription resource shall be returned in the response + body. + The HTTP response shall include a "Location" HTTP header that + contains the resource URI of the created subscription resource. + headers: + Location: + description: The resource URI of the created VNF instance + type: string + format: url + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + type: string + maximum: 1 + minimum: 0 + schema: + $ref: "../../definitions/SOL002SOL003VNFPerformanceManagement_def.yaml#/definitions/PmSubscription" + 400: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400" + 401: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401" + 403: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403" + 405: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405" + 406: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406" + 500: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500" + 503: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503" + get: + description: > + The client can use this method to query the list of active + subscriptions to Performance management notifications subscribed by + the client. + parameters: + - name: Accept + description: > + Content-Types that are acceptable for the response. + Reference: IETF RFC 7231 + in: header + required: true + type: string + - name: Authorization + description: > + The authorization token for the request. + Reference: IETF RFC 7235 + in: header + required: true + type: string + responses: + 200: + description: > + The list of subscriptions was queried successfully. + The response body shall contain the representations of all active + subscriptions of the functional block that invokes the method. + headers: + Content-Type: + description: > + The MIME type of the body of the request. + Reference: IETF RFC 7231 + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + type: string + maximum: 1 + minimum: 0 + schema: + type: array + items: + $ref: "../../definitions/SOL002SOL003VNFPerformanceManagement_def.yaml#/definitions/PmSubscription" + 400: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400-attr-based-filtering-error" + 401: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401" + 403: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403" + 405: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405" + 406: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406" + 500: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500" + 503: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503" +############################################################################### +# Individual subscription # +############################################################################### + '/subscriptions/{subscriptionId}': + #SOL003 location: 6.4.8 + parameters: + - name: subscriptionId + description: > + This identifier can be retrieved from the resource referenced by the + "Location" HTTP header in the response to a POST request creating a + new subscription resource. It can also be retrieved from the "id" + attribute in the payload body of that response. + in: path + type: string + required: true + get: + description: > + The client can use this method for reading an individual subscription + about Performance management notifications subscribed by the client. + parameters: + - name: Accept + description: > + Content-Types that are acceptable for the response. + Reference: IETF RFC 7231 + in: header + required: true + type: string + - name: Authorization + description: > + The authorization token for the request. + Reference: IETF RFC 7235 + in: header + required: true + type: string + responses: + 200: + description: > + The subscription was read successfully. The response body shall + contain a representation of the subscription resource. + headers: + Content-Type: + description: > + The MIME type of the body of the request. + Reference: IETF RFC 7231 + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + type: string + maximum: 1 + minimum: 0 + schema: + $ref: "../../definitions/SOL002SOL003VNFPerformanceManagement_def.yaml#/definitions/PmSubscription" + 400: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400" + 401: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401" + 403: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403" + 405: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405" + 406: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406" + 500: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500" + 503: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503" + delete: + description: > + This method terminates an individual subscription. + parameters: + - name: Accept + description: > + Content-Types that are acceptable for the response. + Reference: IETF RFC 7231 + in: header + required: true + type: string + - name: Authorization + description: > + The authorization token for the request. + Reference: IETF RFC 7235 + in: header + required: true + type: string + responses: + 204: + description: > + The subscription resource was deleted successfully. + The response body shall be empty. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + type: string + maximum: 1 + minimum: 0 + 400: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400" + 401: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401" + 403: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403" + 405: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405" + 406: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406" + 500: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500" + 503: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503" diff --git a/src/SOL003/VNFPerformanceManagement/definitions/VNFPerformanceManagement_def.yaml b/src/SOL003/VNFPerformanceManagement/definitions/VNFPerformanceManagement_def.yaml new file mode 100644 index 00000000..b95437d6 --- /dev/null +++ b/src/SOL003/VNFPerformanceManagement/definitions/VNFPerformanceManagement_def.yaml @@ -0,0 +1,67 @@ +# Copyright (c) ETSI 2017. +# https://forge.etsi.org/etsi-forge-copyright-notice.txt + +definitions: + PerformanceReport: + description: > + This type defines the format of a performance report provided by the + VNFM to the NFVO as a result of collecting performance information as + part of a PM job. + type: object + properties: + entries: + description: > + List of performance information entries. Each performance report + entry is for a given metric of a given object (i.e. VNF instance), + but can include multiple collected values. + type: array + items: + type: object + required: + - objectType + - objectInstanceId + - performanceMetric + - performanceValue + properties: + objectType: + description: > + Defines the object type for which performance information is + reported (i.e. VNF type). The string value shall be set to the + vnfdId of the VNF instance to which the performance + information relates. + type: string + objectInstanceId: + description: > + The object instance for which the performance metric is + reported. + The object instances for this information element will be VNF + instances. + $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Identifier" + performanceMetric: + description: > + Name of the metric collected. + type: string + performanceValue: + description: > + List of performance values with associated timestamp. + type: array + items: + type: object + required: + - timeStamp + - performanceValue + properties: + timeStamp: + description: > + Time stamp indicating when the data was collected. + $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/DateTime" + performanceValue: + description: > + Value of the metric collected. + The type of the "performanceValue" attribute + (i.e. scalar, structure (Object in JSON), or array + (of scalars, arrays or structures / Objects)) is assumed + to be defined in an external measurement specification + outside the scope of the present document. + type: object + diff --git a/src/SOL003/VNFPerformanceManagementNotification/VNFPerformanceManagementNotification.yaml b/src/SOL003/VNFPerformanceManagementNotification/VNFPerformanceManagementNotification.yaml new file mode 100644 index 00000000..7dec5996 --- /dev/null +++ b/src/SOL003/VNFPerformanceManagementNotification/VNFPerformanceManagementNotification.yaml @@ -0,0 +1,172 @@ +swagger: "2.0" + +info: + version: "2.3.0" + title: SOL003 - VNF Lifecycle Management Notification interface + license: + name: "ETSI Forge copyright notice" + url: https://forge.etsi.org/etsi-forge-copyright-notice.txt + contact: + name: "NFV-SOL WG" + +basePath: "/callback/v1" + +schemes: + - https + +consumes: + - "application/json" +produces: + - "application/json" + +paths: +############################################################################### +# Notification endpoint PerformanceInformationAvailableNotification # +############################################################################### + '/URI-is-provided-by-the-client-when-creating-the-subscription-PerformanceInformationAvailableNotification': + #SOL003 location: 6.4.9 + post: + description: > + The POST method delivers a notification regarding a performance + management event from the server to the client. + parameters: + - name: PerformanceInformationAvailableNotification + description: > + Notification about performance information availability. + in: body + required: true + schema: + $ref: "../../definitions/SOL002SOL003VNFPerformanceManagement_def.yaml#/definitions/PerformanceInformationAvailableNotification" + responses: + 204: + description: > + The notification was delivered successfully. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + type: string + maximum: 1 + minimum: 0 + 400: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400" + 401: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401" + 403: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403" + 405: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405" + 406: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406" + 500: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500" + 503: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503" + get: + description: > + The GET method allows the server to test the notification endpoint + that is provided by the client, e.g. during subscription. + responses: + 204: + description: > + The notification endpoint was tested successfully. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + type: string + maximum: 1 + minimum: 0 + 400: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400" + 401: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401" + 403: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403" + 405: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405" + 406: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406" + 500: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500" + 503: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503" +############################################################################### +# Notification endpoint ThresholdCrossedNotification # +############################################################################### + '/URI-is-provided-by-the-client-when-creating-the-subscription-ThresholdCrossedNotification': + #SOL003 location: 6.4.9 + post: + description: > + The POST method delivers a notification regarding a performance + management event from the server to the client. + parameters: + - name: ThresholdCrossedNotification + description: > + Notification about performance information availability. + in: body + required: true + schema: + $ref: "../../definitions/SOL002SOL003VNFPerformanceManagement_def.yaml#/definitions/ThresholdCrossedNotification" + responses: + 204: + description: > + The notification was delivered successfully. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + type: string + maximum: 1 + minimum: 0 + 400: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400" + 401: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401" + 403: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403" + 405: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405" + 406: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406" + 500: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500" + 503: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503" + get: + description: > + The GET method allows the server to test the notification endpoint + that is provided by the client, e.g. during subscription. + responses: + 204: + description: > + The notification endpoint was tested successfully. + headers: + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + type: string + maximum: 1 + minimum: 0 + 400: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400" + 401: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401" + 403: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403" + 405: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405" + 406: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406" + 500: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500" + 503: + $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503" diff --git a/src/definitions/SOL002SOL003VNFLifecycleManagement_def.yaml b/src/definitions/SOL002SOL003VNFLifecycleManagement_def.yaml index 686388e8..f1878db6 100644 --- a/src/definitions/SOL002SOL003VNFLifecycleManagement_def.yaml +++ b/src/definitions/SOL002SOL003VNFLifecycleManagement_def.yaml @@ -378,17 +378,17 @@ definitions: description: > Link to the resource representing the VNF instance to which the notified change applies. - $ref: "#/definitions/Link" + $ref: "SOL002SOL003_def.yaml#/definitions/Link" subscription: description: > Link to the related subscription. - $ref: "#/definitions/Link" + $ref: "SOL002SOL003_def.yaml#/definitions/Link" vnfLcmOpOcc: description: > Link to the VNF lifecycle management operation occurrence that this notification is related to. Shall be present if there is a related lifecycle operation occurrence. - $ref: "#/definitions/Link" + $ref: "SOL002SOL003_def.yaml#/definitions/Link" LccnSubscription: description: > @@ -453,7 +453,7 @@ definitions: in clause 4.5.3.4. This attribute shall only be present if the subscriber requires authorization of notifications. - $ref: "#/definitions/SubscriptionAuthentication" + $ref: "SOL002SOL003_def.yaml#/definitions/SubscriptionAuthentication" LcmOperationStateType: description: > @@ -516,7 +516,7 @@ definitions: vnfInstanceSubscriptionFilter: description: > Filter criteria to select VNF instances about which to notify. - $ref: "#/definitions/VnfInstanceSubscriptionFilter" + $ref: "SOL002SOL003_def.yaml#/definitions/VnfInstanceSubscriptionFilter" notificationTypes: description: > Match particular notification types. @@ -553,19 +553,6 @@ definitions: items: $ref: "#/definitions/LcmOperationStateType" - Link: - description: > - This type represents a link to a resource. - type: object - required: - - href - properties: - href: - description: > - URI of the referenced resource. - type: string - format: url - ResourceHandle: required: - vimConnectionId @@ -703,80 +690,6 @@ definitions: A Version. type: string - SubscriptionAuthentication: - type: object - required: - - authType - properties: - authType: - description: > - Defines the type of Authentication / Authorization to use when - sending a notification. - Permitted values: - * BASIC: In every POST request that sends a notification, use - HTTP Basic authentication with the client credentials. - * OAUTH2_CLIENT_CREDENTIALS: In every POST request that sends a - notification, use an OAuth 2.0 Bearer token, obtained using the - client credentials grant type. - type: string - enum: - - BASIC - - OAUTH2_CLIENT_CREDENTIALS - paramsBasic: - description: > - Parameters for authentication/authorization using BASIC. - Shall be present if authType is "BASIC" and the contained - information has not been provisioned out of band. - Shall be absent otherwise. - type: object - properties: - userName: - description: > - Username to be used in HTTP Basic authentication. Shall be - present if it has not been provisioned out of band. - type: string - password: - description: > - Password to be used in HTTP Basic authentication. Shall be - present if it has not been provisioned out of band. - type: string - paramsOauth2ClientCredentials: - description: > - Parameters for authentication/authorization using - OAUTH2_CLIENT_CREDENTIALS. - Shall be present if authType is "OAUTH2_CLIENT_CREDENTIALS" and the - contained information has not been provisioned out of band. - Shall be absent otherwise. - type: object - properties: - clientId: - description: > - Client identifier to be used in the access token request of the - OAuth 2.0 client credentials grant type. - Shall be present if it has not been provisioned out of band. - The clientId and clientPassword passed in a subscription shall - not be the same as the clientId and clientPassword that are used - to obtain authorization for API requests. Client credentials may - differ between subscriptions. The value of clientPassword should - be generated by a random process. - type: string - clientPassword: - description: > - Client password to be used in the access token request of the - OAuth 2.0 client credentials grant type. - Shall be present if it has not been provisioned out of band. - The clientId and clientPassword passed in a subscription shall - not be the same as the clientId and clientPassword that are used - to obtain authorization for API requests. Client credentials may - differ between subscriptions. The value of clientPassword should - be generated by a random process. - type: string - tokenEndpoint: - description: > - The token endpoint from which the access token can be obtained. - Shall be present if it has not been provisioned out of band. - $ref: "#/definitions/Version" - VimConnectionInfo: type: object required: diff --git a/src/definitions/SOL002SOL003VNFPerformanceManagement_def.yaml b/src/definitions/SOL002SOL003VNFPerformanceManagement_def.yaml new file mode 100644 index 00000000..96480305 --- /dev/null +++ b/src/definitions/SOL002SOL003VNFPerformanceManagement_def.yaml @@ -0,0 +1,517 @@ +# Copyright (c) ETSI 2017. +# https://forge.etsi.org/etsi-forge-copyright-notice.txt + +definitions: + CreateThresholdRequest: + description: > + This type represents a request to create a threshold. + type: object + required: + - objectInstanceId + - criteria + properties: + objectInstanceId: + description: > + Identifier of the VNF instance associated with this threshold. + $ref: "SOL002SOL003_def.yaml#/definitions/Identifier" + criteria: + description: > + Criteria that define this threshold. + $ref: "#/definitions/ThresholdCriteria" + + CreatePmJobRequest: + description: > + This type represents a request to create a PM job. + type: object + required: + - criteria + properties: + objectInstanceIds: + description: > + Identifiers of the VNF instances for which performance information + is requested to be collected. + type: array + items: + $ref: "SOL002SOL003_def.yaml#/definitions/Identifier" + criteria: + description: > + Criteria of the collection of performance information. + $ref: "#/definitions/PmJobCriteria" + + CrossingDirectionType: + type: string + enum: + - UP + - DOWN + + PerformanceInformationAvailableNotification: + description: > + This notification informs the receiver that performance information is + available. + The timing of sending this notification is determined by the capability + of the producing entity to evaluate the threshold crossing condition. + type: object + required: + - id + - notificationType + - subscriptionId + - timeStamp + - objectInstanceId + - _links + properties: + id: + description: > + Identifier of this notification. If a notification is sent multiple + times due to multiple subscriptions, the "id" attribute of all these + notifications shall have the same value. + $ref: "SOL002SOL003_def.yaml#/definitions/Identifier" + notificationType: + description: > + Discriminator for the different notification types. Shall be set to + "PerformanceInformationAvailableNotification" for this notification + type. + type: string + enum: + - PerformanceInformationAvailableNotification + subscriptionId: + description: > + Identifier of the subscription that this notification relates to. + $ref: "SOL002SOL003_def.yaml#/definitions/Identifier" + timeStamp: + description: > + Date and time of the generation of the notification. + $ref: "SOL002SOL003_def.yaml#/definitions/DateTime" + objectInstanceId: + description: > + Identifier that identifies a VNF instance. + $ref: "SOL002SOL003_def.yaml#/definitions/Identifier" + _links: + description: > + Links to resources related to this notification. + type: object + required: + - subscription + - pmJob + - performanceReport + properties: + subscription: + description: > + Link to the related subscription. + $ref: "SOL002SOL003_def.yaml#/definitions/Link" + objectInstance: + description: > + Link to the resource representing the VNF instance to which the + notified change applies. Shall be present if the VNF instance + information is accessible as a resource. + $ref: "SOL002SOL003_def.yaml#/definitions/Link" + pmJob: + description: > + Link to the resource that represents the PM job for which + performance information is available. + $ref: "SOL002SOL003_def.yaml#/definitions/Link" + performanceReport: + description: > + Link from which the available performance information of data + type "PerformanceReport" can be obtained. This link should point + to an "Individual performance report" resource. + $ref: "SOL002SOL003_def.yaml#/definitions/Link" + + PmJob: + description: > + This type represents a PM job. + type: object + required: + - id + - objectInstanceIds + - criteria + properties: + id: + description: > + Identifier of this PM job. + $ref: "SOL002SOL003_def.yaml#/definitions/Identifier" + objectInstanceIds: + description: > + Identifiers of the VNF instances for which performance information + is collected. + type: array + items: + $ref: "SOL002SOL003_def.yaml#/definitions/Identifier" + criteria: + description: > + Criteria of the collection of performance information. + $ref: "#/definitions/PmJobCriteria" + reports: + description: > + Information about available reports collected by this PM job. + type: object + required: + - href + - readyTime + - _links + properties: + href: + description: > + The Uri where the report can be obtained. + type: string + format: url + readyTime: + description: > + The time when the report was made available. + $ref: "SOL002SOL003_def.yaml#/definitions/DateTime" + expiryTime: + description: > + The time when the report will expire. + $ref: "SOL002SOL003_def.yaml#/definitions/DateTime" + fileSize: + description: > + The size of the report file in bytes, if known. + type: integer + # TODO: How to express unsigned int? + _links: + description: > + Links for this resource. + type: object + required: + - self + properties: + self: + description: > + URI of this resource. + $ref: "SOL002SOL003_def.yaml#/definitions/Link" + objects: + description: > + Links to resources representing the VNF instances for which + performance information is collected. Shall be present if + the VNF instance information is accessible as a resource. + type: array + items: + $ref: "SOL002SOL003_def.yaml#/definitions/Link" + + PmJobCriteria: + description: > + Criteria of the collection of performance information. + type: object + required: + - collectionPeriod + - reportingPeriod + properties: + performanceMetric: + description: > + This defines the types of performance metrics for the specified + object instances. At least one of the two attributes + (performance metric or group) shall be present. + type: array + items: + type: string + performanceMetricGroup: + description: > + Group of performance metrics. A metric group is a pre-defined list + of metrics, known to the producer that it can decompose to + individual metrics. + At least one of the two attributes (performance metric or group) + shall be present. + type: array + items: + type: string + collectionPeriod: + description: > + Specifies the periodicity at which the producer will collect + performance information. The unit shall be seconds. + At the end of each reportingPeriod, the producer will inform the + consumer about availability of the performance data collected for + each completed collection period during this reportingPeriod. The + reportingPeriod should be equal to or a multiple of the + collectionPeriod. In the latter case, the performance data for the + collection periods within one reporting period are reported + together. + type: integer + # TODO: How to express unsigned int? + reportingPeriod: + description: > + Specifies the periodicity at which the producer will report to the + consumer. about performance information. The unit shall be seconds. + At the end of each reportingPeriod, the producer will inform the + consumer about availability of the performance data collected for + each completed collection period during this reportingPeriod. The + reportingPeriod should be equal to or a multiple of the + collectionPeriod. In the latter case, the performance data for the + collection periods within one reporting period are reported + together. + type: integer + # TODO: How to express unsigned int? + reportingBoundary: + description: > + Identifies a time boundary after which the reporting will stop. + The boundary shall allow a single reporting as well as periodic + reporting up to the boundary. + $ref: "SOL002SOL003_def.yaml#/definitions/DateTime" + + PmNotificationsFilter: + description: > + This type represents a filter that can be used to subscribe for + notifications related to performance management events. + type: object + properties: + vnfInstanceSubscriptionFilter: + description: > + Filter criteria to select VNF instances about which to notify. + $ref: "SOL002SOL003_def.yaml#/definitions/VnfInstanceSubscriptionFilter" + notificationTypes: + description: > + Match particular notification types. + Permitted values: + * ThresholdCrossedNotification + * PerformanceInformationAvailableNotification + The permitted values of the "notificationTypes" attribute are + spelled exactly as the names of the notification types to facilitate + automated code generation systems. + type: string + enum: + - ThresholdCrossedNotification + - PerformanceInformationAvailableNotification + + PmSubscription: + description: > + This type represents a subscription. + type: object + required: + - id + - callbackUri + - _links + properties: + id: + description: > + Identifier that identifies the subscription. + $ref: "SOL002SOL003_def.yaml#/definitions/Identifier" + 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/PmNotificationsFilter" + callbackUri: + description: > + The URI of the endpoint to send the notification to. + type: string + format: url + _links: + description: > + Links to resources related to this resource. + type: object + required: + - self + properties: + self: + description: > + URI of this resource. + $ref: "SOL002SOL003_def.yaml#/definitions/Link" + + PmSubscriptionRequest: + description: > + This type represents a subscription request. + 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/PmNotificationsFilter" + callbackUri: + description: > + The URI of the endpoint to send the notification to. + type: string + format: url + authentication: + description: > + Authentication parameters to configure the use of Authorization when + sending notifications corresponding to this subscription. + This attribute shall only be present if the subscriber requires + authorization of notifications. + $ref: "SOL002SOL003_def.yaml#/definitions/SubscriptionAuthentication" + + Threshold: + description: > + This type represents a threshold. + type: object + required: + - id + - objectInstanceId + - criteria + - _links + properties: + id: + description: > + Identifier of this threshold resource. + $ref: "SOL002SOL003_def.yaml#/definitions/Identifier" + objectInstanceId: + description: > + Identifier of the VNF instance associated with the threshold. + $ref: "SOL002SOL003_def.yaml#/definitions/Identifier" + criteria: + description: > + Criteria that define this threshold. + $ref: "#/definitions/ThresholdCriteria" + _links: + description: > + Links for this resource. + type: object + required: + - self + properties: + self: + description: > + URI of this resource. + $ref: "SOL002SOL003_def.yaml#/definitions/Link" + object: + description: > + Link to a resource representing the VNF instance for which + performance information is collected. Shall be present if the + VNF instance information is accessible as a resource. + + ThresholdCriteria: + description: > + This type represents criteria that define a threshold. + type: object + required: + - performanceMetric + - thresholdType + properties: + performanceMetric: + description: > + Defines the performance metric associated with the threshold. + type: string + thresholdType: + description: > + Type of threshold. This attribute determines which other attributes + are present in the data structure. + Permitted values: + * SIMPLE: Single-valued static threshold + In the present document, simple thresholds are defined. The + definition of additional threshold types is left for future + specification. + type: string + enum: + - SIMPLE + simpleThresholdDetails: + description: > + Details of a simple threshold. Shall be present if + thresholdType="SIMPLE". + type: object + required: + - thresholdValue + - hysteresis + properties: + thresholdValue: + description: > + The threshold value. Shall be represented as a floating point + number. + # TODO: This should be floating. + type: integer + hysteresis: + description: > + The hysteresis of the threshold. Shall be represented as a + non-negative floating point number. + A notification with crossing direction "UP" will be generated if + the measured value reaches or exceeds + "thresholdValue" + "hysteresis". A notification with crossing + direction "DOWN" will be generated if the measured value reaches + or undercuts "thresholdValue" - "hysteresis". + The hysteresis is defined to prevent storms of threshold + crossing notifications. When processing a request to create a + threshold, implementations should enforce a suitable minimum + value for this attribute (e.g. override the value or reject the + request). + # TODO: This should be floating. + type: integer + + ThresholdCrossedNotification: + description: > + This type represents a notification that is sent when a threshold has + been crossed. + type: object + required: + - id + - notificationType + - subscriptionId + - timeStamp + - thresholdId + - crossingDirection + - objectInstanceId + - performanceMetric + - performanceValue + - _links + properties: + id: + description: > + Identifier of this notification. If a notification is sent multiple + times due to multiple subscriptions, the "id" attribute of all these + notifications shall have the same value. + $ref: "SOL002SOL003_def.yaml#/definitions/Identifier" + notificationType: + description: > + Discriminator for the different notification types. Shall be set to + "ThresholdCrossedNotification" for this notification type. + type: string + enum: + - ThresholdCrossedNotification + subscriptionId: + description: > + Identifier of the subscription that this notification relates to. + $ref: "SOL002SOL003_def.yaml#/definitions/Identifier" + timeStamp: + description: > + Date and time of the generation of the notification. + $ref: "SOL002SOL003_def.yaml#/definitions/DateTime" + thresholdId: + description: > + Identifier of the threshold which has been crossed. + $ref: "SOL002SOL003_def.yaml#/definitions/Identifier" + crossingDirection: + description: > + An indication of whether the threshold was crossed in upward or + downward direction. + $ref: "#/definitions/CrossingDirectionType" + objectInstanceId: + description: > + Identifier that identifies a VNF instance. + $ref: "SOL002SOL003_def.yaml#/definitions/Identifier" + performanceMetric: + description: > + Performance metric associated with the threshold. + type: string + performanceValue: + description: > + Value of the metric that resulted in threshold crossing. + The type of the "performanceValue" attribute (i.e. scalar, + structure (Object in JSON), or array (of scalars, arrays or + structures / Objects)) is assumed to be defined in an external + measurement specification outside the scope of the present document. + type: object + _links: + description: > + Links to resources related to this notification. + type: object + required: + - subscription + - threshold + properties: + subscription: + description: > + Link to the related subscription. + $ref: "SOL002SOL003_def.yaml#/definitions/Link" + objectInstance: + description: > + Link to the resource representing the VNF instance to which the + notified change applies. Shall be present if the VNF instance + information is accessible as a resource. + $ref: "SOL002SOL003_def.yaml#/definitions/Link" + threshold: + description: > + Link to the resource that represents the threshold that was + crossed. + $ref: "SOL002SOL003_def.yaml#/definitions/Link" diff --git a/src/definitions/SOL002SOL003_def.yaml b/src/definitions/SOL002SOL003_def.yaml index c99c0f87..8eda33a3 100644 --- a/src/definitions/SOL002SOL003_def.yaml +++ b/src/definitions/SOL002SOL003_def.yaml @@ -65,6 +65,19 @@ definitions: defined in clause 4 of IETF RFC 7159. type: object + Link: + description: > + This type represents a link to a resource. + type: object + required: + - href + properties: + href: + description: > + URI of the referenced resource. + type: string + format: url + ProblemDetails: #SOL003 location: 4.3.5.3 description: > @@ -124,7 +137,159 @@ definitions: format: URI #TODO: How to express "any additional attributes"? + SubscriptionAuthentication: + type: object + required: + - authType + properties: + authType: + description: > + Defines the type of Authentication / Authorization to use when + sending a notification. + Permitted values: + * BASIC: In every POST request that sends a notification, use + HTTP Basic authentication with the client credentials. + * OAUTH2_CLIENT_CREDENTIALS: In every POST request that sends a + notification, use an OAuth 2.0 Bearer token, obtained using the + client credentials grant type. + type: string + enum: + - BASIC + - OAUTH2_CLIENT_CREDENTIALS + paramsBasic: + description: > + Parameters for authentication/authorization using BASIC. + Shall be present if authType is "BASIC" and the contained + information has not been provisioned out of band. + Shall be absent otherwise. + type: object + properties: + userName: + description: > + Username to be used in HTTP Basic authentication. Shall be + present if it has not been provisioned out of band. + type: string + password: + description: > + Password to be used in HTTP Basic authentication. Shall be + present if it has not been provisioned out of band. + type: string + paramsOauth2ClientCredentials: + description: > + Parameters for authentication/authorization using + OAUTH2_CLIENT_CREDENTIALS. + Shall be present if authType is "OAUTH2_CLIENT_CREDENTIALS" and the + contained information has not been provisioned out of band. + Shall be absent otherwise. + type: object + properties: + clientId: + description: > + Client identifier to be used in the access token request of the + OAuth 2.0 client credentials grant type. + Shall be present if it has not been provisioned out of band. + The clientId and clientPassword passed in a subscription shall + not be the same as the clientId and clientPassword that are used + to obtain authorization for API requests. Client credentials may + differ between subscriptions. The value of clientPassword should + be generated by a random process. + type: string + clientPassword: + description: > + Client password to be used in the access token request of the + OAuth 2.0 client credentials grant type. + Shall be present if it has not been provisioned out of band. + The clientId and clientPassword passed in a subscription shall + not be the same as the clientId and clientPassword that are used + to obtain authorization for API requests. Client credentials may + differ between subscriptions. The value of clientPassword should + be generated by a random process. + type: string + tokenEndpoint: + description: > + The token endpoint from which the access token can be obtained. + Shall be present if it has not been provisioned out of band. + $ref: "#/definitions/Uri" + Uri: description: > String formatted according to IETF RFC 3986. type: string + + VnfInstanceSubscriptionFilter: + description: > + This type represents subscription filter criteria to match VNF + instances. + type: object + 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. + 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. + type: array + items: + $ref: "#/definitions/Identifier" + vnfProductsFromProviders: + description: > + If present, match VNF instances that belong to VNF products from + certain providers. + 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. + 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: + - vnfSoftwareVersions + properties: + vnfSoftwareVersions: + description: > + Software version to match. + $ref: "#/definitions/Version" + 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: + $ref: "#/definitions/Version" + Version: + description: > + A Version. + type: string diff --git a/src/responses/SOL002SOL003_resp.yaml b/src/responses/SOL002SOL003_resp.yaml index 3567ce9b..92a3b3cb 100644 --- a/src/responses/SOL002SOL003_resp.yaml +++ b/src/responses/SOL002SOL003_resp.yaml @@ -57,6 +57,43 @@ responses: minimum: 0 schema: $ref: "/../definitions/SOL002SOL003_def.yaml#/definitions/ProblemDetails" + 400-attr-based-filtering-error: + description: > + Invalid attribute-based filtering parameters or Invalid attribute + selector. + It fhe request is malformed or syntactically incorrect (e.g. if the + request URI contains incorrect query parameters or a syntactically + incorrect payload body), the API producer shall respond with this + response code. The "ProblemDetails" structure shall be provided, + and should include in the "detail" attribute more information about + the source of the problem. + If the request contains a malformed access token, the API producer + should respond with this response. The details of the error shall + be returned in the WWW-Authenticate HTTP header, as defined in + IETF RFC 6750 [11] and IETF RFC 7235 [16]. The ProblemDetails + structure may be provided. + If there is an application error related to the client's input that + cannot be easily mapped to any other HTTP response code ("catch all + error"), the API producer shall respond with this response code.The + "ProblemDetails" structure shall be provided, and shall include in + the "detail" attribute more information about the source of the + problem. + headers: + Content-Type: + description: The MIME type of the body of the response. + type: string + maximum: 1 + minimum: 1 + WWW-Authenticate: + description: > + Challenge if the corresponding HTTP request has not provided + authorization, or error details if the corresponding HTTP + request has provided an invalid authorization token. + type: string + maximum: 1 + minimum: 0 + schema: + $ref: "/../definitions/SOL002SOL003_def.yaml#/definitions/ProblemDetails" 400-attr-selector: description: > It fhe request is malformed or syntactically incorrect (e.g. if the -- GitLab