From 1da61e24938e6b7da34a199277d625e4a5fcd874 Mon Sep 17 00:00:00 2001 From: Giacomo Bernini Date: Tue, 14 Feb 2023 17:24:19 +0000 Subject: [PATCH 1/3] Update Readme.md --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 12c5a62..e361549 100644 --- a/Readme.md +++ b/Readme.md @@ -1,6 +1,6 @@ # NFV SOL012 - OpenAPIs for the Policy Management Interface -This repository contains OpenAPIs for ETSI GS NFV-SOL 012, RESTful protocols +This repository contains OpenAPIs for ETSI GS NFV-SOL 012 v4.4.1, RESTful protocols specification for the Policy Management Interface. More information at [NFV Solutions wiki](https://nfvwiki.etsi.org/index.php?title=NFV_Solutions). -- GitLab From 376484f3197ad3d6f5e30d619aa06365631c355b Mon Sep 17 00:00:00 2001 From: "g.bernini" Date: Tue, 14 Feb 2023 18:40:19 +0100 Subject: [PATCH 2/3] updated refs to v4.4.1 and implemented CR for alignments with IFA048 --- src/SOL012/APIVersion/APIVersion.yaml | 4 +-- .../PolicyManagement/PolicyManagement.yaml | 19 ++++++++++-- .../definitions/PolicyManagement_def.yaml | 30 +++++++++++-------- .../PolicyManagementNotification.yaml | 4 +-- 4 files changed, 38 insertions(+), 19 deletions(-) diff --git a/src/SOL012/APIVersion/APIVersion.yaml b/src/SOL012/APIVersion/APIVersion.yaml index cacc9b8..acbd4d6 100644 --- a/src/SOL012/APIVersion/APIVersion.yaml +++ b/src/SOL012/APIVersion/APIVersion.yaml @@ -23,8 +23,8 @@ info: name: NFV-SOL WG externalDocs: - description: ETSI GS NFV-SOL 012 v3.7.1 - url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/012/03.07.01_60/gs_NFV-SOL012v030701p.pdf + description: ETSI GS NFV-SOL 012 v4.4.1 + url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/012/04.04.01_60/gs_NFV-SOL012v040401p.pdf paths: /nfvpolicy/api_versions: diff --git a/src/SOL012/PolicyManagement/PolicyManagement.yaml b/src/SOL012/PolicyManagement/PolicyManagement.yaml index dec91f1..b2d2819 100644 --- a/src/SOL012/PolicyManagement/PolicyManagement.yaml +++ b/src/SOL012/PolicyManagement/PolicyManagement.yaml @@ -15,8 +15,8 @@ info: name: ETSI Forge copyright notice url: https://forge.etsi.org/etsi-forge-copyright-notice.txt externalDocs: - description: ETSI GS NFV-SOL 012 v3.7.1 - url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/012/03.07.01_60/gs_NFV-SOL012v030701p.pdf + description: ETSI GS NFV-SOL 012 v4.4.1 + url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/012/04.04.01_60/gs_NFV-SOL012v040401p.pdf security: - OauthSecurity: @@ -153,7 +153,9 @@ paths: Modification of a policy includes three functionalities: activating/deactivating the policy, changing the associations of the policy, and changing the selected version of the policy. The three functionalities may be combined flexibly in one request unless there's conflict with - the state of the policy. + the state of the policy. With respect to changing the associations, refer also to the provisions specified in + clause 5.5.6.3.3 regarding the initial setting of the "associations" attribute values in the "Individual policy" + representation, which can be modified using the present method. parameters: - $ref: "../components/SOL012_params.yaml#/components/parameters/Accept" - $ref: "../components/SOL012_params.yaml#/components/parameters/ContentType" @@ -304,6 +306,17 @@ paths: put: description: > The PUT method transfers the content of a particular version of an individual policy. + As the result of successfully executing this method, the API producer shall update the "associations" + attribute in the representation of the "Individual policy" resource as follows: + - If no associations were provided in the initial creation of the "Individual policy" resource + (see clause 5.5.3.3.1) and the policy content includes relevant associations information, the API producer + shall set the values of "associations" attribute according to the information in the policy content. + - If associations were provided in the initial creation of the "Individual policy" resource + (see clause 5.5.3.3.1) or current values are already set on the "associations" attribute in the + representation of the "Individual policy" resource, and the policy content includes relevant associations + information, the API producer shall not apply the values present in the policy content + (i.e., values provided via the API take precedence). + This method shall follow the provisions specified in the tables 5.5.6.3.3-1 and 5.5.6.3.3-2 for URI query parameters, request and response data structures, and response codes. parameters: diff --git a/src/SOL012/PolicyManagement/definitions/PolicyManagement_def.yaml b/src/SOL012/PolicyManagement/definitions/PolicyManagement_def.yaml index 902c7fc..37bd817 100644 --- a/src/SOL012/PolicyManagement/definitions/PolicyManagement_def.yaml +++ b/src/SOL012/PolicyManagement/definitions/PolicyManagement_def.yaml @@ -24,12 +24,11 @@ definitions: $ref: "../../definitions/SOL012_def.yaml#/definitions/schemas/Identifier" associations: description: > - Initial value of the “associations” attribute in the “Policy” data structure which represents the policy. - Shall be absent when the association feature is not applicable for the PF. - The associations refer to identifiers of entities that the PF manages. E.g., if the PF is a VNFM, - the policy can associate to VNF instances; if the PF is NFVO, the policy can associate to an NS instances. - How the PF determines the scope of applicability of the policy when this attribute is absent is - outside the scope of the present document. + Initial value of the "associations" attribute in the "Policy" data structure which represents the policy. + Shall be absent when the association feature is not applicable for the PF, i.e., the target information + in the policy content defined by the "targetType" attribute of the "Policy" information element specified + in clause 5.2 of ETSI GS NFV-IFA 048 [ref-ifa048] is equal to "COMMON". + See note 2 and note 3. type: array items: $ref: "../../definitions/SOL012_def.yaml#/definitions/schemas/Identifier" @@ -65,12 +64,16 @@ definitions: versions: description: > Versions of the policy. Shall be present if at least one version of the policy has been transferred. + Its value shall be the same as the version present in the actual policy content as defined by the + "policyVersion" attribute in the "Policy" information element specified in clause 5.2 of + ETSI GS NFV-IFA 048 [ref-ifa048]. type: array items: $ref: "../../definitions/SOL012_def.yaml#/definitions/schemas/Version" selectedVersion: description: > Selected version of the policy. Shall be present if one or more versions of the policy have been transferred. + The "versions" attribute provides available values of versions of transferred policies. $ref: "../../definitions/SOL012_def.yaml#/definitions/schemas/Version" activationStatus: description: > @@ -83,12 +86,15 @@ definitions: associations: description: > Identifiers of the entities that the PF manages and to which the policy associates to. - Shall be absent when the association feature is not applicable for the PF. - The associations refer to identifiers of entities that the PF manages. - E.g., if the PF is a VNFM, the policy can associate to VNF instances; if the PF is NFVO, the policy can - associate to an NS instances. - How the PF determines the scope of applicability of the policy when this attribute is absent is - outside the scope of the present document. + Shall be absent when the association feature is not applicable for the PF, i.e., the target information in + the policy content defined by the "targetType" attribute of the "Policy" information element specified in + clause 5.2 of ETSI GS NFV-IFA 048 [ref-ifa048] is equal to "COMMON". + An initial set of associations applicable to a policy to be set by the API producer may either be provided + by the "associations" attribute in the "CreatePolicyRequest" or by the actual policy content via the + "targetObjectId" attribute of the "Policy” information element specified in clause 5.2 of + ETSI GS NFV-IFA 048 [ref-ifa048]. Values of the "associations" attribute can be further modified + with the PATCH method. + See note 2 and note 3. type: array items: $ref: "../../definitions/SOL012_def.yaml#/definitions/schemas/Identifier" diff --git a/src/SOL012/PolicyManagementNotification/PolicyManagementNotification.yaml b/src/SOL012/PolicyManagementNotification/PolicyManagementNotification.yaml index 04dbedc..68fbcc5 100644 --- a/src/SOL012/PolicyManagementNotification/PolicyManagementNotification.yaml +++ b/src/SOL012/PolicyManagementNotification/PolicyManagementNotification.yaml @@ -15,8 +15,8 @@ info: name: ETSI Forge copyright notice url: https://forge.etsi.org/etsi-forge-copyright-notice.txt externalDocs: - description: ETSI GS NFV-SOL 012 v3.7.1 - url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/012/03.07.01_60/gs_NFV-SOL012v030701p.pdf + description: ETSI GS NFV-SOL 012 v4.4.1 + url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/012/04.04.01_60/gs_NFV-SOL012v040401p.pdf security: - OauthSecurity: -- GitLab From f4a988a6e39beed1f71b94f04658419e0567378a Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 3 Apr 2023 13:01:34 +0200 Subject: [PATCH 3/3] Added missing notes to the CreatePolicyRequest, PolicyModifications, PolicyConflictNotification and PolicyNotificationsFilter data types. --- .../definitions/PolicyManagement_def.yaml | 12 ++++++++++++ .../PolicyManagementNotification_def.yaml | 3 +++ src/SOL012/definitions/SOL012_def.yaml | 7 ++++++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/SOL012/PolicyManagement/definitions/PolicyManagement_def.yaml b/src/SOL012/PolicyManagement/definitions/PolicyManagement_def.yaml index 37bd817..b2f986b 100644 --- a/src/SOL012/PolicyManagement/definitions/PolicyManagement_def.yaml +++ b/src/SOL012/PolicyManagement/definitions/PolicyManagement_def.yaml @@ -4,6 +4,12 @@ definitions: description: > This type represents request parameters for creating a policy. It shall comply with the provisions defined in table 5.6.2.2-1. + + NOTE 1: For example, the PF can be a VNFM or VIM when the API producer is an NFVO. + NOTE 2: The associations refer to identifiers of entities that the PF manages. E.g. if the PF is a VNFM, the policy + can associate to VNF instances; if the PF is NFVO, the policy can associate to an NS instances. + NOTE 3: How the PF determines the scope of applicability of the policy when this attribute is absent is outside the + scope of the present document. type: object properties: designer: @@ -195,6 +201,12 @@ definitions: 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). + + NOTE 1: The permitted values of the "notificationTypes" attribute are spelled exactly as the names of the notification + types to facilitate automated code generation systems. + NOTE 2: For "PolicyConflictNotification", the notification is sent if any of the policies specified in the subscription + is impacted by the conflict, as defined in clause 5.6.2.8. + type: object properties: notificationTypes: diff --git a/src/SOL012/PolicyManagementNotification/definitions/PolicyManagementNotification_def.yaml b/src/SOL012/PolicyManagementNotification/definitions/PolicyManagementNotification_def.yaml index 16c2418..4821522 100644 --- a/src/SOL012/PolicyManagementNotification/definitions/PolicyManagementNotification_def.yaml +++ b/src/SOL012/PolicyManagementNotification/definitions/PolicyManagementNotification_def.yaml @@ -87,6 +87,9 @@ definitions: This notification shall be triggered by the API producer when a policy conflict is detected, and any of the policies specified in an associated notification subscription is impacted by the conflict. + + NOTE: The policy identifier and the corresponding selected version are mapped by the order + in the array. type: object properties: id: diff --git a/src/SOL012/definitions/SOL012_def.yaml b/src/SOL012/definitions/SOL012_def.yaml index 3bcabc3..3fc178b 100644 --- a/src/SOL012/definitions/SOL012_def.yaml +++ b/src/SOL012/definitions/SOL012_def.yaml @@ -303,7 +303,12 @@ definitions: PolicyModifications: description: > This type represents the parameters for modifying a policy. It shall comply with the provisions - defined in table 5.6.2.4-1 + defined in table 5.6.2.4-1. + + NOTE 1: If "removeAllAssociations" is set to TRUE, neither "addAssociations" nor "removeAssociations" attributes + shall be present. + NOTE 2: Once all associations have been removed, how the PF determines the scope of applicability of the policy + is outside the scope of the present document. type: object properties: activationStatus: -- GitLab