From da5b9e4b6b81fd5ec69634580a8a53c93062f7cc Mon Sep 17 00:00:00 2001 From: uihassan Date: Fri, 9 Oct 2020 11:59:28 +0500 Subject: [PATCH 1/4] refernce updated --- .../ApiVersion.robot | 20 +++++++++---------- .../Grants.robot | 14 ++++++------- .../IndividualGrant.robot | 14 ++++++------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot b/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot index 1740b98ed..6821a6e18 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot @@ -13,7 +13,7 @@ POST API Version - Method not implemented ... Test title: POST API version - Method not implemented ... Test objective: The objective is to test that POST method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -25,7 +25,7 @@ GET API Version ... Test title: GET API Version ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -38,7 +38,7 @@ PUT API Version - Method not implemented ... Test title: PUT API Version - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -50,7 +50,7 @@ PATCH API Version - Method not implemented ... Test title: PATCH API Version - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -62,7 +62,7 @@ DELETE API Version - Method not implemented ... Test title: DELETE API Version - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -74,7 +74,7 @@ POST API Version with apiMajorVerion - Method not implemented ... Test title: POST API version with apiMajorVerion - Method not implemented ... Test objective: The objective is to test that POST method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -86,7 +86,7 @@ GET API Version with apiMajorVerion ... Test title: GET API Version with apiMajorVerion ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -99,7 +99,7 @@ PUT API Version with apiMajorVerion - Method not implemented ... Test title: PUT API Version with apiMajorVerion - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -111,7 +111,7 @@ PATCH API Version with apiMajorVerion - Method not implemented ... Test title: PATCH API Version with apiMajorVerion - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -123,7 +123,7 @@ DELETE API Version with apiMajorVerion - Method not implemented ... Test title: DELETE API Version with apiMajorVerion - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none diff --git a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot index 392ae4b54..347344aa9 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot @@ -18,7 +18,7 @@ Requests a grant for a particular VNF lifecycle operation - Synchronous mode ... Test title: Requests a grant for a particular VNF lifecycle operation - Synchronous mode ... Test objective: The objective is to request a grant for a particular VNF lifecycle operation and perform a JSON schema validation on the returned grant data structure ... Pre-conditions: - ... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO can decide immediately what to respond to a grant request ... Post-Conditions: The grant information is available to the VNFM. @@ -33,7 +33,7 @@ Requests a grant for a particular VNF lifecycle operation - Asynchronous mode ... Test title: Requests a grant for a particular VNF lifecycle operation - Asynchronous mode ... Test objective: The objective is to request a grant for a particular VNF lifecycle operation and perform a JSON schema validation on the returned grant data structure ... Pre-conditions: - ... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO can not decide immediately what to respond to a grant request ... Post-Conditions: The grant information is available to the VNFM. @@ -48,7 +48,7 @@ Requests a grant for a particular VNF lifecycle operation - Forbidden ... Test title: Requests a grant for a particular VNF lifecycle operation - Forbidden ... Test objective: The objective is to request a grant for a particular VNF lifecycle operation and the grant is rejected ... Pre-conditions: none - ... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -61,7 +61,7 @@ GET Grants - Method not implemented ... Test title: GET Grants - Method not implemented ... Test objective: The objective is to test that GET method is not allowed for Life cycle operation granting ... Pre-conditions: none - ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -73,7 +73,7 @@ PUT Grants - Method not implemented ... Test title: PUT Grants - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed for Life cycle operation granting ... Pre-conditions: none - ... Reference: Clause 9.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -85,7 +85,7 @@ PATCH Grants - Method not implemented ... Test title: PATCH Grants - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed for Life cycle operation granting ... Pre-conditions: none - ... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -97,7 +97,7 @@ DELETE Grants - Method not implemented ... Test title: DELETE Grants - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed for Life cycle operation granting ... Pre-conditions: none - ... Reference: Clause 9.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: resources are not deleted diff --git a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot index cb95734f5..10889e265 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot @@ -17,7 +17,7 @@ POST Individual Grant - Method not implemented ... Test title: POST Individual Grant - Method not implemented ... Test objective: The objective is to test that POST method is not allowed for Life cycle operation granting ... Pre-conditions: none - ... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -29,7 +29,7 @@ GET an individual grant - Successful ... Test title: GET an individual grant - Successful ... Test objective: The objective is to retrieve a grant for a particular VNF Lifecycle Operation. ... Pre-conditions: The grant information is available to the VNFM - ... Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -43,7 +43,7 @@ GET an individual grant - Process ongoing ... Test title: GET an individual grant - Process ongoing ... Test objective: The objective is to retrieve a grant for a particular VNF lifecycle operation when process is ongoing and no grant is available yet. ... Pre-conditions: The process of creating the grant is ongoing, no grant is available yet. - ... Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -57,7 +57,7 @@ GET an individual grant - grant rejected ... Test title: GET an individual grant - grant rejected ... Test objective: The objective is to retrieve a grant for a particular VNF Lifecycle Operation but error returned because grant has been rejected. ... Pre-conditions: none - ... Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -70,7 +70,7 @@ PUT an individual grant - Method not implemented ... Test title: PUT an individual grant - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to for Life cycle operation granting ... Pre-conditions: none - ... Reference: Clause 9.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -82,7 +82,7 @@ PATCH an individual grant - Method not implemented ... Test title: PATCH an individual grant - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to for Life cycle operation granting ... Pre-conditions: none - ... Reference: Clause 9.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -94,7 +94,7 @@ DELETE an individual grant - Method not implemented ... Test title: DELETE an individual grant - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to for Life cycle operation granting ... Pre-conditions: none - ... Reference: Clause 9.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none -- GitLab From 9296d9f6346482a916c738937ab527851a9239e5 Mon Sep 17 00:00:00 2001 From: uihassan Date: Fri, 9 Oct 2020 12:11:32 +0500 Subject: [PATCH 2/4] templating and minor fix added --- .../Grants.robot | 14 +++++++---- .../IndividualGrant.robot | 3 --- .../environment/variables.txt | 12 +++++----- .../jsons/grantRejectedRequest.json | 24 +++++++++---------- .../jsons/grantRequest.json | 24 +++++++++---------- 5 files changed, 39 insertions(+), 38 deletions(-) diff --git a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot index 347344aa9..b03e19a80 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot @@ -1,4 +1,5 @@ *** Settings *** +Library String Resource environment/variables.txt Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library OperatingSystem @@ -27,7 +28,6 @@ Requests a grant for a particular VNF lifecycle operation - Synchronous mode Check Operation Occurrence Id existence Check HTTP Response Body Json Schema Is grant - Requests a grant for a particular VNF lifecycle operation - Asynchronous mode [Documentation] Test ID: 7.3.2.1.2 ... Test title: Requests a grant for a particular VNF lifecycle operation - Asynchronous mode @@ -114,7 +114,8 @@ Send Request Grant Request in Synchronous mode Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/grantRequest.json + ${template}= Get File jsons/grantRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${flavourId} Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body} ${body}= Output response Set Suite Variable ${response} ${body} @@ -125,7 +126,8 @@ Send Request Grant Request in Asynchronous mode Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/grantRequest.json + ${template}= Get File jsons/grantRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${flavourId} Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body} ${body}= Output response Set Suite Variable ${response} ${body} @@ -136,7 +138,8 @@ Send Request for a new Grant Forbiden Operation Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/grantRejectedRequest.json + ${template}= Get File jsons/grantRejectedRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${flavourId} Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body} ${body}= Output response Set Suite Variable ${response} ${body} @@ -145,7 +148,8 @@ Send Request Grant Request Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/grantRequest.json + ${template}= Get File jsons/grantRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${flavourId} Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body} allow_redirects=false ${resp} Output response ${result}= evaluate json.loads(json.dumps(${resp})) json diff --git a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot index 10889e265..da4150f8b 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot @@ -8,9 +8,6 @@ Documentation This resource represents an individual grant. The client can us ... It is determined by means outside the scope of the present document, such as configuration or policy, ... how long an individual grant is available. -*** Variables *** -${response} {} - *** Test Cases *** POST Individual Grant - Method not implemented [Documentation] Test ID: 7.3.2.2.1 diff --git a/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt b/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt index cfb446726..39e005a4d 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt +++ b/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt @@ -14,12 +14,7 @@ ${apiVersion} v1 ${SYNC_MODE} 1 - - - -${response} - - +${response} {} ${VNFM_HOST} localhost # Hostname of the VNFM ${VNFM_PORT} 8080 # Listening port of the VNFM @@ -42,3 +37,8 @@ ${sub_filter_invalid} filter_invalid ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${notification_ep} notification ${VrQuotaAvailNotification} {} + +${vnfInstanceId} myVnfInstanceId +${vnfLcmOpOccId} myLcmOccId +${vnfdId} myVnF +${flavourId} string \ No newline at end of file diff --git a/SOL003/VNFLifecycleOperationGranting-API/jsons/grantRejectedRequest.json b/SOL003/VNFLifecycleOperationGranting-API/jsons/grantRejectedRequest.json index d8ae1e897..f335ba633 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/jsons/grantRejectedRequest.json +++ b/SOL003/VNFLifecycleOperationGranting-API/jsons/grantRejectedRequest.json @@ -1,16 +1,16 @@ -{ - "vnfInstanceId": "string", - "vnfLcmOpOccId": "string", - "vnfdId": "string", - "flavourId": "string", +{{ + "vnfInstanceId": "{vnfInstanceId}", + "vnfLcmOpOccId": "{vnfLcmOpOccId}", + "vnfdId": "{vnfdId}", + "flavourId": "{flavourId}", "operation": "INSTANTIATE", "isAutomaticInvocation": true, - "_links": { - "vnfLcmOpOcc": { + "_links": {{ + "vnfLcmOpOcc": {{ "href": "string" - }, - "vnfInstance": { + }}, + "vnfInstance": {{ "href": "string" - } - } -} \ No newline at end of file + }} + }} +}} \ No newline at end of file diff --git a/SOL003/VNFLifecycleOperationGranting-API/jsons/grantRequest.json b/SOL003/VNFLifecycleOperationGranting-API/jsons/grantRequest.json index 74b326828..f335ba633 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/jsons/grantRequest.json +++ b/SOL003/VNFLifecycleOperationGranting-API/jsons/grantRequest.json @@ -1,16 +1,16 @@ -{ - "vnfInstanceId": "myVnfInstanceId", - "vnfLcmOpOccId": "myLcmOccId", - "vnfdId": "myVnF", - "flavourId": "string", +{{ + "vnfInstanceId": "{vnfInstanceId}", + "vnfLcmOpOccId": "{vnfLcmOpOccId}", + "vnfdId": "{vnfdId}", + "flavourId": "{flavourId}", "operation": "INSTANTIATE", "isAutomaticInvocation": true, - "_links": { - "vnfLcmOpOcc": { + "_links": {{ + "vnfLcmOpOcc": {{ "href": "string" - }, - "vnfInstance": { + }}, + "vnfInstance": {{ "href": "string" - } - } -} \ No newline at end of file + }} + }} +}} \ No newline at end of file -- GitLab From 55c5c94ef1919339149deadff47a229cc6e9df0d Mon Sep 17 00:00:00 2001 From: uihassan Date: Wed, 14 Oct 2020 11:35:37 +0500 Subject: [PATCH 3/4] added majorApiVersion --- .../ApiVersion.robot | 10 ++++----- .../Grants.robot | 22 +++++++++---------- .../IndividualGrant.robot | 12 +++++----- .../environment/variables.txt | 2 +- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot b/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot index 6821a6e18..273a3d326 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot @@ -169,35 +169,35 @@ DELETE API Version POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/v1/api_version + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/v1/api_version + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/v1/api_version + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/v1/api_version + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/v1/api_version + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot index b03e19a80..4f9ce5172 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot @@ -109,38 +109,38 @@ DELETE Grants - Method not implemented Wait for individual grant successful notification Wait Until Keyword Succeeds ${retry} ${polling} Get an individual grant - Successful Send Request Grant Request in Synchronous mode - Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiVersion}/grants + Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants Pass Execution If ${SYNC_MODE} == 0 The Granting process is asynchronous mode. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ${template}= Get File jsons/grantRequest.json ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${flavourId} - Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} ${body}= Output response Set Suite Variable ${response} ${body} Send Request Grant Request in Asynchronous mode - Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiVersion}/grants + Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants Pass Execution If ${SYNC_MODE} == 1 The Granting process is synchronous mode. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ${template}= Get File jsons/grantRequest.json ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${flavourId} - Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} ${body}= Output response Set Suite Variable ${response} ${body} Send Request for a new Grant Forbiden Operation - Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiVersion}/grants + Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants Log The grant request should be rejected Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ${template}= Get File jsons/grantRejectedRequest.json ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${flavourId} - Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} ${body}= Output response Set Suite Variable ${response} ${body} @@ -150,7 +150,7 @@ Send Request Grant Request Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ${template}= Get File jsons/grantRequest.json ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${vnfdId} flavourId=${flavourId} - Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body} allow_redirects=false + Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} allow_redirects=false ${resp} Output response ${result}= evaluate json.loads(json.dumps(${resp})) json Log ${result} @@ -187,7 +187,7 @@ Get Grants Log Trying to perform a GET. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/grants + Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body}= Output response Set Suite Variable ${response} ${body} @@ -195,7 +195,7 @@ Put Grants 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}/grants + Put ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body}= Output response Set Suite Variable ${response} ${body} @@ -203,7 +203,7 @@ Patch Grants 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}/grants + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body}= Output response Set Suite Variable ${response} ${body} @@ -212,7 +212,7 @@ Delete Grants 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}/grants + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body}= Output response Set Suite Variable ${response} ${body} diff --git a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot index da4150f8b..52b961997 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot @@ -103,14 +103,14 @@ Get individual grant log Trying to read an individual grant Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} ${body}= Output response Set Suite Variable ${response} ${body} Check resource existence Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 Post individual Grant @@ -118,7 +118,7 @@ Post individual Grant Pass Execution If ${SYNC_MODE} == 1 Skipping. Synchronous mode is supported Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} ${body}= Output response Set Suite Variable ${response} ${body} @@ -126,7 +126,7 @@ Put individual Grant Log Trying to perform a GET. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} ${body}= Output response Set Suite Variable ${response} ${body} @@ -134,7 +134,7 @@ Patch individual Grant Log Trying to perform a GET. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} ${body}= Output response Set Suite Variable ${response} ${body} @@ -142,7 +142,7 @@ Delete individual Grant Log Trying to perform a GET. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} ${body}= Output response Set Suite Variable ${response} ${body} diff --git a/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt b/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt index 39e005a4d..8ba38cb43 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt +++ b/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt @@ -10,7 +10,7 @@ ${grantId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d ${apiRoot} / ${apiName} grant -${apiVersion} v1 +${apiMajorVersion} v1 ${SYNC_MODE} 1 -- GitLab From 88a07486a0ebe9bb365a9976d13a03801056a74f Mon Sep 17 00:00:00 2001 From: Najam UI Hassan Date: Wed, 18 Nov 2020 08:49:10 +0100 Subject: [PATCH 4/4] Update ApiVersion.robot --- .../ApiVersion.robot | 424 +++++++++--------- 1 file changed, 212 insertions(+), 212 deletions(-) diff --git a/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot b/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot index 273a3d326..0e97091ce 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot @@ -1,213 +1,213 @@ -*** Settings *** - -Resource environment/variables.txt - -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Library DependencyLibrary -Library JSONLibrary -Library JSONSchemaLibrary schemas/ - -*** Test Cases *** -POST API Version - Method not implemented - [Documentation] Test ID: 7.3.2.3.1 - ... Test title: POST API version - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version - [Documentation] Test ID: 7.3.2.3.2 - ... Test title: GET API Version - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version - Method not implemented - [Documentation] Test ID: 7.3.2.3.3 - ... Test title: PUT API Version - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version - Method not implemented - [Documentation] Test ID: 7.3.2.3.4 - ... Test title: PATCH API Version - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version - Method not implemented - [Documentation] Test ID: 7.3.2.3.5 - ... Test title: DELETE API Version - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -POST API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.2.3.6 - ... Test title: POST API version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version with apiMajorVerion - [Documentation] Test ID: 7.3.2.3.7 - ... Test title: GET API Version with apiMajorVerion - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.2.3.8 - ... Test title: PUT API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.2.3.9 - ... Test title: PATCH API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.2.3.10 - ... Test title: DELETE API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -*** Keywords *** -POST API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response['body']} +*** Settings *** + +Resource environment/variables.txt + +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 7.3.2.3.1 + ... Test title: POST API version - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 7.3.2.3.2 + ... Test title: GET API Version + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version - Method not implemented + [Documentation] Test ID: 7.3.2.3.3 + ... Test title: PUT API Version - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 7.3.2.3.4 + ... Test title: PATCH API Version - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 7.3.2.3.5 + ... Test title: DELETE API Version - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +POST API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.2.3.6 + ... Test title: POST API version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 7.3.2.3.7 + ... Test title: GET API Version with apiMajorVerion + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.2.3.8 + ... Test title: PUT API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.2.3.9 + ... Test title: PATCH API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.2.3.10 + ... Test title: DELETE API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate ${input} .schema.json + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file -- GitLab