diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..d8fe4fa70f618843e9ab2df67167b49565c71f25 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.project diff --git a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot index 466c0db6adfd0c579ea22416b0af6ebd54ed9555..80dbb91dd6648bc63affa92c7b0afecab1670237 100644 --- a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot +++ b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot @@ -5,61 +5,160 @@ Resource environment/individualVnfIndicator.txt Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} *** Test Cases *** -GET Individual VNF Indicator - Log The GET method reads a VNF indicator. +Get Individual Indicator for VNF Instance + [Documentation] Test ID: 6.3.2.3.1 + ... Test title: Get individual performance indicator for a VNF instance + ... Test objective: The objective is to test the retrieval of a performance indicator for a given VNF instance and perform a JSON schema validation of the returned indicator data structure + ... Pre-conditions: A VNF instance is instantiated. At least one measure of performance indicator is available for the given VNF instance. + ... Reference: section 8.4.4.3.2 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: The VNF supports the generation and maintenance of performance indicators + ... Post-Conditions: none + Get Individual Indicator for a VNF instance + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is vnfIndicator + Check HTTP Response Body Matches VNF Instance ID + Check HTTP Response Body Matches Indicator ID + +Get Individual Indicator for VNF Instance with invalid indicator identifier + [Documentation] Test ID 6.3.2.3.2 + ... Test title: Get individual performance indicator for a VNF instance with invalid indicator identifier + ... Test objective: The objective is to test that the retrieval of a performance indicator for a given VNF instance fails when using an invalid resource identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response. + ... Pre-conditions: A VNF instance is instantiated. At least one measure of performance indicator is available for the given VNF instance. + ... Reference: section 8.4.4.3.2 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: The VNF supports the generation and maintenance of performance indicators. + ... Post-Conditions: none + Get Individual Indicator for a VNF instance with invalid indicator identifier + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST Individual VNF Indicator - Method not implemented + [Documentation] Test ID 6.3.2.3.3 + ... Test title: POST individual performance indicator for VNF instance - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create a new performance indicator for a VNF instance + ... Pre-conditions: A VNF instance is instantiated. + ... Reference: section 8.4.4.3.1 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: The VNF supports the generation and maintenance of performance indicators. + ... Post-Conditions: none + Send POST Request for individual indicator in VNF instance + Check HTTP Response Status Code Is 405 + +PUT Individual VNF Indicator - Method not implemented + [Documentation] Test ID 6.3.2.3.4 + ... Test title: PUT individual performance indicator for VNF instance - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to modify an existing performance indicator for a VNF instance + ... Pre-conditions: A VNF instance is instantiated. At least one measure of performance indicator is available for the given VNF instance. + ... Reference: section 8.4.4.3.3 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: The VNF supports the generation and maintenance of performance indicators. + ... Post-Conditions: none + Send PUT Request for individual indicator in VNF instance + Check HTTP Response Status Code Is 405 + +PATCH Individual VNF Indicator - Method not implemented + [Documentation] Test ID 6.3.2.3.5 + ... Test title: PATCH individual performance indicator for VNF instance - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update an existing performance indicator for a VNF instance + ... Pre-conditions: A VNF instance is instantiated. At least one measure of performance indicator is available for the given VNF instance. + ... Reference: section 8.4.4.3.4 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: The VNF supports the generation and maintenance of performance indicators. + ... Post-Conditions: none + Send PUT Request for individual indicator in VNF instance + Check HTTP Response Status Code Is 405 + +DELETE Individual VNF Indicator - Method not implemented + [Documentation] Test ID 6.3.2.3.6 + ... Test title: DELETE individual performance indicator indicators for VNF instance - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete an existing performance indicator for a VNF instance + ... Pre-conditions: A VNF instance is instantiated. At least one measure of performance indicator is available for the given VNF instance. + ... Reference: section 8.4.3.3.5 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: The VNF supports the generation and maintenance of performance indicators. + ... Post-Conditions: The individual performance indicator for the VNF instance is not deleted by the unsuccessful operation + Send DELETE Request for individual indicator in VNF instance + Check HTTP Response Status Code Is 405 + Check Postcondition Indicator for VNF instance Exist + + *** Keywords *** +Get Individual Indicator for a VNF instance + Log This resource represents a VNF indicator related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} - Integer response status 200 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} application/json - Log Trying to validate response - ${result}= Output response body - Validate Json vnfIndicator.schema.json ${result} - Log Validation OK + ${output}= Output response + Set Suite Variable @{response} ${output} -GET Individual VNF Indicator - Negative (Not Found) - Log Trying to perform a negative get, using an erroneous package ID +Get Individual Indicator for a VNF instance with invalid indicator identifier + Log Trying to perform a negative get, using wrong identifier Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${erroneousIndicatorId} - Integer response status 404 - Log Received 404 Not Found as expected - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} application/json - Log Trying to validate ProblemDetails - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + ${output}= Output response + Set Suite Variable @{response} ${output} -POST Individual VNF Indicator (Method not implemented) +Send POST Request for individual indicator in VNF instance Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} - Integer response status 405 - Log Received 405 Method not implemented as expected + POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} + ${output}= Output response + Set Suite Variable @{response} ${output} -PUT Individual VNF Indicator (Method not implemented) +Send PUT Request for individual indicator in VNF instance Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} - Integer response status 405 - Log Received 405 Method not implemented as expected - -PATCH Individual VNF Indicator (Method not implemented) + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send PATCH Request for individual indicator in VNF instance Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} - Integer response status 405 - Log Received 405 Method not implemented as expected - -DELETE Individual VNF Indicator (Method not implemented) + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send DELETE Request for individual indicator in VNF instance Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} - Integer response status 405 - Log Received 405 Method not implemented as expected + ${output}= Output response + Set Suite Variable @{response} ${output} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + ${status}= Convert To Integer ${expected_status} + Should Be Equal ${response[0]['status']} ${status} + Log Status code validated + +Check HTTP Response Header Contains + [Arguments] ${CONTENT_TYPE} + Log ${response[0]['headers']} + Should Contain ${response[0]['headers']} ${CONTENT_TYPE} + Log Header is present + +Check HTTP Response Body Json Schema Is + [Arguments] ${schema} + Should Contain ${response[0]['headers']['Content-Type']} application/json + Validate Json ${schema} ${response[0]['body']} + Log Json Schema Validation OK + +Check HTTP Response Body Matches Indicator ID + Log Check Response includes propoer VNF instance and Indicator identifiers + Should Be Equal ${response[0]['body']['id']} ${indicatorId} + +Check HTTP Response Body Matches VNF Instance ID + Log Check Response includes propoer VNF instance and Indicator identifiers + Should Be Equal ${response[0]['body']['vnfInstanceId']} ${vnfInstanceId} + +Check Postcondition Indicator for VNF instance Exist + Log Check Response includes VNF Indicator + Get Individual Indicator for a VNF instance + Should Be Equal ${response[0]['body']['vnfInstanceId']} ${vnfInstanceId} + Should Be Equal ${response[0]['body']['id']} ${indicatorId} diff --git a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot index 3f7502e9481c2a4b4e2ad578176190fcf67aa53d..b6923d444f889713fe4aed8d2cffff48fac06aa8 100644 --- a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot +++ b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot @@ -7,86 +7,200 @@ Library JSONLibrary Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} *** Test Cases *** -GET Indicators on VNF Instance +Get Indicators for VNF Instance + [Documentation] Test ID: 6.3.2.2.1 + ... Test title: Get all performance indicators for a VNF instance + ... Test objective: The objective is to test the retrieval of all performance indicators for a given VNF instance and perform a JSON schema validation of the returned indicators data structure + ... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance. + ... Reference: section 8.4.3.3.2 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: The VNF supports the generation and maintenance of performance indicators + ... Post-Conditions: none + Get all indicators for a VNF instance + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is vnfIndicators + Check HTTP Response Body Matches VNF Instance ID + +GET Indicators for VNF Instance with attribute-based filter + [Documentation] Test ID 6.3.2.2.2 + ... Test title: Get all performance indicators for a VNF instance with attribute-based filter + ... Test objective: The objective is to test the retrieval of all performance indicators for a given VNF instance using attribute-based filter and perform a JSON schema validation of the returned indicators data structure + ... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance. + ... Reference: section 8.4.3.3.2 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: The VNF supports the generation and maintenance of performance indicators + ... Post-Conditions: none + Get all indicators for a VNF instance with filter + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is vnfIndicators + Check HTTP Response Body Matches Attribute-Based Filter + +Get Indicators for VNF Instance with invalid attribute-based filter + [Documentation] Test ID 6.3.2.2.3 + ... Test title: Get all performance indicators for a VNF instance with invalid attribute-based filter + ... Test objective: The objective is to test that the retrieval of all performance indicators for a given VNF instance fails using invalid attribute-based filter. The test also checks the JSON schema of the unsuccessful operation HTTP response. + ... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance. + ... Reference: section 8.4.3.3.2 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: The VNF supports the generation and maintenance of performance indicators. + ... Post-Conditions: none + Get all indicators for a VNF instance with invalid filter + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get Indicators for VNF Instance with invalid resource identifier + [Documentation] Test ID 6.3.2.2.4 + ... Test title: Get all performance indicators for a VNF instance with invalid resource identifier + ... Test objective: The objective is to test that the retrieval of all performance indicators for a given VNF instance fails when using invalid resource identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response. + ... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance. + ... Reference: section 8.4.3.3.2 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: The VNF supports the generation and maintenance of performance indicators. + ... Post-Conditions: none + Get all indicators for a VNF instance with invalid resource identifier + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST Indicators for VNF instance - Method not implemented + [Documentation] Test ID 6.3.2.2.5 + ... Test title: POST performance indicators for VNF instance - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create new performance indicators for a VNF instance + ... Pre-conditions: A VNF instance is instantiated. + ... Reference: section 8.4.3.3.1 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: The VNF supports the generation and maintenance of performance indicators. + ... Post-Conditions: none + Send POST Request for indicators in VNF instance + Check HTTP Response Status Code Is 405 + +PUT Indicators for VNF instance - Method not implemented + [Documentation] Test ID 6.3.2.2.6 + ... Test title: PUT performance indicators for VNF instance - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to modify existing performance indicators for a VNF instance + ... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance. + ... Reference: section 8.4.3.3.3 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: The VNF supports the generation and maintenance of performance indicators. + ... Post-Conditions: none + Send PUT Request for indicators in VNF instance + Check HTTP Response Status Code Is 405 + +PATCH Indicators for VNF instance - Method not implemented + [Documentation] Test ID 6.3.2.2.7 + ... Test title: PATCH performance indicators for VNF instance - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update existing performance indicators for a VNF instance + ... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance. + ... Reference: section 8.4.3.3.4 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: The VNF supports the generation and maintenance of performance indicators. + ... Post-Conditions: none + Send PATCH Request for indicators in VNF instance + Check HTTP Response Status Code Is 405 + +DELETE Indicators for VNF instance - Method not implemented + [Documentation] Test ID 6.3.2.2.8 + ... Test title: DELETE performance indicators for VNF instance - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete performance indicators for a VNF instance + ... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance. + ... Reference: section 8.4.3.3.5 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: The VNF supports the generation and maintenance of performance indicators. + ... Post-Conditions: The indicators for the VNF instance are not deleted by the unsuccessful operation + Send DELETE Request for indicators in VNF instance + Check HTTP Response Status Code Is 405 + Check Postcondition Indicators for VNF instance Exist + +*** Keywords *** +Get all indicators for a VNF instance Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} - Integer response status 200 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE_JSON} - Log Trying to validate response - ${result}= Output response body - Validate Json vnfIndicators.schema.json ${result} - Log Validation OK - -GET Indicators on VNF Instance - Filter + ${output}= Output response + Set Suite Variable @{response} ${output} + +Get all indicators for a VNF instance with filter Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}?${POS_FIELDS} - Integer response status 200 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE_JSON} - Log Trying to validate response - ${result}= Output response body - Validate Json vnfIndicators.schema.json ${result} - Log Validation OK - -GET Indicators on VNF Instance - Negative Filter + ${output}= Output response + Set Suite Variable @{response} ${output} + +Get all indicators for a VNF instance with invalid filter Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}?${NEG_FIELDS} - Integer response status 400 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE_JSON} - Log Trying to validate ProblemDetails - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK - -GET Indicators on VNF Instance - Negative (Not Found) - Log Trying to perform a negative get, using wrong authorization bearer + ${output}= Output response + Set Suite Variable @{response} ${output} + +Get all indicators for a VNF instance with invalid resource identifier + Log Trying to perform a negative get, using wrong identifier Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${erroneousVnfInstanceId} - Integer response status 404 - Log Received 404 Not Found as expected - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE_JSON} - Log Trying to validate ProblemDetails - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK - -POST Indicators on VNF Instance - (Method not implemented) + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send POST Request for indicators in VNF instance Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} - Integer response status 405 - Log Received 405 Method not implemented as expected + ${output}= Output response + Set Suite Variable @{response} ${output} -PUT Indicators on VNF Instance - (Method not implemented) +Send PUT Request for indicators in VNF instance Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} - Integer response status 405 - Log Received 405 Method not implemented as expected - -PATCH Indicators on VNF Instance - (Method not implemented) + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send PATCH Request for indicators in VNF instance Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} - Integer response status 405 - Log Received 405 Method not implemented as expected - -DELETE Indicators on VNF Instance - (Method not implemented) + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send DELETE Request for indicators in VNF instance Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} - Log Received 405 Method not implemented as expected + ${output}= Output response + Set Suite Variable @{response} ${output} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + ${status}= Convert To Integer ${expected_status} + Should Be Equal ${response[0]['status']} ${status} + Log Status code validated + +Check HTTP Response Header Contains + [Arguments] ${CONTENT_TYPE} + Log ${response[0]['headers']} + Should Contain ${response[0]['headers']} ${CONTENT_TYPE} + Log Header is present + +Check HTTP Response Body Json Schema Is + [Arguments] ${schema} + Should Contain ${response[0]['headers']['Content-Type']} application/json + Validate Json ${schema} ${response[0]['body']} + Log Json Schema Validation OK + +Check HTTP Response Body Matches VNF Instance ID + Log Check Response includes Indicators according to resource identifier + #todo + +Check HTTP Response Body Matches Attribute-Based Filter + Log Check Response includes VNF Indicators according to filter + #todo + +Check Postcondition Indicators for VNF instance Exist + Log Check Response includes VNF Indicators according to filter + #todo \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/environment/individualVnfIndicator.txt b/SOL002/VNFIndicator-API/environment/individualVnfIndicator.txt index d5dbf6388d931071ee543eaed28b0f6073bcf57b..2570ae3923b477f60abe3cb2707f3843e06e78f0 100644 --- a/SOL002/VNFIndicator-API/environment/individualVnfIndicator.txt +++ b/SOL002/VNFIndicator-API/environment/individualVnfIndicator.txt @@ -1,4 +1,6 @@ *** Variables *** ${vnfInstanceId} 80b0deba-c398-445b-bef0-ac0fe733e3d0 ${indicatorId} 34e70855-a9d3-4fef-aece-76a3cd266ec8 +${notAllowedIndicatorId} notAllowedId ${erroneousIndicatorId} erroneousIndicatorId +@{response}= httpresponse diff --git a/SOL002/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt b/SOL002/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt index 13ef83d69d114ec300b29757e0d7e90b4a2cd2fe..b07991d9b8266f91980f33bc0d9d42f264341187 100644 --- a/SOL002/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt +++ b/SOL002/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt @@ -3,3 +3,4 @@ ${vnfInstanceId} 80b0deba-c398-445b-bef0-ac0fe733e3d0 ${erroneousVnfInstanceId} erroneousVnfInstanceId ${POS_FIELDS} name=vnfIndicator ${NEG_FIELDS} wrongName=any_value +@{response}= httpresponse diff --git a/SOL005/NSDManagement-API/IndividualNSDescriptor.robot b/SOL005/NSDManagement-API/IndividualNSDescriptor.robot index 3216a694c442ccc16908f552f1dd98c3b283e7bb..a5b5ce59145ab6f21a359d81b20e972a6ad4cf83 100644 --- a/SOL005/NSDManagement-API/IndividualNSDescriptor.robot +++ b/SOL005/NSDManagement-API/IndividualNSDescriptor.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation This clause defines all the resources and methods provided by the Individual NS descriptor interface. \ Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Resource environment/nsDescriptors.txt # Specific nsDescriptors Parameters Library OperatingSystem Library JSONLibrary @@ -24,8 +24,7 @@ GET Single Network Service Descriptor Log Validation of Content-Type : OK Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json NsdInfo.schema.json ${json} + Validate Json NsdInfo.schema.json ${result} Log Validation OK @@ -40,8 +39,7 @@ GET Single Network Service Descriptor (Negative: Not found) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK @@ -62,28 +60,26 @@ PATCH Single Network Service Descriptor - (Disabling a nsdInfo) Log Trying to perform a PATCH. As prerequisite the nsdInfo shall be in enabled operational state Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File json/NsdInfoModificationDisable.json + ${body}= Get File jsons/NsdInfoModificationDisable.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoId} ${body} Integer response status 200 Log Received 200 OK as expected ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json NsdInfoModification.schema.json ${json} + Validate Json NsdInfoModification.schema.json ${result} Log Validation of NsdInfoModifications OK PATCH Single Network Service Descriptor - (Enabling an previously disabled nsdInfo) Log Trying to perform a PATCH. As prerequisite the nsdInfo shall be in disabled operational state Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File json/NsdInfoModificationEnable.json + ${body}= Get File jsons/NsdInfoModificationEnable.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoId} ${body} Integer response status 200 Log Received 200 OK as expected ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json NsdInfoModification.schema.json ${json} + Validate Json NsdInfoModification.schema.json ${result} Log Validation of NsdInfoModifications OK @@ -91,7 +87,7 @@ PATCH Single Network Service Descriptor - NEGATIVE (Trying to enable an previous Log Trying to perform a PATCH. As prerequisite the nsdInfo shall be in enabled operational state Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File json/NsdInfoModificationEnable.json + ${body}= Get File jsons/NsdInfoModificationEnable.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${enabledNsdInfoId} ${body} Integer response status 409 @@ -100,8 +96,7 @@ PATCH Single Network Service Descriptor - NEGATIVE (Trying to enable an previous Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK @@ -110,7 +105,7 @@ PATCH Single Network Service Descriptor - NEGATIVE (Trying to enable an previous Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set Headers {"If-Match": "${Etag}"} - ${body}= Get File json/NsdInfoModificationEnable.json + ${body}= Get File jsons/NsdInfoModificationEnable.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${modifiedNsdInfoId} ${body} Integer response status 412 @@ -122,8 +117,7 @@ PATCH Single Network Service Descriptor - NEGATIVE (Trying to enable an previous Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK @@ -155,12 +149,12 @@ DELETE Single Network Service Descriptor (Negative: Trying to delete an enabled Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST Single Network Service Descriptor (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a POST. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} @@ -172,6 +166,7 @@ POST Single Network Service Descriptor (Method not implemented) PUT Single Network Service Descriptor (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} diff --git a/SOL005/NSDManagement-API/IndividualPnfDescriptor.robot b/SOL005/NSDManagement-API/IndividualPnfDescriptor.robot index 78f914c8e295c3deb2654e690f21549531fa9144..2cbb1a99a35e54840edd8389ecfccf983b75e7d8 100644 --- a/SOL005/NSDManagement-API/IndividualPnfDescriptor.robot +++ b/SOL005/NSDManagement-API/IndividualPnfDescriptor.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation This clause defines all the resources and methods provided by the Iindividual PNF descriptor interface. \ Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Resource environment/pnfDescriptors.txt # Specific nsDescriptors Parameters Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} @@ -22,8 +22,7 @@ GET Single PNF Descriptor Log Validation of Content-Type : OK Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json NsdInfo.schema.json ${json} + Validate Json NsdInfo.schema.json ${result} Log Validation OK @@ -38,8 +37,7 @@ GET Single PNF Descriptor (Negative: Not found) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK @@ -50,14 +48,13 @@ PATCH Single PNF Descriptor - (Disabling a nsdInfo) Log The PATCH method modifies the user defined data of an individual PNF descriptor resource. Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File json/PnfdInfoModification.json + ${body}= Get File jsons/PnfdInfoModification.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId} ${body} Integer response status 200 Log Received 200 OK as expected ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PnfdInfoModification.schema.json ${json} + Validate Json PnfdInfoModification.schema.json ${result} Log Validation of PnfdInfoModification OK @@ -71,6 +68,7 @@ DELETE Single PNF Descriptor POST Single PNF Descriptor (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a POST. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} @@ -82,6 +80,7 @@ POST Single PNF Descriptor (Method not implemented) PUT Single PNF Descriptor (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} diff --git a/SOL005/NSDManagement-API/IndividualSubscription.robot b/SOL005/NSDManagement-API/IndividualSubscription.robot index 392a3716dce27b6f6cf02a2733df193066a08d0b..a454f1897669c5487229e95912478cac19bfdc33 100644 --- a/SOL005/NSDManagement-API/IndividualSubscription.robot +++ b/SOL005/NSDManagement-API/IndividualSubscription.robot @@ -1,6 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Resource environment/individualSubscription.txt Library OperatingSystem Library JSONLibrary @@ -17,8 +17,7 @@ GET Individual Subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE_JSON} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json NsdmSubscription.schema.json ${json} + Validate Json NsdmSubscription.schema.json ${result} Log Validated NsdmSubscription schema GET Subscription - Negative (Not Found) @@ -32,8 +31,7 @@ GET Subscription - Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK DELETE Subscription @@ -62,11 +60,11 @@ DELETE Subscription - Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK PUT Subscription - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -75,6 +73,7 @@ PUT Subscription - (Method not implemented) Log Received 405 Method not implemented as expected PATCH Subscription - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -83,6 +82,7 @@ PATCH Subscription - (Method not implemented) Log Received 405 Method not implemented as expected POST Subscription - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a POST. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} diff --git a/SOL005/NSDManagement-API/NSDContent.robot b/SOL005/NSDManagement-API/NSDContent.robot index b3ff9a68c856eac3364dc045cbe117e4f0e43f78..8a7c0b38f2ea79f28168c5979d3676f3c6a2f641 100644 --- a/SOL005/NSDManagement-API/NSDContent.robot +++ b/SOL005/NSDManagement-API/NSDContent.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation This clause defines the content of the individual NS descriptor, i.e. NSD content Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Resource environment/nsDescriptors.txt # Specific nsDescriptors Parameters Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} @@ -78,8 +78,7 @@ GET NSD Content - Negative Range Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK @@ -96,8 +95,7 @@ GET NSD Content- Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK @@ -112,8 +110,7 @@ GET NSD Content - Negative (onboardingState issue) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK @@ -189,13 +186,13 @@ PUT a NSD Content - Negative. Nsd in CREATING state Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST a NSD Content (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PUT. This method should not be implemented Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoId}/nsd_content @@ -205,6 +202,7 @@ POST a NSD Content (Method not implemented) PATCH a NSD Content (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoId}/nsd_content @@ -212,6 +210,7 @@ PATCH a NSD Content (Method not implemented) Log Received 405 Method not implemented as expected DELETE a NSD Content (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoId}/nsd_content diff --git a/SOL005/NSDManagement-API/NSDManagementNotification.robot b/SOL005/NSDManagement-API/NSDManagementNotification.robot index 9197a43f95f55c664edb3f3f5cc3a494e6152ff3..83228d366fdeab6b4bbc894dd8db55f84645bd0d 100644 --- a/SOL005/NSDManagement-API/NSDManagementNotification.robot +++ b/SOL005/NSDManagement-API/NSDManagementNotification.robot @@ -1,6 +1,5 @@ *** Setting *** Resource environment/variables.txt -Resource environment/generic.txt Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true Library MockServerLibrary @@ -130,6 +129,7 @@ Post Notification Negative 404 PUT VNF Package Management Notification + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log PUT Method not implemented &{req}= Create Mock Request Matcher PUT ${callback_endpoint} &{rsp}= Create Mock Response status_code=405 @@ -142,6 +142,7 @@ PUT VNF Package Management Notification PATCH VNF Package Management Notification + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log PATCH Method not implemented &{req}= Create Mock Request Matcher PATCH ${callback_endpoint} &{rsp}= Create Mock Response status_code=405 @@ -154,6 +155,7 @@ PATCH VNF Package Management Notification DELETE VNF Package Management Notification + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log PATCH Method not implemented &{req}= Create Mock Request Matcher DELETE ${callback_endpoint} &{rsp}= Create Mock Response status_code=405 diff --git a/SOL005/NSDManagement-API/NSDescriptors.robot b/SOL005/NSDManagement-API/NSDescriptors.robot index b427aa85dfa3f34e6528d9983d99006cd674c694..cb5f51acfb3fe2009235dbbd6ee1011571747965 100644 --- a/SOL005/NSDManagement-API/NSDescriptors.robot +++ b/SOL005/NSDManagement-API/NSDescriptors.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation This clause defines all the resources and methods provided by the NS descriptors interface. \ Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Resource environment/nsDescriptors.txt # Specific nsDescriptors Parameters Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} @@ -22,8 +22,7 @@ GET all Network Service Descriptors Log Validation of Content-Type : OK Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json NsdInfos.schema.json ${json} + Validate Json NsdInfos.schema.json ${result} Log Validation OK GET all Network Service Descriptors - Filter @@ -39,8 +38,7 @@ GET all Network Service Descriptors - Filter Should Contain ${contentType} application/json Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json NsdInfos.schema.json ${json} + Validate Json NsdInfos.schema.json ${result} Log Validation OK GET all Network Service Descriptors - Negative (wronge filter name) @@ -54,8 +52,7 @@ GET all Network Service Descriptors - Negative (wronge filter name) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET all Network Service Descriptors - Negative (Unauthorized: Wrong Token) @@ -70,8 +67,7 @@ GET all Network Service Descriptors - Negative (Unauthorized: Wrong Token) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET all Network Service Descriptors - Negative (Unauthorized: No Token) @@ -86,8 +82,7 @@ GET all Network Service Descriptors - Negative (Unauthorized: No Token) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET all Network Service Descriptors (Negative: Not found) @@ -101,8 +96,7 @@ GET all Network Service Descriptors (Negative: Not found) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK @@ -119,10 +113,9 @@ GET all Network Service Descriptors - all_fields Should Contain ${contentType} application/json Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json NsdInfos.schema.json ${json} + Validate Json NsdInfos.schema.json ${result} Log NsdInfo schema validated - ${links}= Get Value From Json ${json} $.._links + ${links}= Get Value From Json ${result} $.._links Validate Json links.schema.json ${links[0]} Log Validation for _links schema OK @@ -136,11 +129,10 @@ GET all Network Service Descriptors - exclude_default Should Contain ${contentType} application/json Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json NsdInfos.schema.json ${json} + Validate Json NsdInfos.schema.json ${result} Log NsdInfo schema validated Log Checking missing information for _links element - ${links}= Get Value From Json ${json} $.._links + ${links}= Get Value From Json ${result} $.._links Should Be Empty ${links} Log _links element is missing as excepted @@ -150,17 +142,16 @@ GET all Network Service Descriptors - exclude_fields Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use exclude_fields option Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages?exlude_fields=${fields} + GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors?exlude_fields=${fields} Integer response status 200 ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json NsdInfos.schema.json ${json} + Validate Json NsdInfos.schema.json ${result} Log NsdInfo schema validated Log Checking missing information for _links element - ${links}= Get Value From Json ${json} $.._links + ${links}= Get Value From Json ${result} $.._links Should Be Empty ${links} Log _links element is missing as excepted @@ -169,7 +160,7 @@ POST a new Network Service Descriptors Log Creating a new network service descriptor Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File json/createNsdInfoRequest.json + ${body}= Get File jsons/createNsdInfoRequest.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors ${body} Integer response status 201 @@ -178,11 +169,11 @@ POST a new Network Service Descriptors Should Contain ${headers} Location Log Response has header Location ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json NsdInfo.schema.json ${json} + Validate Json NsdInfo.schema.json ${result} Log Validation of NsdInfo OK PUT all Network Service Descriptors (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -191,6 +182,7 @@ PUT all Network Service Descriptors (Method not implemented) Log Received 405 Method not implemented as expected PATCH all Network Service Descriptors (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -199,6 +191,7 @@ PATCH all Network Service Descriptors (Method not implemented) Log Received 405 Method not implemented as expected DELETE all Network Service Descriptors (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} diff --git a/SOL005/NSDManagement-API/PNFDContent.robot b/SOL005/NSDManagement-API/PNFDContent.robot index ef17886748ad2964b714a6acab6417ed9686a93f..590d58168e9a5a4f51208f1bb7a34dadfb05b1d0 100644 --- a/SOL005/NSDManagement-API/PNFDContent.robot +++ b/SOL005/NSDManagement-API/PNFDContent.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation This clause defines the content of the individual NS descriptor, i.e. NSD content Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Resource environment/pnfDescriptors.txt # Specific nsDescriptors Parameters Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} @@ -32,8 +32,7 @@ GET PNFD Content- Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK @@ -48,8 +47,7 @@ GET PNFD Content - Negative (onboardingState issue) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK @@ -58,7 +56,7 @@ PUT a PNFD Content Set Headers {"Accept": "${ACCEPT_PLAIN}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ${body}= Get Binary File ${contentFile} - PUT ${apiRoot}/${apiName}/${apiVersion}//pnf_descriptors/${pnfdInfoId}/pnfd_content ${body} + PUT ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}/pnfd_content ${body} Integer response status 204 Log Received 204 No Content as expected ${response}= Output response body @@ -80,13 +78,13 @@ PUT a PNFD Content - Negative. Nsd in CREATING state Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST a PNFD Content (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PUT. This method should not be implemented Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}/pnfd_content @@ -96,6 +94,7 @@ POST a PNFD Content (Method not implemented) PATCH a NSDContent (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -104,6 +103,7 @@ PATCH a NSDContent (Method not implemented) Log Received 405 Method not implemented as expected DELETE a NSDContent (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} diff --git a/SOL005/NSDManagement-API/PNFDescriptors.robot b/SOL005/NSDManagement-API/PNFDescriptors.robot index e9d1b93fc08c5466e66b8a8d8879e1db1eeba111..739b2fea6008a5ebf7df5d97d4f1c086abb4249d 100644 --- a/SOL005/NSDManagement-API/PNFDescriptors.robot +++ b/SOL005/NSDManagement-API/PNFDescriptors.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation This clause defines all the resources and methods provided by the PNF descriptors interface. \ Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Resource environment/pnfDescriptors.txt # Specific nsDescriptors Parameters Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} @@ -22,8 +22,7 @@ GET all PNF Descriptors Log Validation of Content-Type : OK Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PnfdInfos.schema.json ${json} + Validate Json PnfdInfos.schema.json ${result} Log Validation OK GET all PNF Descriptors - Filter @@ -39,8 +38,7 @@ GET all PNF Descriptors - Filter Should Contain ${contentType} application/json Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PnfdInfos.schema.json ${json} + Validate Json PnfdInfos.schema.json ${result} Log Validation OK GET all PNF Descriptors - Negative (wronge filter name) @@ -54,8 +52,7 @@ GET all PNF Descriptors - Negative (wronge filter name) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET all PNF Descriptors - Negative (Unauthorized: Wrong Token) @@ -70,8 +67,7 @@ GET all PNF Descriptors - Negative (Unauthorized: Wrong Token) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET all PNF Descriptors - Negative (Unauthorized: No Token) @@ -86,8 +82,7 @@ GET all PNF Descriptors - Negative (Unauthorized: No Token) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET all PNF Descriptors (Negative: Not found) @@ -101,8 +96,7 @@ GET all PNF Descriptors (Negative: Not found) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK @@ -119,10 +113,9 @@ GET all PNF Descriptors - all_fields Should Contain ${contentType} application/json Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PnfdInfos.schema.json ${json} + Validate Json PnfdInfos.schema.json ${result} Log PnfdInfos schema validated - ${links}= Get Value From Json ${json} $.._links + ${links}= Get Value From Json ${result} $.._links Validate Json links.schema.json ${links[0]} Log Validation for _links schema OK @@ -136,11 +129,10 @@ GET all PNF Descriptors - exclude_default Should Contain ${contentType} application/json Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PnfdInfos.schema.json ${json} + Validate Json PnfdInfos.schema.json ${result} Log PnfdInfo schema validated Log Checking missing information for _links element - ${links}= Get Value From Json ${json} $.._links + ${links}= Get Value From Json ${result} $.._links Should Be Empty ${links} Log _links element is missing as excepted @@ -156,11 +148,10 @@ GET all PNF Descriptors - exclude_fields Should Contain ${contentType} application/json Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PnfdInfos.schema.json ${json} + Validate Json PnfdInfos.schema.json ${result} Log PnfdInfo schema validated Log Checking missing information for _links element - ${links}= Get Value From Json ${json} $.._links + ${links}= Get Value From Json ${result} $.._links Should Be Empty ${links} Log _links element is missing as excepted @@ -168,7 +159,7 @@ POST a new PNF Descriptor Log Creating a new PNF descriptor Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File json/createPnfdInfoRequest.json + ${body}= Get File jsons/createPnfdInfoRequest.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors ${body} Integer response status 201 @@ -177,11 +168,11 @@ POST a new PNF Descriptor Should Contain ${headers} Location Log Response has header Location ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PnfdInfo.schema.json ${json} + Validate Json PnfdInfo.schema.json ${result} Log Validation of PnfdInfo OK PUT all PNF Descriptors (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -190,6 +181,7 @@ PUT all PNF Descriptors (Method not implemented) Log Received 405 Method not implemented as expected PATCH all PNF Descriptors (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -198,6 +190,7 @@ PATCH all PNF Descriptors (Method not implemented) Log Received 405 Method not implemented as expected DELETE all PNF Descriptors (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} diff --git a/SOL005/NSDManagement-API/Subscriptions.robot b/SOL005/NSDManagement-API/Subscriptions.robot index 04cfa0698143f8234b218cb74859ab354c5c7274..071f16ff96ba4a5e1549bb6b8fcbf5e2efa90dcb 100644 --- a/SOL005/NSDManagement-API/Subscriptions.robot +++ b/SOL005/NSDManagement-API/Subscriptions.robot @@ -1,6 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Resource environment/subscriptions.txt Library OperatingSystem Library JSONLibrary @@ -19,8 +19,7 @@ GET Subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE_JSON} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json NsdmSubscriptions.schema.json ${json} + Validate Json NsdmSubscriptions.schema.json ${result} Log Validated NsdmSubscription schema GET Subscription - Filter @@ -33,8 +32,7 @@ GET Subscription - Filter ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE_JSON} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json NsdmSubscriptions.schema.json ${json} + Validate Json NsdmSubscriptions.schema.json ${result} Log Validated NsdmSubscription schema GET Subscription - Negative Filter @@ -48,8 +46,7 @@ GET Subscription - Negative Filter Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Subscription - Negative (Not Found) @@ -63,8 +60,7 @@ GET Subscription - Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST Subscription @@ -73,7 +69,7 @@ POST Subscription Log Trying to create a new subscription Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File json/subscriptions.json + ${body}= Get File jsons/subscriptions.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} Integer response status 201 @@ -82,8 +78,7 @@ POST Subscription Should Contain ${headers} Location Log Response has header Location ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json NsdmSubscription.schema.json ${json} + Validate Json NsdmSubscription.schema.json ${result} Log Validation of NsdmSubscription OK POST Subscription - DUPLICATION @@ -91,7 +86,7 @@ POST Subscription - DUPLICATION Pass Execution If ${NFVO_DUPLICATION} == 0 NFVO is not permitting duplication. Skipping the test Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File json/subscriptions.json + ${body}= Get File jsons/subscriptions.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} Integer response status 201 @@ -100,8 +95,7 @@ POST Subscription - DUPLICATION Should Contain ${headers} Location Log Response has header Location ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json NsdmSubscription.schema.json ${json} + Validate Json NsdmSubscription.schema.json ${result} Log Validation of NsdmSubscription OK POST Subscription - NO DUPLICATION @@ -109,7 +103,7 @@ POST Subscription - NO DUPLICATION Pass Execution If ${NFVO_DUPLICATION} == 1 NFVO is permitting duplication. Skipping the test Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File json/subscriptions.json + ${body}= Get File jsons/subscriptions.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} Integer response status 303 @@ -119,6 +113,7 @@ POST Subscription - NO DUPLICATION Log Response header contains Location PUT Subscription - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -127,6 +122,7 @@ PUT Subscription - (Method not implemented) Log Received 405 Method not implemented as expected PATCH Subscription - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -135,6 +131,7 @@ PATCH Subscription - (Method not implemented) Log Received 405 Method not implemented as expected DELETE Subscription - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} diff --git a/SOL005/NSDManagement-API/environment/generic.txt b/SOL005/NSDManagement-API/environment/generic.txt deleted file mode 100644 index 81b2ec62d8c63018d38c0a667abe11d6df7ec95a..0000000000000000000000000000000000000000 --- a/SOL005/NSDManagement-API/environment/generic.txt +++ /dev/null @@ -1,17 +0,0 @@ -*** Variables *** -${NFVO_HOST} localhost # Hostname of the NFVO -${NFVO_PORT} 8081 # Listening port of the NFVO -${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 -${CONTENT_TYPE_JSON} application/json -${ACCEPT_JSON} application/json -${apiRoot} / -${AUTH_USAGE} 1 -${NEG_AUTHORIZATION} Bearer negativetoken -${apiVersion} v1 -${apiName} nsd -${FIELD_USAGE} 1 -${NFVO_AUTHENTICATION} Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 -${NFVO_AUTH_USAGE} 1 - -${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar diff --git a/SOL005/NSDManagement-API/environment/variables.txt b/SOL005/NSDManagement-API/environment/variables.txt index c758145e5c52572eed2049b66bc603171bce9385..e588bf2addd872593a11701cda06ba0483cbb717 100644 --- a/SOL005/NSDManagement-API/environment/variables.txt +++ b/SOL005/NSDManagement-API/environment/variables.txt @@ -1,7 +1,25 @@ - *** Variables *** +${NFVO_HOST} localhost # Hostname of the NFVO +${NFVO_PORT} 8081 # Listening port of the NFVO +${NFVO_SCHEMA} https +${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${CONTENT_TYPE_JSON} application/json +${ACCEPT_JSON} application/json +${apiRoot} / +${AUTH_USAGE} 1 +${NEG_AUTHORIZATION} Bearer negativetoken +${apiVersion} v1 +${apiName} nsd +${FIELD_USAGE} 1 +${NFVO_AUTHENTICATION} Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 +${NFVO_AUTH_USAGE} 1 + +${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + ${callback_uri} http://localhost ${callback_port} 9091 ${callback_endpoint} /endpoint ${callback_endpoint_error} /endpoint_404 -${sleep_interval} 20s \ No newline at end of file +${sleep_interval} 20s + +${testOptionalMethods} 0 diff --git a/SOL005/NSFaultManagement-API/Alarms.robot b/SOL005/NSFaultManagement-API/Alarms.robot new file mode 100644 index 0000000000000000000000000000000000000000..18354e9ae303b0d9433fcb18ec03630dfe194c13 --- /dev/null +++ b/SOL005/NSFaultManagement-API/Alarms.robot @@ -0,0 +1,101 @@ +*** Settings *** +Resource environment/variables.txt +Resource NSFMOperationKeywords.robot +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library OperatingSystem + +*** Test Cases *** +POST Alarms - Method not implemented + [Documentation] Test ID: 8.4.2.1 + ... Test title:POST Alarms - Method not implemented + ... Test objective: The objective is to post alarms + ... Pre-conditions: + ... Reference: section 8.4.2 - SOL005 v2.4.1 + ... Config ID: + ... Applicability: + ... Post-Conditions: + Do POST Alarms + Check HTTP Response Status Code Is 405 + +Get information about multiple alarms + [Documentation] Test ID: 8.4.2.2-1 + ... Test title: Get information about multiple alarms + ... Test objective: The objective is to retrieve information about the alarm list + ... Pre-conditions: + ... Reference: section 8.4.2 - SOL005 v2.4.1 + ... Config ID: + ... Applicability: + ... Post-Conditions: + Do GET Alarms + Check HTTP Response Status Code Is 200 + Check HTTP Response Header ContentType is ${CONTENT_TYPE} + Check HTTP Response Body Json Schema Is alarms.schema.json + + +Get information about multiple alarms with filters + [Documentation] Test ID: 8.4.2.2-2 + ... Test title: Get information about multiple alarms with filters + ... Test objective: The objective is to retrieve information about the alarm list with filters + ... Pre-conditions: + ... Reference: section 8.4.2 - SOL005 v2.4.1 + ... Config ID: + ... Applicability: + ... Post-Conditions: + Do GET Alarms With Filters + Check HTTP Response Status Code Is 200 + Check HTTP Response Header ContentType is ${CONTENT_TYPE} + Check HTTP Response Body Json Schema Is alarms.schema.json + + +Get information about multiple alarms Bad Request Invalid attribute-based filtering parameters + [Documentation] Test ID: 8.4.2.2-3 + ... Test title: Get information about multiple alarms - with Invalid attribute-based filtering parameters + ... Test objective: The objective is to retrieve information about the alarm list + ... Pre-conditions: + ... Reference: section 8.4.2 - SOL005 v2.4.1 + ... Config ID: + ... Applicability: + ... Post-Conditions: + Do GET Alarms With Invalid Filters + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails.schema.json + +PUT Alarms - Method not implemented + [Documentation] Test ID: 8.4.2.3 + ... Test title: PUT Alarms - Method not implemented + ... Test objective: The objective is to put alarms + ... Pre-conditions: + ... Reference: section 8.4.2 - SOL005 v2.4.1 + ... Config ID: + ... Applicability: + ... Post-Conditions: + Do PUT Alarms + Check HTTP Response Status Code Is 405 + + +PATCH Alarms - Method not implemented + [Documentation] Test ID: 8.4.2.4 + ... Test title: PATCH Alarms - Method not implemented + ... Test objective: The objective is to post alarms + ... Pre-conditions: + ... Reference: section 8.4.2 - SOL005 v2.4.1 + ... Config ID: + ... Applicability: + ... Post-Conditions: + Do PATCH Alarms + Check HTTP Response Status Code Is 405 + +DELETE Alarms - Method not implemented + [Documentation] Test ID: 8.4.2.5 + ... Test title: DELETE Alarms - Method not implemented + ... Test objective: The objective is to DELETE alarms + ... Pre-conditions: + ... Reference: section 8.4.2 - SOL005 v2.4.1 + ... Config ID: + ... Applicability: + ... Post-Conditions: + Do DELETE Alarms + Check HTTP Response Status Code Is 405 + diff --git a/SOL005/NSFaultManagement-API/IndividualAlarm.robot b/SOL005/NSFaultManagement-API/IndividualAlarm.robot new file mode 100644 index 0000000000000000000000000000000000000000..b7db7a345f8ab33a1abbc8ab855c939f03f3f98c --- /dev/null +++ b/SOL005/NSFaultManagement-API/IndividualAlarm.robot @@ -0,0 +1,116 @@ +*** Settings *** +# Suite setup Expect spec SOL003-VNFLifecycleManagement-API.yaml +Resource environment/variables.txt +Resource NSFMOperationKeywords.robot +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library OperatingSystem +Library DependencyLibrary + +*** Test Cases *** +POST Individual Alarm - Method not implemented + [Documentation] Test ID: 8.4.3.1 + ... Test title:POST Individual Alarm - Method not implemented + ... Test objective: The objective is to post alarms + ... Pre-conditions: + ... Reference: section 8.4.3 - SOL005 v2.4.1 + ... Config ID: + ... Applicability: + ... Post-Conditions: + Do POST Individual Alarm + Check HTTP Response Status Code Is 405 + +GET information about Individual Alarm + [Documentation] Test ID: 8.4.3.2-1 + ... Test title: GET information about Individual Alarm + ... Test objective: The objective is to read an individual alarm. + ... Pre-conditions: The related alarm exists + ... Reference: section 8.4.3 - SOL005 v2.4.1 + ... Config ID: + ... Applicability: + ... Post-Conditions: + Do GET Individual Alarm + Check HTTP Response Status Code Is 200 + Check HTTP Response Header ContentType is ${CONTENT_TYPE} + Check HTTP Response Body Json Schema Is alarm.schema.json + +GET information about Invalid Individual Alarm + [Documentation] Test ID: 8.4.3.2-2 + ... Test title: GET information about Invalid Individual Alarm + ... Test objective: The objective is to read an Invalid individual alarm. + ... Pre-conditions: The related alarm does not exists + ... Reference: section 8.4.3 - SOL005 v2.4.1 + ... Config ID: + ... Applicability: + ... Post-Conditions: + Do GET Invalid Individual Alarm + Check HTTP Response Status Code Is 404 + + +PUT Individual Alarm - Method not implemented + [Documentation] Test ID: 8.4.3.3 + ... Test title:PUT Individual Alarm - Method not implemented + ... Test objective: The objective is to post alarms + ... Pre-conditions: + ... Reference: section 8.4.3 - SOL005 v2.4.1 + ... Config ID: + ... Applicability: + ... Post-Conditions: + Do PUT Individual Alarm + Check HTTP Response Status Code Is 405 + +PATCH Alarm + [Documentation] Test ID: 8.4.3.4-1 + ... Test title: Modify an individual alarm resource + ... Test objective: The objective is to Modify an individual alarm resource + ... Pre-conditions: The related alarm exists + ... Reference: section 8.4.3 - SOL005 v2.4.1 + ... Config ID: + ... Applicability: + ... Post-Conditions: + Do PATCH Individual Alarm + Check HTTP Response Status Code Is 200 + Check HTTP Response Header ContentType is ${CONTENT_TYPE} + Check HTTP Response Body Json Schema Is alarmModifications.schema.json + +PATCH Alarm - Conflict + [Documentation] Test ID: 8.4.3.4-2 + ... Test title: Modify an individual alarm resource - Conflict + ... Test objective: The objective is to Modify an individual alarm resource + ... Pre-conditions: The related alarm exists + ... Reference: section 8.4.3 - SOL002 v2.4.1 + ... Config ID: + ... Applicability: + ... Post-Conditions: The alarm resource is not modified + Depends On Test PATCH Alarm # If the previous test scceeded, it means that the alarm is in ackownledged state + Do PATCH Individual Alarm + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails.schema.json + + +PATCH Alarm - Precondition failed + [Documentation] Test ID: 8.4.3.4-3 + ... Test title: Modify an individual alarm resource - Precondition failed + ... Test objective: The objective is to Modify an individual alarm resource + ... Pre-conditions: The related alarm exists + ... Reference: section 8.4.3 - SOL005 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: The alarm resource is not modified + Depends On Test PATCH Alarm # If the previous test scceeded, it means that Etag has been modified + Do PATCH Individual Alarm Conflict + Check HTTP Response Status Code Is 412 + Check HTTP Response Body Json Schema Is ProblemDetails.schema.json + +DELETE Individual Alarm - Method not implemented + [Documentation] Test ID: 8.4.3.5 + ... Test title:DELETE Individual Alarm - Method not implemented + ... Test objective: The objective is to post alarms + ... Pre-conditions: + ... Reference: section 8.4.3 - SOL005 v2.4.1 + ... Config ID: + ... Applicability: + ... Post-Conditions: + Do DELETE Individual Alarm + Check HTTP Response Status Code Is 405 diff --git a/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot b/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot new file mode 100644 index 0000000000000000000000000000000000000000..9acf153667496285181af65f0bf726cecb8c9fc3 --- /dev/null +++ b/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot @@ -0,0 +1,158 @@ +*** Settings *** +Resource environment/variables.txt +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library OperatingSystem + + +*** Keywords *** +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Log Validate Status code + Should Be Equal ${response[0]['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Header Contains + [Arguments] ${CONTENT_TYPE} + Should Contain ${response[0]['headers']} ${CONTENT_TYPE} + Log Header is present + +Check HTTP Response Body Json Schema Is + [Arguments] ${schema} + Validate Json ${schema} ${response[0]['body']} + Log Json Schema Validation OK + +Check HTTP Response Header ContentType is + [Arguments] ${expected_contentType} + Log Validate content type + Should Be Equal ${response[0]['headers']['Content-Type']} ${expected_contentType} + Log Content Type validated + +Do POST Alarms + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/${apiVersion}/alarms + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do PATCH Alarms + log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/alarms + ${outputResponse} = Output response + Set Global Variable @{response} ${outputResponse} + +Do PUT Alarms + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/alarms + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + + +Do DELETE Alarms + log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/alarms + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do GET Alarms + Log Query NFVO The GET method queries information about multiple alarms. + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query + Get ${apiRoot}/${apiName}/${apiVersion}/alarms + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do GET Alarms With Filters + Log Query NFVO The GET method queries information about multiple alarms with filters. + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query + Get ${apiRoot}/${apiName}/${apiVersion}/alarms?${alarm_filter}=${nsInstanceId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do GET Alarms With Invalid Filters + Log Query NFVO The GET method queries information about multiple alarms with filters. + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query + Get ${apiRoot}/${apiName}/${apiVersion}/alarms?${invalid_alarm_filter}=${nsInstanceId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do POST Individual Alarm + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do DELETE Individual Alarm + log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do PUT Individual Alarm + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do GET Individual Alarm + Log Query NFVO The GET method queries information about an alarm. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query + Get ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do GET Invalid Individual Alarm + Log Query NFVO The GET method queries information about an invalid alarm. Should return does not exist + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query + Get ${apiRoot}/${apiName}/${apiVersion}/alarms/${invalidAlarmId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Do PATCH Individual Alarm + log Trying to perform a PATCH. This method modifies an individual alarm resource + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/alarmModifications.json + Patch ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + + +Do PATCH Individual Alarm Conflict + log Trying to perform a PATCH. This method modifies an individual alarm resource + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} + Set Headers {"If-Match": "${Etag}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/alarmModifications.json + Patch ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + + \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/environment/variables.txt b/SOL005/NSFaultManagement-API/environment/variables.txt new file mode 100644 index 0000000000000000000000000000000000000000..69b955eb9bc78570432c876d77aed5d1153c48bc --- /dev/null +++ b/SOL005/NSFaultManagement-API/environment/variables.txt @@ -0,0 +1,41 @@ +*** Variables *** +${NFVO_HOST} localhost # Hostname of the VNFM +${NFVO_PORT} 8080 # Listening port of the VNFM +${NFVO_SCHEMA} https +${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== +${ACCEPT} application/json +${AUTH_USAGE} 1 +${alarm_filter} nsInstanceId +${nsInstanceId} 007c111c-38a1-42c0-a666-7475ecb1567c +${invalid_alarm_filter} badFilter +${apiRoot} / +${apiName} nsfm +${apiVersion} v1 +${CONTENT_TYPE} application/json + +${NFVO_DUPLICATION} 0 + +${alarmId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d +${invalidAlarmId} invalidAlramID +${Etag}= an etag +${Etag_modified}= a modified etag +${CONTENT_TYPE_PATCH} application/merge-patch+json + +${PerceivedSeverity} CRITICAL + +${sub_filter} filter +${sub_filter_invalid} filter_invalid + +${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f + +${callback_uri} http://localhost +${callback_port} 9091 +${callback_endpoint} /endpoint +${callback_endpoint_error} /endpoint_404 +${sleep_interval} 20s + +${AlarmNotification} {} +${AlarmClearedNotification} {} +${AlarmListRebuiltNotification} {} + +${response} {} diff --git a/SOL005/NSFaultManagement-API/jsons/alarmModifications.json b/SOL005/NSFaultManagement-API/jsons/alarmModifications.json new file mode 100644 index 0000000000000000000000000000000000000000..89f6d32b81b12afbaad419d83cc01733019945fc --- /dev/null +++ b/SOL005/NSFaultManagement-API/jsons/alarmModifications.json @@ -0,0 +1,3 @@ +{ + "ackState": "ACKNOWLEDGED" +} \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/schemas/EventType.schema.json b/SOL005/NSFaultManagement-API/schemas/EventType.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..2da9701e09c6dc865928b095b7d0863c223de8ef --- /dev/null +++ b/SOL005/NSFaultManagement-API/schemas/EventType.schema.json @@ -0,0 +1,11 @@ +{ + "description": "The enumeration EventType represents those types of events that trigger an alarm. - COMMUNICATIONS_ALARM: An alarm of this type is associated with the\n procedure and/or process required conveying information from one point\n to another (ITU-T Recommendation X.733).\n- PROCESSING_ERROR_ALARM: An alarm of this type is associated with a\n software or processing fault (ITU-T Recommendation X.733).\n- ENVIRONMENTAL_ALARM: An alarm of this type is associated with a\n condition related to an enclosure in which the equipment resides\n (ITU-T Recommendation X.733).\n- QOS_ALARM: An alarm of this type is associated with degradation in the\n quality of a service (ITU-T Recommendation X.733).\n- EQUIPMENT_ALARM: An alarm of this type is associated with an equipment\n fault (ITU-T Recommendation X.733).\n", + "type": "string", + "enum": [ + "COMMUNICATIONS_ALARM", + "PROCESSING_ERROR_ALARM", + "ENVIRONMENTAL_ALARM", + "QOS_ALARM", + "EQUIPMENT_ALARM" + ] +} \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/schemas/FaultyComponentInfo.schema.json b/SOL005/NSFaultManagement-API/schemas/FaultyComponentInfo.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..cf3d57325b1d85ca4768abe44f48d6daf87fa789 --- /dev/null +++ b/SOL005/NSFaultManagement-API/schemas/FaultyComponentInfo.schema.json @@ -0,0 +1,18 @@ +{ + "description": "This type represents the faulty component that has a negative impact on an NS. It shall comply with the provisions defined in Table 8.5.3.4-1.\n", + "type": "object", + "properties": { + "faultyNestedNsInstanceId": { + "description": "Identifier of the faulty nested NS instance.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "faultyResourceType": { + "description": "Identifier of the faulty NS virtual link instance.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "faultyNsVirtualLinkInstanceId": { + "description": "Identifier of the faulty VNF instance.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + } + } +} \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/schemas/FaultyResourceInfo.schema.json b/SOL005/NSFaultManagement-API/schemas/FaultyResourceInfo.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..d349b9d138cbf12eea62e60f32d0f8609349ff89 --- /dev/null +++ b/SOL005/NSFaultManagement-API/schemas/FaultyResourceInfo.schema.json @@ -0,0 +1,18 @@ +{ + "description": "This type represents the faulty virtual resources that have a negative impact on a NS.\n", + "type": "object", + "required": [ + "faultyResource", + "faultyResourceType" + ], + "properties": { + "faultyResource": { + "description": "Information that identifies the faulty resource instance and its managing entity.\n", + "$ref": "SOL005_def.yaml#/definitions/ResourceHandle" + }, + "faultyResourceType": { + "description": "Type of the faulty resource.\n", + "$ref": "#/definitions/FaultyResourceType" + } + } +} \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/schemas/FaultyResourceType.schema.json b/SOL005/NSFaultManagement-API/schemas/FaultyResourceType.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..c5fc0ebf5edc5674677a15bb274b46d9610ab4bb --- /dev/null +++ b/SOL005/NSFaultManagement-API/schemas/FaultyResourceType.schema.json @@ -0,0 +1,9 @@ +{ + "description": "The enumeration FaultyResourceType represents those types of faulty resource. Acceptable values are: - COMPUTE - Virtual compute resource. - STORAGE - Virtual storage resource. - NETWORK - Virtual network resource.\n", + "type": "string", + "enum": [ + "COMPUTE", + "STORAGE", + "NETWORK" + ] +} \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/schemas/FmNotificationsFilter.schema.json b/SOL005/NSFaultManagement-API/schemas/FmNotificationsFilter.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..d4086b7d797c7d2ffe41b6f1c7d8fa58a6850139 --- /dev/null +++ b/SOL005/NSFaultManagement-API/schemas/FmNotificationsFilter.schema.json @@ -0,0 +1,50 @@ +{ + "description": "This type represents a subscription filter related to notifications about NS faults. It shall comply with the provisions defined in Table 8.5.3.2-1. 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)..\n", + "type": "object", + "properties": { + "nsInstanceSubscriptionFilter": { + "description": "Filter criteria to select NS instances about which to notify. \n", + "$ref": "SOL005_def.yaml#/definitions/NsInstanceSubscriptionFilter" + }, + "notificationTypes": { + "description": "Match particular notification types. Permitted values: - AlarmNotification - AlarmClearedNotification - AlarmListRebuiltNotification.\n", + "type": "array", + "items": { + "type": "string", + "enum": [ + "AlarmNotification", + "AlarmClearedNotification", + "AlarmListRebuiltNotification" + ] + } + }, + "faultyResourceTypes": { + "description": "Match alarms related to NSs with a faulty resource type listed in this attribute.\n", + "type": "array", + "items": { + "$ref": "#/definitions/FaultyResourceType" + } + }, + "perceivedSeverities": { + "description": "Match VNF alarms with a perceived severity listed in this attribute.\n", + "type": "array", + "items": { + "$ref": "#/definitions/PerceivedSeverityType" + } + }, + "eventTypes": { + "description": "Match VNF alarms with an event type listed in this attribute.\n", + "type": "array", + "items": { + "$ref": "#/definitions/EventType" + } + }, + "probableCauses": { + "description": "Match VNF alarms with a probable cause listed in this attribute.\n", + "type": "array", + "items": { + "type": "string" + } + } + } +} \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/schemas/FmSubscription.schema.json b/SOL005/NSFaultManagement-API/schemas/FmSubscription.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..ba91f25e5fb62d56542c04ce556141f2b6edfe79 --- /dev/null +++ b/SOL005/NSFaultManagement-API/schemas/FmSubscription.schema.json @@ -0,0 +1,37 @@ +{ + "description": "This type represents a subscription related to notifications about VNF faults.\n", + "type": "object", + "required": [ + "id", + "callbackUri", + "_links" + ], + "properties": { + "id": { + "description": "Identifier of this subscription resource.\n", + "$ref": "SOL005_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.\n", + "$ref": "#/definitions/FmNotificationsFilter" + }, + "callbackUri": { + "description": "The URI of the endpoint to send the notification to.\n", + "type": "string", + "format": "url" + }, + "_links": { + "description": "Links for this resource.\n", + "type": "object", + "required": [ + "self" + ], + "properties": { + "self": { + "description": "URI of this resource.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + } + } + } + } +} \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/schemas/FmSubscriptionRequest.schema.json b/SOL005/NSFaultManagement-API/schemas/FmSubscriptionRequest.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..c207633ba21da9cde8d091834133022eb837bc3b --- /dev/null +++ b/SOL005/NSFaultManagement-API/schemas/FmSubscriptionRequest.schema.json @@ -0,0 +1,22 @@ +{ + "description": "This type represents a subscription request related to notifications about VNF faults.\n", + "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.\n", + "$ref": "#/definitions/FmNotificationsFilter" + }, + "callbackUri": { + "description": "The URI of the endpoint to send the notification to.\n", + "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.\n", + "$ref": "SOL005_def.yaml#/definitions/SubscriptionAuthentication" + } + } +} \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/schemas/PerceivedSeverityType.schema.json b/SOL005/NSFaultManagement-API/schemas/PerceivedSeverityType.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..026a8949351aafcb524d0491c9ea7e01ea7681f8 --- /dev/null +++ b/SOL005/NSFaultManagement-API/schemas/PerceivedSeverityType.schema.json @@ -0,0 +1,12 @@ +{ + "description": "Indicates the relative level of urgency for operator attention. * CRITICAL: The Critical severity level indicates that a service\n affecting condition has occurred and an immediate corrective action\n is required. Such a severity can be reported, for example, when a\n managed object becomes totally out of service and its capability needs\n to be restored (ITU-T Recommendation X.733).\n* MAJOR: The Major severity level indicates that a service affecting\n condition has developed and an urgent corrective action is required.\n Such a severity can be reported, for example, when there is a severe\n degradation in the capability of the managed object and its full\n capability needs to be restored (ITU-T Recommendation X.733).\n* MINOR: The Minor severity level indicates the existence of a\n non-service affecting fault condition and that corrective action\n should be taken in order to prevent a more serious (for example,\n service affecting) fault. Such a severity can be reported, for\n example, when the detected alarm condition is not currently degrading\n the capacity of the managed object (ITU-T Recommendation X.733).\n* WARNING: The Warning severity level indicates the detection of a\n potential or impending service affecting fault, before any significant\n effects have been felt. Action should be taken to further diagnose (if\n necessary) and correct the problem in order to prevent it from\n becoming a more serious service affecting fault (ITU-T Recommendation\n X.733).\n* INDETERMINATE: The Indeterminate severity level indicates that the\n severity level cannot be determined (ITU-T Recommendation X.733).\n* CLEARED: The Cleared severity level indicates the clearing of one or\n more previously reported alarms. This alarm clears all alarms for this\n managed object that have the same Alarm type, Probable cause and\n Specific problems (if given) (ITU-T Recommendation X.733).\n", + "type": "string", + "enum": [ + "CRITICAL", + "MAJOR", + "MINOR", + "WARNING", + "INDETERMINATE", + "CLEARED" + ] +} \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/schemas/ProblemDetails.schema.json b/SOL005/NSFaultManagement-API/schemas/ProblemDetails.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..cb8cecc4e0695aca03163370e39c5fe6e194253b --- /dev/null +++ b/SOL005/NSFaultManagement-API/schemas/ProblemDetails.schema.json @@ -0,0 +1,34 @@ +{ + "definitions": {}, + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n", + "properties": { + "type": { + "type": "string", + "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n", + "format": "URI" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n" + }, + "status": { + "type": "integer", + "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n" + }, + "detail": { + "type": "string", + "description": "A human-readable explanation specific to this occurrence of the problem.\n" + }, + "instance": { + "type": "string", + "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n", + "format": "URI" + } + }, + "required": [ + "status", + "detail" + ] +} \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/schemas/alarm.schema.json b/SOL005/NSFaultManagement-API/schemas/alarm.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..26683f2fde62b9651da78ccdbce5bcc52eafde0b --- /dev/null +++ b/SOL005/NSFaultManagement-API/schemas/alarm.schema.json @@ -0,0 +1,107 @@ +{ + "description": "The alarm data type encapsulates information about an alarm. It shall comply with the provisions defined in Table 8.5.2.4-1\n", + "type": "object", + "required": [ + "id", + "managedObjectId", + "alarmRaisedTime", + "rootCauseFaultyComponent", + "ackState", + "perceivedSeverity", + "eventTime", + "eventType", + "probableCause", + "isRootCause", + "_links" + ], + "properties": { + "id": { + "description": "Identifier of this Alarm information element.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "managedObjectId": { + "description": "Identifier of the affected NS instance.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "rootCauseFaultyComponent": { + "description": "The NS components that are causing the NS fault.\n", + "$ref": "#/definitions/FaultyComponentInfo" + }, + "rootCauseFaultyResource": { + "description": "The virtualised resources that are causing the NS fault. It shall be present when the faulty component is \"NS Virtual Link\" or \"VNF\".\n", + "$ref": "#/definitions/FaultyResourceInfo" + }, + "alarmRaisedTime": { + "description": "Alarm identifier.\n", + "$ref": "SOL005_def.yaml#/definitions/DateTime" + }, + "alarmChangedTime": { + "description": "The time stamp indicating when the alarm was cleared.\n", + "$ref": "SOL005_def.yaml#/definitions/DateTime" + }, + "alarmClearedTime": { + "description": "Links to resources related to this notification.\n", + "$ref": "SOL005_def.yaml#/definitions/DateTime" + }, + "ackState": { + "description": "Acknowledgment state of the alarm. Permitted values: UNACKNOWLEDGED ACKNOWLEDGED\n", + "type": "string", + "enum": [ + "UNACKNOWLEDGED", + "ACKNOWLEDGED" + ] + }, + "perceivedSeverity": { + "description": "Perceived severity of the managed object failure.\n", + "$ref": "#/definitions/PerceivedSeverityType" + }, + "eventTime": { + "description": "Time stamp indicating when the fault was observed.\n", + "$ref": "SOL005_def.yaml#/definitions/DateTime" + }, + "eventType": { + "description": "Type of event.\n", + "$ref": "#/definitions/EventType" + }, + "faultType": { + "description": "Additional information to clarify the type of the fault.\n", + "type": "string" + }, + "probableCause": { + "description": "Information about the probable cause of the fault.\n", + "type": "string" + }, + "isRootCause": { + "description": "Attribute indicating if this fault is the root for other correlated alarms. If TRUE, then the alarms listed in the attribute CorrelatedAlarmId are caused by this fault.\n", + "type": "boolean" + }, + "correlatedAlarmIds": { + "description": "List of identifiers of other alarms correlated to this fault.\n", + "type": "array", + "items": { + "$ref": "SOL005_def.yaml#/definitions/Identifier" + } + }, + "faultDetails": { + "description": "Provides additional information about the fault..\n", + "type": "string" + }, + "_links": { + "description": "Links for this resource.\n", + "type": "object", + "required": [ + "self" + ], + "properties": { + "self": { + "description": "URI of this resource.\n", + "$ref": "SOL005_def.yaml#/definitions/Link", + "objectInstance": { + "description": "Link to the resource representing the NS instance to which the notified alarm is correlated. Shall be present if the NS instance information is accessible as a resource.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + } + } + } + } + } +} \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/schemas/alarmClearedNotification.schema.json b/SOL005/NSFaultManagement-API/schemas/alarmClearedNotification.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..25b39f8e2c237f2601dd47b2d219630783c28be5 --- /dev/null +++ b/SOL005/NSFaultManagement-API/schemas/alarmClearedNotification.schema.json @@ -0,0 +1,59 @@ +{ + "description": "This type represents an alarm cleared notification about VNF faults. The notification shall be triggered by the VNFM when an alarm has been cleared.\n", + "type": "object", + "required": [ + "id", + "notificationType", + "subscriptionId", + "timeStamp", + "alarmId", + "alarmClearedTime", + "_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.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "notificationType": { + "description": "Discriminator for the different notification types. Shall be set to \"AlarmClearedNotification\" for this notification type.\n", + "type": "string", + "enum": [ + "AlarmClearedNotification" + ] + }, + "subscriptionId": { + "description": "Identifier of the subscription that this notification relates to.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "timeStamp": { + "description": "Date-time of the generation of the notification.\n", + "$ref": "SOL005_def.yaml#/definitions/DateTime" + }, + "alarmId": { + "description": "Alarm identifier.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "alarmClearedTime": { + "description": "The time stamp indicating when the alarm was cleared.\n" + }, + "_links": { + "description": "Links to resources related to this notification.\n", + "type": "object", + "required": [ + "subscription", + "alarm" + ], + "properties": { + "subscription": { + "description": "Link to the related subscription.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "alarm": { + "description": "Link to the resource that represents the related alarm.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + } + } + } + } +} \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/schemas/alarmListRebuiltNotification.schema.json b/SOL005/NSFaultManagement-API/schemas/alarmListRebuiltNotification.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..ff8579b421d21673b6790300b67eeee9e7d5aa00 --- /dev/null +++ b/SOL005/NSFaultManagement-API/schemas/alarmListRebuiltNotification.schema.json @@ -0,0 +1,50 @@ +{ + "description": "This type represents a notification that the alarm list has been rebuilt, e.g. if the VNFM detects its storage holding the alarm list is corrupted. The notification shall be triggered by the VNFM when the alarm list has been rebuilt.\n", + "type": "object", + "required": [ + "id", + "notificationType", + "subscriptionId", + "timeStamp", + "_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.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "notificationType": { + "description": "Discriminator for the different notification types. Shall be set to \"AlarmListRebuiltNotification\" for this notification type.\n", + "type": "string", + "enum": [ + "AlarmListRebuiltNotification" + ] + }, + "subscriptionId": { + "description": "Identifier of the subscription that this notification relates to.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "timeStamp": { + "description": "Date-time of the generation of the notification.\n", + "$ref": "SOL005_def.yaml#/definitions/DateTime" + }, + "_links": { + "description": "Links to resources related to this notification.\n", + "type": "object", + "required": [ + "subscription", + "alarms" + ], + "properties": { + "subscription": { + "description": "Link to the related subscription.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "alarms": { + "description": "Link to the alarm list, i.e. the \"Alarms\" resource.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + } + } + } + } +} \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/schemas/alarmModifications.schema.json b/SOL005/NSFaultManagement-API/schemas/alarmModifications.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..ae310c34a754e6e542b0a2a654d1b1315b0e4561 --- /dev/null +++ b/SOL005/NSFaultManagement-API/schemas/alarmModifications.schema.json @@ -0,0 +1,16 @@ +{ + "description": "This type represents attribute modifications for an \"Individual alarm\" resource, i.e. modifications to a resource representation based on the \"Alarm\" data type. The attributes of \"Alarm\" that can be modified according to the provisions in clause 8.5.2.4 are included in the \"AlarmModifications\" data type. The \"AlarmModifications\" data type shall comply with the provisions defined in Table 8.5.2.8-1.\n", + "type": "object", + "required": [ + "ackState" + ], + "properties": { + "ackState": { + "description": "New value of the \"ackState\" attribute in \"Alarm\". Permitted values: - ACKNOWLEDGED\n", + "type": "string", + "enum": [ + "ACKNOWLEDGED" + ] + } + } +} \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/schemas/alarmNotification.schema.json b/SOL005/NSFaultManagement-API/schemas/alarmNotification.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..e13ba6f42e0d815ce2286afab0182a424bfc0e1d --- /dev/null +++ b/SOL005/NSFaultManagement-API/schemas/alarmNotification.schema.json @@ -0,0 +1,58 @@ +{ + "description": "This type represents an alarm notification about NS faults.\n", + "type": "object", + "required": [ + "id", + "notificationType", + "subscriptionId", + "timeStamp", + "alarm", + "_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.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "notificationType": { + "description": "Discriminator for the different notification types. Shall be set to \"AlarmNotification\" for this notification type.\n", + "type": "string", + "enum": [ + "AlarmClearedNotification" + ] + }, + "subscriptionId": { + "description": "Identifier of the subscription that this notification relates to.\n", + "$ref": "SOL005_def.yaml#/definitions/Identifier" + }, + "timeStamp": { + "description": "Date-time of the generation of the notification.\n", + "$ref": "SOL005_def.yaml#/definitions/DateTime" + }, + "alarm": { + "description": "Information about an alarm including AlarmId, affected NS identifier, and FaultDetails.\n", + "$ref": "#/definitions/Alarm" + }, + "alarmClearedTime": { + "description": "The time stamp indicating when the alarm was cleared.\n" + }, + "_links": { + "description": "Links to resources related to this notification.\n", + "type": "object", + "required": [ + "subscription", + "alarm" + ], + "properties": { + "subscription": { + "description": "Link to the related subscription.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + }, + "alarm": { + "description": "Link to the resource that represents the related alarm.\n", + "$ref": "SOL005_def.yaml#/definitions/Link" + } + } + } + } +} \ No newline at end of file diff --git a/SOL005/VNFPerformanceManagement-API/IndividualPmJob.robot b/SOL005/NSPerformanceManagement-API/IndividualPmJob.robot similarity index 84% rename from SOL005/VNFPerformanceManagement-API/IndividualPmJob.robot rename to SOL005/NSPerformanceManagement-API/IndividualPmJob.robot index 00c0445d72dd581032f40f16948df16c88186e06..a0f8d65501ef94b22f647840033f9537610ede8b 100644 --- a/SOL005/VNFPerformanceManagement-API/IndividualPmJob.robot +++ b/SOL005/NSPerformanceManagement-API/IndividualPmJob.robot @@ -1,6 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Library JSONLibrary Resource environment/IndividualPmJob.txt Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} @@ -16,8 +16,7 @@ GET Individual PM Job Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJob.schema.json ${json} + Validate Json PmJob.schema.json ${result} Log Validation OK GET Individual PM Job - Negative (Not Found) @@ -31,8 +30,7 @@ GET Individual PM Job - Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK DELETE Individual PM Job @@ -50,11 +48,11 @@ DELETE Individual PM Job - Negative (Not Found) Log Received 404 Not Found as expected Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST Individual PM Job - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a POST (method should not be implemented) Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} @@ -62,6 +60,7 @@ POST Individual PM Job - (Method not implemented) Log Received 405 Method not implemented as expected PUT Individual PM Job - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PUT. This method should not be implemented Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} @@ -69,6 +68,7 @@ PUT Individual PM Job - (Method not implemented) Log Received 405 Method not implemented as expected PATCH Individual PM Job - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} diff --git a/SOL005/VNFPerformanceManagement-API/IndividualReport.robot b/SOL005/NSPerformanceManagement-API/IndividualReport.robot similarity index 82% rename from SOL005/VNFPerformanceManagement-API/IndividualReport.robot rename to SOL005/NSPerformanceManagement-API/IndividualReport.robot index 38e9da21127a866ca770f10171bfd1e1bf0c3a4c..de5119e05a83e998aa223bff632f7df44261135e 100644 --- a/SOL005/VNFPerformanceManagement-API/IndividualReport.robot +++ b/SOL005/NSPerformanceManagement-API/IndividualReport.robot @@ -1,6 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Resource environment/reports.txt Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} @@ -18,8 +18,7 @@ GET Report on Single PM Job Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate result with PerformanceReport schema ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PerformanceReport.schema.json ${json} + Validate Json PerformanceReport.schema.json ${result} GET Report on Single PM Job - Negative (Not Found) [Documentation] The client can use this resource to read the performance report. @@ -32,29 +31,32 @@ GET Report on Single PM Job - Negative (Not Found) Log Received 404 Not Found as expected Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST Reports - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} Integer response status 405 Log Received 405 Method not implemented as expected PUT Reports - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} Integer response status 405 Log Received 405 Method not implemented as expected PATCH Reports - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} Integer response status 405 Log Received 405 Method not implemented as expected DELETE Reports - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} Integer response status 405 diff --git a/SOL005/VNFPerformanceManagement-API/IndividualSubscription.robot b/SOL005/NSPerformanceManagement-API/IndividualSubscription.robot similarity index 89% rename from SOL005/VNFPerformanceManagement-API/IndividualSubscription.robot rename to SOL005/NSPerformanceManagement-API/IndividualSubscription.robot index 2c6d9faed7da257305e8f43f27f730183f5074a5..26ad17d04eaf36cf702458c4000ec4ad00e78eb8 100644 --- a/SOL005/VNFPerformanceManagement-API/IndividualSubscription.robot +++ b/SOL005/NSPerformanceManagement-API/IndividualSubscription.robot @@ -3,7 +3,7 @@ Documentation This resource represents an individual subscription for notifi ... The client can use this resource to read and to terminate a subscription to notifications related to NS performance ... management. Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} Library OperatingSystem Library JSONLibrary @@ -23,8 +23,7 @@ GET Individual Subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmSubscription.schema.json ${json} + Validate Json PmSubscription.schema.json ${result} Log Validated PmSubscription schema GET Individual Subscription - Negative (Not Found) @@ -40,13 +39,13 @@ GET Individual Subscription - Negative (Not Found) ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${result} Log Validated ProblemDetails schema POST Individual Subscription - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the NFVO shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} Integer response status 405 @@ -55,6 +54,7 @@ POST Individual Subscription - (Method not implemented) PUT Individual Subscription - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the NFVO shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} Integer response status 405 @@ -63,6 +63,7 @@ PUT Individual Subscription - (Method not implemented) PATCH Individual Subscription - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the NFVO shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} Integer response status 405 diff --git a/SOL005/VNFPerformanceManagement-API/IndividualThreshold.robot b/SOL005/NSPerformanceManagement-API/IndividualThreshold.robot similarity index 83% rename from SOL005/VNFPerformanceManagement-API/IndividualThreshold.robot rename to SOL005/NSPerformanceManagement-API/IndividualThreshold.robot index 717d143d6a5bbb4228201f9173de4aaf3228b375..875101f40c0bb3e75929c1e30b21c3cbc5779353 100644 --- a/SOL005/VNFPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL005/NSPerformanceManagement-API/IndividualThreshold.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation This resource represents an individual threshold. Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} Library OperatingSystem @@ -16,9 +16,8 @@ GET Individual Threshold ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json Log Trying to validate result with thresholds schema - Validate Json Threshold.schema.json ${json} + Validate Json Threshold.schema.json ${result} GET Individual Threshold - Negative (Not Found) Set Headers {"Accept": "${ACCEPT_JSON}"} @@ -28,8 +27,7 @@ GET Individual Threshold - Negative (Not Found) Log Received 404 Not Found as expected Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK DELETE Individual Threshold @@ -47,23 +45,25 @@ DELETE Individual Threshold - Negative (Not Found) Integer response status 404 Log Received 404 Not Found as expected ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json Log Trying to validate result with ProblemDetails schema - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${result} POST Individual Threshold - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/thresholds Integer response status 405 Log Received 405 Method not implemented as expected PUT Individual Threshold - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/thresholds Integer response status 405 Log Received 405 Method not implemented as expected PATCH Individual Threshold - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/thresholds Integer response status 405 diff --git a/SOL005/VNFPerformanceManagement-API/Notifications.robot b/SOL005/NSPerformanceManagement-API/Notifications.robot similarity index 92% rename from SOL005/VNFPerformanceManagement-API/Notifications.robot rename to SOL005/NSPerformanceManagement-API/Notifications.robot index 676cecc6c29c781fe252ca15fb6f7875aa22ef9d..8fe01e3a6eda197faad4786f3ccbb5832ca96014 100644 --- a/SOL005/VNFPerformanceManagement-API/Notifications.robot +++ b/SOL005/NSPerformanceManagement-API/Notifications.robot @@ -1,6 +1,6 @@ *** Setting *** Resource environment/notifications.txt -Resource environment/generic.txt +Resource environment/variables.txt Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true Library MockServerLibrary @@ -76,6 +76,7 @@ Post Threshold Crossed Notification Negative 404 PUT Performance Notification + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log PUT Method not implemented &{req}= Create Mock Request Matcher PUT ${callback_endpoint} &{rsp}= Create Mock Response status_code=405 @@ -88,6 +89,7 @@ PUT Performance Notification PATCH Performance Notification + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log PATCH Method not implemented &{req}= Create Mock Request Matcher PATCH ${callback_endpoint} &{rsp}= Create Mock Response status_code=405 @@ -100,6 +102,7 @@ PATCH Performance Notification DELETE Performance Notification + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log PATCH Method not implemented &{req}= Create Mock Request Matcher DELETE ${callback_endpoint} &{rsp}= Create Mock Response status_code=405 diff --git a/SOL005/VNFPerformanceManagement-API/PMJobs.robot b/SOL005/NSPerformanceManagement-API/PMJobs.robot similarity index 83% rename from SOL005/VNFPerformanceManagement-API/PMJobs.robot rename to SOL005/NSPerformanceManagement-API/PMJobs.robot index 9269c1d7606de6f7cf9919f49201dc4b485f3aee..dd2d35e243954c14eef13004003a5630c89e1e39 100644 --- a/SOL005/VNFPerformanceManagement-API/PMJobs.robot +++ b/SOL005/NSPerformanceManagement-API/PMJobs.robot @@ -1,6 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library OperatingSystem Resource environment/pmJobs.txt @@ -18,11 +18,10 @@ GET all Pm Jobs Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJobs.schema.json ${json} + Validate Json PmJobs.schema.json ${result} Log Validation OK Log Checking that reports element is missing - ${reports}= Get Value From Json ${json} $..reports + ${reports}= Get Value From Json ${result} $..reports Should Be Empty ${reports} Log Reports element is empty as expected @@ -36,8 +35,7 @@ GET all Pm Jobs - Filter Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJobs.schema.json ${json} + Validate Json PmJobs.schema.json ${result} Log Validation OK GET all Pm Jobs - all_fields @@ -50,19 +48,18 @@ GET all Pm Jobs - all_fields Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJobs.schema.json ${json} + Validate Json PmJobs.schema.json ${result} Log Validation OK Log Trying to validate criteria schema - ${criteria}= Get Value From Json ${json} $..criteria + ${criteria}= Get Value From Json ${result} $..criteria Validate Json criteria.schema.json ${criteria[0]} Log Validation for criteria schema OK Log Trying to validate criteria schema - ${reports}= Get Value From Json ${json} $..reports + ${reports}= Get Value From Json ${result} $..reports Validate Json reports.schema.json ${reports[0]} Log Validation for reports schema OK Log Validating _links schema - ${links}= Get Value From Json ${json} $.._links + ${links}= Get Value From Json ${result} $.._links Validate Json links.schema.json ${links[0]} Log Validation for _links schema OK @@ -76,11 +73,10 @@ GET all Pm Jobs - exclude_default Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJobs.schema.json ${json} + Validate Json PmJobs.schema.json ${result} Log Validation OK Log Checking that reports element is missing - ${reports}= Get Value From Json ${json} $..reports + ${reports}= Get Value From Json ${result} $..reports Should Be Empty ${reports} Log Reports element is empty as expected @@ -95,15 +91,14 @@ GET all Pm Jobs - fields Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJobs.schema.json ${json} + Validate Json PmJobs.schema.json ${result} Log Validation OK Log Trying to validate criteria schema - ${criteria}= Get Value From Json ${json} $..criteria + ${criteria}= Get Value From Json ${result} $..criteria Validate Json criteria.schema.json ${criteria[0]} Log Validation for criteria schema OK Log Trying to validate criteria schema - ${reports}= Get Value From Json ${json} $..reports + ${reports}= Get Value From Json ${result} $..reports Validate Json reports.schema.json ${reports[0]} Log Validation for reports schema OK @@ -118,15 +113,14 @@ GET all Pm Jobs - exclude_fields Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJobs.schema.json ${json} + Validate Json PmJobs.schema.json ${result} Log Validation OK Log Checking that reports element is missing - ${reports}= Get Value From Json ${json} $..reports + ${reports}= Get Value From Json ${result} $..reports Should Be Empty ${reports} Log Reports element is empty as expected Log Checking that criteria element is missing - ${criteria}= Get Value From Json ${json} $..criteria + ${criteria}= Get Value From Json ${result} $..criteria Should Be Empty ${criteria} Log Criteria element is empty as expected @@ -141,8 +135,7 @@ GET all Pm Jobs - Negative (wronge filter name) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response headers Content-Type - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET all Pm Jobs (Negative: Not found) @@ -156,8 +149,7 @@ GET all Pm Jobs (Negative: Not found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response headers Content-Type - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST all PM Jobs - Create new PM Job @@ -173,11 +165,11 @@ POST all PM Jobs - Create new PM Job Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJob.schema.json ${json} + Validate Json PmJob.schema.json ${result} Log Validation OK PUT all PM Jobs - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -186,6 +178,7 @@ PUT all PM Jobs - (Method not implemented) Log Received 405 Method not implemented as expected PATCH all Pm Jobs - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -194,6 +187,7 @@ PATCH all Pm Jobs - (Method not implemented) Log Received 405 Method not implemented as expected DELETE all Pm Jobs - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} diff --git a/SOL005/VNFPerformanceManagement-API/Subscriptions.robot b/SOL005/NSPerformanceManagement-API/Subscriptions.robot similarity index 93% rename from SOL005/VNFPerformanceManagement-API/Subscriptions.robot rename to SOL005/NSPerformanceManagement-API/Subscriptions.robot index 52622658eacb040962cbdd872fe6f29f2da5447c..9baec607e657d7344d45f9c681659138165b46fc 100644 --- a/SOL005/VNFPerformanceManagement-API/Subscriptions.robot +++ b/SOL005/NSPerformanceManagement-API/Subscriptions.robot @@ -2,7 +2,7 @@ Documentation This resource represents subscriptions. The client can use this resource to subscribe to notifications related to VNF ... performance management and to query its subscriptions. Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} Library OperatingSystem Library JSONLibrary @@ -22,8 +22,7 @@ GET Subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmSubscriptions.schema.json ${json} + Validate Json PmSubscriptions.schema.json ${result} Log Validated PmSubscription schema GET Subscription - Filter @@ -39,8 +38,7 @@ GET Subscription - Filter ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmSubscriptions.schema.json ${json} + Validate Json PmSubscriptions.schema.json ${result} Log Validated PmSubscription schema GET Subscription - Negative Filter (Erroneous filter) @@ -56,8 +54,7 @@ GET Subscription - Negative Filter (Erroneous filter) ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${result} Log Validated ProblemDetails schema GET Subscription - Negative (Not Found) @@ -73,8 +70,7 @@ GET Subscription - Negative (Not Found) ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${result} Log Validated ProblemDetails schema POST Subscription @@ -97,8 +93,7 @@ POST Subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmSubscription.schema.json ${json} + Validate Json PmSubscription.schema.json ${result} Log Validated PmSubscription schema Log Trying to validate the Location header ${headers}= Output response headers @@ -152,8 +147,7 @@ POST Subscription - NO DUPLICATION ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmSubscription.schema.json ${json} + Validate Json PmSubscription.schema.json ${result} Log Validated PmSubscription schema Log Trying to validate the Location header ${headers}= Output response headers @@ -162,6 +156,7 @@ POST Subscription - NO DUPLICATION PUT Subscription - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the NFVO shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions Integer response status 405 @@ -170,6 +165,7 @@ PUT Subscription - (Method not implemented) PATCH Subscription - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions Integer response status 405 @@ -178,6 +174,7 @@ PATCH Subscription - (Method not implemented) DELETE Subscription - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions Integer response status 405 diff --git a/SOL005/VNFPerformanceManagement-API/Thresholds.robot b/SOL005/NSPerformanceManagement-API/Thresholds.robot similarity index 81% rename from SOL005/VNFPerformanceManagement-API/Thresholds.robot rename to SOL005/NSPerformanceManagement-API/Thresholds.robot index 71a8066976b2801dc9b9fd1d95841c0838ffc78d..46bd053651a5539ff0c3fa6f7904b5026c8940ad 100644 --- a/SOL005/VNFPerformanceManagement-API/Thresholds.robot +++ b/SOL005/NSPerformanceManagement-API/Thresholds.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation This resource represents thresholds. The client can use this resource to create and query thresholds. Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} Resource environment/thresholds.txt @@ -18,9 +18,8 @@ GET Thresholds ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json Log Trying to validate result with thresholds schema - Validate Json Thresholds.schema.json ${json} + Validate Json Thresholds.schema.json ${result} GET Thresholds - Filter Set Headers {"Accept": "${ACCEPT_JSON}"} @@ -30,9 +29,8 @@ GET Thresholds - Filter ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json Log Trying to validate result with Threshold schema - Validate Json Thresholds.schema.json ${json} + Validate Json Thresholds.schema.json ${result} GET Thresholds - NEGATIVE Filter Set Headers {"Accept": "${ACCEPT_JSON}"} @@ -40,9 +38,8 @@ GET Thresholds - NEGATIVE Filter GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_KO} Integer response status 400 ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json Log Trying to validate result with ProblemDetails schema - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${result} GET Thresholds - Negative (Not Found) Set Headers {"Accept": "${ACCEPT_JSON}"} @@ -51,12 +48,11 @@ GET Thresholds - Negative (Not Found) Integer response status 404 Log Received 404 Not Found as expected ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json Log Trying to validate ProblemDetails - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK -POST Reports +POST Thresholds Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -65,26 +61,28 @@ POST Reports Integer response status 201 Log Received 201 Created as expected ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json Log Trying to validate result with thresholds schema - Validate Json Threshold.schema.json ${json} + Validate Json Threshold.schema.json ${result} Log Trying to validate the Location header ${headers}= Output response headers Should Contain ${headers} Location -PUT Reports - (Method not implemented) +PUT Thresholds - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/thresholds Integer response status 405 Log Received 405 Method not implemented as expected -PATCH Reports - (Method not implemented) +PATCH Thresholds - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/thresholds Integer response status 405 Log Received 405 Method not implemented as expected -DELETE Reports - (Method not implemented) +DELETE Thresholds - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds Integer response status 405 diff --git a/SOL005/VNFPerformanceManagement-API/environment/IndividualPmJob.txt b/SOL005/NSPerformanceManagement-API/environment/IndividualPmJob.txt similarity index 100% rename from SOL005/VNFPerformanceManagement-API/environment/IndividualPmJob.txt rename to SOL005/NSPerformanceManagement-API/environment/IndividualPmJob.txt diff --git a/SOL005/VNFPerformanceManagement-API/environment/individualSubscription.txt b/SOL005/NSPerformanceManagement-API/environment/individualSubscription.txt similarity index 100% rename from SOL005/VNFPerformanceManagement-API/environment/individualSubscription.txt rename to SOL005/NSPerformanceManagement-API/environment/individualSubscription.txt diff --git a/SOL005/VNFPerformanceManagement-API/environment/individualThresholds.txt b/SOL005/NSPerformanceManagement-API/environment/individualThresholds.txt similarity index 100% rename from SOL005/VNFPerformanceManagement-API/environment/individualThresholds.txt rename to SOL005/NSPerformanceManagement-API/environment/individualThresholds.txt diff --git a/SOL005/VNFPerformanceManagement-API/environment/notifications.txt b/SOL005/NSPerformanceManagement-API/environment/notifications.txt similarity index 100% rename from SOL005/VNFPerformanceManagement-API/environment/notifications.txt rename to SOL005/NSPerformanceManagement-API/environment/notifications.txt diff --git a/SOL005/VNFPerformanceManagement-API/environment/pmJobs.txt b/SOL005/NSPerformanceManagement-API/environment/pmJobs.txt similarity index 100% rename from SOL005/VNFPerformanceManagement-API/environment/pmJobs.txt rename to SOL005/NSPerformanceManagement-API/environment/pmJobs.txt diff --git a/SOL005/VNFPerformanceManagement-API/environment/reports.txt b/SOL005/NSPerformanceManagement-API/environment/reports.txt similarity index 100% rename from SOL005/VNFPerformanceManagement-API/environment/reports.txt rename to SOL005/NSPerformanceManagement-API/environment/reports.txt diff --git a/SOL005/VNFPerformanceManagement-API/environment/subscriptions.txt b/SOL005/NSPerformanceManagement-API/environment/subscriptions.txt similarity index 100% rename from SOL005/VNFPerformanceManagement-API/environment/subscriptions.txt rename to SOL005/NSPerformanceManagement-API/environment/subscriptions.txt diff --git a/SOL005/VNFPerformanceManagement-API/environment/thresholds.txt b/SOL005/NSPerformanceManagement-API/environment/thresholds.txt similarity index 100% rename from SOL005/VNFPerformanceManagement-API/environment/thresholds.txt rename to SOL005/NSPerformanceManagement-API/environment/thresholds.txt diff --git a/SOL005/VNFPerformanceManagement-API/environment/generic.txt b/SOL005/NSPerformanceManagement-API/environment/variables.txt similarity index 68% rename from SOL005/VNFPerformanceManagement-API/environment/generic.txt rename to SOL005/NSPerformanceManagement-API/environment/variables.txt index 51879755eed41015962c40e95ac08c02b7c21c44..fc53947d0e6357d60b4cf2aabedd0e52d401b5f3 100644 --- a/SOL005/VNFPerformanceManagement-API/environment/generic.txt +++ b/SOL005/NSPerformanceManagement-API/environment/variables.txt @@ -1,9 +1,6 @@ *** Variables *** -${VNFM_HOST} localhost # Hostname of the VNFM -${VNFM_PORT} 8080 # Listening port of the VNFM ${NFVO_HOST} localhost # Hostname of the NFVO ${NFVO_PORT} 8081 # Listening port of the NFVO -${VNFM_SCHEMA} https ${NFVO_SCHEMA} https ${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${CONTENT_TYPE_JSON} application/json @@ -14,10 +11,8 @@ ${NEG_AUTHORIZATION} Bearer negativetoken ${apiVersion} v1 ${apiName} vnfpm ${FIELD_USAGE} 1 -${VNFM_AUTHENTICATION} Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 -${VNFM_AUTH_USAGE} 1 -${VNFM_DUPLICATION} 1 ${NFVO_DUPLICATION} 1 ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar +${testOptionalMethods} 0 \ No newline at end of file diff --git a/SOL005/VNFPerformanceManagement-API/jsons/CreatePmJobRequest.json b/SOL005/NSPerformanceManagement-API/jsons/CreatePmJobRequest.json similarity index 100% rename from SOL005/VNFPerformanceManagement-API/jsons/CreatePmJobRequest.json rename to SOL005/NSPerformanceManagement-API/jsons/CreatePmJobRequest.json diff --git a/SOL005/VNFPerformanceManagement-API/jsons/CreateThresholdRequest.json b/SOL005/NSPerformanceManagement-API/jsons/CreateThresholdRequest.json similarity index 100% rename from SOL005/VNFPerformanceManagement-API/jsons/CreateThresholdRequest.json rename to SOL005/NSPerformanceManagement-API/jsons/CreateThresholdRequest.json diff --git a/SOL005/VNFPerformanceManagement-API/jsons/PerformanceInformationAvailableNotification.json b/SOL005/NSPerformanceManagement-API/jsons/PerformanceInformationAvailableNotification.json similarity index 100% rename from SOL005/VNFPerformanceManagement-API/jsons/PerformanceInformationAvailableNotification.json rename to SOL005/NSPerformanceManagement-API/jsons/PerformanceInformationAvailableNotification.json diff --git a/SOL005/VNFPerformanceManagement-API/jsons/ThresholdCrossedNotification.json b/SOL005/NSPerformanceManagement-API/jsons/ThresholdCrossedNotification.json similarity index 100% rename from SOL005/VNFPerformanceManagement-API/jsons/ThresholdCrossedNotification.json rename to SOL005/NSPerformanceManagement-API/jsons/ThresholdCrossedNotification.json diff --git a/SOL005/VNFPerformanceManagement-API/jsons/subscriptions.json b/SOL005/NSPerformanceManagement-API/jsons/subscriptions.json similarity index 100% rename from SOL005/VNFPerformanceManagement-API/jsons/subscriptions.json rename to SOL005/NSPerformanceManagement-API/jsons/subscriptions.json diff --git a/SOL005/VNFPerformanceManagement-API/schemas/PerformanceInformationAvailableNotification.schema.json b/SOL005/NSPerformanceManagement-API/schemas/PerformanceInformationAvailableNotification.schema.json similarity index 100% rename from SOL005/VNFPerformanceManagement-API/schemas/PerformanceInformationAvailableNotification.schema.json rename to SOL005/NSPerformanceManagement-API/schemas/PerformanceInformationAvailableNotification.schema.json diff --git a/SOL005/VNFPerformanceManagement-API/schemas/PerformanceReport.schema.json b/SOL005/NSPerformanceManagement-API/schemas/PerformanceReport.schema.json similarity index 100% rename from SOL005/VNFPerformanceManagement-API/schemas/PerformanceReport.schema.json rename to SOL005/NSPerformanceManagement-API/schemas/PerformanceReport.schema.json diff --git a/SOL005/VNFPerformanceManagement-API/schemas/PmJob.schema.json b/SOL005/NSPerformanceManagement-API/schemas/PmJob.schema.json similarity index 100% rename from SOL005/VNFPerformanceManagement-API/schemas/PmJob.schema.json rename to SOL005/NSPerformanceManagement-API/schemas/PmJob.schema.json diff --git a/SOL005/VNFPerformanceManagement-API/schemas/PmJobs.schema.json b/SOL005/NSPerformanceManagement-API/schemas/PmJobs.schema.json similarity index 100% rename from SOL005/VNFPerformanceManagement-API/schemas/PmJobs.schema.json rename to SOL005/NSPerformanceManagement-API/schemas/PmJobs.schema.json diff --git a/SOL005/VNFPerformanceManagement-API/schemas/PmSubscription.schema.json b/SOL005/NSPerformanceManagement-API/schemas/PmSubscription.schema.json similarity index 100% rename from SOL005/VNFPerformanceManagement-API/schemas/PmSubscription.schema.json rename to SOL005/NSPerformanceManagement-API/schemas/PmSubscription.schema.json diff --git a/SOL005/VNFPerformanceManagement-API/schemas/PmSubscriptions.schema.json b/SOL005/NSPerformanceManagement-API/schemas/PmSubscriptions.schema.json similarity index 100% rename from SOL005/VNFPerformanceManagement-API/schemas/PmSubscriptions.schema.json rename to SOL005/NSPerformanceManagement-API/schemas/PmSubscriptions.schema.json diff --git a/SOL005/VNFPerformanceManagement-API/schemas/ProblemDetails.schema.json b/SOL005/NSPerformanceManagement-API/schemas/ProblemDetails.schema.json similarity index 100% rename from SOL005/VNFPerformanceManagement-API/schemas/ProblemDetails.schema.json rename to SOL005/NSPerformanceManagement-API/schemas/ProblemDetails.schema.json diff --git a/SOL005/VNFPerformanceManagement-API/schemas/Subscriptions.schema.json b/SOL005/NSPerformanceManagement-API/schemas/Subscriptions.schema.json similarity index 100% rename from SOL005/VNFPerformanceManagement-API/schemas/Subscriptions.schema.json rename to SOL005/NSPerformanceManagement-API/schemas/Subscriptions.schema.json diff --git a/SOL005/VNFPerformanceManagement-API/schemas/Threshold.schema.json b/SOL005/NSPerformanceManagement-API/schemas/Threshold.schema.json similarity index 100% rename from SOL005/VNFPerformanceManagement-API/schemas/Threshold.schema.json rename to SOL005/NSPerformanceManagement-API/schemas/Threshold.schema.json diff --git a/SOL005/VNFPerformanceManagement-API/schemas/ThresholdCrossedNotification.schema.json b/SOL005/NSPerformanceManagement-API/schemas/ThresholdCrossedNotification.schema.json similarity index 100% rename from SOL005/VNFPerformanceManagement-API/schemas/ThresholdCrossedNotification.schema.json rename to SOL005/NSPerformanceManagement-API/schemas/ThresholdCrossedNotification.schema.json diff --git a/SOL005/VNFPerformanceManagement-API/schemas/Thresholds.schema.json b/SOL005/NSPerformanceManagement-API/schemas/Thresholds.schema.json similarity index 100% rename from SOL005/VNFPerformanceManagement-API/schemas/Thresholds.schema.json rename to SOL005/NSPerformanceManagement-API/schemas/Thresholds.schema.json diff --git a/SOL005/VNFPerformanceManagement-API/schemas/criteria.schema.json b/SOL005/NSPerformanceManagement-API/schemas/criteria.schema.json similarity index 100% rename from SOL005/VNFPerformanceManagement-API/schemas/criteria.schema.json rename to SOL005/NSPerformanceManagement-API/schemas/criteria.schema.json diff --git a/SOL005/VNFPerformanceManagement-API/schemas/links.schema.json b/SOL005/NSPerformanceManagement-API/schemas/links.schema.json similarity index 100% rename from SOL005/VNFPerformanceManagement-API/schemas/links.schema.json rename to SOL005/NSPerformanceManagement-API/schemas/links.schema.json diff --git a/SOL005/VNFPerformanceManagement-API/schemas/reports.schema.json b/SOL005/NSPerformanceManagement-API/schemas/reports.schema.json similarity index 100% rename from SOL005/VNFPerformanceManagement-API/schemas/reports.schema.json rename to SOL005/NSPerformanceManagement-API/schemas/reports.schema.json diff --git a/SOL005/VNFPackageManagement-API/IndividualSubscription.robot b/SOL005/VNFPackageManagement-API/IndividualSubscription.robot index 1a14bd04f7dd260beba1724a9cdde5e77fe2e814..642ca9e58776e97f4f29b91def35fab2dccdaa9a 100644 --- a/SOL005/VNFPackageManagement-API/IndividualSubscription.robot +++ b/SOL005/VNFPackageManagement-API/IndividualSubscription.robot @@ -1,6 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Resource environment/individualSubscription.txt Library OperatingSystem Library JSONLibrary @@ -17,8 +17,7 @@ GET Individual Subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE_JSON} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PkgmSubscription.schema.json ${json} + Validate Json PkgmSubscription.schema.json ${result} Log Validated PkgmSubscription schema GET Subscription - Negative (Not Found) @@ -32,8 +31,7 @@ GET Subscription - Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK DELETE Subscription @@ -43,13 +41,7 @@ DELETE Subscription DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} Integer response status 204 Log Received 204 No Content as expected - Comment Log Trying to get the deleted element - Comment Create HTTP Context ${NFVO_HOST}:${NFVO_PORT} ${NFVO_SCHEMA} - Comment Set Request Header Accept ${ACCEPT_JSON} - Comment Run Keyword If ${AUTH_USAGE} == 1 Set Request Header Authorization ${AUTHORIZATION} - Comment GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Comment Response Status Code Should Equal 404 - Comment Log The subscriptionId is not present in database + DELETE Subscription - Negative (Not Found) Log Trying to perform a DELETE on a subscriptionId which doesn't exist @@ -62,11 +54,11 @@ DELETE Subscription - Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK PUT Subscription - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -75,6 +67,7 @@ PUT Subscription - (Method not implemented) Log Received 405 Method not implemented as expected PATCH Subscription - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -83,6 +76,7 @@ PATCH Subscription - (Method not implemented) Log Received 405 Method not implemented as expected POST Subscription - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a POST. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} diff --git a/SOL005/VNFPackageManagement-API/IndividualVNFPackage.robot b/SOL005/VNFPackageManagement-API/IndividualVNFPackage.robot index 853cf6532986c9519563cb5618c530befad14803..478aa79a38aca19c813272a87d14a0ea7aca87ca 100644 --- a/SOL005/VNFPackageManagement-API/IndividualVNFPackage.robot +++ b/SOL005/VNFPackageManagement-API/IndividualVNFPackage.robot @@ -1,6 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Resource environment/individualVnfPackage.txt Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} @@ -16,8 +16,7 @@ GET Individual VNF Package Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${vnfPkgInfo}= Output response body - ${json}= evaluate json.loads('''${vnfPkgInfo}''') json - Validate Json vnfPkgInfo.schema.json ${json} + Validate Json vnfPkgInfo.schema.json ${vnfPackageId} Log Validation OK GET Individual VNF Package - Negative (Not Found) @@ -31,8 +30,7 @@ GET Individual VNF Package - Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK @@ -46,8 +44,7 @@ PATCH Individual VNF Package Log Received 200 OK as expected Log Trying to validate VnfPkgInfoModification ${response}= Output response body - ${json}= evaluate json.loads('''${response}''') json - Validate Json VnfPkgInfoModification.schema.json ${json} + Validate Json VnfPkgInfoModification.schema.json ${response} Log Validation OK @@ -61,8 +58,7 @@ PATCH Individual VNF Package - Negative (Conflict on the state of the resource) Log Received 409 Conflict as expected Log Trying to validate ProblemDetails ${response}= Output response body - ${json}= evaluate json.loads('''${response}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${response} Log Validation OK @@ -89,12 +85,12 @@ DELETE Individual VNF Package - Negative (Conflict on the state of the resource) Log Received 409 Conflict as expected Log Trying to validate ProblemDetails ${response}= Output response body - ${json}= evaluate json.loads('''${response}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${response} Log Validation OK POST Individual VNF Package - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -103,6 +99,7 @@ POST Individual VNF Package - (Method not implemented) Log Received 405 Method not implemented as expected PUT Individual VNF Package - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} diff --git a/SOL005/VNFPackageManagement-API/Notifications.robot b/SOL005/VNFPackageManagement-API/Notifications.robot index 2a0e5a9ac2727b6df2e00a048291bd5776249ac1..6a2d01326ab792ceed58c426e3111a69dd67f22e 100644 --- a/SOL005/VNFPackageManagement-API/Notifications.robot +++ b/SOL005/VNFPackageManagement-API/Notifications.robot @@ -1,6 +1,5 @@ *** Setting *** Resource environment/variables.txt -Resource environment/generic.txt Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true Library MockServerLibrary @@ -76,6 +75,7 @@ Post Package Change Notification Negative 404 PUT VNF Package Management Notification + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log PUT Method not implemented &{req}= Create Mock Request Matcher PUT ${callback_endpoint} &{rsp}= Create Mock Response status_code=405 @@ -88,6 +88,7 @@ PUT VNF Package Management Notification PATCH VNF Package Management Notification + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log PATCH Method not implemented &{req}= Create Mock Request Matcher PATCH ${callback_endpoint} &{rsp}= Create Mock Response status_code=405 @@ -100,6 +101,7 @@ PATCH VNF Package Management Notification DELETE VNF Package Management Notification + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log PATCH Method not implemented &{req}= Create Mock Request Matcher DELETE ${callback_endpoint} &{rsp}= Create Mock Response status_code=405 diff --git a/SOL005/VNFPackageManagement-API/Subscriptions.robot b/SOL005/VNFPackageManagement-API/Subscriptions.robot index d74b799c20445b11a9b2a340ff11b82ec5e3a4be..b14f9232f324476756b8e9c49c0c9695bc4a146a 100644 --- a/SOL005/VNFPackageManagement-API/Subscriptions.robot +++ b/SOL005/VNFPackageManagement-API/Subscriptions.robot @@ -1,6 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Resource environment/subscriptions.txt Library OperatingSystem Library JSONLibrary @@ -17,8 +17,7 @@ GET Subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE_JSON} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PkgmSubscriptions.schema.json ${json} + Validate Json PkgmSubscriptions.schema.json ${result} Log Validated PkgmSubscription schema GET Subscription - Filter @@ -31,8 +30,7 @@ GET Subscription - Filter ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE_JSON} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PkgmSubscriptions.schema.json ${json} + Validate Json PkgmSubscriptions.schema.json ${result} Log Validated PkgmSubscription schema GET Subscription - Negative Filter @@ -46,8 +44,7 @@ GET Subscription - Negative Filter Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Subscription - Negative (Not Found) @@ -61,15 +58,14 @@ GET Subscription - Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST Subscription Log Trying to create a new subscription Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File json/subscriptions.json + ${body}= Get File jsons/subscriptions.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} Integer response status 201 @@ -78,8 +74,7 @@ POST Subscription Should Contain ${headers} Location Log Response has header Location ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PkgmSubscription.schema.json ${json} + Validate Json PkgmSubscription.schema.json ${result} Log Validation of PkgmSubscription OK POST Subscription - DUPLICATION @@ -87,7 +82,7 @@ POST Subscription - DUPLICATION Pass Execution If ${NFVO_DUPLICATION} == 0 NFVO is not permitting duplication. Skipping the test Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File json/subscriptions.json + ${body}= Get File jsons/subscriptions.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} Integer response status 201 @@ -96,8 +91,7 @@ POST Subscription - DUPLICATION Should Contain ${headers} Location Log Response has header Location ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PkgmSubscription.schema.json ${json} + Validate Json PkgmSubscription.schema.json ${result} Log Validation of PkgmSubscription OK POST Subscription - NO DUPLICATION @@ -105,7 +99,7 @@ POST Subscription - NO DUPLICATION Pass Execution If ${NFVO_DUPLICATION} == 1 NFVO is permitting duplication. Skipping the test Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File json/subscriptions.json + ${body}= Get File jsons/subscriptions.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} Integer response status 303 @@ -115,6 +109,7 @@ POST Subscription - NO DUPLICATION Log Response header contains Location PUT Subscription - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -123,6 +118,7 @@ PUT Subscription - (Method not implemented) Log Received 405 Method not implemented as expected PATCH Subscription - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -131,6 +127,7 @@ PATCH Subscription - (Method not implemented) Log Received 405 Method not implemented as expected DELETE Subscription - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} diff --git a/SOL005/VNFPackageManagement-API/VNFDInIndividualVNFPackage.robot b/SOL005/VNFPackageManagement-API/VNFDInIndividualVNFPackage.robot index fe149c08a9b5c2fb34fc9d89defc4fa2338bf273..44096e7505649c164557e831b382ae199be5f35b 100644 --- a/SOL005/VNFPackageManagement-API/VNFDInIndividualVNFPackage.robot +++ b/SOL005/VNFPackageManagement-API/VNFDInIndividualVNFPackage.robot @@ -1,6 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Resource environment/vnfdInIndividualVnfPackage.txt Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} @@ -45,8 +45,7 @@ GET VNFD in Individual VNF Package - Negative (PLAIN/ZIP) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET VNFD in Individual VNF Package - Negative (Not Found) @@ -61,8 +60,7 @@ GET VNFD in Individual VNF Package - Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET VNFD in Individual VNF Package - Negative (onboardingState issue) @@ -77,11 +75,11 @@ GET VNFD in Individual VNF Package - Negative (onboardingState issue) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST VNFD in Individual VNF Package (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_ZIP}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"} @@ -90,6 +88,7 @@ POST VNFD in Individual VNF Package (Method not implemented) Log Received 405 Method not implemented as expected PUT VNFD in Individual VNF Package (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"} @@ -98,6 +97,7 @@ PUT VNFD in Individual VNF Package (Method not implemented) Log Received 405 Method not implemented as expected PATCH VNFD in Individual VNF Package (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"} @@ -106,6 +106,7 @@ PATCH VNFD in Individual VNF Package (Method not implemented) Log Received 405 Method not implemented as expected DELETE VNFD in Individual VNF Package (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization: "${AUTHORIZATION}"} diff --git a/SOL005/VNFPackageManagement-API/VNFPackageArtifacts.robot b/SOL005/VNFPackageManagement-API/VNFPackageArtifacts.robot index e30759f7fabcfd3eb23febfb8c023707cd159a26..26cc582af8513d8540697b35d4bc366ce2550483 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackageArtifacts.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackageArtifacts.robot @@ -1,6 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Resource environment/vnfPackageArtifacts.txt Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} @@ -48,8 +48,7 @@ GET VNF Package Artifact - Negative Range Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET VNF Package Artifact- Negative (Not Found) @@ -62,8 +61,7 @@ GET VNF Package Artifact- Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET VNF Package Artifact - Negative (onboardingState issue) @@ -76,11 +74,11 @@ GET VNF Package Artifact - Negative (onboardingState issue) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST VNF Package Artifact - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a POST (method should not be implemented) Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgId}/artifacts/${artifactPath} @@ -88,6 +86,7 @@ POST VNF Package Artifact - (Method not implemented) Log Received 405 Method not implemented as expected PUT VNF Package Artifact - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PUT. This method should not be implemented Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgId}/artifacts/${artifactPath} @@ -95,6 +94,7 @@ PUT VNF Package Artifact - (Method not implemented) Log Received 405 Method not implemented as expected PATCH VNF Package Artifact - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgId}/artifacts/${artifactPath} @@ -102,6 +102,7 @@ PATCH VNF Package Artifact - (Method not implemented) Log Received 405 Method not implemented as expected DELETE VNF Package Artifact - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgId}/artifacts/${artifactPath} diff --git a/SOL005/VNFPackageManagement-API/VNFPackageContent.robot b/SOL005/VNFPackageManagement-API/VNFPackageContent.robot index 7a523f1b705bfa805ffc4a1502469aebaaa15f74..176831c74ad46b4ddd4aabf29b1df986c53861e8 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackageContent.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackageContent.robot @@ -1,6 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Resource environment/vnfPackageContent.txt Library JSONLibrary Library OperatingSystem @@ -54,8 +54,7 @@ GET VNF Package Content - Negative Range Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET VNF Package Content - Negative (Not Found) @@ -69,8 +68,7 @@ GET VNF Package Content - Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET VNF Package Content - Negative (onboardingState issue) @@ -84,8 +82,7 @@ GET VNF Package Content - Negative (onboardingState issue) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK @@ -113,12 +110,12 @@ PUT VNF Package Content - Negative (Conflict on onboarding status not in CREATED Log Received 409 Conflict as expected Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST VNF Package Content - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_ZIP}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -128,6 +125,7 @@ POST VNF Package Content - (Method not implemented) PATCH VNF Package Content - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -136,6 +134,7 @@ PATCH VNF Package Content - (Method not implemented) Log Received 405 Method not implemented as expected DELETE VNF Package Content - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} diff --git a/SOL005/VNFPackageManagement-API/VNFPackageContentViaURI.robot b/SOL005/VNFPackageManagement-API/VNFPackageContentViaURI.robot index 7789899615ac23859a3fe177c132865ccb73a9da..eb39ff37d6b2b32afda86f82727f781cfd9129e2 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackageContentViaURI.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackageContentViaURI.robot @@ -1,6 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Resource environment/vnfPackageContent.txt Library JSONLibrary Library OperatingSystem @@ -33,12 +33,12 @@ POST VNF Package Content - Negative (VNF Package not in CREATED operational stat Log Received 409 Conflict as expected Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET VNF Package Content - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a GET. This method should not be implemented Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgId}/package_content/upload_from_uri @@ -47,6 +47,7 @@ GET VNF Package Content - (Method not implemented) PUT VNF Package Content - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PUT. This method should not be implemented Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content/upload_from_uri @@ -54,6 +55,7 @@ PUT VNF Package Content - (Method not implemented) Log Received 405 Method not implemented as expected PATCH VNF Package Content - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -62,6 +64,7 @@ PATCH VNF Package Content - (Method not implemented) Log Received 405 Method not implemented as expected DELETE VNF Package Content - (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} diff --git a/SOL005/VNFPackageManagement-API/VNFPackages.robot b/SOL005/VNFPackageManagement-API/VNFPackages.robot index f058f86af140fbe2e0701d61882dfac9a1880c47..8833d3c3103b4bd549b657cb27871aa227e8ea22 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackages.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackages.robot @@ -1,7 +1,7 @@ *** Settings *** Resource environment/vnfPackages.txt # VNF Packages specific parameters Library JSONSchemaLibrary schemas/ -Resource environment/generic.txt # Generic Parameters +Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} @@ -18,19 +18,18 @@ GET all Packages Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfPkgsInfo.schema.json ${json} + Validate Json vnfPkgsInfo.schema.json ${result} Log Validation OK Log Checking missing information for softwareImages element - ${softwareImages}= Get Value From Json ${json} $..softwareImages + ${softwareImages}= Get Value From Json ${result} $..softwareImages Should Be Empty ${softwareImages} Log softwareImages element is missing as excepted Log Checking missing information for additionalArtifact element - ${additional_artifacts}= Get Value From Json ${json} $..additionalArtifacts + ${additional_artifacts}= Get Value From Json ${result} $..additionalArtifacts Should Be Empty ${additional_artifacts} Log additionalArtifact element is missing as excepted Log Checking missing information for _links element - ${links}= Get Value From Json ${json} $.._links + ${links}= Get Value From Json ${result} $.._links Should Be Empty ${links} Log _links element is missing as excepted @@ -44,8 +43,7 @@ GET all Packages - Filter Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfPkgsInfo.schema.json ${json} + Validate Json vnfPkgsInfo.schema.json ${result} Log Validation OK GET all Packages - Negative (wronge filter name) @@ -59,8 +57,7 @@ GET all Packages - Negative (wronge filter name) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET all Packages - Negative (Unauthorized: Wrong Token) @@ -75,8 +72,7 @@ GET all Packages - Negative (Unauthorized: Wrong Token) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET all Packages - Negative (Unauthorized: No Token) @@ -90,8 +86,7 @@ GET all Packages - Negative (Unauthorized: No Token) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET all Packages - all_fields @@ -103,19 +98,18 @@ GET all Packages - all_fields ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE_JSON} ${vnfPkgInfos}= Output response body - ${json}= evaluate json.loads('''${vnfPkgInfos}''') json Log Trying to validate response - Validate Json vnfPkgsInfo.schema.json ${json} + Validate Json vnfPkgsInfo.schema.json ${vnfPkgInfos} Log Validation OK Log Trying to validate softwareImages schema - ${softwareImages}= Get Value From Json ${json} $..softwareImages + ${softwareImages}= Get Value From Json ${vnfPkgInfos} $..softwareImages Validate Json softwareImage.schema.json ${softwareImages[0]} Log Validation for softwareImage schema OK Log Trying to validate additionalArtifacts schema - ${additional_artifacts}= Get Value From Json ${json} $..additionalArtifacts + ${additional_artifacts}= Get Value From Json ${vnfPkgInfos} $..additionalArtifacts Validate Json additionalArtifacts.schema.json ${additional_artifacts[0]} Log Validation for additionalArtifacts schema OK - ${links}= Get Value From Json ${json} $.._links + ${links}= Get Value From Json ${vnfPkgInfos} $.._links Validate Json links.schema.json ${links[0]} Log Validation for _links schema OK @@ -128,20 +122,19 @@ GET all Packages - exclude_default ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE_JSON} ${vnfPkgInfos}= Output response body - ${json}= evaluate json.loads('''${vnfPkgInfos}''') json Log Trying to validate response - Validate Json vnfPkgsInfo.schema.json ${json} + Validate Json vnfPkgsInfo.schema.json ${vnfPkgInfos} Log Validation OK Log Checking missing information for softwareImages element - ${softwareImages}= Get Value From Json ${json} $..softwareImages + ${softwareImages}= Get Value From Json ${vnfPkgInfos} $..softwareImages Should Be Empty ${softwareImages} Log softwareImages element is missing as excepted Log Checking missing information for additionalArtifact element - ${additional_artifacts}= Get Value From Json ${json} $..additionalArtifacts + ${additional_artifacts}= Get Value From Json ${vnfPkgInfos} $..additionalArtifacts Should Be Empty ${additional_artifacts} Log additionalArtifact element is missing as excepted Log Checking missing information for _links element - ${links}= Get Value From Json ${json} $.._links + ${links}= Get Value From Json ${vnfPkgInfos} $.._links Should Be Empty ${links} Log _links element is missing as excepted @@ -155,16 +148,15 @@ GET all Packages - fields ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE_JSON} ${vnfPkgInfos}= Output response body - ${json}= evaluate json.loads('''${vnfPkgInfos}''') json Log Trying to validate response, checking vnfPkgInfo and other complex attributes included in the vnfPkgInfo - Validate Json vnfPkgsInfo.schema.json ${json} + Validate Json vnfPkgsInfo.schema.json ${vnfPkgInfos} Log Validation for vnfPkgInfo OK Log Trying to validate softwareImages schema - ${softwareImages}= Get Value From Json ${json} $..softwareImages + ${softwareImages}= Get Value From Json ${vnfPkgInfos} $..softwareImages Validate Json softwareImage.schema.json ${softwareImages[0]} Log Validation for softwareImage schema OK Log Trying to validate additionalArtifacts schema - ${additional_artifacts}= Get Value From Json ${json} $..additionalArtifacts + ${additional_artifacts}= Get Value From Json ${vnfPkgInfos} $..additionalArtifacts Validate Json additionalArtifacts.schema.json ${additional_artifacts[0]} Log Validation for additionalArtifacts schema OK @@ -178,13 +170,12 @@ GET all Packages - exclude_fields ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE_JSON} ${vnfPkgInfos}= Output response body - ${json}= evaluate json.loads('''${vnfPkgInfos}''') json Log Checking missing information for softwareImages element - ${softwareImages}= Get Value From Json ${json} $..softwareImages + ${softwareImages}= Get Value From Json ${vnfPkgInfos} $..softwareImages Should Be Empty ${softwareImages} Log softwareImages element is missing as excepted Log Checking missing information for additionalArtifact element - ${additional_artifacts}= Get Value From Json ${json} $..additionalArtifacts + ${additional_artifacts}= Get Value From Json ${vnfPkgInfos} $..additionalArtifacts Should Be Empty ${additional_artifacts} Log additionalArtifact element is missing as excepted @@ -199,8 +190,7 @@ GET all PACKAGE (Negative: Not found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST all VNF PACKAGE @@ -220,10 +210,10 @@ POST all VNF PACKAGE Log Validation of the vnfPkgInfo schema ${vnfPkgInfo}= Output response body Log Trying to validate response - ${json}= evaluate json.loads('''${vnfPkgInfo}''') json - Validate Json vnfPkgInfo.schema.json ${json} + Validate Json vnfPkgInfo.schema.json ${vnfPkgInfo} PUT all PACKAGE (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -232,6 +222,7 @@ PUT all PACKAGE (Method not implemented) Log Received 405 Method not implemented as expected PATCH all PACKAGE (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -240,6 +231,7 @@ PATCH all PACKAGE (Method not implemented) Log Received 405 Method not implemented as expected DELETE all PACKAGE (Method not implemented) + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} diff --git a/SOL005/VNFPackageManagement-API/environment/generic.txt b/SOL005/VNFPackageManagement-API/environment/generic.txt deleted file mode 100644 index 60457280d7f72afcff648f93ff54d9169d3a8c12..0000000000000000000000000000000000000000 --- a/SOL005/VNFPackageManagement-API/environment/generic.txt +++ /dev/null @@ -1,22 +0,0 @@ -*** Variables *** -${VNFM_HOST} localhost # Hostname of the VNFM -${VNFM_PORT} 8080 # Listening port of the VNFM -${NFVO_HOST} localhost # Hostname of the NFVO -${NFVO_PORT} 8081 # Listening port of the NFVO -${VNFM_SCHEMA} https -${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 -${CONTENT_TYPE_JSON} application/json -${ACCEPT_JSON} application/json -${apiRoot} / -${AUTH_USAGE} 1 -${NEG_AUTHORIZATION} Bearer negativetoken -${apiVersion} v1 -${apiName} vnfpkgm -${FIELD_USAGE} 1 -${NFVO_PLAIN} 1 -${NFVO_FIELDS} 1 -${vnfPackageId} 788106a2-d692-44f3-a86d-384f0ce35e42 - -${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar - diff --git a/SOL005/VNFPackageManagement-API/environment/variables.txt b/SOL005/VNFPackageManagement-API/environment/variables.txt index c758145e5c52572eed2049b66bc603171bce9385..3792edc0f6a118c3b6e9b2290e756b6d03593272 100644 --- a/SOL005/VNFPackageManagement-API/environment/variables.txt +++ b/SOL005/VNFPackageManagement-API/environment/variables.txt @@ -1,5 +1,25 @@ - *** Variables *** + +${NFVO_HOST} localhost # Hostname of the NFVO +${NFVO_PORT} 8081 # Listening port of the NFVO +${NFVO_SCHEMA} https +${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${CONTENT_TYPE_JSON} application/json +${ACCEPT_JSON} application/json +${apiRoot} / +${AUTH_USAGE} 1 +${NEG_AUTHORIZATION} Bearer negativetoken +${apiVersion} v1 +${apiName} vnfpkgm +${FIELD_USAGE} 1 +${NFVO_PLAIN} 1 +${NFVO_FIELDS} 1 +${vnfPackageId} 788106a2-d692-44f3-a86d-384f0ce35e42 + +${testOptionalMethods} 0 + +${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + ${callback_uri} http://localhost ${callback_port} 9091 ${callback_endpoint} /endpoint