From b0aa46e4e906252e306241de4487cec5a1201e8a Mon Sep 17 00:00:00 2001 From: Mubeena Date: Tue, 20 Dec 2022 16:28:31 +0500 Subject: [PATCH] Update SOL002 VNF Configuration API as per v4.3.1 --- SOL002/VNFConfiguration-API/ApiVersion.robot | 20 +- .../VNFConfiguration-API/Configuration.robot | 88 +++- .../environment/variables.txt | 6 + .../jsons/vnfConfigModifications.json | 1 - ...ModificationsWithVnfConfigurationData.json | 19 + ...odificationsWithvnfcConfigurationData.json | 26 + .../vnfConfigModifications.schema.json | 11 +- .../schemas/vnfConfiguration.schema.json | 489 +++++++++++++++--- 8 files changed, 566 insertions(+), 94 deletions(-) create mode 100644 SOL002/VNFConfiguration-API/jsons/vnfConfigModificationsWithVnfConfigurationData.json create mode 100644 SOL002/VNFConfiguration-API/jsons/vnfConfigModificationsWithvnfcConfigurationData.json diff --git a/SOL002/VNFConfiguration-API/ApiVersion.robot b/SOL002/VNFConfiguration-API/ApiVersion.robot index 03f15c0ec..601b261d2 100644 --- a/SOL002/VNFConfiguration-API/ApiVersion.robot +++ b/SOL002/VNFConfiguration-API/ApiVersion.robot @@ -11,7 +11,7 @@ POST API Version - Method not implemented ... Test title: POST API version - Method not implemented ... Test objective: The objective is to test that POST method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 [5] v3.5.1 + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 [5] v4.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -23,7 +23,7 @@ GET API Version ... Test title: GET API Version ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 [5] v3.5.1 + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 [5] v4.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -36,7 +36,7 @@ PUT API Version - Method not implemented ... Test title: PUT API Version - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 [5] v3.5.1 + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 [5] v4.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -48,7 +48,7 @@ PATCH API Version - Method not implemented ... Test title: PATCH API Version - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 [5] v3.5.1 + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 [5] v4.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -60,7 +60,7 @@ DELETE API Version - Method not implemented ... Test title: DELETE API Version - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 [5] v3.5.1 + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 [5] v4.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -72,7 +72,7 @@ POST API Version with apiMajorVerion - Method not implemented ... Test title: POST API version with apiMajorVerion - Method not implemented ... Test objective: The objective is to test that POST method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 [5] v3.5.1 + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 [5] v4.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -84,7 +84,7 @@ GET API Version with apiMajorVerion ... Test title: GET API Version with apiMajorVerion ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 [5] v3.5.1 + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 [5] v4.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -97,7 +97,7 @@ PUT API Version with apiMajorVerion - Method not implemented ... Test title: PUT API Version with apiMajorVerion - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 [5] v3.5.1 + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 [5] v4.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -109,7 +109,7 @@ PATCH API Version with apiMajorVerion - Method not implemented ... Test title: PATCH API Version with apiMajorVerion - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 [5] v3.5.1 + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 [5] v4.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -121,7 +121,7 @@ DELETE API Version with apiMajorVerion - Method not implemented ... Test title: DELETE API Version with apiMajorVerion - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 [5] v3.5.1 + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 [5] v4.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none diff --git a/SOL002/VNFConfiguration-API/Configuration.robot b/SOL002/VNFConfiguration-API/Configuration.robot index afcd2d228..df2794519 100644 --- a/SOL002/VNFConfiguration-API/Configuration.robot +++ b/SOL002/VNFConfiguration-API/Configuration.robot @@ -4,6 +4,7 @@ Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verif Library JSONLibrary Library JSONSchemaLibrary schemas/ Library OperatingSystem +Library String Library DependencyLibrary *** Test Cases *** @@ -12,13 +13,13 @@ Set new VNF Configuration ... Test title: Set a new VNF Configuration ... Test objective: The objective is to test the creation of a new VNF configuration and perform a JSON schema validation of the returned configuration data structure ... Pre-conditions: A VNF instance is instantiated - ... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v3.6.1 + ... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v4.3.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation of HTTP Etag opaque identifiers ... Post-Conditions: The configuration is successfully set in the VNF and it matches the issued configuration Send VNF configuration Check HTTP Response Status Code Is 200 - Check HTTP Response Header Contains ETag + Check HTTP Response Header Contains ETag and Last-Modified Check HTTP Response Body Json Schema Is vnfConfigModifications Check Postcondition VNF Is Configured @@ -28,7 +29,7 @@ Get information about a VNF configuration ... Test title: Get information about a VNF configuration ... Test objective: The objective is to test the retrieval of an existing VNF instance configuration and perform a JSON schema validation of the collected configuration data structure ... Pre-conditions: A VNF instance is instantiated. The VNF instance is already configured. - ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v3.6.1 + ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.3.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -42,13 +43,13 @@ Get information about a VNF configuration with HTTP Etag ... Test title: Get information about a VNF configuration with HTTP Etag ... Test objective: The objective is to test the retrieval of an existing VNF instance configuration, check the generation by the VNF of an HTTP Etag opaque identifier, and perform a JSON schema validation of the collected configuration data structure ... Pre-conditions: A VNF instance is instantiated. The VNF instance is already configured - ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v3.6.1 + ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.3.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation of HTTP Etag opaque identifiers ... Post-Conditions: none Get VNF configuration Check HTTP Response Status Code Is 200 - Check HTTP Response Header Contains ETag + Check HTTP Response Header Contains ETag and Last-Modified Check HTTP Response Body Json Schema Is vnfConfiguration Set new VNF Configuration - HTTP Etag precondition unsuccessful @@ -57,7 +58,7 @@ Set new VNF Configuration - HTTP Etag precondition unsuccessful ... Test title: Set a new VNF Configuration - HTTP Etag precondition unsuccessful ... Test objective: The objective is to test the unsuccess in setting a duplication of VNF configuration identified by an already used HTTP Etag identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. The VNF instance is already configured (Test ID 6.3.1.1.1) with a given HTTP Etag identifier. - ... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v3.6.1 + ... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v4.3.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation of HTTP Etag opaque identifiers ... Post-Conditions: The VNF configuration is not modified by the unsuccessful operation and it matches the configuration issued in Test ID 6.3.1.1.1 @@ -71,7 +72,7 @@ POST VNF Configuration - Method not implemented ... Test title: POST VNF Configuration - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new VNF configuration ... Pre-conditions: none - ... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v3.6.1 + ... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.3.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -83,7 +84,7 @@ PUT VNF Configuration - Method not implemented ... Test title: PUT VNF Configuration - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify an existing VNF configuration ... Pre-conditions: none - ... Reference: Clause 9.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v3.6.1 + ... Reference: Clause 9.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v4.3.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -95,13 +96,44 @@ DELETE VNF Configuration - Method not implemented ... Test title: Delete VNF Configuration - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete an existing VNF configuration ... Pre-conditions: none - ... Reference: Clause 9.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v3.6.1 + ... Reference: Clause 9.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v4.3.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none Send DELETE Request for VNF Configuration Check HTTP Response Status Code Is 405 + +Set new VNF Configuration With Attribute vnfConfigurationData + [Documentation] Test ID: 6.3.1.1.8 + ... Test title: Set a new VNF Configuration with Attribute vnfConfigurationData + ... Test objective: The objective is to test the creation of a new VNF configuration and perform a JSON schema validation of the returned configuration data structure + ... Pre-conditions: A VNF instance is instantiated + ... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v4.3.1 + ... Config ID: Config_prod_VE + ... Applicability: The VNF supports the generation of HTTP Etag opaque identifiers + ... Post-Conditions: The configuration is successfully set in the VNF and it matches the issued configuration + Send VNF configuration with vnfConfigurationData + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Contains ETag and Last-Modified + Check HTTP Response Body Json Schema Is vnfConfigModifications + Check Postcondition VNF Is Configured +Set new VNF Configuration With Attribute vnfcConfigurationData + [Documentation] Test ID: 6.3.1.1.9 + ... Test title: Set a new VNF Configuration with Attribute vnfcConfigurationData + ... Test objective: The objective is to test the creation of a new VNF configuration and perform a JSON schema validation of the returned configuration data structure + ... Pre-conditions: A VNF instance is instantiated + ... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v4.3.1 + ... Config ID: Config_prod_VE + ... Applicability: The VNF supports the generation of HTTP Etag opaque identifiers + ... Post-Conditions: The configuration is successfully set in the VNF and it matches the issued configuration + Send VNF configuration with vnfcConfigurationData + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Contains ETag and Last-Modified + Check HTTP Response Body Json Schema Is vnfConfigModifications + Check Postcondition VNF Is Configured + + *** Keywords *** Get VNF configuration Log Query VNF The GET method queries information about a configuration. @@ -128,11 +160,12 @@ Check HTTP Response Status Code Is Should Be Equal As Strings ${response['status']} ${expected_status} Log Status code validated -Check HTTP Response Header Contains - [Arguments] ${CONTENT_TYPE} +Check HTTP Response Header Contains ETag and Last-Modified + Pass Execution If ${HEADER_TEST_SUPPORTED} == 0 Headers testing not supported. Skipping the Test. Log ${response['headers']} - Should Contain ${response['headers']} ${CONTENT_TYPE} - Log Header is present + Should Contain ${response['headers']} Etag + Should Contain ${response['headers']} Last-Modified + Log Etag and Last-Modified Headers are present Check HTTP Response Body Json Schema Is [Arguments] ${input} @@ -187,4 +220,31 @@ Send DELETE Request for VNF Configuration Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/configuration ${output}= Output response - Set Suite Variable ${response} ${output} \ No newline at end of file + Set Suite Variable ${response} ${output} + +Send VNF configuration with vnfConfigurationData + log Trying to perform a PATCH. This method modifies the configuration when attribute is vnfConfigurationData + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/vnfConfigModificationsWithVnfConfigurationData.json + ${body}= Format String ${template} cpId=${cpId} cpdId=${cpdId} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/configuration ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send VNF configuration with vnfcConfigurationData + log Trying to perform a PATCH. This method modifies the configuration when attribute is vnfcConfigurationData + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/vnfConfigModificationsWithvnfcConfigurationData.json + ${body}= Format String ${template} vnfcInstanceId=${vnfcInstanceId} cpId=${cpId} cpdId=${cpdId} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/configuration ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} +Check HTTP Response Header Contains + [Arguments] ${CONTENT_TYPE} + Log ${response['headers']} + Should Contain ${response['headers']} ${CONTENT_TYPE} + Log Header is present \ No newline at end of file diff --git a/SOL002/VNFConfiguration-API/environment/variables.txt b/SOL002/VNFConfiguration-API/environment/variables.txt index 46ba91d8d..2e7355081 100644 --- a/SOL002/VNFConfiguration-API/environment/variables.txt +++ b/SOL002/VNFConfiguration-API/environment/variables.txt @@ -13,8 +13,14 @@ ${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${CONTENT_TYPE} application/json +${HEADER_TEST_SUPPORTED} 0 + ${apiRoot} / ${apiName} vnfconfig ${apiMajorVersion} v1 ${etag} enter-etag-value-for-testing-mismatch-condition + +${cpId} +${cpdId} +${vnfcInstanceId} diff --git a/SOL002/VNFConfiguration-API/jsons/vnfConfigModifications.json b/SOL002/VNFConfiguration-API/jsons/vnfConfigModifications.json index 5a14e63b8..16f8c15d5 100644 --- a/SOL002/VNFConfiguration-API/jsons/vnfConfigModifications.json +++ b/SOL002/VNFConfiguration-API/jsons/vnfConfigModifications.json @@ -14,7 +14,6 @@ } ] }, - "dhcpServer": "string", "vnfSpecificData": {} }, "vnfcConfigurationData": [ diff --git a/SOL002/VNFConfiguration-API/jsons/vnfConfigModificationsWithVnfConfigurationData.json b/SOL002/VNFConfiguration-API/jsons/vnfConfigModificationsWithVnfConfigurationData.json new file mode 100644 index 000000000..65d0a6695 --- /dev/null +++ b/SOL002/VNFConfiguration-API/jsons/vnfConfigModificationsWithVnfConfigurationData.json @@ -0,0 +1,19 @@ +{{ + "vnfConfigurationData": { + "extCpConfig": { + "cpId": "{cpId}", + "cpdId": "{cpdId}", + "addresses": [ + { + "address": { + "macAddress": "string", + "ipAddress": "string" + }, + "useDynamicAddress": true, + "port": 0 + } + ] + }, + "vnfSpecificData": {} + } +}} \ No newline at end of file diff --git a/SOL002/VNFConfiguration-API/jsons/vnfConfigModificationsWithvnfcConfigurationData.json b/SOL002/VNFConfiguration-API/jsons/vnfConfigModificationsWithvnfcConfigurationData.json new file mode 100644 index 000000000..dbbeb16ea --- /dev/null +++ b/SOL002/VNFConfiguration-API/jsons/vnfConfigModificationsWithvnfcConfigurationData.json @@ -0,0 +1,26 @@ +{{ + "vnfcConfigurationData": [ + { + "vnfcInstanceId": "{vnfcInstanceId}", + "intCpConfig": [ + { + "cpId": "{cpId}", + "cpdId": "{cpdId}", + "addresses": [ + { + "address": { + "macAddress": "string", + "ipAddress": "string" + }, + "useDynamicAddress": true, + "port": 0 + } + ] + } + ], + "dhcpServer": "string", + "vnfcSpecificData": {} + } + ], + "vnfcConfigurationDataDeleteIds": [] +}} \ No newline at end of file diff --git a/SOL002/VNFConfiguration-API/schemas/vnfConfigModifications.schema.json b/SOL002/VNFConfiguration-API/schemas/vnfConfigModifications.schema.json index e69ca505e..01f6087b6 100644 --- a/SOL002/VNFConfiguration-API/schemas/vnfConfigModifications.schema.json +++ b/SOL002/VNFConfiguration-API/schemas/vnfConfigModifications.schema.json @@ -15,7 +15,7 @@ ], "properties": { "vnfConfigurationData": { - "description": "This type represents configuration parameters of a VNF instance.\n", + "description": "This type represents configuration parameters of a VNF instance. * NOTE:\tETSI GS NFV-SOL 001 specifies the structure and format of\n the VNFD based on TOSCA specifications.\n", "type": "object", "properties": { "extCpConfig": { @@ -99,11 +99,6 @@ } } }, - "dhcpServer": { - "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n", - "type": "string", - "format": "IP" - }, "vnfSpecificData": { "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of keyvalue pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259. In the following example, a list of key-value pairs with four keys (\"aString\", \"aNumber\", \"anArray\" and \"anObject\") is provided to illustrate that the values associated with different keys can be of different type.\n", "type": "object" @@ -111,10 +106,10 @@ } }, "vnfcConfigurationData": { - "description": "Modifications to configuration data for certain VNFC instances. See NOTE 1 and NOTE 2. If present, the modifications of the \"vnfcConfigurationData\" attribute shall follow these provisions:\n Modifying an attribute that is an array of objects of type \"VnfcConfigurationData\".\n Assumptions:\n 1) \"oldList\" is the \"VnfcConfigurationData\" array to be modified and \"newList\"\n is the \"VnfcConfigurationData\" array that contains the changes.\n 2) \"oldEntry\" is an entry in \"oldList\" and \"newEntry\" is an entry in \"newList\".\n 3) A \"newEntry\" has a \"corresponding entry\" if there exists an \"oldEntry\" that\n has the same content of the \"vnfcInstanceId\" attribute as the \"newEntry\";\n a \"newEntry\" has no corresponding entry if no such \"oldEntry\" exists.\n 4) In any array of \"VnfcConfigurationData\" structures, the content of \"vnfcInstanceId\"\n is unique (i.e. there shall be no two entries with the same content of \"vnfcInstanceId\").\n Provisions:\n 1) For each \"newEntry\" in \"newList\" that has no corresponding entry in \"oldList\",\n the \"oldList\" array shall be modified by adding that \"newEntry\".\n\n 2) For each \"newEntry\" in \"newList\" that has a corresponding \"oldEntry\" in \"oldList\",\n the value of \"oldEntry\" shall be updated with the value of \"newEntry\" according to\n the rules of JSON Merge PATCH (see IETF RFC 7396 ).\n", + "description": "Modifications to configuration data for certain VNFC instances. See NOTE 1 and NOTE 2. If present, the modifications of the \"vnfcConfigurationData\" attribute shall follow these provisions:\n Modifying an attribute that is an array of objects of type \"VnfcConfigurationData\".\n Assumptions:\n 1) \"oldList\" is the \"VnfcConfigurationData\" array to be modified and \"newList\"\n is the \"VnfcConfigurationData\" array that contains the changes.\n 2) \"oldEntry\" is an entry in \"oldList\" and \"newEntry\" is an entry in \"newList\".\n 3) A \"newEntry\" has a \"corresponding entry\" if there exists an \"oldEntry\" that\n has the same content of the \"vnfcInstanceId\" attribute as the \"newEntry\";\n a \"newEntry\" has no corresponding entry if no such \"oldEntry\" exists.\n 4) In any array of \"VnfcConfigurationData\" structures, the content of \"vnfcInstanceId\"\n is unique (i.e. there shall be no two entries with the same content of \"vnfcInstanceId\").\n Provisions:\n 1) For each \"newEntry\" in \"newList\" that has no corresponding entry in \"oldList\",\n the \"oldList\" array shall be modified by adding that \"newEntry\".\n\n 2) For each \"newEntry\" in \"newList\" that has a corresponding \"oldEntry\" in \"oldList\",\n the value of \"oldEntry\" shall be updated with the value of \"newEntry\" according to\n the rules of JSON Merge PATCH (see IETF RFC 7396 ).\n", "type": "array", "items": { - "description": "This type represents configuration parameters of a VNFC instance.\n", + "description": "This type represents configuration parameters of a VNFC instance. * NOTE:\tETSI GS NFV-SOL 001 specifies the structure and format\n of the VNFD based on TOSCA specifications.\n", "type": "object", "required": [ "vnfcInstanceId" diff --git a/SOL002/VNFConfiguration-API/schemas/vnfConfiguration.schema.json b/SOL002/VNFConfiguration-API/schemas/vnfConfiguration.schema.json index 1156069c2..c28f9c65e 100644 --- a/SOL002/VNFConfiguration-API/schemas/vnfConfiguration.schema.json +++ b/SOL002/VNFConfiguration-API/schemas/vnfConfiguration.schema.json @@ -6,69 +6,92 @@ ], "properties": { "vnfConfigurationData": { - "description": "This type represents configuration parameters of a VNF instance.\n", + "description": "This type represents configuration parameters of a VNF instance. * NOTE:\tETSI GS NFV-SOL 001 specifies the structure and format of\n the VNFD based on TOSCA specifications.\n", "type": "object", "properties": { "extCpConfig": { - "description": "This type represents configuration parameters of a CP instance.\n", - "type": "object", - "required": [ - "cpId", - "cpdId", - "addresses" - ], - "properties": { - "cpId": { - "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n", - "type": "string" - }, - "cpdId": { - "description": "An identifier that is unique within a VNF descriptor.\n", - "type": "string" - }, - "addresses": { - "description": "Network address and port assigned to the CP.\n", - "type": "array", - "items": { - "description": "This type represents configuration parameters of a CP instance address. * NOTE 1: Either \"address\" or \"useDynamicAddress\" shall be present.\n * NOTE 2: At least one of \"macAddress\" and \"ipAddress\" shall be present.\n", - "type": "object", - "properties": { - "address": { - "description": "Network address that has been configured on the CP. See NOTE 1.\n", - "type": "object", - "properties": { - "macAddress": { - "description": "A MAC address. Representation: string that consists of groups of two hexadecimal digits, separated by hyphens or colons.\n", - "type": "string", - "format": "MAC" - }, - "ipAddress": { - "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n", - "type": "string", - "format": "IP" + "description": "Configuration parameters for the external CPs of the VNF instance.\n", + "type": "array", + "items": { + "description": "This type represents configuration parameters of a CP instance.\n", + "type": "object", + "required": [ + "cpId", + "cpdId", + "addresses" + ], + "properties": { + "cpId": { + "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n", + "type": "string" + }, + "cpdId": { + "description": "An identifier that is unique within a VNF descriptor.\n", + "type": "string" + }, + "addresses": { + "description": "Network address and port assigned to the CP.\n", + "type": "array", + "items": { + "description": "This type represents configuration parameters of a CP instance address.\n * NOTE 1: Either \"address\" or \"useDynamicAddress\" shall be present.\n * NOTE 2: At least one of \"macAddress\" and \"ipAddress\" shall be present.\n", + "type": "object", + "oneOf": [ + { + "required": [ + "address" + ] + }, + { + "required": [ + "useDynamicAddress" + ] + } + ], + "anyOf": [ + { + "required": [ + "macAddress" + ] + }, + { + "required": [ + "ipAddress" + ] + } + ], + "properties": { + "address": { + "description": "Network address that has been configured on the CP. See NOTE 1.\n", + "type": "object", + "properties": { + "macAddress": { + "description": "A MAC address. Representation: string that consists of groups of two hexadecimal digits, separated by hyphens or colons.\n", + "type": "string", + "format": "MAC" + }, + "ipAddress": { + "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n", + "type": "string", + "format": "IP" + } } + }, + "useDynamicAddress": { + "description": "Set to true if an address shall be assigned dynamically. Otherwise set to false. The default value shall be false. See NOTE 1.\n", + "type": "boolean" + }, + "port": { + "description": "The port assigned to the CP instance (e.g. IP port number, Ethernet port number, etc.).\n", + "type": "integer" } - }, - "useDynamicAddress": { - "description": "Set to true if an address shall be assigned dynamically. Otherwise set to false. The default value shall be false. See NOTE 1.\n", - "type": "boolean" - }, - "port": { - "description": "The port assigned to the CP instance (e.g. IP port number, Ethernet port number, etc.).\n", - "type": "integer" } } } } } }, - "dhcpServer": { - "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n", - "type": "string", - "format": "IP" - }, "vnfSpecificData": { - "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n", + "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of keyvalue pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259. In the following example, a list of key-value pairs with four keys (\"aString\", \"aNumber\", \"anArray\" and \"anObject\") is provided to illustrate that the values associated with different keys can be of different type.\n", "type": "object" } } @@ -77,7 +100,7 @@ "description": "Configuration parameters of the VNFC instances.\n", "type": "array", "items": { - "description": "This type represents configuration parameters of a VNFC instance.\n", + "description": "This type represents configuration parameters of a VNFC instance. * NOTE:\tETSI GS NFV-SOL 001 specifies the structure and format\n of the VNFD based on TOSCA specifications.\n", "type": "object", "required": [ "vnfcInstanceId" @@ -111,8 +134,32 @@ "description": "Network address and port assigned to the CP.\n", "type": "array", "items": { - "description": "This type represents configuration parameters of a CP instance address. * NOTE 1: Either \"address\" or \"useDynamicAddress\" shall be present.\n * NOTE 2: At least one of \"macAddress\" and \"ipAddress\" shall be present.\n", + "description": "This type represents configuration parameters of a CP instance address.\n * NOTE 1: Either \"address\" or \"useDynamicAddress\" shall be present.\n * NOTE 2: At least one of \"macAddress\" and \"ipAddress\" shall be present.\n", "type": "object", + "oneOf": [ + { + "required": [ + "address" + ] + }, + { + "required": [ + "useDynamicAddress" + ] + } + ], + "anyOf": [ + { + "required": [ + "macAddress" + ] + }, + { + "required": [ + "ipAddress" + ] + } + ], "properties": { "address": { "description": "Network address that has been configured on the CP. See NOTE 1.\n", @@ -124,7 +171,7 @@ "format": "MAC" }, "ipAddress": { - "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n", + "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n", "type": "string", "format": "IP" } @@ -144,17 +191,337 @@ } } }, - "dhcpServer": { - "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n", - "type": "string", - "format": "IP" - }, "vnfcSpecificData": { - "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n", + "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of keyvalue pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259. In the following example, a list of key-value pairs with four keys (\"aString\", \"aNumber\", \"anArray\" and \"anObject\") is provided to illustrate that the values associated with different keys can be of different type.\n", "type": "object" } } } } } -} \ No newline at end of file +}, +"VnfConfigurationData": { + "description": "This type represents configuration parameters of a VNF instance. * NOTE:\tETSI GS NFV-SOL 001 specifies the structure and format of\n the VNFD based on TOSCA specifications.\n", + "type": "object", + "properties": { + "extCpConfig": { + "description": "Configuration parameters for the external CPs of the VNF instance.\n", + "type": "array", + "items": { + "description": "This type represents configuration parameters of a CP instance.\n", + "type": "object", + "required": [ + "cpId", + "cpdId", + "addresses" + ], + "properties": { + "cpId": { + "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n", + "type": "string" + }, + "cpdId": { + "description": "An identifier that is unique within a VNF descriptor.\n", + "type": "string" + }, + "addresses": { + "description": "Network address and port assigned to the CP.\n", + "type": "array", + "items": { + "description": "This type represents configuration parameters of a CP instance address.\n * NOTE 1: Either \"address\" or \"useDynamicAddress\" shall be present.\n * NOTE 2: At least one of \"macAddress\" and \"ipAddress\" shall be present.\n", + "type": "object", + "oneOf": [ + { + "required": [ + "address" + ] + }, + { + "required": [ + "useDynamicAddress" + ] + } + ], + "anyOf": [ + { + "required": [ + "macAddress" + ] + }, + { + "required": [ + "ipAddress" + ] + } + ], + "properties": { + "address": { + "description": "Network address that has been configured on the CP. See NOTE 1.\n", + "type": "object", + "properties": { + "macAddress": { + "description": "A MAC address. Representation: string that consists of groups of two hexadecimal digits, separated by hyphens or colons.\n", + "type": "string", + "format": "MAC" + }, + "ipAddress": { + "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n", + "type": "string", + "format": "IP" + } + } + }, + "useDynamicAddress": { + "description": "Set to true if an address shall be assigned dynamically. Otherwise set to false. The default value shall be false. See NOTE 1.\n", + "type": "boolean" + }, + "port": { + "description": "The port assigned to the CP instance (e.g. IP port number, Ethernet port number, etc.).\n", + "type": "integer" + } + } + } + } + } + } + }, + "vnfSpecificData": { + "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of keyvalue pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259. In the following example, a list of key-value pairs with four keys (\"aString\", \"aNumber\", \"anArray\" and \"anObject\") is provided to illustrate that the values associated with different keys can be of different type.\n", + "type": "object" + } + } +}, +"VnfcConfigurationData": { + "description": "This type represents configuration parameters of a VNFC instance. * NOTE:\tETSI GS NFV-SOL 001 specifies the structure and format\n of the VNFD based on TOSCA specifications.\n", + "type": "object", + "required": [ + "vnfcInstanceId" + ], + "properties": { + "vnfcInstanceId": { + "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n", + "type": "string" + }, + "intCpConfig": { + "description": "Configuration parameters for the internal CPs of the VNFC instance.\n", + "type": "array", + "items": { + "description": "This type represents configuration parameters of a CP instance.\n", + "type": "object", + "required": [ + "cpId", + "cpdId", + "addresses" + ], + "properties": { + "cpId": { + "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n", + "type": "string" + }, + "cpdId": { + "description": "An identifier that is unique within a VNF descriptor.\n", + "type": "string" + }, + "addresses": { + "description": "Network address and port assigned to the CP.\n", + "type": "array", + "items": { + "description": "This type represents configuration parameters of a CP instance address.\n * NOTE 1: Either \"address\" or \"useDynamicAddress\" shall be present.\n * NOTE 2: At least one of \"macAddress\" and \"ipAddress\" shall be present.\n", + "type": "object", + "oneOf": [ + { + "required": [ + "address" + ] + }, + { + "required": [ + "useDynamicAddress" + ] + } + ], + "anyOf": [ + { + "required": [ + "macAddress" + ] + }, + { + "required": [ + "ipAddress" + ] + } + ], + "properties": { + "address": { + "description": "Network address that has been configured on the CP. See NOTE 1.\n", + "type": "object", + "properties": { + "macAddress": { + "description": "A MAC address. Representation: string that consists of groups of two hexadecimal digits, separated by hyphens or colons.\n", + "type": "string", + "format": "MAC" + }, + "ipAddress": { + "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n", + "type": "string", + "format": "IP" + } + } + }, + "useDynamicAddress": { + "description": "Set to true if an address shall be assigned dynamically. Otherwise set to false. The default value shall be false. See NOTE 1.\n", + "type": "boolean" + }, + "port": { + "description": "The port assigned to the CP instance (e.g. IP port number, Ethernet port number, etc.).\n", + "type": "integer" + } + } + } + } + } + } + }, + "dhcpServer": { + "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n", + "type": "string", + "format": "IP" + }, + "vnfcSpecificData": { + "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of keyvalue pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259. In the following example, a list of key-value pairs with four keys (\"aString\", \"aNumber\", \"anArray\" and \"anObject\") is provided to illustrate that the values associated with different keys can be of different type.\n", + "type": "object" + } + } +}, +"CpConfiguration": { + "description": "This type represents configuration parameters of a CP instance.\n", + "type": "object", + "required": [ + "cpId", + "cpdId", + "addresses" + ], + "properties": { + "cpId": { + "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n", + "type": "string" + }, + "cpdId": { + "description": "An identifier that is unique within a VNF descriptor.\n", + "type": "string" + }, + "addresses": { + "description": "Network address and port assigned to the CP.\n", + "type": "array", + "items": { + "description": "This type represents configuration parameters of a CP instance address.\n * NOTE 1: Either \"address\" or \"useDynamicAddress\" shall be present.\n * NOTE 2: At least one of \"macAddress\" and \"ipAddress\" shall be present.\n", + "type": "object", + "oneOf": [ + { + "required": [ + "address" + ] + }, + { + "required": [ + "useDynamicAddress" + ] + } + ], + "anyOf": [ + { + "required": [ + "macAddress" + ] + }, + { + "required": [ + "ipAddress" + ] + } + ], + "properties": { + "address": { + "description": "Network address that has been configured on the CP. See NOTE 1.\n", + "type": "object", + "properties": { + "macAddress": { + "description": "A MAC address. Representation: string that consists of groups of two hexadecimal digits, separated by hyphens or colons.\n", + "type": "string", + "format": "MAC" + }, + "ipAddress": { + "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n", + "type": "string", + "format": "IP" + } + } + }, + "useDynamicAddress": { + "description": "Set to true if an address shall be assigned dynamically. Otherwise set to false. The default value shall be false. See NOTE 1.\n", + "type": "boolean" + }, + "port": { + "description": "The port assigned to the CP instance (e.g. IP port number, Ethernet port number, etc.).\n", + "type": "integer" + } + } + } + } + } +}, +"CpAddress": { + "description": "This type represents configuration parameters of a CP instance address.\n * NOTE 1: Either \"address\" or \"useDynamicAddress\" shall be present.\n * NOTE 2: At least one of \"macAddress\" and \"ipAddress\" shall be present.\n", + "type": "object", + "oneOf": [ + { + "required": [ + "address" + ] + }, + { + "required": [ + "useDynamicAddress" + ] + } + ], + "anyOf": [ + { + "required": [ + "macAddress" + ] + }, + { + "required": [ + "ipAddress" + ] + } + ], + "properties": { + "address": { + "description": "Network address that has been configured on the CP. See NOTE 1.\n", + "type": "object", + "properties": { + "macAddress": { + "description": "A MAC address. Representation: string that consists of groups of two hexadecimal digits, separated by hyphens or colons.\n", + "type": "string", + "format": "MAC" + }, + "ipAddress": { + "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n", + "type": "string", + "format": "IP" + } + } + }, + "useDynamicAddress": { + "description": "Set to true if an address shall be assigned dynamically. Otherwise set to false. The default value shall be false. See NOTE 1.\n", + "type": "boolean" + }, + "port": { + "description": "The port assigned to the CP instance (e.g. IP port number, Ethernet port number, etc.).\n", + "type": "integer" + } + } +} -- GitLab