diff --git a/src/SOL003/VNFIndicator/VNFIndicator.yaml b/src/SOL003/VNFIndicator/VNFIndicator.yaml new file mode 100644 index 0000000000000000000000000000000000000000..dbdde0c14be5b7364b97675d0e57bbffb4ee6f10 --- /dev/null +++ b/src/SOL003/VNFIndicator/VNFIndicator.yaml @@ -0,0 +1,533 @@ +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: "/vnfind/v1" + +schemes: + - https + +consumes: + - "application/json" +produces: + - "application/json" + +paths: +############################################################################### +# VNF indicators # +############################################################################### + '/indicators': + #SOL003 location: 8.4.2 + get: + description: > + The GET method queries multiple VNF indicators. + parameters: + - 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: + 200: + description: > + The list of VNF indicators was queried successfully. + The response body shall contain the representations of all VNF + indicators that match the attribute filter. + 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/SOL002SOL003VNFIndicator_def.yaml#/definitions/VnfIndicator" + 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" +############################################################################### +# VNF indicators related to a VNF instance # +############################################################################### + '/indicators/{vnfInstanceId}': + #SOL003 location: 8.4.3 + parameters: + - name: vnfInstanceId + description: > + Identifier of the VNF instance to which the VNF indicator applies. + This identifier can be retrieved from the resource referenced by the + "Location" HTTP header in the response to a POST request creating a + new VNF instance 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 GET method queries multiple VNF indicators related to a VNF + instance. + parameters: + - 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: + 200: + description: > + The list of VNF indicators was queried successfully. + The response body shall contain the representations of all VNF + indicators that are related to the particular VNF instance and + that match the attribute filter. + 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/SOL002SOL003VNFIndicator_def.yaml#/definitions/VnfIndicator" + 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 VNF indicator # +############################################################################### + '/indicators/{vnfInstanceId}/{indicatorId}': + #SOL003 location: 8.4.4 + parameters: + - name: indicatorId + description: > + Identifier of the VNF indicator. + This identifier can be retrieved from the resource referenced by the + payload body in the response to a POST request creating a new VNF + instance resource. + in: path + type: string + required: true + - name: vnfInstanceId + description: > + Identifier of the VNF instance to which the VNF indicator applies. + This identifier can be retrieved from the resource referenced by the + "Location" HTTP header in the response to a POST request creating a + new VNF instance 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 GET method reads a VNF indicator. + parameters: + - 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: + 200: + description: > + The VNF indicator was read successfully. + The response body shall contain the representation of the VNF + indicator. + 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/SOL002SOL003VNFIndicator_def.yaml#/definitions/VnfIndicator" + 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: 8.4.5 + post: + description: > + The POST method creates a new subscription. + parameters: + - name: VnfIndicatorSubscriptionRequest + description: Details of the subscription to be created. + in: body + required: true + schema: + $ref: "../../definitions/SOL002SOL003VNFIndicator_def.yaml#/definitions/VnfIndicatorSubscriptionRequest" + - 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 subscription was created successfully. + The response body shall contain a representation of the created + subscription resource. + The HTTP response shall include a "Location" HTTP header that + points to the created 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 + 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/SOL002SOL003VNFIndicator_def.yaml#/definitions/VnfIndicatorSubscription" + 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 queries the list of active subscriptions of the + functional block that invokes the method. It can be used e.g. for + resynchronization after error situations. + parameters: + - 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: + 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 + which match the attribute filter. + headers: + Content-Type: + description: > + The MIME type of the body of the request. + Reference: IETF RFC 7231 + type: string + maximum: 1 + minimum: 1 + 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/SOL002SOL003VNFIndicator_def.yaml#/definitions/VnfIndicatorSubscription" + 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 # +############################################################################### + '/indicators/subscriptions/{subscriptionId}': + #SOL003 location: 8.4.6 + parameters: + - name: subscriptionId + description: > + Identifier of this subscription. + 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 GET method reads 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: 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: + 200: + description: > + The operation has completed 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/SOL002SOL003VNFIndicator_def.yaml#/definitions/VnfIndicatorSubscription" + 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: > + The DELETE method terminates an individual subscription. + parameters: + - 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/VNFIndicatorNotification/VNFIndicatorNotification.yaml b/src/SOL003/VNFIndicatorNotification/VNFIndicatorNotification.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c864b15e4c96757f84e9e3a5b36eed347cf47f60 --- /dev/null +++ b/src/SOL003/VNFIndicatorNotification/VNFIndicatorNotification.yaml @@ -0,0 +1,99 @@ +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 VnfIndicatorValueChangeNotification # +############################################################################### + '/URI-is-provided-by-the-client-when-creating-the-subscription-VnfIndicatorValueChangeNotification': + #SOL003 location: 8.4.7 + post: + description: > + The POST method notifies a VNF alarm or that the alarm list has been + rebuilt. + parameters: + - name: AlarmListRebuiltNotification + description: > + Information that the alarm list has been rebuilt by the VNFM + in: body + required: true + schema: + $ref: "../../definitions/SOL002SOL003VNFIndicator_def.yaml#/definitions/VnfIndicatorValueChangeNotification" + responses: + 204: + description: > + The notification was delivered 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" + 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. + 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/definitions/SOL002SOL003VNFIndicator_def.yaml b/src/definitions/SOL002SOL003VNFIndicator_def.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7ba91a92469b65edcd78a612c7461cee94f3ad7d --- /dev/null +++ b/src/definitions/SOL002SOL003VNFIndicator_def.yaml @@ -0,0 +1,210 @@ +# Copyright (c) ETSI 2017. +# https://forge.etsi.org/etsi-forge-copyright-notice.txt + +definitions: + VnfIndicator: + description: > + This type represents a VNF indicator value. + type: object + required: + - id + - value + - vnfInstanceId + - _links + properties: + id: + description: > + Identifier of this VNF indicator. + $ref: "SOL002SOL003_def.yaml#/definitions/IdentifierInVnfd" + name: + description: > + Human readable name of the indicator. Shall be present if defined in + the VNFD. + type: string + value: + description: > + Provides the value of the indicator. The value format is defined in + the VNFD. + ETSI GS NFV-SOL 001 specifies the structure and format of the + VNFD based on TOSCA specifications. + type: object + vnfInstanceId: + description: > + Identifier of the VNF instance which provides the indicator value. + $ref: "SOL002SOL003_def.yaml#/definitions/Identifier" + _links: + description: > + Links for this resource. + type: object + required: + - self + - vnfInstance + properties: + self: + description: > + URI of this resource. + $ref: "SOL002SOL003_def.yaml#/definitions/Link" + vnfInstance: + description: > + Link to the related VNF instance resource. + $ref: "SOL002SOL003_def.yaml#/definitions/Link" + + VnfIndicatorNotificationsFilter: + description: > + This type represents a subscription filter related to notifications + about VNF indicator value changes. + At a particular nesting level in the filter structure, the following + applies: All attributes shall match in order for the filter to match + (logical "and" between different filter attributes). If an attribute is + an array, the attribute shall match if at least one of the values in the + array matches (logical "or" between the values of one filter attribute). + type: object + properties: + vnfInstanceSubscriptionFilter: + description: > + Filter criteria to select VNF instances about which to notify. + $ref: "SOL002SOL003_def.yaml#/definitions/VnfInstanceSubscriptionFilter" + indicatorIds: + description: > + Match particular VNF indicator identifiers. + type: array + items: + $ref: "SOL002SOL003_def.yaml#/definitions/IdentifierInVnfd" + + VnfIndicatorSubscription: + description: > + This type represents a subscription related to notifications about VNF + indicator value changes. + type: object + required: + - id + - callbackUri + - _links + properties: + id: + description: > + Identifier of this subscription resource. + $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/VnfIndicatorNotificationsFilter" + callbackUri: + description: > + The URI of the endpoint to send the notification to. + type: string + format: url + _links: + description: > + Links for this resource. + type: object + required: + - self + properties: + self: + description: > + URI of this resource. + $ref: "SOL002SOL003_def.yaml#/definitions/Link" + + VnfIndicatorSubscriptionRequest: + description: > + This type represents a subscription request related to VNF indicator + value change notifications. + 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/VnfIndicatorNotificationsFilter" + 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" + + VnfIndicatorValueChangeNotification: + description: > + This type represents a VNF indicator value change notification. + type: object + required: + - id + - notificationType + - subscriptionId + - timeStamp + - vnfIndicatorId + - value + - vnfInstanceId + - _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 + "VnfIndicatorValueChangeNotification" for this notification type. + type: string + enum: + - VnfIndicatorValueChangeNotification + subscriptionId: + description: > + Identifier of the subscription that this notification relates to. + $ref: "SOL002SOL003_def.yaml#/definitions/Identifier" + timeStamp: + description: > + Date-time of the generation of the notification. + $ref: "SOL002SOL003_def.yaml#/definitions/DateTime" + vnfIndicatorId: + description: > + Identifier of the VNF indicator whose value has changed. + $ref: "SOL002SOL003_def.yaml#/definitions/IdentifierInVnfd" + name: + description: > + Human readable name of the VNF indicator. Shall be present if + defined in the VNFD. + type: string + value: + description: > + Provides the value of the VNF indicator. The value format is defined + in the VNFD. + ETSI GS NFV-SOL 001 specifies the structure and format of the VNFD + based on TOSCA specifications. + type: object + vnfInstanceId: + description: > + Identifier of the VNF instance which provides the indicator value. + $ref: "SOL002SOL003_def.yaml#/definitions/Identifier" + _links: + description: > + Links for this resource. + type: object + required: + - vnfInstance + - subscription + properties: + vnfInstance: + description: > + Link to the related VNF instance resource. + $ref: "SOL002SOL003_def.yaml#/definitions/Link" + subscription: + description: > + Link to the related subscription. + $ref: "SOL002SOL003_def.yaml#/definitions/Link"