From 731933e071324078e0c4e17fd580df82ec0ccf17 Mon Sep 17 00:00:00 2001 From: uihassan Date: Fri, 16 Oct 2020 15:58:48 +0500 Subject: [PATCH] New Resource NSD Archive Manifest added --- SOL005/NSDManagement-API/NSD.robot | 25 ++++++-- .../NSDManagementKeywords.robot | 64 +++++++++++++++++++ 2 files changed, 83 insertions(+), 6 deletions(-) diff --git a/SOL005/NSDManagement-API/NSD.robot b/SOL005/NSDManagement-API/NSD.robot index e71c8d90..b70f7ab8 100644 --- a/SOL005/NSDManagement-API/NSD.robot +++ b/SOL005/NSDManagement-API/NSD.robot @@ -97,10 +97,23 @@ Get NSD with conflict due to onboarding state ... Post-Conditions: none Get NSD with conflict due to onboarding state Check HTTP Response Status Code Is 409 - Check HTTP Response Body Json Schema Is ProblemDetails + Check HTTP Response Body Json Schema Is ProblemDetails + +Get NSD with security information + [Documentation] Test ID: 5.3.1.10.8 + ... Test title: Get NSD with security information + ... Test objective: The objective is to test the retrieval of the NSD within a NSD archive shall include in the ZIP archive the security information when requested with "include_signature" parameter + ... Pre-conditions: One or more NSDs are onboarded in the NFVO. + ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NSD with security information + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip POST NSD - Method not implemented - [Documentation] Test ID: 5.3.1.10.8 + [Documentation] Test ID: 5.3.1.10.9 ... Test title: POST NSD - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new Network Service Descriptor ... Pre-conditions: none @@ -112,7 +125,7 @@ POST NSD - Method not implemented Check HTTP Response Status Code Is 405 PUT NSD - Method not implemented - [Documentation] Test ID: 5.3.1.10.9 + [Documentation] Test ID: 5.3.1.10.10 ... Test title: PUT NSD - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor ... Pre-conditions: none @@ -124,7 +137,7 @@ PUT NSD - Method not implemented Check HTTP Response Status Code Is 405 PATCH NSD - Method not implemented - [Documentation] Test ID: 5.3.1.10.10 + [Documentation] Test ID: 5.3.1.10.11 ... Test title: PATCH NSD - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor ... Pre-conditions: none @@ -136,7 +149,7 @@ PATCH NSD - Method not implemented Check HTTP Response Status Code Is 405 DELETE NSD - Method not implemented - [Documentation] Test ID: 5.3.1.10.11 + [Documentation] Test ID: 5.3.1.10.12 ... Test title: DELETE NSD - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete Network Service Descriptor ... Pre-conditions: none @@ -144,5 +157,5 @@ DELETE NSD - Method not implemented ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Send DELETE Request for NSD Content + Send DELETE Request for NSD Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NSDManagement-API/NSDManagementKeywords.robot b/SOL005/NSDManagement-API/NSDManagementKeywords.robot index 61ec26c2..60d89bf4 100644 --- a/SOL005/NSDManagement-API/NSDManagementKeywords.robot +++ b/SOL005/NSDManagement-API/NSDManagementKeywords.robot @@ -1108,3 +1108,67 @@ Send DELETE Request for NSD DELETE ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd ${output}= Output response Set Suite Variable ${response} ${output} + +Get NSD with security information + Log Trying to get a NSD present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd/include_signatures + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get NSD Archive Manifest + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdPlain}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get NSD Archive Manifest with security information + Log Trying to get a NSD present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/manifest/include_signatures + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get NSD Archive Manifest with conflict due to onboarding state + Log Trying to get a VNFD from a given NSD Management present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${notOnboardedNsdInfoId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send POST Request for NSD Archive Manifest + 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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + POST ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PUT Request for NSD Archive Manifest + 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}"} + PUT ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PATCH Request for NSD Archive Manifest + 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/${nsdInfoIdZip}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send DELETE Request for NSD Archive Manifest + 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/${nsdInfoIdZip}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} \ No newline at end of file -- GitLab