From e5492487bc88d31c711a57fa88c06e3578449f2e Mon Sep 17 00:00:00 2001 From: muhammadh Date: Thu, 14 Oct 2021 18:22:11 +0500 Subject: [PATCH 01/19] Add New API VNFLCM Coordination --- SOL002/VNFIndicator-API/Subscriptions.robot | 3 +- .../VNFLCMCoordination-API/ApiVersion.robot | 132 ++++++++ .../CancelCoordinationActionTask.robot | 85 +++++ .../Coordinations.robot | 127 ++++++++ .../IndividualCoordinationAction.robot | 84 +++++ SOL002/VNFLCMCoordination-API/README.md | 12 + .../VNFLCMCoordinationKeywords.robot | 300 ++++++++++++++++++ .../environment/variables.txt | 30 ++ .../jsons/LcmCoordRequest.json | 10 + .../schemas/ApiVersionInformation.schema.json | 39 +++ .../schemas/LcmCoord.schema.json | 148 +++++++++ .../schemas/LcmCoords.schema.json | 152 +++++++++ .../schemas/ProblemDetails.schema.Json | 34 ++ indexes/sol_002_index.csv | 7 +- 14 files changed, 1161 insertions(+), 2 deletions(-) create mode 100644 SOL002/VNFLCMCoordination-API/ApiVersion.robot create mode 100644 SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot create mode 100644 SOL002/VNFLCMCoordination-API/Coordinations.robot create mode 100644 SOL002/VNFLCMCoordination-API/IndividualCoordinationAction.robot create mode 100644 SOL002/VNFLCMCoordination-API/README.md create mode 100644 SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot create mode 100644 SOL002/VNFLCMCoordination-API/environment/variables.txt create mode 100644 SOL002/VNFLCMCoordination-API/jsons/LcmCoordRequest.json create mode 100644 SOL002/VNFLCMCoordination-API/schemas/ApiVersionInformation.schema.json create mode 100644 SOL002/VNFLCMCoordination-API/schemas/LcmCoord.schema.json create mode 100644 SOL002/VNFLCMCoordination-API/schemas/LcmCoords.schema.json create mode 100644 SOL002/VNFLCMCoordination-API/schemas/ProblemDetails.schema.Json diff --git a/SOL002/VNFIndicator-API/Subscriptions.robot b/SOL002/VNFIndicator-API/Subscriptions.robot index ba59c8166..287ed0922 100644 --- a/SOL002/VNFIndicator-API/Subscriptions.robot +++ b/SOL002/VNFIndicator-API/Subscriptions.robot @@ -181,7 +181,8 @@ Create new VNF indicator Subscription - NO-DUPLICATION Check HTTP Response Status Code Is 303 Check Operation Occurrence Id - *** Keywords *** +*** Keywords *** + Get VNF Indicators Subscriptions Log Trying to get the list of subscriptions Set Headers {"Accept": "${ACCEPT_JSON}"} diff --git a/SOL002/VNFLCMCoordination-API/ApiVersion.robot b/SOL002/VNFLCMCoordination-API/ApiVersion.robot new file mode 100644 index 000000000..b1b0cad8c --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/ApiVersion.robot @@ -0,0 +1,132 @@ +*** Settings *** +Resource environment/variables.txt +Resource VNFLCMCoordinationKeywords.robot +Library String +Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library OperatingSystem +Library DependencyLibrary + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 6.3.6.1.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 v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 6.3.6.1.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 v3.5.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.6.1.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 v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 6.3.6.1.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 v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 6.3.6.1.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 v3.5.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.6.1.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 v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 6.3.6.1.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 v3.5.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.6.1.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 v3.5.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.6.1.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 v3.5.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.6.1.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 v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot b/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot new file mode 100644 index 000000000..1ab88fbde --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot @@ -0,0 +1,85 @@ +*** Settings *** +Resource environment/variables.txt +Resource VNFLCMCoordinationKeywords.robot +Library String +Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library OperatingSystem +Library DependencyLibrary + +*** Test Cases *** + +POST Cancellation of an Ongoing Individual Coordination Action + [Documentation] Test ID: 6.3.6.4.1 + ... Test title: POST Cancellation of an Ongoing Individual Coordination Action + ... Test Objective: The objective is to test that POST request for cancellation of an ongoing individual coordination Action has accepted for processing. + ... pre-condition: The status of the related LCM operation occurance is "PROCESSING" + ... Reference: Clause 10.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: When there is an Ongoing individual LCM operation coordination action. + ... Post-Condition: none + POST Cancellation of an Ongoing Individual Coordination Action + Check HTTP Response Status Code Is 202 + Check HTTP Response Body Should be Empty + +POST Cancellation of an Ongoing Individual Coordination Action - Conflict + [Documentation] Test ID: 6.3.6.4.2 + ... Test title: POST Cancellation of an Ongoing Individual Coordination Action - Conflict + ... Test Objective: The objective is to test that POST request for cancellation of an ongoing individual coordination Action is not successfull due to a conflict with the state of the "Individual coordination action" resource. + ... pre-condition: none + ... Reference: Clause 10.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: Processing of Individual Coordination Action has 'Finished'. + ... Post-Condition: none + POST Cancellation of an Ongoing Individual Coordination Action not Applicable + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET Cancellation of an Ongoing Individual Coordination Action - Method not Implemented + [Documentation] Test ID: 6.3.6.4.3 + ... Test title: GET Cancellation of an Ongoing Individual Coordination Action + ... Test Objective: The objective is to test that GET method for cancellation of an ongoing individual coordination Action is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: ongoing individual coordination + ... Post-Condition: none + GET Cancellation of an Ongoing Individual Coordination Action + Check HTTP Response Status Code Is 405 + +PUT Cancellation of an Ongoing Individual Coordination Action - Method not Implemented + [Documentation] Test ID: 6.3.6.4.4 + ... Test title: PUT Cancellation of an Ongoing Individual Coordination Action + ... Test Objective: The objective is to test that PUT method for cancellation of an ongoing individual coordination Action is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + PUT Cancellation of an Ongoing Individual Coordination Action + Check HTTP Response Status Code Is 405 + +PATCH Cancellation of an Ongoing Individual Coordination Action - Method not Implemented + [Documentation] Test ID: 6.3.6.4.5 + ... Test title: PATCH Cancellation of an Ongoing Individual Coordination Action + ... Test Objective: The objective is to test that PATCH method for cancellation of an ongoing individual coordination Action is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + PATCH Cancellation of an Ongoing Individual Coordination Action + Check HTTP Response Status Code Is 405 + +DELETE Cancellation of an Ongoing Individual Coordination Action - Method not Implemented + [Documentation] Test ID: 6.3.6.4.6 + ... Test title: DELETE Cancellation of an Ongoing Individual Coordination Action + ... Test Objective: The objective is to test that DELETE method for cancellation of an ongoing individual coordination Action is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.4.3.5 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + DELETE Cancellation of an Ongoing Individual Coordination Action + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/Coordinations.robot b/SOL002/VNFLCMCoordination-API/Coordinations.robot new file mode 100644 index 000000000..fea972ffe --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/Coordinations.robot @@ -0,0 +1,127 @@ +*** Settings *** +Resource environment/variables.txt +Resource VNFLCMCoordinationKeywords.robot +Library String +Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library OperatingSystem +Library DependencyLibrary + +*** Test Cases *** + +POST Coordination of LCM Operation Occurance and API Producer has Chosen the Synchronous Mode + [Documentation] Test ID: 6.3.6.2.1 + ... Test title: Post Coordination of an LCM operation occurrence + ... Test Objective: The objective is to test the creation of new Individual Coordination Action, and perform a JSON schema validation of the returned LCM coordination data structure. + ... pre-condition: LCM operation occurrence resource is in Processing state + ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: API producer has chosen the synchronous mode + ... Post-Condition: none + Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode + Check HTTP Response Status Code Is 201 + Check HTTP Location Header Contains URI of Created Resource + Check HTTP Response Body Json Schema Is LcmCoords + +POST Coordination of LCM Operation Occurance and API Producer has Chosen the Asynchronous Mode + [Documentation] Test ID: 6.3.6.2.2 + ... Test title: Post Coordination of an LCM operation occurrence + ... Test Objective: The objective is to test that the coordination of a LCM operation occurance request has been accepted for processing, and perform a JSON schema validation of the returned LCM coordination data structure. + ... pre-condition: LCM operation occurrence resource is in Processing state + ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: API producer has chosen the asynchronous mode + ... Post-Condition: none + Post coordination of LCM operation Occurance and API Producer has Chosen Asynchronous Mode + Check HTTP Response Status Code Is 202 + Check HTTP Location Header Contains URI of Resource That Will be Created + Check HTTP Response Body Should be Empty + +POST Coordination of a LCM Operation Occurance Forbidden + [Documentation] Test ID: 6.3.6.2.3 + ... Test title: Post Coordination of an LCM operation occurrence Forbidden + ... Test Objective: The objective is to verify that the coordination of LCM operation occurance has been rejected. + ... pre-condition: LCM operation occurrence resource is in Processing state + ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + Post coordination of LCM operation Occurance is Forbidden + Check HTTP Response Status Code Is 403 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST Coordination of LCM Operation Occurance Conflict + [Documentation] Test ID: 6.3.6.2.4 + ... Test title: Post Coordination of an LCM operation occurrence Conflict + ... Test Objective: The objective is to verify that no coordination actions can be executed currently, due to a conflict with the state of the "Coordinations" resource. + ... pre-condition: LCM operation occurrence resource is in Processing state + ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: When there are many coordination actions exist, or conflicting ones, are in progress. + ... Post-Condition: none + Post coordination of LCM operation Occurance + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST Coordination of LCM Operation Occurance Service Unavailable + [Documentation] Test ID: 6.3.6.2.5 + ... Test title: Post Coordination of an LCM operation occurrence Service Unavailable + ... Test Objective: The objective is to verify that requested coordination operation cannot be executed currently. + ... pre-condition: LCM operation occurrence resource is in Processing state + ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: API producer has chosen the synchronous mode + ... Post-Condition: none + Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode + Check HTTP Response Status Code Is 503 + Check HTTP Retry-After Header Contains Delay After Which Corrdination Request Will be Repeated + Check HTTP Response Body Json Schema Is ProblemDetails + +GET Coordination of a LCM Operation Occurance - Method not implemented + [Documentation] Test ID: 6.3.6.2.6 + ... Test title: GET Coordination of a LCM Operation Occurance - Method not implemented + ... Test Objective: The objective is to test that GET method for Resource Coordinations is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + GET coordination of LCM operation Occurance + Check HTTP Response Status Code Is 405 + +PUT Coordination of a LCM Operation Occurance - Method not implemented + [Documentation] Test ID: 6.3.6.2.7 + ... Test title: PUT Coordination of a LCM Operation Occurance - Method not implemented + ... Test Objective: The objective is to test that PUT method for Resource Coordinations is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + PUT coordination of LCM operation Occurance + Check HTTP Response Status Code Is 405 + +PACTH Coordination of a LCM Operation Occurance - Method not implemented + [Documentation] Test ID: 6.3.6.2.8 + ... Test title: PATCH Coordination of a LCM Operation Occurance - Method not implemented + ... Test Objective: The objective is to test that PATCH method for Resource Coordinations is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + PATCH coordination of LCM operation Occurance + Check HTTP Response Status Code Is 405 + +DELETE Coordination of a LCM Operation Occurance - Method not implemented + [Documentation] Test ID: 6.3.6.2.9 + ... Test title: DELETE Coordination of a LCM Operation Occurance - Method not implemented + ... Test Objective: The objective is to test that DELETE method for Resource Coordinations is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + DELETE coordination of LCM operation Occurance + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/IndividualCoordinationAction.robot b/SOL002/VNFLCMCoordination-API/IndividualCoordinationAction.robot new file mode 100644 index 000000000..dca7fa494 --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/IndividualCoordinationAction.robot @@ -0,0 +1,84 @@ +*** Settings *** +Resource environment/variables.txt +Resource VNFLCMCoordinationKeywords.robot +Library String +Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library OperatingSystem +Library DependencyLibrary + +*** Test Cases *** +POST Individual LCM Operation Coordination Results - Method not implemented + [Documentation] Test ID: 6.3.6.3.1 + ... Test title: POST Individual LCM Operation Coordination Results - Method not implemented + ... Test Objective: The objective is to test that POST method for individual LCM operation coordination results is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.3.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + POST Individual LCM Operation Coordination Results + Check HTTP Response Status Code Is 405 + +GET Individual LCM Operation Coordination Results - Coordination is Finished + [Documentation] Test ID: 6.3.6.3.2 + ... Test title: GET Individual LCM Operation Coordination Results + ... Test Objective: The objective is to test that coordination is finished and GET method reads individual LCM operation coordination results successfully, and perform a JSON schema validation of the returned LCM coordination data structure. + ... pre-condition: LCM operation occurrence resource is in Processing state + ... Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: When the Individual LCM Operation Coordination is finished + ... Post-Condition: none + GET Individual LCM Operation Coordination Results + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is LcmCoord + +GET Individual LCM Operation Coordination Results - Coordination is Not Finished Yet + [Documentation] Test ID: 6.3.6.3.3 + ... Test title: GET Individual LCM Operation Coordination Results + ... Test Objective: The objective is to test that GET method checks that whether Individual LCM Operation Coordination is still ongoing or in the process of being cancelled. + ... pre-condition: LCM operation occurrence resource is in Processing state + ... Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: When the Individual LCM Operation Coordination is still ongoing or in the process of being cancelled. + ... Post-Condition: none + GET Individual LCM Operation Coordination Results of Ongoing Coordination Action + Check HTTP Response Status Code Is 202 + Check HTTP Response Body Should be Empty + +PUT Individual LCM Operation Coordination Results - Method not implemented + [Documentation] Test ID: 6.3.6.3.4 + ... Test title: PUT Individual LCM Operation Coordination Results - Method not implemented + ... Test Objective: The objective is to test that PUT method for individual LCM operation coordination results is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.3.3.3 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + PUT Individual LCM Operation Coordination Results + Check HTTP Response Status Code Is 405 + +PATCH Individual LCM Operation Coordination Results - Method not implemented + [Documentation] Test ID: 6.3.6.3.5 + ... Test title: PATCH Individual LCM Operation Coordination Results - Method not implemented + ... Test Objective: The objective is to test that PATCH method for individual LCM operation coordination results is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + PATCH Individual LCM Operation Coordination Results + Check HTTP Response Status Code Is 405 + +DELETE Individual LCM Operation Coordination Results - Method not implemented + [Documentation] Test ID: 6.3.6.3.6 + ... Test title: PUT Individual LCM Operation Coordination Results - Method not implemented + ... Test Objective: The objective is to test that DELETE method for individual LCM operation coordination results is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + DELETE Individual LCM Operation Coordination Results + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/README.md b/SOL002/VNFLCMCoordination-API/README.md new file mode 100644 index 000000000..cad5572c4 --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/README.md @@ -0,0 +1,12 @@ +# NFV API Tests + +This is a development folder for ETSI TTFT015. +It includes the NFV API conformance test descriptions. + +## License + +Any software in this repository is released under the ETSI Software License. +Licensing information is available in the attached LICENSE file. + + +Copyright (c) ETSI 2021 \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot new file mode 100644 index 000000000..e79fb0209 --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot @@ -0,0 +1,300 @@ +*** Settings *** +Resource environment/variables.txt +Library String +Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library OperatingSystem +Library DependencyLibrary + +*** Keywords *** + +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} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json + ${schema}= Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} + Log Json Schema Validation OK + +Check HTTP Response Body Should be Empty + Should Be Empty ${response['body']} + +POST Individual LCM Operation Coordination Results + Log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET Individual LCM Operation Coordination Results + Log Trying to perform a GET. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET Individual LCM Operation Coordination Results of Ongoing Coordination Action + Log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${ongoing_coordination_action_id} + ${outputResponse}= Output response${ongoing_coordination_action_id} + Set Global Variable ${response} ${outputResponse} + +PUT Individual LCM Operation Coordination Results + Log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH Individual LCM Operation Coordination Results + Log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE Individual LCM Operation Coordination Results + Log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + + +POST Cancellation of an Ongoing Individual Coordination Action + Log Trying to initiates the cancellation of an ongoing coordination action. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST Cancellation of an Ongoing Individual Coordination Action not Applicable + Log Trying to initiates the cancellation of an ongoing coordination action. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Finished_Coordination_Action}/cancel + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET Cancellation of an Ongoing Individual Coordination Action + Log Trying to perform a GET. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT Cancellation of an Ongoing Individual Coordination Action + Log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH Cancellation of an Ongoing Individual Coordination Action + Log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE Cancellation of an Ongoing Individual Coordination Action + Log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check HTTP Location Header Contains URI of Created Resource + ${indiviCoordActionId}= Get Value From Json ${response['headers']} $..Location + Should Not Be Empty ${indiviCoordActionId} + +Check HTTP Location Header Contains URI of Resource That Will be Created + ${indiviCoordActionId}= Get Value From Json ${response['headers']} $..Location + Should Not Be Empty ${indiviCoordActionId} + +Check HTTP Retry-After Header Contains Delay After Which Corrdination Request Will be Repeated + ${delayTime}= Get Value From Json ${response['headers']} $..Retry-After + Should Not Be Empty ${delayTime} + +Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode + Pass Execution If ${synchronous_mode} == 0 The API producer is in Asynchronous Mode. Skipping the test. + Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/LcmCoordRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post coordination of LCM operation Occurance and API Producer has Chosen Asynchronous Mode + Pass Execution If ${synchronous_mode} == 1 The API producer is in Synchronous Mode. Skipping the test. + Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/LcmCoordRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post coordination of LCM operation Occurance + Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/LcmCoordRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post coordination of LCM operation Occurance is Forbidden + Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations + Log The coordination action request should be rejected + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/LcmCoordRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET coordination of LCM operation Occurance + Log Trying to perform a GET. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT coordination of LCM operation Occurance + Log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH coordination of LCM operation Occurance + Log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE coordination of LCM operation Occurance + Log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/environment/variables.txt b/SOL002/VNFLCMCoordination-API/environment/variables.txt new file mode 100644 index 000000000..cd36ffa9e --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/environment/variables.txt @@ -0,0 +1,30 @@ +*** Variables *** + +${synchronous_mode} 1 #Set it to 0 if API producer supporting Asynchronous mode, and set it to 1 if API producer supporting Synchronous mode. + +${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${coordinationActionName} 6fc3539c-e602-4afa-8e13-962fb5a7d81f + +{coordinationId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f + +${Id_of_Finished_Coordination_Action} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which has Finished its processing, to test the conflict test suite. +${Id_of_Ongoing_Coordination_Action} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which is currently ongoing. + +${lcmOperationType} INSTANTIATE #Permitted values to represent VNF lifecycle operation types in VNF LCM operation coordination actions + +${AUTH_USAGE} 1 +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 + +${apiRoot} / +${apiName} lcmcoord +${apiMajorVersion} v1 +${response}= httpresponse + +${EM-VNF_HOST} localhost # Hostname of the NFVO +${EM-VNF_PORT} 8081 # Listening port of the NFVO +${EM-VNF_SCHEMA} https + +${CONTENT_TYPE} application/json +${ACCEPT} application/json \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/jsons/LcmCoordRequest.json b/SOL002/VNFLCMCoordination-API/jsons/LcmCoordRequest.json new file mode 100644 index 000000000..74f17f714 --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/jsons/LcmCoordRequest.json @@ -0,0 +1,10 @@ +{{ + "vnfInstanceId":"{vnfInstanceId}", + "vnfLcmOpOccId":"{vnfLcmOpOccId}", + "lcmOperationType": "{lcmOperationType}", + "coordinationActionName": "{coordinationActionName}", + "_links": {{ + "vnfLcmOpOcc":"", + "vnfInstance":"" + }} +}} \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/schemas/ApiVersionInformation.schema.json b/SOL002/VNFLCMCoordination-API/schemas/ApiVersionInformation.schema.json new file mode 100644 index 000000000..a79641197 --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/schemas/ApiVersionInformation.schema.json @@ -0,0 +1,39 @@ +{ + "description": "This type represents API version information.\n", + "type": "object", + "required": [ + "uriPrefix", + "apiVersions" + ], + "properties": { + "uriPrefix": { + "description": "Specifies the URI prefix for the API, in the following form {apiRoot}/{apiName}/{apiMajorVersion}/.\n", + "type": "string" + }, + "apiVersions": { + "description": "Version(s) supported for the API signaled by the uriPrefix attribute.\n", + "type": "array", + "items": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "description": "Identifies a supported version. The value of the version attribute shall be a version identifier as specified in clause 9.1 (SOL013).\n", + "type": "string" + }, + "isDeprecated": { + "description": "If such information is available, this attribute indicates whether use of the version signaled by the version attribute is deprecated (true) or not (false).\nA deprecated version is still supported by the API producer but is recommended not to be used any longer. When a version is no longer supported, it does not appear in the response body.\n", + "type": "boolean" + }, + "retirementDate": { + "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n", + "type": "string", + "format": "date-time" + } + } + } + } + } +} \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/schemas/LcmCoord.schema.json b/SOL002/VNFLCMCoordination-API/schemas/LcmCoord.schema.json new file mode 100644 index 000000000..fdadd65b7 --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/schemas/LcmCoord.schema.json @@ -0,0 +1,148 @@ +{ + "description": "This type represents an LCM coordination result.\n", + "type": "object", + "required": [ + "id", + "coordinationResult", + "vnfInstanceId", + "vnfLcmOpOccId", + "lcmOperationType", + "coordinationActionName", + "_links" + ], + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "coordinationResult": { + "description": "The enumeration LcmCoordResultType defines the permitted values to represent the result of executing an LCM coordination action. The coordination result also implies the action to be performed by the VNFM as the follow-up to this coordination. Value | Description ------|------------ CONTINUE | The related LCM operation shall be continued, staying in the state \"PROCESSING\". ABORT | The related LCM operation shall be aborted by transitioning into the state \"FAILED_TEMP\". CANCELLED | The coordination action has been cancelled upon request of the API consumer, i.e. the VNFM. The related LCM operation shall be aborted by transitioning into the state \"FAILED_TEMP\".\n", + "type": "string", + "enum": [ + "CONTINUE", + "ABORT", + "CANCELLED" + ] + }, + "vnfInstanceId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "vnfLcmOpOccId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "lcmOperationType": { + "description": "The enumeration LcmOperationForCoordType defines the permitted values to represent VNF lifecycle operation types in VNF LCM operation coordination actions. * INSTANTIATE: Represents the \"Instantiate VNF\" LCM operation. * SCALE: Represents the \"Scale VNF\" LCM operation. * SCALE_TO_LEVEL: Represents the \"Scale VNF to Level\" LCM operation. * CHANGE_FLAVOUR: Represents the \"Change VNF Flavour\" LCM operation. * TERMINATE: Represents the \"Terminate VNF\" LCM operation. * HEAL: Represents the \"Heal VNF\" LCM operation. * OPERATE: Represents the \"Operate VNF\" LCM operation. * CHANGE_EXT_CONN: Represents the \"Change external VNF connectivity\" LCM operation. * MODIFY_INFO: Represents the \"Modify VNF Information\" LCM operation. * CREATE_SNAPSHOT: Represents the \"Create VNF Snapshot\" LCM operation. * REVERT_TO_SNAPSHOT: Represents the \"Revert To VNF Snapshot\" LCM operation. * CHANGE_VNFPKG: Represents the \"Change current VNF package\" LCM operation.\n", + "type": "string", + "enum": [ + "INSTANTIATE", + "SCALE", + "SCALE_TO_LEVEL", + "CHANGE_FLAVOUR", + "TERMINATE", + "HEAL", + "OPERATE", + "CHANGE_EXT_CONN", + "MODIFY_INFO", + "CREATE_SNAPSHOT", + "REVERT_TO_SNAPSHOT", + "CHANGE_VNFPKG" + ] + }, + "coordinationActionName": { + "description": "Indicates the actual LCM coordination action. The coordination actions that a VNF supports are declared in the VNFD.\n", + "type": "string" + }, + "outputParams": { + "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of keyvalue pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259. In the following example, a list of key-value pairs with four keys (\"aString\", \"aNumber\", \"anArray\" and \"anObject\") is provided to illustrate that the values associated with different keys can be of different type.\n", + "type": "object" + }, + "warnings": { + "description": "Warning messages that were generated while the operation was executing.\n", + "type": "string" + }, + "error": { + "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807, 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 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.\n", + "type": "object", + "required": [ + "status", + "detail" + ], + "properties": { + "type": { + "description": "A URI reference according to IETF RFC 3986 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", + "type": "string", + "format": "URI" + }, + "title": { + "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", + "type": "string" + }, + "status": { + "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", + "type": "integer" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the problem.\n", + "type": "string" + }, + "instance": { + "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n", + "type": "string", + "format": "URI" + } + } + }, + "_links": { + "description": "Links to resources related to this resource.\n", + "type": "object", + "required": [ + "self", + "vnfLcmOpOcc", + "vnfInstance" + ], + "properties": { + "self": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + }, + "vnfLcmOpOcc": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + }, + "vnfInstance": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + } + } + } + } + } \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/schemas/LcmCoords.schema.json b/SOL002/VNFLCMCoordination-API/schemas/LcmCoords.schema.json new file mode 100644 index 000000000..8434d8d67 --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/schemas/LcmCoords.schema.json @@ -0,0 +1,152 @@ +{ + "type": "array", + "items": + { + "description": "This type represents an LCM coordination result.\n", + "type": "object", + "required": [ + "id", + "coordinationResult", + "vnfInstanceId", + "vnfLcmOpOccId", + "lcmOperationType", + "coordinationActionName", + "_links" + ], + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "coordinationResult": { + "description": "The enumeration LcmCoordResultType defines the permitted values to represent the result of executing an LCM coordination action. The coordination result also implies the action to be performed by the VNFM as the follow-up to this coordination. Value | Description ------|------------ CONTINUE | The related LCM operation shall be continued, staying in the state \"PROCESSING\". ABORT | The related LCM operation shall be aborted by transitioning into the state \"FAILED_TEMP\". CANCELLED | The coordination action has been cancelled upon request of the API consumer, i.e. the VNFM. The related LCM operation shall be aborted by transitioning into the state \"FAILED_TEMP\".\n", + "type": "string", + "enum": [ + "CONTINUE", + "ABORT", + "CANCELLED" + ] + }, + "vnfInstanceId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "vnfLcmOpOccId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "lcmOperationType": { + "description": "The enumeration LcmOperationForCoordType defines the permitted values to represent VNF lifecycle operation types in VNF LCM operation coordination actions. * INSTANTIATE: Represents the \"Instantiate VNF\" LCM operation. * SCALE: Represents the \"Scale VNF\" LCM operation. * SCALE_TO_LEVEL: Represents the \"Scale VNF to Level\" LCM operation. * CHANGE_FLAVOUR: Represents the \"Change VNF Flavour\" LCM operation. * TERMINATE: Represents the \"Terminate VNF\" LCM operation. * HEAL: Represents the \"Heal VNF\" LCM operation. * OPERATE: Represents the \"Operate VNF\" LCM operation. * CHANGE_EXT_CONN: Represents the \"Change external VNF connectivity\" LCM operation. * MODIFY_INFO: Represents the \"Modify VNF Information\" LCM operation. * CREATE_SNAPSHOT: Represents the \"Create VNF Snapshot\" LCM operation. * REVERT_TO_SNAPSHOT: Represents the \"Revert To VNF Snapshot\" LCM operation. * CHANGE_VNFPKG: Represents the \"Change current VNF package\" LCM operation.\n", + "type": "string", + "enum": [ + "INSTANTIATE", + "SCALE", + "SCALE_TO_LEVEL", + "CHANGE_FLAVOUR", + "TERMINATE", + "HEAL", + "OPERATE", + "CHANGE_EXT_CONN", + "MODIFY_INFO", + "CREATE_SNAPSHOT", + "REVERT_TO_SNAPSHOT", + "CHANGE_VNFPKG" + ] + }, + "coordinationActionName": { + "description": "Indicates the actual LCM coordination action. The coordination actions that a VNF supports are declared in the VNFD.\n", + "type": "string" + }, + "outputParams": { + "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of keyvalue pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259. In the following example, a list of key-value pairs with four keys (\"aString\", \"aNumber\", \"anArray\" and \"anObject\") is provided to illustrate that the values associated with different keys can be of different type.\n", + "type": "object" + }, + "warnings": { + "description": "Warning messages that were generated while the operation was executing.\n", + "type": "string" + }, + "error": { + "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807, 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 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.\n", + "type": "object", + "required": [ + "status", + "detail" + ], + "properties": { + "type": { + "description": "A URI reference according to IETF RFC 3986 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", + "type": "string", + "format": "URI" + }, + "title": { + "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", + "type": "string" + }, + "status": { + "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", + "type": "integer" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the problem.\n", + "type": "string" + }, + "instance": { + "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n", + "type": "string", + "format": "URI" + } + } + }, + "_links": { + "description": "Links to resources related to this resource.\n", + "type": "object", + "required": [ + "self", + "vnfLcmOpOcc", + "vnfInstance" + ], + "properties": { + "self": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + }, + "vnfLcmOpOcc": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + }, + "vnfInstance": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + } + } + } + } + } + } \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/schemas/ProblemDetails.schema.Json b/SOL002/VNFLCMCoordination-API/schemas/ProblemDetails.schema.Json new file mode 100644 index 000000000..2cc052847 --- /dev/null +++ b/SOL002/VNFLCMCoordination-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/indexes/sol_002_index.csv b/indexes/sol_002_index.csv index 90992d5b2..38a1633a0 100644 --- a/indexes/sol_002_index.csv +++ b/indexes/sol_002_index.csv @@ -10,7 +10,7 @@ 6.3.2.5,Individual Subscription Resource Endpoint,IndividualSubscription.robot 6.3.2.6,Notifications,../VNFIndicatorNotification-API/Notifications.robot 6.3.2.7,API Version Resource Endpoint,ApiVersion.robot -6.3.3.8, Notification Endpoint,NotificationEndpoint.robot +6.3.2.8, Notification Endpoint,NotificationEndpoint.robot 6.3.3,VNF Performance Management Interface,VNFPerformanceManagement-API 6.3.3.1,PM Jobs Resource Endpoint,PMJobs.robot 6.3.3.2,Individual PM Job Resource Endpoint,IndividualPmJob.robot @@ -51,3 +51,8 @@ 6.3.5.19,Notifications,Notifications.robot 6.3.5.20,API Version Resource Endpoint,ApiVersion.robot 6.3.5.21,Notification Endpoint,NotificationEndpoint.robot +6.3.6,VNF LCM Coordination Interface,VNFLCMCoordination-API +6.3.6.1,API Version Resource Endpoint,ApiVersion.robot +6.3.6.2,Coordinations,Coordinations.robot +6.3.6.3,Individual Coordination Action,IndividualCoordinationAction.robot +6.3.6.4,Cancel Coordination Action Task,CancelCoordinationActionTask.robot -- GitLab From 5151cbe1165264edc6b93cd17125a4d5430ff997 Mon Sep 17 00:00:00 2001 From: muhammadh Date: Fri, 15 Oct 2021 10:16:36 +0500 Subject: [PATCH 02/19] Minor fix in Index and Readme files --- SOL002/VNFLCMCoordination-API/README.md | 2 +- indexes/sol_002_index.csv | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SOL002/VNFLCMCoordination-API/README.md b/SOL002/VNFLCMCoordination-API/README.md index cad5572c4..d35b2a100 100644 --- a/SOL002/VNFLCMCoordination-API/README.md +++ b/SOL002/VNFLCMCoordination-API/README.md @@ -1,6 +1,6 @@ # NFV API Tests -This is a development folder for ETSI TTFT015. +This is a development folder for ETSI TTF T015. It includes the NFV API conformance test descriptions. ## License diff --git a/indexes/sol_002_index.csv b/indexes/sol_002_index.csv index 38a1633a0..e4673a0c1 100644 --- a/indexes/sol_002_index.csv +++ b/indexes/sol_002_index.csv @@ -2,7 +2,7 @@ 6.3.1,VNF Configuration Interface,VNFConfiguration-API 6.3.1.1,Configuration Resource Endpoint,Configuration.robot 6.3.1.2,API Version Resource Endpoint,ApiVersion.robot -6.3.2, VNF Indicator Interface,VNFIndicator-API +6.3.2,VNF Indicator Interface,VNFIndicator-API 6.3.2.1,VNF Indicators Resource Endpoint,VNFIndicators.robot 6.3.2.2,VNF Indicators related to a VNF Instance Resource Endpoint,VnfIndicatorsInVnfInstanceId.robot 6.3.2.3,Individual VNF Indicator Resource Endpoit,IndividualVNFindicator.robot @@ -10,7 +10,7 @@ 6.3.2.5,Individual Subscription Resource Endpoint,IndividualSubscription.robot 6.3.2.6,Notifications,../VNFIndicatorNotification-API/Notifications.robot 6.3.2.7,API Version Resource Endpoint,ApiVersion.robot -6.3.2.8, Notification Endpoint,NotificationEndpoint.robot +6.3.2.8,Notification Endpoint,NotificationEndpoint.robot 6.3.3,VNF Performance Management Interface,VNFPerformanceManagement-API 6.3.3.1,PM Jobs Resource Endpoint,PMJobs.robot 6.3.3.2,Individual PM Job Resource Endpoint,IndividualPmJob.robot @@ -19,7 +19,7 @@ 6.3.3.5,Individual Threshold Resource Endpoint,IndividualThreshold.robot 6.3.3.8,Notification,../VNFPerformanceManagementNotification-API/Notifications.robot 6.3.3.9,API Version Resource Endpoint,ApiVersion.robot -6.3.3.10, Notification Endpoint,NotificationEndpoint.robot +6.3.3.10,Notification Endpoint,NotificationEndpoint.robot 6.3.4,VNF Fault Management interface,VNFFaultManagement-API 6.3.4.1,Alarms,Alarms.robot 6.3.4.2,Individual Alarm,IndividualAlarm.robot @@ -55,4 +55,4 @@ 6.3.6.1,API Version Resource Endpoint,ApiVersion.robot 6.3.6.2,Coordinations,Coordinations.robot 6.3.6.3,Individual Coordination Action,IndividualCoordinationAction.robot -6.3.6.4,Cancel Coordination Action Task,CancelCoordinationActionTask.robot +6.3.6.4,Cancel Coordination Action Task,CancelCoordinationActionTask.robot \ No newline at end of file -- GitLab From 151fd166d01fdded9f2506df3a111b939d4f0bef Mon Sep 17 00:00:00 2001 From: muhammadh Date: Wed, 20 Oct 2021 16:07:44 +0500 Subject: [PATCH 03/19] update version to v3.5.1 in README file --- SOL002/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SOL002/README.md b/SOL002/README.md index a530db164..c926de30d 100644 --- a/SOL002/README.md +++ b/SOL002/README.md @@ -2,5 +2,5 @@ This folder includes the NFV API conformance test descriptions for NFV SOL002 APIs. -The reference spec version is v3.3.1: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/03.03.01_60/gs_NFV-SOL002v030301p.pdf +The reference spec version is v3.5.1: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/03.05.01_60/gs_NFV-SOL002v030501p.pdf -- GitLab From cb45ab6614d95e24c5acaf6c7571c4a5d6aea026 Mon Sep 17 00:00:00 2001 From: muhammadh Date: Wed, 20 Oct 2021 16:51:04 +0500 Subject: [PATCH 04/19] update README file --- SOL002/VNFLCMCoordination-API/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SOL002/VNFLCMCoordination-API/README.md b/SOL002/VNFLCMCoordination-API/README.md index d35b2a100..1e5d7e566 100644 --- a/SOL002/VNFLCMCoordination-API/README.md +++ b/SOL002/VNFLCMCoordination-API/README.md @@ -1,6 +1,6 @@ # NFV API Tests -This is a development folder for ETSI TTF T015. +This is a development folder for ETSI STF 557. It includes the NFV API conformance test descriptions. ## License @@ -9,4 +9,4 @@ Any software in this repository is released under the ETSI Software License. Licensing information is available in the attached LICENSE file. -Copyright (c) ETSI 2021 \ No newline at end of file +Copyright (c) ETSI 2018 \ No newline at end of file -- GitLab From 31e40903f16d80cafbaea7fb17bacc2986fe33aa Mon Sep 17 00:00:00 2001 From: hammad zafar Date: Thu, 21 Oct 2021 13:06:01 +0500 Subject: [PATCH 05/19] minor fixes --- .../CancelCoordinationActionTask.robot | 2 +- .../VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot | 6 +++--- SOL002/VNFLCMCoordination-API/environment/variables.txt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot b/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot index 1ab88fbde..be0c501dd 100644 --- a/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot +++ b/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot @@ -32,7 +32,7 @@ POST Cancellation of an Ongoing Individual Coordination Action - Conflict ... Config ID: Config_prod_VE ... Applicability: Processing of Individual Coordination Action has 'Finished'. ... Post-Condition: none - POST Cancellation of an Ongoing Individual Coordination Action not Applicable + POST Cancellation of an Ongoing Individual Coordination Action - Conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot index e79fb0209..097fe0fa7 100644 --- a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot +++ b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot @@ -89,7 +89,7 @@ POST Cancellation of an Ongoing Individual Coordination Action ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} -POST Cancellation of an Ongoing Individual Coordination Action not Applicable +POST Cancellation of an Ongoing Individual Coordination Action - Conflict Log Trying to initiates the cancellation of an ongoing coordination action. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} @@ -147,7 +147,7 @@ Check HTTP Retry-After Header Contains Delay After Which Corrdination Request Wi Should Not Be Empty ${delayTime} Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode - Pass Execution If ${synchronous_mode} == 0 The API producer is in Asynchronous Mode. Skipping the test. + Pass Execution If ${SYNCHRONOUS_MODE_SUPPORT} == 0 The API producer is in Asynchronous Mode. Skipping the test. Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} @@ -159,7 +159,7 @@ Post coordination of LCM operation Occurance and API Producer has Chosen Synchro Set Global Variable ${response} ${outputResponse} Post coordination of LCM operation Occurance and API Producer has Chosen Asynchronous Mode - Pass Execution If ${synchronous_mode} == 1 The API producer is in Synchronous Mode. Skipping the test. + Pass Execution If ${SYNCHRONOUS_MODE_SUPPORT} == 1 The API producer is in Synchronous Mode. Skipping the test. Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} diff --git a/SOL002/VNFLCMCoordination-API/environment/variables.txt b/SOL002/VNFLCMCoordination-API/environment/variables.txt index cd36ffa9e..3533ae3fa 100644 --- a/SOL002/VNFLCMCoordination-API/environment/variables.txt +++ b/SOL002/VNFLCMCoordination-API/environment/variables.txt @@ -1,12 +1,12 @@ *** Variables *** -${synchronous_mode} 1 #Set it to 0 if API producer supporting Asynchronous mode, and set it to 1 if API producer supporting Synchronous mode. +${SYNCHRONOUS_MODE_SUPPORT} 1 #Set it to 0 if API producer supporting Asynchronous mode, and set it to 1 if API producer supporting Synchronous mode. ${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${coordinationActionName} 6fc3539c-e602-4afa-8e13-962fb5a7d81f -{coordinationId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${coordinationId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${Id_of_Finished_Coordination_Action} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which has Finished its processing, to test the conflict test suite. ${Id_of_Ongoing_Coordination_Action} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which is currently ongoing. -- GitLab From a38f60892c6afd611cdc9b84bc1cf90c28a82317 Mon Sep 17 00:00:00 2001 From: hammad zafar Date: Thu, 21 Oct 2021 18:49:59 +0500 Subject: [PATCH 06/19] minor fixes --- .gitignore | 1 + SOL002/VNFLCMCoordination-API/Coordinations.robot | 2 +- .../VNFLCMCoordinationKeywords.robot | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 1b6e272e0..94620f93e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ build/ dist/ libspecs/ +/.vscode \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/Coordinations.robot b/SOL002/VNFLCMCoordination-API/Coordinations.robot index fea972ffe..1e1077202 100644 --- a/SOL002/VNFLCMCoordination-API/Coordinations.robot +++ b/SOL002/VNFLCMCoordination-API/Coordinations.robot @@ -60,7 +60,7 @@ POST Coordination of LCM Operation Occurance Conflict ... Config ID: Config_prod_VE ... Applicability: When there are many coordination actions exist, or conflicting ones, are in progress. ... Post-Condition: none - Post coordination of LCM operation Occurance + Post coordination of LCM operation Occurance - Conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot index 097fe0fa7..f46ec8bcb 100644 --- a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot +++ b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot @@ -39,7 +39,7 @@ GET Individual LCM Operation Coordination Results Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - GET ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} + GET ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Finished_Coordination_Action} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -48,8 +48,8 @@ GET Individual LCM Operation Coordination Results of Ongoing Coordination Action Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${ongoing_coordination_action_id} - ${outputResponse}= Output response${ongoing_coordination_action_id} + Get ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Ongoing_Coordination_Action} + ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Individual LCM Operation Coordination Results @@ -170,7 +170,7 @@ Post coordination of LCM operation Occurance and API Producer has Chosen Asynchr ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} -Post coordination of LCM operation Occurance +Post coordination of LCM operation Occurance - Conflict Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} @@ -207,7 +207,7 @@ PUT coordination of LCM operation Occurance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} -- GitLab From 43117b7485e82ee57f4a7b828702f736dc574b45 Mon Sep 17 00:00:00 2001 From: muhammadh Date: Mon, 25 Oct 2021 14:45:32 +0500 Subject: [PATCH 07/19] Update robot, keyords, variable.txt Files --- .../CancelCoordinationActionTask.robot | 20 ++- .../Coordinations.robot | 13 +- .../IndividualCoordinationAction.robot | 18 ++- .../VNFLCMCoordinationKeywords.robot | 103 ++++++++---- .../environment/variables.txt | 42 ++--- .../jsons/LcmCoordRequest.json | 12 +- .../schemas/LcmCoords.schema.json | 152 ------------------ 7 files changed, 139 insertions(+), 221 deletions(-) delete mode 100644 SOL002/VNFLCMCoordination-API/schemas/LcmCoords.schema.json diff --git a/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot b/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot index be0c501dd..56f6f36cb 100644 --- a/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot +++ b/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot @@ -36,8 +36,20 @@ POST Cancellation of an Ongoing Individual Coordination Action - Conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails -GET Cancellation of an Ongoing Individual Coordination Action - Method not Implemented +Request a cancellation of an ongoing coordination action without authentication [Documentation] Test ID: 6.3.6.4.3 + ... Test title: Request a cancellation of an ongoing coordination action without authentication + ... Test objective: The objective is to test the failure of the request for a cancellation of a coordination task when no authentication is used + ... Pre-conditions: none + ... Reference: Clause Clause 10.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + POST Cancellation of an Ongoing Individual Coordination Action without authorization token + Check HTTP Response Status Code Is 401 + +GET Cancellation of an Ongoing Individual Coordination Action - Method not Implemented + [Documentation] Test ID: 6.3.6.4.4 ... Test title: GET Cancellation of an Ongoing Individual Coordination Action ... Test Objective: The objective is to test that GET method for cancellation of an ongoing individual coordination Action is not implemented. ... pre-condition: none @@ -49,7 +61,7 @@ GET Cancellation of an Ongoing Individual Coordination Action - Method not Imple Check HTTP Response Status Code Is 405 PUT Cancellation of an Ongoing Individual Coordination Action - Method not Implemented - [Documentation] Test ID: 6.3.6.4.4 + [Documentation] Test ID: 6.3.6.4.5 ... Test title: PUT Cancellation of an Ongoing Individual Coordination Action ... Test Objective: The objective is to test that PUT method for cancellation of an ongoing individual coordination Action is not implemented. ... pre-condition: none @@ -61,7 +73,7 @@ PUT Cancellation of an Ongoing Individual Coordination Action - Method not Imple Check HTTP Response Status Code Is 405 PATCH Cancellation of an Ongoing Individual Coordination Action - Method not Implemented - [Documentation] Test ID: 6.3.6.4.5 + [Documentation] Test ID: 6.3.6.4.6 ... Test title: PATCH Cancellation of an Ongoing Individual Coordination Action ... Test Objective: The objective is to test that PATCH method for cancellation of an ongoing individual coordination Action is not implemented. ... pre-condition: none @@ -73,7 +85,7 @@ PATCH Cancellation of an Ongoing Individual Coordination Action - Method not Imp Check HTTP Response Status Code Is 405 DELETE Cancellation of an Ongoing Individual Coordination Action - Method not Implemented - [Documentation] Test ID: 6.3.6.4.6 + [Documentation] Test ID: 6.3.6.4.7 ... Test title: DELETE Cancellation of an Ongoing Individual Coordination Action ... Test Objective: The objective is to test that DELETE method for cancellation of an ongoing individual coordination Action is not implemented. ... pre-condition: none diff --git a/SOL002/VNFLCMCoordination-API/Coordinations.robot b/SOL002/VNFLCMCoordination-API/Coordinations.robot index 1e1077202..cc60bcc4c 100644 --- a/SOL002/VNFLCMCoordination-API/Coordinations.robot +++ b/SOL002/VNFLCMCoordination-API/Coordinations.robot @@ -21,8 +21,9 @@ POST Coordination of LCM Operation Occurance and API Producer has Chosen the Syn ... Post-Condition: none Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode Check HTTP Response Status Code Is 201 - Check HTTP Location Header Contains URI of Created Resource - Check HTTP Response Body Json Schema Is LcmCoords + Check HTTP Response Body Json Schema Is LcmCoord + Check HTTP Response Header Contains Location + Check Postcondition LcmCoord Exists POST Coordination of LCM Operation Occurance and API Producer has Chosen the Asynchronous Mode [Documentation] Test ID: 6.3.6.2.2 @@ -35,8 +36,8 @@ POST Coordination of LCM Operation Occurance and API Producer has Chosen the Asy ... Post-Condition: none Post coordination of LCM operation Occurance and API Producer has Chosen Asynchronous Mode Check HTTP Response Status Code Is 202 - Check HTTP Location Header Contains URI of Resource That Will be Created Check HTTP Response Body Should be Empty + Check HTTP Response Header Contains Location POST Coordination of a LCM Operation Occurance Forbidden [Documentation] Test ID: 6.3.6.2.3 @@ -60,7 +61,7 @@ POST Coordination of LCM Operation Occurance Conflict ... Config ID: Config_prod_VE ... Applicability: When there are many coordination actions exist, or conflicting ones, are in progress. ... Post-Condition: none - Post coordination of LCM operation Occurance - Conflict + Post coordination of LCM operation Occurance - conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails @@ -73,9 +74,9 @@ POST Coordination of LCM Operation Occurance Service Unavailable ... Config ID: Config_prod_VE ... Applicability: API producer has chosen the synchronous mode ... Post-Condition: none - Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode + Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode - Service Unavailable Check HTTP Response Status Code Is 503 - Check HTTP Retry-After Header Contains Delay After Which Corrdination Request Will be Repeated + Check HTTP Response Header Contains Retry-After Check HTTP Response Body Json Schema Is ProblemDetails GET Coordination of a LCM Operation Occurance - Method not implemented diff --git a/SOL002/VNFLCMCoordination-API/IndividualCoordinationAction.robot b/SOL002/VNFLCMCoordination-API/IndividualCoordinationAction.robot index dca7fa494..c62a741d8 100644 --- a/SOL002/VNFLCMCoordination-API/IndividualCoordinationAction.robot +++ b/SOL002/VNFLCMCoordination-API/IndividualCoordinationAction.robot @@ -47,8 +47,20 @@ GET Individual LCM Operation Coordination Results - Coordination is Not Finished Check HTTP Response Status Code Is 202 Check HTTP Response Body Should be Empty -PUT Individual LCM Operation Coordination Results - Method not implemented +Get Individual LCM Operation Coordination Results without authentication [Documentation] Test ID: 6.3.6.3.4 + ... Test title: Get information about a finished coordination task without authentication + ... Test objective: The objective is to try to read an individual coordination task without using authentication + ... Pre-conditions: none + ... Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + GET Individual LCM Operation Coordination Results - without authentication + Check HTTP Response Status Code Is 401 + +PUT Individual LCM Operation Coordination Results - Method not implemented + [Documentation] Test ID: 6.3.6.3.5 ... Test title: PUT Individual LCM Operation Coordination Results - Method not implemented ... Test Objective: The objective is to test that PUT method for individual LCM operation coordination results is not implemented. ... pre-condition: none @@ -60,7 +72,7 @@ PUT Individual LCM Operation Coordination Results - Method not implemented Check HTTP Response Status Code Is 405 PATCH Individual LCM Operation Coordination Results - Method not implemented - [Documentation] Test ID: 6.3.6.3.5 + [Documentation] Test ID: 6.3.6.3.6 ... Test title: PATCH Individual LCM Operation Coordination Results - Method not implemented ... Test Objective: The objective is to test that PATCH method for individual LCM operation coordination results is not implemented. ... pre-condition: none @@ -72,7 +84,7 @@ PATCH Individual LCM Operation Coordination Results - Method not implemented Check HTTP Response Status Code Is 405 DELETE Individual LCM Operation Coordination Results - Method not implemented - [Documentation] Test ID: 6.3.6.3.6 + [Documentation] Test ID: 6.3.6.3.7 ... Test title: PUT Individual LCM Operation Coordination Results - Method not implemented ... Test Objective: The objective is to test that DELETE method for individual LCM operation coordination results is not implemented. ... pre-condition: none diff --git a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot index f46ec8bcb..61196a33e 100644 --- a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot +++ b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot @@ -22,6 +22,16 @@ Check HTTP Response Body Json Schema Is Validate Json ${schema} ${response['body']} Log Json Schema Validation OK +Check Postcondition LcmCoord Exists + Log Checking that individual lcm coordination exists + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/coordiations/${response['body']['id']} + ${output}= Output response + Set Suite Variable ${response} ${output} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is LcmCoord + Check HTTP Response Body Should be Empty Should Be Empty ${response['body']} @@ -32,25 +42,33 @@ POST Individual LCM Operation Coordination Results Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} GET Individual LCM Operation Coordination Results - Log Trying to perform a GET. This method should not be implemented + Log Requesting the retrieve of a finished coordination task Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Finished_Coordination_Action} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} GET Individual LCM Operation Coordination Results of Ongoing Coordination Action - Log Trying to perform a POST. This method should not be implemented + Log Requesting the retrieve of an ongoing coordination task Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Ongoing_Coordination_Action} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Global Variable ${response} ${outputResponse} + +GET Individual LCM Operation Coordination Results - without authentication + Log Requesting to retrieve a finished coordination task without authentication + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + GET ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} + ${outputResponse}= Output response + Set Suite Variable ${response} ${outputResponse} PUT Individual LCM Operation Coordination Results Log Trying to perform a PUT. This method should not be implemented @@ -59,7 +77,7 @@ PUT Individual LCM Operation Coordination Results Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} PATCH Individual LCM Operation Coordination Results Log Trying to perform a PATCH. This method should not be implemented @@ -68,7 +86,7 @@ PATCH Individual LCM Operation Coordination Results Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} DELETE Individual LCM Operation Coordination Results Log Trying to perform a DELETE. This method should not be implemented @@ -77,17 +95,16 @@ DELETE Individual LCM Operation Coordination Results Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - + Set Suite Variable ${response} ${outputResponse} POST Cancellation of an Ongoing Individual Coordination Action Log Trying to initiates the cancellation of an ongoing coordination action. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel + POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Ongoing_Coordination_Action}/cancel ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} POST Cancellation of an Ongoing Individual Coordination Action - Conflict Log Trying to initiates the cancellation of an ongoing coordination action. @@ -96,7 +113,15 @@ POST Cancellation of an Ongoing Individual Coordination Action - Conflict Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Finished_Coordination_Action}/cancel ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} + +POST Cancellation of an Ongoing Individual Coordination Action without authorization token + Log Requesting the cancellation of an ongoing coordination task without authorization + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations/${Id_of_Ongoing_Coordination_Action}/cancel + ${output}= Output response + Set Suite Variable ${response} ${output} GET Cancellation of an Ongoing Individual Coordination Action Log Trying to perform a GET. This method should not be implemented @@ -105,7 +130,7 @@ GET Cancellation of an Ongoing Individual Coordination Action Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} PUT Cancellation of an Ongoing Individual Coordination Action Log Trying to perform a PUT. This method should not be implemented @@ -114,7 +139,7 @@ PUT Cancellation of an Ongoing Individual Coordination Action Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} PATCH Cancellation of an Ongoing Individual Coordination Action Log Trying to perform a PATCH. This method should not be implemented @@ -123,7 +148,7 @@ PATCH Cancellation of an Ongoing Individual Coordination Action Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} DELETE Cancellation of an Ongoing Individual Coordination Action Log Trying to perform a DELETE. This method should not be implemented @@ -132,20 +157,17 @@ DELETE Cancellation of an Ongoing Individual Coordination Action Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} -Check HTTP Location Header Contains URI of Created Resource - ${indiviCoordActionId}= Get Value From Json ${response['headers']} $..Location - Should Not Be Empty ${indiviCoordActionId} +Check HTTP Response Header Contains + [Arguments] ${CONTENT_TYPE} + Should Contain ${response['headers']} ${CONTENT_TYPE} + Log Header is present Check HTTP Location Header Contains URI of Resource That Will be Created ${indiviCoordActionId}= Get Value From Json ${response['headers']} $..Location Should Not Be Empty ${indiviCoordActionId} -Check HTTP Retry-After Header Contains Delay After Which Corrdination Request Will be Repeated - ${delayTime}= Get Value From Json ${response['headers']} $..Retry-After - Should Not Be Empty ${delayTime} - Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode Pass Execution If ${SYNCHRONOUS_MODE_SUPPORT} == 0 The API producer is in Asynchronous Mode. Skipping the test. Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations @@ -153,10 +175,10 @@ Post coordination of LCM operation Occurance and API Producer has Chosen Synchro Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template} = Get File jsons/LcmCoordRequest.json - ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} vnfLcmOpOccHref=${vnfLcmOpOccHref} vnfInstanceHref=${vnfInstanceHref} Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} Post coordination of LCM operation Occurance and API Producer has Chosen Asynchronous Mode Pass Execution If ${SYNCHRONOUS_MODE_SUPPORT} == 1 The API producer is in Synchronous Mode. Skipping the test. @@ -168,18 +190,31 @@ Post coordination of LCM operation Occurance and API Producer has Chosen Asynchr ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} -Post coordination of LCM operation Occurance - Conflict +Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode - Service Unavailable + Pass Execution If ${synchronous_mode} == 0 The API producer is in Asynchronous Mode. Skipping the test. Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template} = Get File jsons/LcmCoordRequest.json - ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccIdServiceUnavailable} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} vnfLcmOpOccHref=${vnfLcmOpOccHrefServiceUnavailable} vnfInstanceHref=${vnfInstanceHref} Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} + +Post coordination of LCM operation Occurance - conflict + Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations + Log Requesting a new coordination task for an LCM Operation occurrence not in PROCESSING state + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/LcmCoordRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccIdNotProcessing} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} vnfLcmOpOccHref=${vnfLcmOpOccHrefNotProcessing} vnfInstanceHref=${vnfInstanceHref} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} + ${outputResponse}= Output response + Set Suite Variable ${response} ${outputResponse} Post coordination of LCM operation Occurance is Forbidden Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations @@ -191,7 +226,7 @@ Post coordination of LCM operation Occurance is Forbidden ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} GET coordination of LCM operation Occurance Log Trying to perform a GET. This method should not be implemented @@ -200,7 +235,7 @@ GET coordination of LCM operation Occurance Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} PUT coordination of LCM operation Occurance Log Trying to perform a PUT. This method should not be implemented @@ -209,7 +244,7 @@ PUT coordination of LCM operation Occurance Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} PATCH coordination of LCM operation Occurance Log Trying to perform a PATCH. This method should not be implemented @@ -218,7 +253,7 @@ PATCH coordination of LCM operation Occurance Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} DELETE coordination of LCM operation Occurance Log Trying to perform a DELETE. This method should not be implemented @@ -227,7 +262,7 @@ DELETE coordination of LCM operation Occurance Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} POST API Version Set Headers {"Accept":"${ACCEPT}"} diff --git a/SOL002/VNFLCMCoordination-API/environment/variables.txt b/SOL002/VNFLCMCoordination-API/environment/variables.txt index 3533ae3fa..72d31cc41 100644 --- a/SOL002/VNFLCMCoordination-API/environment/variables.txt +++ b/SOL002/VNFLCMCoordination-API/environment/variables.txt @@ -1,30 +1,36 @@ *** Variables *** - -${SYNCHRONOUS_MODE_SUPPORT} 1 #Set it to 0 if API producer supporting Asynchronous mode, and set it to 1 if API producer supporting Synchronous mode. - -${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f -${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f -${coordinationActionName} 6fc3539c-e602-4afa-8e13-962fb5a7d81f - -${coordinationId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f - -${Id_of_Finished_Coordination_Action} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which has Finished its processing, to test the conflict test suite. -${Id_of_Ongoing_Coordination_Action} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which is currently ongoing. - -${lcmOperationType} INSTANTIATE #Permitted values to represent VNF lifecycle operation types in VNF LCM operation coordination actions - ${AUTH_USAGE} 1 ${AUTHORIZATION_HEADER} Authorization ${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 - ${apiRoot} / ${apiName} lcmcoord ${apiMajorVersion} v1 ${response}= httpresponse - ${EM-VNF_HOST} localhost # Hostname of the NFVO ${EM-VNF_PORT} 8081 # Listening port of the NFVO ${EM-VNF_SCHEMA} https - ${CONTENT_TYPE} application/json -${ACCEPT} application/json \ No newline at end of file +${ACCEPT} application/json + +${SYNCHRONOUS_MODE_SUPPORT} 1 #Set it to 0 if API producer supporting Asynchronous mode, and set it to 1 if API producer supporting Synchronous mode. + +{coordinationId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f + +${Id_of_Finished_Coordination_Action} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which has Finished its processing, to test the conflict test suite. +${Id_of_Ongoing_Coordination_Action} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which is currently ongoing. + +### Template data for coordinationRequest +${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${coordinationActionName} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${lcmOperationType} INSTANTIATE #Permitted values to represent VNF lifecycle operation types in VNF LCM operation coordination actions +${vnfLcmOpOccHref} +${vnfInstanceHref} + +### Template data for coordinationRequest for LCMOpp not in PROCESSING state +${vnfLcmOpOccHrefNotProcessing} +${vnfLcmOpOccIdNotProcessing} + +### Template data for coordinationRequest for LCMOpp when API producer cannot execute immediately the request +${vnfLcmOpOccHrefServiceUnavailable} +${vnfLcmOpOccIdServiceUnavailable} \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/jsons/LcmCoordRequest.json b/SOL002/VNFLCMCoordination-API/jsons/LcmCoordRequest.json index 74f17f714..c0cc402f6 100644 --- a/SOL002/VNFLCMCoordination-API/jsons/LcmCoordRequest.json +++ b/SOL002/VNFLCMCoordination-API/jsons/LcmCoordRequest.json @@ -3,8 +3,12 @@ "vnfLcmOpOccId":"{vnfLcmOpOccId}", "lcmOperationType": "{lcmOperationType}", "coordinationActionName": "{coordinationActionName}", - "_links": {{ - "vnfLcmOpOcc":"", - "vnfInstance":"" - }} + "_links": {{ + "vnfLcmOpOcc": {{ + "href": "{vnfLcmOpOccHref}" + }}, + "vnfInstance": {{ + "href": "{vnfInstanceHref}" + }} + }} }} \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/schemas/LcmCoords.schema.json b/SOL002/VNFLCMCoordination-API/schemas/LcmCoords.schema.json deleted file mode 100644 index 8434d8d67..000000000 --- a/SOL002/VNFLCMCoordination-API/schemas/LcmCoords.schema.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "type": "array", - "items": - { - "description": "This type represents an LCM coordination result.\n", - "type": "object", - "required": [ - "id", - "coordinationResult", - "vnfInstanceId", - "vnfLcmOpOccId", - "lcmOperationType", - "coordinationActionName", - "_links" - ], - "properties": { - "id": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - }, - "coordinationResult": { - "description": "The enumeration LcmCoordResultType defines the permitted values to represent the result of executing an LCM coordination action. The coordination result also implies the action to be performed by the VNFM as the follow-up to this coordination. Value | Description ------|------------ CONTINUE | The related LCM operation shall be continued, staying in the state \"PROCESSING\". ABORT | The related LCM operation shall be aborted by transitioning into the state \"FAILED_TEMP\". CANCELLED | The coordination action has been cancelled upon request of the API consumer, i.e. the VNFM. The related LCM operation shall be aborted by transitioning into the state \"FAILED_TEMP\".\n", - "type": "string", - "enum": [ - "CONTINUE", - "ABORT", - "CANCELLED" - ] - }, - "vnfInstanceId": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - }, - "vnfLcmOpOccId": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - }, - "lcmOperationType": { - "description": "The enumeration LcmOperationForCoordType defines the permitted values to represent VNF lifecycle operation types in VNF LCM operation coordination actions. * INSTANTIATE: Represents the \"Instantiate VNF\" LCM operation. * SCALE: Represents the \"Scale VNF\" LCM operation. * SCALE_TO_LEVEL: Represents the \"Scale VNF to Level\" LCM operation. * CHANGE_FLAVOUR: Represents the \"Change VNF Flavour\" LCM operation. * TERMINATE: Represents the \"Terminate VNF\" LCM operation. * HEAL: Represents the \"Heal VNF\" LCM operation. * OPERATE: Represents the \"Operate VNF\" LCM operation. * CHANGE_EXT_CONN: Represents the \"Change external VNF connectivity\" LCM operation. * MODIFY_INFO: Represents the \"Modify VNF Information\" LCM operation. * CREATE_SNAPSHOT: Represents the \"Create VNF Snapshot\" LCM operation. * REVERT_TO_SNAPSHOT: Represents the \"Revert To VNF Snapshot\" LCM operation. * CHANGE_VNFPKG: Represents the \"Change current VNF package\" LCM operation.\n", - "type": "string", - "enum": [ - "INSTANTIATE", - "SCALE", - "SCALE_TO_LEVEL", - "CHANGE_FLAVOUR", - "TERMINATE", - "HEAL", - "OPERATE", - "CHANGE_EXT_CONN", - "MODIFY_INFO", - "CREATE_SNAPSHOT", - "REVERT_TO_SNAPSHOT", - "CHANGE_VNFPKG" - ] - }, - "coordinationActionName": { - "description": "Indicates the actual LCM coordination action. The coordination actions that a VNF supports are declared in the VNFD.\n", - "type": "string" - }, - "outputParams": { - "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of keyvalue pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259. In the following example, a list of key-value pairs with four keys (\"aString\", \"aNumber\", \"anArray\" and \"anObject\") is provided to illustrate that the values associated with different keys can be of different type.\n", - "type": "object" - }, - "warnings": { - "description": "Warning messages that were generated while the operation was executing.\n", - "type": "string" - }, - "error": { - "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807, 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 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.\n", - "type": "object", - "required": [ - "status", - "detail" - ], - "properties": { - "type": { - "description": "A URI reference according to IETF RFC 3986 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", - "type": "string", - "format": "URI" - }, - "title": { - "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", - "type": "string" - }, - "status": { - "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", - "type": "integer" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem.\n", - "type": "string" - }, - "instance": { - "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n", - "type": "string", - "format": "URI" - } - } - }, - "_links": { - "description": "Links to resources related to this resource.\n", - "type": "object", - "required": [ - "self", - "vnfLcmOpOcc", - "vnfInstance" - ], - "properties": { - "self": { - "description": "This type represents a link to a resource using an absolute URI.\n", - "type": "object", - "required": [ - "href" - ], - "properties": { - "href": { - "description": "String formatted according to IETF RFC 3986.\n", - "type": "string" - } - } - }, - "vnfLcmOpOcc": { - "description": "This type represents a link to a resource using an absolute URI.\n", - "type": "object", - "required": [ - "href" - ], - "properties": { - "href": { - "description": "String formatted according to IETF RFC 3986.\n", - "type": "string" - } - } - }, - "vnfInstance": { - "description": "This type represents a link to a resource using an absolute URI.\n", - "type": "object", - "required": [ - "href" - ], - "properties": { - "href": { - "description": "String formatted according to IETF RFC 3986.\n", - "type": "string" - } - } - } - } - } - } - } - } \ No newline at end of file -- GitLab From 050e40f9477f94374636aec21036be41dbedeb27 Mon Sep 17 00:00:00 2001 From: muhammadh Date: Tue, 26 Oct 2021 19:13:50 +0500 Subject: [PATCH 08/19] Add 403 Forbidden Testcase, Add variables.txt file --- .../Coordinations.robot | 30 +++-- .../VNFLCMCoordinationKeywords.robot | 127 ++++++++++-------- .../environment/variables.txt | 5 +- 3 files changed, 92 insertions(+), 70 deletions(-) diff --git a/SOL002/VNFLCMCoordination-API/Coordinations.robot b/SOL002/VNFLCMCoordination-API/Coordinations.robot index cc60bcc4c..d415882bd 100644 --- a/SOL002/VNFLCMCoordination-API/Coordinations.robot +++ b/SOL002/VNFLCMCoordination-API/Coordinations.robot @@ -42,8 +42,8 @@ POST Coordination of LCM Operation Occurance and API Producer has Chosen the Asy POST Coordination of a LCM Operation Occurance Forbidden [Documentation] Test ID: 6.3.6.2.3 ... Test title: Post Coordination of an LCM operation occurrence Forbidden - ... Test Objective: The objective is to verify that the coordination of LCM operation occurance has been rejected. - ... pre-condition: LCM operation occurrence resource is in Processing state + ... Test Objective: The objective is to test the failure of a request for the coordination of an LCM operation occurrence + ... pre-condition: The status of the related LCM opeation occurrence is "PROCESSING". The request is performed by a user that has not the grant to run this operation ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 ... Config ID: Config_prod_VE ... Applicability: none @@ -56,7 +56,7 @@ POST Coordination of LCM Operation Occurance Conflict [Documentation] Test ID: 6.3.6.2.4 ... Test title: Post Coordination of an LCM operation occurrence Conflict ... Test Objective: The objective is to verify that no coordination actions can be executed currently, due to a conflict with the state of the "Coordinations" resource. - ... pre-condition: LCM operation occurrence resource is in Processing state + ... pre-condition: The status of the related LCM opeation occurrence is not "PROCESSING" ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 ... Config ID: Config_prod_VE ... Applicability: When there are many coordination actions exist, or conflicting ones, are in progress. @@ -68,8 +68,8 @@ POST Coordination of LCM Operation Occurance Conflict POST Coordination of LCM Operation Occurance Service Unavailable [Documentation] Test ID: 6.3.6.2.5 ... Test title: Post Coordination of an LCM operation occurrence Service Unavailable - ... Test Objective: The objective is to verify that requested coordination operation cannot be executed currently. - ... pre-condition: LCM operation occurrence resource is in Processing state + ... Test Objective: The objective is to test the request for the coordination of an LCM operation occurrence and the verify that the NFVO cannot perform immediately the request, but can perform it sometime in the future. + ... pre-condition: The status of the related LCM opeation occurrence is "PROCESSING" but API producer cannot perform immediately the request ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 ... Config ID: Config_prod_VE ... Applicability: API producer has chosen the synchronous mode @@ -79,8 +79,20 @@ POST Coordination of LCM Operation Occurance Service Unavailable Check HTTP Response Header Contains Retry-After Check HTTP Response Body Json Schema Is ProblemDetails -GET Coordination of a LCM Operation Occurance - Method not implemented +POST Coordination of an LCM operation occurrence without authentication [Documentation] Test ID: 6.3.6.2.6 + ... Test title: Request a Coordination of an LCM operation occurrence without authentication + ... Test objective: The objective is to test the failure of the request for the coordination of an LCM operation occurrence without providing an authentication token + ... Pre-conditions: The status of the related LCM opeation occurrence is "PROCESSING" + ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + Post Request for coordination of an LCM operation occurrence without authorization token + Check HTTP Response Status Code Is 401 + +GET Coordination of a LCM Operation Occurance - Method not implemented + [Documentation] Test ID: 6.3.6.2.7 ... Test title: GET Coordination of a LCM Operation Occurance - Method not implemented ... Test Objective: The objective is to test that GET method for Resource Coordinations is not implemented. ... pre-condition: none @@ -92,7 +104,7 @@ GET Coordination of a LCM Operation Occurance - Method not implemented Check HTTP Response Status Code Is 405 PUT Coordination of a LCM Operation Occurance - Method not implemented - [Documentation] Test ID: 6.3.6.2.7 + [Documentation] Test ID: 6.3.6.2.8 ... Test title: PUT Coordination of a LCM Operation Occurance - Method not implemented ... Test Objective: The objective is to test that PUT method for Resource Coordinations is not implemented. ... pre-condition: none @@ -104,7 +116,7 @@ PUT Coordination of a LCM Operation Occurance - Method not implemented Check HTTP Response Status Code Is 405 PACTH Coordination of a LCM Operation Occurance - Method not implemented - [Documentation] Test ID: 6.3.6.2.8 + [Documentation] Test ID: 6.3.6.2.9 ... Test title: PATCH Coordination of a LCM Operation Occurance - Method not implemented ... Test Objective: The objective is to test that PATCH method for Resource Coordinations is not implemented. ... pre-condition: none @@ -116,7 +128,7 @@ PACTH Coordination of a LCM Operation Occurance - Method not implemented Check HTTP Response Status Code Is 405 DELETE Coordination of a LCM Operation Occurance - Method not implemented - [Documentation] Test ID: 6.3.6.2.9 + [Documentation] Test ID: 6.3.6.2.10 ... Test title: DELETE Coordination of a LCM Operation Occurance - Method not implemented ... Test Objective: The objective is to test that DELETE method for Resource Coordinations is not implemented. ... pre-condition: none diff --git a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot index 61196a33e..2e568f919 100644 --- a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot +++ b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot @@ -37,8 +37,8 @@ Check HTTP Response Body Should be Empty POST Individual LCM Operation Coordination Results Log Trying to perform a POST. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} ${outputResponse}= Output response @@ -46,8 +46,8 @@ POST Individual LCM Operation Coordination Results GET Individual LCM Operation Coordination Results Log Requesting the retrieve of a finished coordination task - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Finished_Coordination_Action} ${outputResponse}= Output response @@ -55,8 +55,8 @@ GET Individual LCM Operation Coordination Results GET Individual LCM Operation Coordination Results of Ongoing Coordination Action Log Requesting the retrieve of an ongoing coordination task - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Ongoing_Coordination_Action} ${outputResponse}= Output response @@ -64,16 +64,16 @@ GET Individual LCM Operation Coordination Results of Ongoing Coordination Action GET Individual LCM Operation Coordination Results - without authentication Log Requesting to retrieve a finished coordination task without authentication - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} GET ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} ${outputResponse}= Output response Set Suite Variable ${response} ${outputResponse} PUT Individual LCM Operation Coordination Results Log Trying to perform a PUT. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} ${outputResponse}= Output response @@ -81,8 +81,8 @@ PUT Individual LCM Operation Coordination Results PATCH Individual LCM Operation Coordination Results Log Trying to perform a PATCH. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} ${outputResponse}= Output response @@ -90,8 +90,8 @@ PATCH Individual LCM Operation Coordination Results DELETE Individual LCM Operation Coordination Results Log Trying to perform a DELETE. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} ${outputResponse}= Output response @@ -99,8 +99,8 @@ DELETE Individual LCM Operation Coordination Results POST Cancellation of an Ongoing Individual Coordination Action Log Trying to initiates the cancellation of an ongoing coordination action. - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Ongoing_Coordination_Action}/cancel ${outputResponse}= Output response @@ -108,8 +108,8 @@ POST Cancellation of an Ongoing Individual Coordination Action POST Cancellation of an Ongoing Individual Coordination Action - Conflict Log Trying to initiates the cancellation of an ongoing coordination action. - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Finished_Coordination_Action}/cancel ${outputResponse}= Output response @@ -125,8 +125,8 @@ POST Cancellation of an Ongoing Individual Coordination Action without authoriza GET Cancellation of an Ongoing Individual Coordination Action Log Trying to perform a GET. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel ${outputResponse}= Output response @@ -134,8 +134,8 @@ GET Cancellation of an Ongoing Individual Coordination Action PUT Cancellation of an Ongoing Individual Coordination Action Log Trying to perform a PUT. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel ${outputResponse}= Output response @@ -143,8 +143,8 @@ PUT Cancellation of an Ongoing Individual Coordination Action PATCH Cancellation of an Ongoing Individual Coordination Action Log Trying to perform a PATCH. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel ${outputResponse}= Output response @@ -152,16 +152,16 @@ PATCH Cancellation of an Ongoing Individual Coordination Action DELETE Cancellation of an Ongoing Individual Coordination Action Log Trying to perform a DELETE. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel ${outputResponse}= Output response Set Suite Variable ${response} ${outputResponse} Check HTTP Response Header Contains - [Arguments] ${CONTENT_TYPE} - Should Contain ${response['headers']} ${CONTENT_TYPE} + [Arguments] ${CONTENT_TYPE_JSON} + Should Contain ${response['headers']} ${CONTENT_TYPE_JSON} Log Header is present Check HTTP Location Header Contains URI of Resource That Will be Created @@ -171,8 +171,8 @@ Check HTTP Location Header Contains URI of Resource That Will be Created Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode Pass Execution If ${SYNCHRONOUS_MODE_SUPPORT} == 0 The API producer is in Asynchronous Mode. Skipping the test. Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template} = Get File jsons/LcmCoordRequest.json ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} vnfLcmOpOccHref=${vnfLcmOpOccHref} vnfInstanceHref=${vnfInstanceHref} @@ -183,11 +183,11 @@ Post coordination of LCM operation Occurance and API Producer has Chosen Synchro Post coordination of LCM operation Occurance and API Producer has Chosen Asynchronous Mode Pass Execution If ${SYNCHRONOUS_MODE_SUPPORT} == 1 The API producer is in Synchronous Mode. Skipping the test. Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template} = Get File jsons/LcmCoordRequest.json - ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} vnfLcmOpOccHref=${vnfLcmOpOccHref} vnfInstanceHref=${vnfInstanceHref} Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} ${outputResponse}= Output response Set Suite Variable ${response} ${outputResponse} @@ -195,8 +195,8 @@ Post coordination of LCM operation Occurance and API Producer has Chosen Asynchr Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode - Service Unavailable Pass Execution If ${synchronous_mode} == 0 The API producer is in Asynchronous Mode. Skipping the test. Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template} = Get File jsons/LcmCoordRequest.json ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccIdServiceUnavailable} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} vnfLcmOpOccHref=${vnfLcmOpOccHrefServiceUnavailable} vnfInstanceHref=${vnfInstanceHref} @@ -207,8 +207,8 @@ Post coordination of LCM operation Occurance and API Producer has Chosen Synchro Post coordination of LCM operation Occurance - conflict Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations Log Requesting a new coordination task for an LCM Operation occurrence not in PROCESSING state - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template} = Get File jsons/LcmCoordRequest.json ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccIdNotProcessing} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} vnfLcmOpOccHref=${vnfLcmOpOccHrefNotProcessing} vnfInstanceHref=${vnfInstanceHref} @@ -216,22 +216,31 @@ Post coordination of LCM operation Occurance - conflict ${outputResponse}= Output response Set Suite Variable ${response} ${outputResponse} +Post Request for coordination of an LCM operation occurrence without authorization token + Log Requesting a new coordination task for an LCM Operation occurrence without authorization token + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + ${body}= Get File jsons/LcmCoordRequest.json + POST ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + Post coordination of LCM operation Occurance is Forbidden Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations Log The coordination action request should be rejected - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${INSUFFICIENT_AUTHORIZATION_TOKEN}"} ${template} = Get File jsons/LcmCoordRequest.json - ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} vnfLcmOpOccHref=${vnfLcmOpOccHref} vnfInstanceHref=${vnfInstanceHref} Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} ${outputResponse}= Output response Set Suite Variable ${response} ${outputResponse} GET coordination of LCM operation Occurance Log Trying to perform a GET. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${outputResponse}= Output response @@ -239,8 +248,8 @@ GET coordination of LCM operation Occurance PUT coordination of LCM operation Occurance Log Trying to perform a PUT. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${outputResponse}= Output response @@ -248,8 +257,8 @@ PUT coordination of LCM operation Occurance PATCH coordination of LCM operation Occurance Log Trying to perform a PATCH. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${outputResponse}= Output response @@ -257,78 +266,78 @@ PATCH coordination of LCM operation Occurance DELETE coordination of LCM operation Occurance Log Trying to perform a DELETE. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${outputResponse}= Output response Set Suite Variable ${response} ${outputResponse} POST API Version - Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version - Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version - Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version - Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version - Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response diff --git a/SOL002/VNFLCMCoordination-API/environment/variables.txt b/SOL002/VNFLCMCoordination-API/environment/variables.txt index 72d31cc41..1a3bda58a 100644 --- a/SOL002/VNFLCMCoordination-API/environment/variables.txt +++ b/SOL002/VNFLCMCoordination-API/environment/variables.txt @@ -2,6 +2,7 @@ ${AUTH_USAGE} 1 ${AUTHORIZATION_HEADER} Authorization ${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${INSUFFICIENT_AUTHORIZATION_TOKEN} Bearer INSUFFICIENT_AUTHORIZATION_TOKEN #The provided authorization token can be insufficient, expired, etc, and server refuses to authorize the request with this token. ${apiRoot} / ${apiName} lcmcoord ${apiMajorVersion} v1 @@ -9,8 +10,8 @@ ${response}= httpresponse ${EM-VNF_HOST} localhost # Hostname of the NFVO ${EM-VNF_PORT} 8081 # Listening port of the NFVO ${EM-VNF_SCHEMA} https -${CONTENT_TYPE} application/json -${ACCEPT} application/json +${CONTENT_TYPE_JSON} application/json +${ACCEPT_JSON} application/json ${SYNCHRONOUS_MODE_SUPPORT} 1 #Set it to 0 if API producer supporting Asynchronous mode, and set it to 1 if API producer supporting Synchronous mode. -- GitLab From 981c74ad72fa45ca9909bdcd246eb4b88c4a0050 Mon Sep 17 00:00:00 2001 From: hammad zafar Date: Wed, 27 Oct 2021 10:43:10 +0500 Subject: [PATCH 09/19] minor fixes --- SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot | 2 +- SOL002/VNFLCMCoordination-API/environment/variables.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot index 2e568f919..db418d425 100644 --- a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot +++ b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot @@ -193,7 +193,7 @@ Post coordination of LCM operation Occurance and API Producer has Chosen Asynchr Set Suite Variable ${response} ${outputResponse} Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode - Service Unavailable - Pass Execution If ${synchronous_mode} == 0 The API producer is in Asynchronous Mode. Skipping the test. + Pass Execution If ${SYNCHRONOUS_MODE_SUPPORT} == 0 The API producer is in Asynchronous Mode. Skipping the test. Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} diff --git a/SOL002/VNFLCMCoordination-API/environment/variables.txt b/SOL002/VNFLCMCoordination-API/environment/variables.txt index 1a3bda58a..bd9307485 100644 --- a/SOL002/VNFLCMCoordination-API/environment/variables.txt +++ b/SOL002/VNFLCMCoordination-API/environment/variables.txt @@ -15,7 +15,7 @@ ${ACCEPT_JSON} application/json ${SYNCHRONOUS_MODE_SUPPORT} 1 #Set it to 0 if API producer supporting Asynchronous mode, and set it to 1 if API producer supporting Synchronous mode. -{coordinationId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${coordinationId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${Id_of_Finished_Coordination_Action} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which has Finished its processing, to test the conflict test suite. ${Id_of_Ongoing_Coordination_Action} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which is currently ongoing. -- GitLab From faa4b988f4ba2c8bfa19ca6d4ee17d14288ae6c9 Mon Sep 17 00:00:00 2001 From: hammad zafar Date: Wed, 27 Oct 2021 16:29:18 +0500 Subject: [PATCH 10/19] declared a variable with appropriate dummy value for better user understanding --- SOL002/VNFLCMCoordination-API/environment/variables.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SOL002/VNFLCMCoordination-API/environment/variables.txt b/SOL002/VNFLCMCoordination-API/environment/variables.txt index bd9307485..74326462b 100644 --- a/SOL002/VNFLCMCoordination-API/environment/variables.txt +++ b/SOL002/VNFLCMCoordination-API/environment/variables.txt @@ -29,8 +29,8 @@ ${vnfLcmOpOccHref} ${vnfInstanceHref} ### Template data for coordinationRequest for LCMOpp not in PROCESSING state -${vnfLcmOpOccHrefNotProcessing} -${vnfLcmOpOccIdNotProcessing} +${vnfLcmOpOccHrefNotProcessing} not-in-PROCESSING-vnfLcmOpOccHref-for-conflict-scenario +${vnfLcmOpOccIdNotProcessing} not-in-PROCESSING-vnfLcmOpOccId-for-conflict-scenario ### Template data for coordinationRequest for LCMOpp when API producer cannot execute immediately the request ${vnfLcmOpOccHrefServiceUnavailable} -- GitLab From d177df9aaee5819ccd50b4ffd98fb59c4693471c Mon Sep 17 00:00:00 2001 From: muhammadh Date: Thu, 14 Oct 2021 18:22:11 +0500 Subject: [PATCH 11/19] Add New API VNFLCM Coordination --- .../VNFLCMCoordination-API/ApiVersion.robot | 132 ++++++++ .../CancelCoordinationActionTask.robot | 85 +++++ .../Coordinations.robot | 127 ++++++++ .../IndividualCoordinationAction.robot | 84 +++++ SOL002/VNFLCMCoordination-API/README.md | 12 + .../VNFLCMCoordinationKeywords.robot | 300 ++++++++++++++++++ .../environment/variables.txt | 30 ++ .../jsons/LcmCoordRequest.json | 10 + .../schemas/ApiVersionInformation.schema.json | 39 +++ .../schemas/LcmCoord.schema.json | 148 +++++++++ .../schemas/LcmCoords.schema.json | 152 +++++++++ .../schemas/ProblemDetails.schema.Json | 34 ++ indexes/sol_002_index.csv | 7 +- 13 files changed, 1159 insertions(+), 1 deletion(-) create mode 100644 SOL002/VNFLCMCoordination-API/ApiVersion.robot create mode 100644 SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot create mode 100644 SOL002/VNFLCMCoordination-API/Coordinations.robot create mode 100644 SOL002/VNFLCMCoordination-API/IndividualCoordinationAction.robot create mode 100644 SOL002/VNFLCMCoordination-API/README.md create mode 100644 SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot create mode 100644 SOL002/VNFLCMCoordination-API/environment/variables.txt create mode 100644 SOL002/VNFLCMCoordination-API/jsons/LcmCoordRequest.json create mode 100644 SOL002/VNFLCMCoordination-API/schemas/ApiVersionInformation.schema.json create mode 100644 SOL002/VNFLCMCoordination-API/schemas/LcmCoord.schema.json create mode 100644 SOL002/VNFLCMCoordination-API/schemas/LcmCoords.schema.json create mode 100644 SOL002/VNFLCMCoordination-API/schemas/ProblemDetails.schema.Json diff --git a/SOL002/VNFLCMCoordination-API/ApiVersion.robot b/SOL002/VNFLCMCoordination-API/ApiVersion.robot new file mode 100644 index 000000000..b1b0cad8c --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/ApiVersion.robot @@ -0,0 +1,132 @@ +*** Settings *** +Resource environment/variables.txt +Resource VNFLCMCoordinationKeywords.robot +Library String +Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library OperatingSystem +Library DependencyLibrary + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 6.3.6.1.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 v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 6.3.6.1.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 v3.5.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.6.1.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 v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 6.3.6.1.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 v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 6.3.6.1.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 v3.5.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.6.1.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 v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 6.3.6.1.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 v3.5.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.6.1.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 v3.5.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.6.1.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 v3.5.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.6.1.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 v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot b/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot new file mode 100644 index 000000000..1ab88fbde --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot @@ -0,0 +1,85 @@ +*** Settings *** +Resource environment/variables.txt +Resource VNFLCMCoordinationKeywords.robot +Library String +Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library OperatingSystem +Library DependencyLibrary + +*** Test Cases *** + +POST Cancellation of an Ongoing Individual Coordination Action + [Documentation] Test ID: 6.3.6.4.1 + ... Test title: POST Cancellation of an Ongoing Individual Coordination Action + ... Test Objective: The objective is to test that POST request for cancellation of an ongoing individual coordination Action has accepted for processing. + ... pre-condition: The status of the related LCM operation occurance is "PROCESSING" + ... Reference: Clause 10.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: When there is an Ongoing individual LCM operation coordination action. + ... Post-Condition: none + POST Cancellation of an Ongoing Individual Coordination Action + Check HTTP Response Status Code Is 202 + Check HTTP Response Body Should be Empty + +POST Cancellation of an Ongoing Individual Coordination Action - Conflict + [Documentation] Test ID: 6.3.6.4.2 + ... Test title: POST Cancellation of an Ongoing Individual Coordination Action - Conflict + ... Test Objective: The objective is to test that POST request for cancellation of an ongoing individual coordination Action is not successfull due to a conflict with the state of the "Individual coordination action" resource. + ... pre-condition: none + ... Reference: Clause 10.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: Processing of Individual Coordination Action has 'Finished'. + ... Post-Condition: none + POST Cancellation of an Ongoing Individual Coordination Action not Applicable + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET Cancellation of an Ongoing Individual Coordination Action - Method not Implemented + [Documentation] Test ID: 6.3.6.4.3 + ... Test title: GET Cancellation of an Ongoing Individual Coordination Action + ... Test Objective: The objective is to test that GET method for cancellation of an ongoing individual coordination Action is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: ongoing individual coordination + ... Post-Condition: none + GET Cancellation of an Ongoing Individual Coordination Action + Check HTTP Response Status Code Is 405 + +PUT Cancellation of an Ongoing Individual Coordination Action - Method not Implemented + [Documentation] Test ID: 6.3.6.4.4 + ... Test title: PUT Cancellation of an Ongoing Individual Coordination Action + ... Test Objective: The objective is to test that PUT method for cancellation of an ongoing individual coordination Action is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + PUT Cancellation of an Ongoing Individual Coordination Action + Check HTTP Response Status Code Is 405 + +PATCH Cancellation of an Ongoing Individual Coordination Action - Method not Implemented + [Documentation] Test ID: 6.3.6.4.5 + ... Test title: PATCH Cancellation of an Ongoing Individual Coordination Action + ... Test Objective: The objective is to test that PATCH method for cancellation of an ongoing individual coordination Action is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + PATCH Cancellation of an Ongoing Individual Coordination Action + Check HTTP Response Status Code Is 405 + +DELETE Cancellation of an Ongoing Individual Coordination Action - Method not Implemented + [Documentation] Test ID: 6.3.6.4.6 + ... Test title: DELETE Cancellation of an Ongoing Individual Coordination Action + ... Test Objective: The objective is to test that DELETE method for cancellation of an ongoing individual coordination Action is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.4.3.5 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + DELETE Cancellation of an Ongoing Individual Coordination Action + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/Coordinations.robot b/SOL002/VNFLCMCoordination-API/Coordinations.robot new file mode 100644 index 000000000..fea972ffe --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/Coordinations.robot @@ -0,0 +1,127 @@ +*** Settings *** +Resource environment/variables.txt +Resource VNFLCMCoordinationKeywords.robot +Library String +Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library OperatingSystem +Library DependencyLibrary + +*** Test Cases *** + +POST Coordination of LCM Operation Occurance and API Producer has Chosen the Synchronous Mode + [Documentation] Test ID: 6.3.6.2.1 + ... Test title: Post Coordination of an LCM operation occurrence + ... Test Objective: The objective is to test the creation of new Individual Coordination Action, and perform a JSON schema validation of the returned LCM coordination data structure. + ... pre-condition: LCM operation occurrence resource is in Processing state + ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: API producer has chosen the synchronous mode + ... Post-Condition: none + Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode + Check HTTP Response Status Code Is 201 + Check HTTP Location Header Contains URI of Created Resource + Check HTTP Response Body Json Schema Is LcmCoords + +POST Coordination of LCM Operation Occurance and API Producer has Chosen the Asynchronous Mode + [Documentation] Test ID: 6.3.6.2.2 + ... Test title: Post Coordination of an LCM operation occurrence + ... Test Objective: The objective is to test that the coordination of a LCM operation occurance request has been accepted for processing, and perform a JSON schema validation of the returned LCM coordination data structure. + ... pre-condition: LCM operation occurrence resource is in Processing state + ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: API producer has chosen the asynchronous mode + ... Post-Condition: none + Post coordination of LCM operation Occurance and API Producer has Chosen Asynchronous Mode + Check HTTP Response Status Code Is 202 + Check HTTP Location Header Contains URI of Resource That Will be Created + Check HTTP Response Body Should be Empty + +POST Coordination of a LCM Operation Occurance Forbidden + [Documentation] Test ID: 6.3.6.2.3 + ... Test title: Post Coordination of an LCM operation occurrence Forbidden + ... Test Objective: The objective is to verify that the coordination of LCM operation occurance has been rejected. + ... pre-condition: LCM operation occurrence resource is in Processing state + ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + Post coordination of LCM operation Occurance is Forbidden + Check HTTP Response Status Code Is 403 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST Coordination of LCM Operation Occurance Conflict + [Documentation] Test ID: 6.3.6.2.4 + ... Test title: Post Coordination of an LCM operation occurrence Conflict + ... Test Objective: The objective is to verify that no coordination actions can be executed currently, due to a conflict with the state of the "Coordinations" resource. + ... pre-condition: LCM operation occurrence resource is in Processing state + ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: When there are many coordination actions exist, or conflicting ones, are in progress. + ... Post-Condition: none + Post coordination of LCM operation Occurance + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST Coordination of LCM Operation Occurance Service Unavailable + [Documentation] Test ID: 6.3.6.2.5 + ... Test title: Post Coordination of an LCM operation occurrence Service Unavailable + ... Test Objective: The objective is to verify that requested coordination operation cannot be executed currently. + ... pre-condition: LCM operation occurrence resource is in Processing state + ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: API producer has chosen the synchronous mode + ... Post-Condition: none + Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode + Check HTTP Response Status Code Is 503 + Check HTTP Retry-After Header Contains Delay After Which Corrdination Request Will be Repeated + Check HTTP Response Body Json Schema Is ProblemDetails + +GET Coordination of a LCM Operation Occurance - Method not implemented + [Documentation] Test ID: 6.3.6.2.6 + ... Test title: GET Coordination of a LCM Operation Occurance - Method not implemented + ... Test Objective: The objective is to test that GET method for Resource Coordinations is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + GET coordination of LCM operation Occurance + Check HTTP Response Status Code Is 405 + +PUT Coordination of a LCM Operation Occurance - Method not implemented + [Documentation] Test ID: 6.3.6.2.7 + ... Test title: PUT Coordination of a LCM Operation Occurance - Method not implemented + ... Test Objective: The objective is to test that PUT method for Resource Coordinations is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + PUT coordination of LCM operation Occurance + Check HTTP Response Status Code Is 405 + +PACTH Coordination of a LCM Operation Occurance - Method not implemented + [Documentation] Test ID: 6.3.6.2.8 + ... Test title: PATCH Coordination of a LCM Operation Occurance - Method not implemented + ... Test Objective: The objective is to test that PATCH method for Resource Coordinations is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + PATCH coordination of LCM operation Occurance + Check HTTP Response Status Code Is 405 + +DELETE Coordination of a LCM Operation Occurance - Method not implemented + [Documentation] Test ID: 6.3.6.2.9 + ... Test title: DELETE Coordination of a LCM Operation Occurance - Method not implemented + ... Test Objective: The objective is to test that DELETE method for Resource Coordinations is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + DELETE coordination of LCM operation Occurance + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/IndividualCoordinationAction.robot b/SOL002/VNFLCMCoordination-API/IndividualCoordinationAction.robot new file mode 100644 index 000000000..dca7fa494 --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/IndividualCoordinationAction.robot @@ -0,0 +1,84 @@ +*** Settings *** +Resource environment/variables.txt +Resource VNFLCMCoordinationKeywords.robot +Library String +Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library OperatingSystem +Library DependencyLibrary + +*** Test Cases *** +POST Individual LCM Operation Coordination Results - Method not implemented + [Documentation] Test ID: 6.3.6.3.1 + ... Test title: POST Individual LCM Operation Coordination Results - Method not implemented + ... Test Objective: The objective is to test that POST method for individual LCM operation coordination results is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.3.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + POST Individual LCM Operation Coordination Results + Check HTTP Response Status Code Is 405 + +GET Individual LCM Operation Coordination Results - Coordination is Finished + [Documentation] Test ID: 6.3.6.3.2 + ... Test title: GET Individual LCM Operation Coordination Results + ... Test Objective: The objective is to test that coordination is finished and GET method reads individual LCM operation coordination results successfully, and perform a JSON schema validation of the returned LCM coordination data structure. + ... pre-condition: LCM operation occurrence resource is in Processing state + ... Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: When the Individual LCM Operation Coordination is finished + ... Post-Condition: none + GET Individual LCM Operation Coordination Results + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is LcmCoord + +GET Individual LCM Operation Coordination Results - Coordination is Not Finished Yet + [Documentation] Test ID: 6.3.6.3.3 + ... Test title: GET Individual LCM Operation Coordination Results + ... Test Objective: The objective is to test that GET method checks that whether Individual LCM Operation Coordination is still ongoing or in the process of being cancelled. + ... pre-condition: LCM operation occurrence resource is in Processing state + ... Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: When the Individual LCM Operation Coordination is still ongoing or in the process of being cancelled. + ... Post-Condition: none + GET Individual LCM Operation Coordination Results of Ongoing Coordination Action + Check HTTP Response Status Code Is 202 + Check HTTP Response Body Should be Empty + +PUT Individual LCM Operation Coordination Results - Method not implemented + [Documentation] Test ID: 6.3.6.3.4 + ... Test title: PUT Individual LCM Operation Coordination Results - Method not implemented + ... Test Objective: The objective is to test that PUT method for individual LCM operation coordination results is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.3.3.3 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + PUT Individual LCM Operation Coordination Results + Check HTTP Response Status Code Is 405 + +PATCH Individual LCM Operation Coordination Results - Method not implemented + [Documentation] Test ID: 6.3.6.3.5 + ... Test title: PATCH Individual LCM Operation Coordination Results - Method not implemented + ... Test Objective: The objective is to test that PATCH method for individual LCM operation coordination results is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + PATCH Individual LCM Operation Coordination Results + Check HTTP Response Status Code Is 405 + +DELETE Individual LCM Operation Coordination Results - Method not implemented + [Documentation] Test ID: 6.3.6.3.6 + ... Test title: PUT Individual LCM Operation Coordination Results - Method not implemented + ... Test Objective: The objective is to test that DELETE method for individual LCM operation coordination results is not implemented. + ... pre-condition: none + ... Reference: Clause 10.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Condition: none + DELETE Individual LCM Operation Coordination Results + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/README.md b/SOL002/VNFLCMCoordination-API/README.md new file mode 100644 index 000000000..cad5572c4 --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/README.md @@ -0,0 +1,12 @@ +# NFV API Tests + +This is a development folder for ETSI TTFT015. +It includes the NFV API conformance test descriptions. + +## License + +Any software in this repository is released under the ETSI Software License. +Licensing information is available in the attached LICENSE file. + + +Copyright (c) ETSI 2021 \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot new file mode 100644 index 000000000..e79fb0209 --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot @@ -0,0 +1,300 @@ +*** Settings *** +Resource environment/variables.txt +Library String +Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library OperatingSystem +Library DependencyLibrary + +*** Keywords *** + +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} + Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json + ... ELSE Should Contain ${response['headers']['Content-Type']} application/json + ${schema}= Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} + Log Json Schema Validation OK + +Check HTTP Response Body Should be Empty + Should Be Empty ${response['body']} + +POST Individual LCM Operation Coordination Results + Log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET Individual LCM Operation Coordination Results + Log Trying to perform a GET. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET Individual LCM Operation Coordination Results of Ongoing Coordination Action + Log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${ongoing_coordination_action_id} + ${outputResponse}= Output response${ongoing_coordination_action_id} + Set Global Variable ${response} ${outputResponse} + +PUT Individual LCM Operation Coordination Results + Log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH Individual LCM Operation Coordination Results + Log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE Individual LCM Operation Coordination Results + Log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + + +POST Cancellation of an Ongoing Individual Coordination Action + Log Trying to initiates the cancellation of an ongoing coordination action. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST Cancellation of an Ongoing Individual Coordination Action not Applicable + Log Trying to initiates the cancellation of an ongoing coordination action. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Finished_Coordination_Action}/cancel + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET Cancellation of an Ongoing Individual Coordination Action + Log Trying to perform a GET. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT Cancellation of an Ongoing Individual Coordination Action + Log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH Cancellation of an Ongoing Individual Coordination Action + Log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE Cancellation of an Ongoing Individual Coordination Action + Log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check HTTP Location Header Contains URI of Created Resource + ${indiviCoordActionId}= Get Value From Json ${response['headers']} $..Location + Should Not Be Empty ${indiviCoordActionId} + +Check HTTP Location Header Contains URI of Resource That Will be Created + ${indiviCoordActionId}= Get Value From Json ${response['headers']} $..Location + Should Not Be Empty ${indiviCoordActionId} + +Check HTTP Retry-After Header Contains Delay After Which Corrdination Request Will be Repeated + ${delayTime}= Get Value From Json ${response['headers']} $..Retry-After + Should Not Be Empty ${delayTime} + +Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode + Pass Execution If ${synchronous_mode} == 0 The API producer is in Asynchronous Mode. Skipping the test. + Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/LcmCoordRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post coordination of LCM operation Occurance and API Producer has Chosen Asynchronous Mode + Pass Execution If ${synchronous_mode} == 1 The API producer is in Synchronous Mode. Skipping the test. + Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/LcmCoordRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post coordination of LCM operation Occurance + Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/LcmCoordRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post coordination of LCM operation Occurance is Forbidden + Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations + Log The coordination action request should be rejected + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/LcmCoordRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET coordination of LCM operation Occurance + Log Trying to perform a GET. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT coordination of LCM operation Occurance + Log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH coordination of LCM operation Occurance + Log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE coordination of LCM operation Occurance + Log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/environment/variables.txt b/SOL002/VNFLCMCoordination-API/environment/variables.txt new file mode 100644 index 000000000..cd36ffa9e --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/environment/variables.txt @@ -0,0 +1,30 @@ +*** Variables *** + +${synchronous_mode} 1 #Set it to 0 if API producer supporting Asynchronous mode, and set it to 1 if API producer supporting Synchronous mode. + +${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${coordinationActionName} 6fc3539c-e602-4afa-8e13-962fb5a7d81f + +{coordinationId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f + +${Id_of_Finished_Coordination_Action} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which has Finished its processing, to test the conflict test suite. +${Id_of_Ongoing_Coordination_Action} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which is currently ongoing. + +${lcmOperationType} INSTANTIATE #Permitted values to represent VNF lifecycle operation types in VNF LCM operation coordination actions + +${AUTH_USAGE} 1 +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 + +${apiRoot} / +${apiName} lcmcoord +${apiMajorVersion} v1 +${response}= httpresponse + +${EM-VNF_HOST} localhost # Hostname of the NFVO +${EM-VNF_PORT} 8081 # Listening port of the NFVO +${EM-VNF_SCHEMA} https + +${CONTENT_TYPE} application/json +${ACCEPT} application/json \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/jsons/LcmCoordRequest.json b/SOL002/VNFLCMCoordination-API/jsons/LcmCoordRequest.json new file mode 100644 index 000000000..74f17f714 --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/jsons/LcmCoordRequest.json @@ -0,0 +1,10 @@ +{{ + "vnfInstanceId":"{vnfInstanceId}", + "vnfLcmOpOccId":"{vnfLcmOpOccId}", + "lcmOperationType": "{lcmOperationType}", + "coordinationActionName": "{coordinationActionName}", + "_links": {{ + "vnfLcmOpOcc":"", + "vnfInstance":"" + }} +}} \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/schemas/ApiVersionInformation.schema.json b/SOL002/VNFLCMCoordination-API/schemas/ApiVersionInformation.schema.json new file mode 100644 index 000000000..a79641197 --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/schemas/ApiVersionInformation.schema.json @@ -0,0 +1,39 @@ +{ + "description": "This type represents API version information.\n", + "type": "object", + "required": [ + "uriPrefix", + "apiVersions" + ], + "properties": { + "uriPrefix": { + "description": "Specifies the URI prefix for the API, in the following form {apiRoot}/{apiName}/{apiMajorVersion}/.\n", + "type": "string" + }, + "apiVersions": { + "description": "Version(s) supported for the API signaled by the uriPrefix attribute.\n", + "type": "array", + "items": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "description": "Identifies a supported version. The value of the version attribute shall be a version identifier as specified in clause 9.1 (SOL013).\n", + "type": "string" + }, + "isDeprecated": { + "description": "If such information is available, this attribute indicates whether use of the version signaled by the version attribute is deprecated (true) or not (false).\nA deprecated version is still supported by the API producer but is recommended not to be used any longer. When a version is no longer supported, it does not appear in the response body.\n", + "type": "boolean" + }, + "retirementDate": { + "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n", + "type": "string", + "format": "date-time" + } + } + } + } + } +} \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/schemas/LcmCoord.schema.json b/SOL002/VNFLCMCoordination-API/schemas/LcmCoord.schema.json new file mode 100644 index 000000000..fdadd65b7 --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/schemas/LcmCoord.schema.json @@ -0,0 +1,148 @@ +{ + "description": "This type represents an LCM coordination result.\n", + "type": "object", + "required": [ + "id", + "coordinationResult", + "vnfInstanceId", + "vnfLcmOpOccId", + "lcmOperationType", + "coordinationActionName", + "_links" + ], + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "coordinationResult": { + "description": "The enumeration LcmCoordResultType defines the permitted values to represent the result of executing an LCM coordination action. The coordination result also implies the action to be performed by the VNFM as the follow-up to this coordination. Value | Description ------|------------ CONTINUE | The related LCM operation shall be continued, staying in the state \"PROCESSING\". ABORT | The related LCM operation shall be aborted by transitioning into the state \"FAILED_TEMP\". CANCELLED | The coordination action has been cancelled upon request of the API consumer, i.e. the VNFM. The related LCM operation shall be aborted by transitioning into the state \"FAILED_TEMP\".\n", + "type": "string", + "enum": [ + "CONTINUE", + "ABORT", + "CANCELLED" + ] + }, + "vnfInstanceId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "vnfLcmOpOccId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "lcmOperationType": { + "description": "The enumeration LcmOperationForCoordType defines the permitted values to represent VNF lifecycle operation types in VNF LCM operation coordination actions. * INSTANTIATE: Represents the \"Instantiate VNF\" LCM operation. * SCALE: Represents the \"Scale VNF\" LCM operation. * SCALE_TO_LEVEL: Represents the \"Scale VNF to Level\" LCM operation. * CHANGE_FLAVOUR: Represents the \"Change VNF Flavour\" LCM operation. * TERMINATE: Represents the \"Terminate VNF\" LCM operation. * HEAL: Represents the \"Heal VNF\" LCM operation. * OPERATE: Represents the \"Operate VNF\" LCM operation. * CHANGE_EXT_CONN: Represents the \"Change external VNF connectivity\" LCM operation. * MODIFY_INFO: Represents the \"Modify VNF Information\" LCM operation. * CREATE_SNAPSHOT: Represents the \"Create VNF Snapshot\" LCM operation. * REVERT_TO_SNAPSHOT: Represents the \"Revert To VNF Snapshot\" LCM operation. * CHANGE_VNFPKG: Represents the \"Change current VNF package\" LCM operation.\n", + "type": "string", + "enum": [ + "INSTANTIATE", + "SCALE", + "SCALE_TO_LEVEL", + "CHANGE_FLAVOUR", + "TERMINATE", + "HEAL", + "OPERATE", + "CHANGE_EXT_CONN", + "MODIFY_INFO", + "CREATE_SNAPSHOT", + "REVERT_TO_SNAPSHOT", + "CHANGE_VNFPKG" + ] + }, + "coordinationActionName": { + "description": "Indicates the actual LCM coordination action. The coordination actions that a VNF supports are declared in the VNFD.\n", + "type": "string" + }, + "outputParams": { + "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of keyvalue pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259. In the following example, a list of key-value pairs with four keys (\"aString\", \"aNumber\", \"anArray\" and \"anObject\") is provided to illustrate that the values associated with different keys can be of different type.\n", + "type": "object" + }, + "warnings": { + "description": "Warning messages that were generated while the operation was executing.\n", + "type": "string" + }, + "error": { + "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807, 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 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.\n", + "type": "object", + "required": [ + "status", + "detail" + ], + "properties": { + "type": { + "description": "A URI reference according to IETF RFC 3986 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", + "type": "string", + "format": "URI" + }, + "title": { + "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", + "type": "string" + }, + "status": { + "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", + "type": "integer" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the problem.\n", + "type": "string" + }, + "instance": { + "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n", + "type": "string", + "format": "URI" + } + } + }, + "_links": { + "description": "Links to resources related to this resource.\n", + "type": "object", + "required": [ + "self", + "vnfLcmOpOcc", + "vnfInstance" + ], + "properties": { + "self": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + }, + "vnfLcmOpOcc": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + }, + "vnfInstance": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + } + } + } + } + } \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/schemas/LcmCoords.schema.json b/SOL002/VNFLCMCoordination-API/schemas/LcmCoords.schema.json new file mode 100644 index 000000000..8434d8d67 --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/schemas/LcmCoords.schema.json @@ -0,0 +1,152 @@ +{ + "type": "array", + "items": + { + "description": "This type represents an LCM coordination result.\n", + "type": "object", + "required": [ + "id", + "coordinationResult", + "vnfInstanceId", + "vnfLcmOpOccId", + "lcmOperationType", + "coordinationActionName", + "_links" + ], + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "coordinationResult": { + "description": "The enumeration LcmCoordResultType defines the permitted values to represent the result of executing an LCM coordination action. The coordination result also implies the action to be performed by the VNFM as the follow-up to this coordination. Value | Description ------|------------ CONTINUE | The related LCM operation shall be continued, staying in the state \"PROCESSING\". ABORT | The related LCM operation shall be aborted by transitioning into the state \"FAILED_TEMP\". CANCELLED | The coordination action has been cancelled upon request of the API consumer, i.e. the VNFM. The related LCM operation shall be aborted by transitioning into the state \"FAILED_TEMP\".\n", + "type": "string", + "enum": [ + "CONTINUE", + "ABORT", + "CANCELLED" + ] + }, + "vnfInstanceId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "vnfLcmOpOccId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "lcmOperationType": { + "description": "The enumeration LcmOperationForCoordType defines the permitted values to represent VNF lifecycle operation types in VNF LCM operation coordination actions. * INSTANTIATE: Represents the \"Instantiate VNF\" LCM operation. * SCALE: Represents the \"Scale VNF\" LCM operation. * SCALE_TO_LEVEL: Represents the \"Scale VNF to Level\" LCM operation. * CHANGE_FLAVOUR: Represents the \"Change VNF Flavour\" LCM operation. * TERMINATE: Represents the \"Terminate VNF\" LCM operation. * HEAL: Represents the \"Heal VNF\" LCM operation. * OPERATE: Represents the \"Operate VNF\" LCM operation. * CHANGE_EXT_CONN: Represents the \"Change external VNF connectivity\" LCM operation. * MODIFY_INFO: Represents the \"Modify VNF Information\" LCM operation. * CREATE_SNAPSHOT: Represents the \"Create VNF Snapshot\" LCM operation. * REVERT_TO_SNAPSHOT: Represents the \"Revert To VNF Snapshot\" LCM operation. * CHANGE_VNFPKG: Represents the \"Change current VNF package\" LCM operation.\n", + "type": "string", + "enum": [ + "INSTANTIATE", + "SCALE", + "SCALE_TO_LEVEL", + "CHANGE_FLAVOUR", + "TERMINATE", + "HEAL", + "OPERATE", + "CHANGE_EXT_CONN", + "MODIFY_INFO", + "CREATE_SNAPSHOT", + "REVERT_TO_SNAPSHOT", + "CHANGE_VNFPKG" + ] + }, + "coordinationActionName": { + "description": "Indicates the actual LCM coordination action. The coordination actions that a VNF supports are declared in the VNFD.\n", + "type": "string" + }, + "outputParams": { + "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of keyvalue pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259. In the following example, a list of key-value pairs with four keys (\"aString\", \"aNumber\", \"anArray\" and \"anObject\") is provided to illustrate that the values associated with different keys can be of different type.\n", + "type": "object" + }, + "warnings": { + "description": "Warning messages that were generated while the operation was executing.\n", + "type": "string" + }, + "error": { + "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807, 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 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.\n", + "type": "object", + "required": [ + "status", + "detail" + ], + "properties": { + "type": { + "description": "A URI reference according to IETF RFC 3986 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", + "type": "string", + "format": "URI" + }, + "title": { + "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", + "type": "string" + }, + "status": { + "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", + "type": "integer" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the problem.\n", + "type": "string" + }, + "instance": { + "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n", + "type": "string", + "format": "URI" + } + } + }, + "_links": { + "description": "Links to resources related to this resource.\n", + "type": "object", + "required": [ + "self", + "vnfLcmOpOcc", + "vnfInstance" + ], + "properties": { + "self": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + }, + "vnfLcmOpOcc": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + }, + "vnfInstance": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + } + } + } + } + } + } \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/schemas/ProblemDetails.schema.Json b/SOL002/VNFLCMCoordination-API/schemas/ProblemDetails.schema.Json new file mode 100644 index 000000000..2cc052847 --- /dev/null +++ b/SOL002/VNFLCMCoordination-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/indexes/sol_002_index.csv b/indexes/sol_002_index.csv index 90992d5b2..38a1633a0 100644 --- a/indexes/sol_002_index.csv +++ b/indexes/sol_002_index.csv @@ -10,7 +10,7 @@ 6.3.2.5,Individual Subscription Resource Endpoint,IndividualSubscription.robot 6.3.2.6,Notifications,../VNFIndicatorNotification-API/Notifications.robot 6.3.2.7,API Version Resource Endpoint,ApiVersion.robot -6.3.3.8, Notification Endpoint,NotificationEndpoint.robot +6.3.2.8, Notification Endpoint,NotificationEndpoint.robot 6.3.3,VNF Performance Management Interface,VNFPerformanceManagement-API 6.3.3.1,PM Jobs Resource Endpoint,PMJobs.robot 6.3.3.2,Individual PM Job Resource Endpoint,IndividualPmJob.robot @@ -51,3 +51,8 @@ 6.3.5.19,Notifications,Notifications.robot 6.3.5.20,API Version Resource Endpoint,ApiVersion.robot 6.3.5.21,Notification Endpoint,NotificationEndpoint.robot +6.3.6,VNF LCM Coordination Interface,VNFLCMCoordination-API +6.3.6.1,API Version Resource Endpoint,ApiVersion.robot +6.3.6.2,Coordinations,Coordinations.robot +6.3.6.3,Individual Coordination Action,IndividualCoordinationAction.robot +6.3.6.4,Cancel Coordination Action Task,CancelCoordinationActionTask.robot -- GitLab From 6624aa48f548170c32f8315b1964f92646d4c5a8 Mon Sep 17 00:00:00 2001 From: muhammadh Date: Fri, 15 Oct 2021 10:16:36 +0500 Subject: [PATCH 12/19] Minor fix in Index and Readme files --- SOL002/VNFLCMCoordination-API/README.md | 2 +- indexes/sol_002_index.csv | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SOL002/VNFLCMCoordination-API/README.md b/SOL002/VNFLCMCoordination-API/README.md index cad5572c4..d35b2a100 100644 --- a/SOL002/VNFLCMCoordination-API/README.md +++ b/SOL002/VNFLCMCoordination-API/README.md @@ -1,6 +1,6 @@ # NFV API Tests -This is a development folder for ETSI TTFT015. +This is a development folder for ETSI TTF T015. It includes the NFV API conformance test descriptions. ## License diff --git a/indexes/sol_002_index.csv b/indexes/sol_002_index.csv index 38a1633a0..e4673a0c1 100644 --- a/indexes/sol_002_index.csv +++ b/indexes/sol_002_index.csv @@ -2,7 +2,7 @@ 6.3.1,VNF Configuration Interface,VNFConfiguration-API 6.3.1.1,Configuration Resource Endpoint,Configuration.robot 6.3.1.2,API Version Resource Endpoint,ApiVersion.robot -6.3.2, VNF Indicator Interface,VNFIndicator-API +6.3.2,VNF Indicator Interface,VNFIndicator-API 6.3.2.1,VNF Indicators Resource Endpoint,VNFIndicators.robot 6.3.2.2,VNF Indicators related to a VNF Instance Resource Endpoint,VnfIndicatorsInVnfInstanceId.robot 6.3.2.3,Individual VNF Indicator Resource Endpoit,IndividualVNFindicator.robot @@ -10,7 +10,7 @@ 6.3.2.5,Individual Subscription Resource Endpoint,IndividualSubscription.robot 6.3.2.6,Notifications,../VNFIndicatorNotification-API/Notifications.robot 6.3.2.7,API Version Resource Endpoint,ApiVersion.robot -6.3.2.8, Notification Endpoint,NotificationEndpoint.robot +6.3.2.8,Notification Endpoint,NotificationEndpoint.robot 6.3.3,VNF Performance Management Interface,VNFPerformanceManagement-API 6.3.3.1,PM Jobs Resource Endpoint,PMJobs.robot 6.3.3.2,Individual PM Job Resource Endpoint,IndividualPmJob.robot @@ -19,7 +19,7 @@ 6.3.3.5,Individual Threshold Resource Endpoint,IndividualThreshold.robot 6.3.3.8,Notification,../VNFPerformanceManagementNotification-API/Notifications.robot 6.3.3.9,API Version Resource Endpoint,ApiVersion.robot -6.3.3.10, Notification Endpoint,NotificationEndpoint.robot +6.3.3.10,Notification Endpoint,NotificationEndpoint.robot 6.3.4,VNF Fault Management interface,VNFFaultManagement-API 6.3.4.1,Alarms,Alarms.robot 6.3.4.2,Individual Alarm,IndividualAlarm.robot @@ -55,4 +55,4 @@ 6.3.6.1,API Version Resource Endpoint,ApiVersion.robot 6.3.6.2,Coordinations,Coordinations.robot 6.3.6.3,Individual Coordination Action,IndividualCoordinationAction.robot -6.3.6.4,Cancel Coordination Action Task,CancelCoordinationActionTask.robot +6.3.6.4,Cancel Coordination Action Task,CancelCoordinationActionTask.robot \ No newline at end of file -- GitLab From 761c5835a3b43a35914b4b41fc601e69f104564b Mon Sep 17 00:00:00 2001 From: muhammadh Date: Wed, 20 Oct 2021 16:51:04 +0500 Subject: [PATCH 13/19] update README file --- SOL002/VNFLCMCoordination-API/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SOL002/VNFLCMCoordination-API/README.md b/SOL002/VNFLCMCoordination-API/README.md index d35b2a100..1e5d7e566 100644 --- a/SOL002/VNFLCMCoordination-API/README.md +++ b/SOL002/VNFLCMCoordination-API/README.md @@ -1,6 +1,6 @@ # NFV API Tests -This is a development folder for ETSI TTF T015. +This is a development folder for ETSI STF 557. It includes the NFV API conformance test descriptions. ## License @@ -9,4 +9,4 @@ Any software in this repository is released under the ETSI Software License. Licensing information is available in the attached LICENSE file. -Copyright (c) ETSI 2021 \ No newline at end of file +Copyright (c) ETSI 2018 \ No newline at end of file -- GitLab From 6fb6e1eb0ffa6fd2d5fdec8ac35b9426992551a3 Mon Sep 17 00:00:00 2001 From: hammad zafar Date: Thu, 21 Oct 2021 13:06:01 +0500 Subject: [PATCH 14/19] minor fixes --- .../CancelCoordinationActionTask.robot | 2 +- .../VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot | 6 +++--- SOL002/VNFLCMCoordination-API/environment/variables.txt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot b/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot index 1ab88fbde..be0c501dd 100644 --- a/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot +++ b/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot @@ -32,7 +32,7 @@ POST Cancellation of an Ongoing Individual Coordination Action - Conflict ... Config ID: Config_prod_VE ... Applicability: Processing of Individual Coordination Action has 'Finished'. ... Post-Condition: none - POST Cancellation of an Ongoing Individual Coordination Action not Applicable + POST Cancellation of an Ongoing Individual Coordination Action - Conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot index e79fb0209..097fe0fa7 100644 --- a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot +++ b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot @@ -89,7 +89,7 @@ POST Cancellation of an Ongoing Individual Coordination Action ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} -POST Cancellation of an Ongoing Individual Coordination Action not Applicable +POST Cancellation of an Ongoing Individual Coordination Action - Conflict Log Trying to initiates the cancellation of an ongoing coordination action. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} @@ -147,7 +147,7 @@ Check HTTP Retry-After Header Contains Delay After Which Corrdination Request Wi Should Not Be Empty ${delayTime} Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode - Pass Execution If ${synchronous_mode} == 0 The API producer is in Asynchronous Mode. Skipping the test. + Pass Execution If ${SYNCHRONOUS_MODE_SUPPORT} == 0 The API producer is in Asynchronous Mode. Skipping the test. Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} @@ -159,7 +159,7 @@ Post coordination of LCM operation Occurance and API Producer has Chosen Synchro Set Global Variable ${response} ${outputResponse} Post coordination of LCM operation Occurance and API Producer has Chosen Asynchronous Mode - Pass Execution If ${synchronous_mode} == 1 The API producer is in Synchronous Mode. Skipping the test. + Pass Execution If ${SYNCHRONOUS_MODE_SUPPORT} == 1 The API producer is in Synchronous Mode. Skipping the test. Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} diff --git a/SOL002/VNFLCMCoordination-API/environment/variables.txt b/SOL002/VNFLCMCoordination-API/environment/variables.txt index cd36ffa9e..3533ae3fa 100644 --- a/SOL002/VNFLCMCoordination-API/environment/variables.txt +++ b/SOL002/VNFLCMCoordination-API/environment/variables.txt @@ -1,12 +1,12 @@ *** Variables *** -${synchronous_mode} 1 #Set it to 0 if API producer supporting Asynchronous mode, and set it to 1 if API producer supporting Synchronous mode. +${SYNCHRONOUS_MODE_SUPPORT} 1 #Set it to 0 if API producer supporting Asynchronous mode, and set it to 1 if API producer supporting Synchronous mode. ${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${coordinationActionName} 6fc3539c-e602-4afa-8e13-962fb5a7d81f -{coordinationId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${coordinationId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${Id_of_Finished_Coordination_Action} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which has Finished its processing, to test the conflict test suite. ${Id_of_Ongoing_Coordination_Action} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which is currently ongoing. -- GitLab From ae1c4efa5dca70a8959d6b4aae32515af196a017 Mon Sep 17 00:00:00 2001 From: hammad zafar Date: Thu, 21 Oct 2021 18:49:59 +0500 Subject: [PATCH 15/19] minor fixes --- .gitignore | 1 + SOL002/VNFLCMCoordination-API/Coordinations.robot | 2 +- .../VNFLCMCoordinationKeywords.robot | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 1b6e272e0..94620f93e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ build/ dist/ libspecs/ +/.vscode \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/Coordinations.robot b/SOL002/VNFLCMCoordination-API/Coordinations.robot index fea972ffe..1e1077202 100644 --- a/SOL002/VNFLCMCoordination-API/Coordinations.robot +++ b/SOL002/VNFLCMCoordination-API/Coordinations.robot @@ -60,7 +60,7 @@ POST Coordination of LCM Operation Occurance Conflict ... Config ID: Config_prod_VE ... Applicability: When there are many coordination actions exist, or conflicting ones, are in progress. ... Post-Condition: none - Post coordination of LCM operation Occurance + Post coordination of LCM operation Occurance - Conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot index 097fe0fa7..f46ec8bcb 100644 --- a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot +++ b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot @@ -39,7 +39,7 @@ GET Individual LCM Operation Coordination Results Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - GET ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} + GET ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Finished_Coordination_Action} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -48,8 +48,8 @@ GET Individual LCM Operation Coordination Results of Ongoing Coordination Action Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${ongoing_coordination_action_id} - ${outputResponse}= Output response${ongoing_coordination_action_id} + Get ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Ongoing_Coordination_Action} + ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Individual LCM Operation Coordination Results @@ -170,7 +170,7 @@ Post coordination of LCM operation Occurance and API Producer has Chosen Asynchr ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} -Post coordination of LCM operation Occurance +Post coordination of LCM operation Occurance - Conflict Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} @@ -207,7 +207,7 @@ PUT coordination of LCM operation Occurance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} -- GitLab From 83a0801796a597e1bd6abe34f0d364cdfc6e84de Mon Sep 17 00:00:00 2001 From: muhammadh Date: Mon, 25 Oct 2021 14:45:32 +0500 Subject: [PATCH 16/19] Update robot, keyords, variable.txt Files --- .../CancelCoordinationActionTask.robot | 20 ++- .../Coordinations.robot | 13 +- .../IndividualCoordinationAction.robot | 18 ++- .../VNFLCMCoordinationKeywords.robot | 103 ++++++++---- .../environment/variables.txt | 42 ++--- .../jsons/LcmCoordRequest.json | 12 +- .../schemas/LcmCoords.schema.json | 152 ------------------ 7 files changed, 139 insertions(+), 221 deletions(-) delete mode 100644 SOL002/VNFLCMCoordination-API/schemas/LcmCoords.schema.json diff --git a/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot b/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot index be0c501dd..56f6f36cb 100644 --- a/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot +++ b/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot @@ -36,8 +36,20 @@ POST Cancellation of an Ongoing Individual Coordination Action - Conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails -GET Cancellation of an Ongoing Individual Coordination Action - Method not Implemented +Request a cancellation of an ongoing coordination action without authentication [Documentation] Test ID: 6.3.6.4.3 + ... Test title: Request a cancellation of an ongoing coordination action without authentication + ... Test objective: The objective is to test the failure of the request for a cancellation of a coordination task when no authentication is used + ... Pre-conditions: none + ... Reference: Clause Clause 10.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + POST Cancellation of an Ongoing Individual Coordination Action without authorization token + Check HTTP Response Status Code Is 401 + +GET Cancellation of an Ongoing Individual Coordination Action - Method not Implemented + [Documentation] Test ID: 6.3.6.4.4 ... Test title: GET Cancellation of an Ongoing Individual Coordination Action ... Test Objective: The objective is to test that GET method for cancellation of an ongoing individual coordination Action is not implemented. ... pre-condition: none @@ -49,7 +61,7 @@ GET Cancellation of an Ongoing Individual Coordination Action - Method not Imple Check HTTP Response Status Code Is 405 PUT Cancellation of an Ongoing Individual Coordination Action - Method not Implemented - [Documentation] Test ID: 6.3.6.4.4 + [Documentation] Test ID: 6.3.6.4.5 ... Test title: PUT Cancellation of an Ongoing Individual Coordination Action ... Test Objective: The objective is to test that PUT method for cancellation of an ongoing individual coordination Action is not implemented. ... pre-condition: none @@ -61,7 +73,7 @@ PUT Cancellation of an Ongoing Individual Coordination Action - Method not Imple Check HTTP Response Status Code Is 405 PATCH Cancellation of an Ongoing Individual Coordination Action - Method not Implemented - [Documentation] Test ID: 6.3.6.4.5 + [Documentation] Test ID: 6.3.6.4.6 ... Test title: PATCH Cancellation of an Ongoing Individual Coordination Action ... Test Objective: The objective is to test that PATCH method for cancellation of an ongoing individual coordination Action is not implemented. ... pre-condition: none @@ -73,7 +85,7 @@ PATCH Cancellation of an Ongoing Individual Coordination Action - Method not Imp Check HTTP Response Status Code Is 405 DELETE Cancellation of an Ongoing Individual Coordination Action - Method not Implemented - [Documentation] Test ID: 6.3.6.4.6 + [Documentation] Test ID: 6.3.6.4.7 ... Test title: DELETE Cancellation of an Ongoing Individual Coordination Action ... Test Objective: The objective is to test that DELETE method for cancellation of an ongoing individual coordination Action is not implemented. ... pre-condition: none diff --git a/SOL002/VNFLCMCoordination-API/Coordinations.robot b/SOL002/VNFLCMCoordination-API/Coordinations.robot index 1e1077202..cc60bcc4c 100644 --- a/SOL002/VNFLCMCoordination-API/Coordinations.robot +++ b/SOL002/VNFLCMCoordination-API/Coordinations.robot @@ -21,8 +21,9 @@ POST Coordination of LCM Operation Occurance and API Producer has Chosen the Syn ... Post-Condition: none Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode Check HTTP Response Status Code Is 201 - Check HTTP Location Header Contains URI of Created Resource - Check HTTP Response Body Json Schema Is LcmCoords + Check HTTP Response Body Json Schema Is LcmCoord + Check HTTP Response Header Contains Location + Check Postcondition LcmCoord Exists POST Coordination of LCM Operation Occurance and API Producer has Chosen the Asynchronous Mode [Documentation] Test ID: 6.3.6.2.2 @@ -35,8 +36,8 @@ POST Coordination of LCM Operation Occurance and API Producer has Chosen the Asy ... Post-Condition: none Post coordination of LCM operation Occurance and API Producer has Chosen Asynchronous Mode Check HTTP Response Status Code Is 202 - Check HTTP Location Header Contains URI of Resource That Will be Created Check HTTP Response Body Should be Empty + Check HTTP Response Header Contains Location POST Coordination of a LCM Operation Occurance Forbidden [Documentation] Test ID: 6.3.6.2.3 @@ -60,7 +61,7 @@ POST Coordination of LCM Operation Occurance Conflict ... Config ID: Config_prod_VE ... Applicability: When there are many coordination actions exist, or conflicting ones, are in progress. ... Post-Condition: none - Post coordination of LCM operation Occurance - Conflict + Post coordination of LCM operation Occurance - conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails @@ -73,9 +74,9 @@ POST Coordination of LCM Operation Occurance Service Unavailable ... Config ID: Config_prod_VE ... Applicability: API producer has chosen the synchronous mode ... Post-Condition: none - Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode + Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode - Service Unavailable Check HTTP Response Status Code Is 503 - Check HTTP Retry-After Header Contains Delay After Which Corrdination Request Will be Repeated + Check HTTP Response Header Contains Retry-After Check HTTP Response Body Json Schema Is ProblemDetails GET Coordination of a LCM Operation Occurance - Method not implemented diff --git a/SOL002/VNFLCMCoordination-API/IndividualCoordinationAction.robot b/SOL002/VNFLCMCoordination-API/IndividualCoordinationAction.robot index dca7fa494..c62a741d8 100644 --- a/SOL002/VNFLCMCoordination-API/IndividualCoordinationAction.robot +++ b/SOL002/VNFLCMCoordination-API/IndividualCoordinationAction.robot @@ -47,8 +47,20 @@ GET Individual LCM Operation Coordination Results - Coordination is Not Finished Check HTTP Response Status Code Is 202 Check HTTP Response Body Should be Empty -PUT Individual LCM Operation Coordination Results - Method not implemented +Get Individual LCM Operation Coordination Results without authentication [Documentation] Test ID: 6.3.6.3.4 + ... Test title: Get information about a finished coordination task without authentication + ... Test objective: The objective is to try to read an individual coordination task without using authentication + ... Pre-conditions: none + ... Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + GET Individual LCM Operation Coordination Results - without authentication + Check HTTP Response Status Code Is 401 + +PUT Individual LCM Operation Coordination Results - Method not implemented + [Documentation] Test ID: 6.3.6.3.5 ... Test title: PUT Individual LCM Operation Coordination Results - Method not implemented ... Test Objective: The objective is to test that PUT method for individual LCM operation coordination results is not implemented. ... pre-condition: none @@ -60,7 +72,7 @@ PUT Individual LCM Operation Coordination Results - Method not implemented Check HTTP Response Status Code Is 405 PATCH Individual LCM Operation Coordination Results - Method not implemented - [Documentation] Test ID: 6.3.6.3.5 + [Documentation] Test ID: 6.3.6.3.6 ... Test title: PATCH Individual LCM Operation Coordination Results - Method not implemented ... Test Objective: The objective is to test that PATCH method for individual LCM operation coordination results is not implemented. ... pre-condition: none @@ -72,7 +84,7 @@ PATCH Individual LCM Operation Coordination Results - Method not implemented Check HTTP Response Status Code Is 405 DELETE Individual LCM Operation Coordination Results - Method not implemented - [Documentation] Test ID: 6.3.6.3.6 + [Documentation] Test ID: 6.3.6.3.7 ... Test title: PUT Individual LCM Operation Coordination Results - Method not implemented ... Test Objective: The objective is to test that DELETE method for individual LCM operation coordination results is not implemented. ... pre-condition: none diff --git a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot index f46ec8bcb..61196a33e 100644 --- a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot +++ b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot @@ -22,6 +22,16 @@ Check HTTP Response Body Json Schema Is Validate Json ${schema} ${response['body']} Log Json Schema Validation OK +Check Postcondition LcmCoord Exists + Log Checking that individual lcm coordination exists + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/coordiations/${response['body']['id']} + ${output}= Output response + Set Suite Variable ${response} ${output} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is LcmCoord + Check HTTP Response Body Should be Empty Should Be Empty ${response['body']} @@ -32,25 +42,33 @@ POST Individual LCM Operation Coordination Results Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} GET Individual LCM Operation Coordination Results - Log Trying to perform a GET. This method should not be implemented + Log Requesting the retrieve of a finished coordination task Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Finished_Coordination_Action} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} GET Individual LCM Operation Coordination Results of Ongoing Coordination Action - Log Trying to perform a POST. This method should not be implemented + Log Requesting the retrieve of an ongoing coordination task Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Ongoing_Coordination_Action} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Global Variable ${response} ${outputResponse} + +GET Individual LCM Operation Coordination Results - without authentication + Log Requesting to retrieve a finished coordination task without authentication + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + GET ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} + ${outputResponse}= Output response + Set Suite Variable ${response} ${outputResponse} PUT Individual LCM Operation Coordination Results Log Trying to perform a PUT. This method should not be implemented @@ -59,7 +77,7 @@ PUT Individual LCM Operation Coordination Results Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} PATCH Individual LCM Operation Coordination Results Log Trying to perform a PATCH. This method should not be implemented @@ -68,7 +86,7 @@ PATCH Individual LCM Operation Coordination Results Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} DELETE Individual LCM Operation Coordination Results Log Trying to perform a DELETE. This method should not be implemented @@ -77,17 +95,16 @@ DELETE Individual LCM Operation Coordination Results Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - + Set Suite Variable ${response} ${outputResponse} POST Cancellation of an Ongoing Individual Coordination Action Log Trying to initiates the cancellation of an ongoing coordination action. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel + POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Ongoing_Coordination_Action}/cancel ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} POST Cancellation of an Ongoing Individual Coordination Action - Conflict Log Trying to initiates the cancellation of an ongoing coordination action. @@ -96,7 +113,15 @@ POST Cancellation of an Ongoing Individual Coordination Action - Conflict Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Finished_Coordination_Action}/cancel ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} + +POST Cancellation of an Ongoing Individual Coordination Action without authorization token + Log Requesting the cancellation of an ongoing coordination task without authorization + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations/${Id_of_Ongoing_Coordination_Action}/cancel + ${output}= Output response + Set Suite Variable ${response} ${output} GET Cancellation of an Ongoing Individual Coordination Action Log Trying to perform a GET. This method should not be implemented @@ -105,7 +130,7 @@ GET Cancellation of an Ongoing Individual Coordination Action Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} PUT Cancellation of an Ongoing Individual Coordination Action Log Trying to perform a PUT. This method should not be implemented @@ -114,7 +139,7 @@ PUT Cancellation of an Ongoing Individual Coordination Action Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} PATCH Cancellation of an Ongoing Individual Coordination Action Log Trying to perform a PATCH. This method should not be implemented @@ -123,7 +148,7 @@ PATCH Cancellation of an Ongoing Individual Coordination Action Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} DELETE Cancellation of an Ongoing Individual Coordination Action Log Trying to perform a DELETE. This method should not be implemented @@ -132,20 +157,17 @@ DELETE Cancellation of an Ongoing Individual Coordination Action Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} -Check HTTP Location Header Contains URI of Created Resource - ${indiviCoordActionId}= Get Value From Json ${response['headers']} $..Location - Should Not Be Empty ${indiviCoordActionId} +Check HTTP Response Header Contains + [Arguments] ${CONTENT_TYPE} + Should Contain ${response['headers']} ${CONTENT_TYPE} + Log Header is present Check HTTP Location Header Contains URI of Resource That Will be Created ${indiviCoordActionId}= Get Value From Json ${response['headers']} $..Location Should Not Be Empty ${indiviCoordActionId} -Check HTTP Retry-After Header Contains Delay After Which Corrdination Request Will be Repeated - ${delayTime}= Get Value From Json ${response['headers']} $..Retry-After - Should Not Be Empty ${delayTime} - Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode Pass Execution If ${SYNCHRONOUS_MODE_SUPPORT} == 0 The API producer is in Asynchronous Mode. Skipping the test. Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations @@ -153,10 +175,10 @@ Post coordination of LCM operation Occurance and API Producer has Chosen Synchro Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template} = Get File jsons/LcmCoordRequest.json - ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} vnfLcmOpOccHref=${vnfLcmOpOccHref} vnfInstanceHref=${vnfInstanceHref} Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} Post coordination of LCM operation Occurance and API Producer has Chosen Asynchronous Mode Pass Execution If ${SYNCHRONOUS_MODE_SUPPORT} == 1 The API producer is in Synchronous Mode. Skipping the test. @@ -168,18 +190,31 @@ Post coordination of LCM operation Occurance and API Producer has Chosen Asynchr ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} -Post coordination of LCM operation Occurance - Conflict +Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode - Service Unavailable + Pass Execution If ${synchronous_mode} == 0 The API producer is in Asynchronous Mode. Skipping the test. Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template} = Get File jsons/LcmCoordRequest.json - ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccIdServiceUnavailable} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} vnfLcmOpOccHref=${vnfLcmOpOccHrefServiceUnavailable} vnfInstanceHref=${vnfInstanceHref} Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} + +Post coordination of LCM operation Occurance - conflict + Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations + Log Requesting a new coordination task for an LCM Operation occurrence not in PROCESSING state + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/LcmCoordRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccIdNotProcessing} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} vnfLcmOpOccHref=${vnfLcmOpOccHrefNotProcessing} vnfInstanceHref=${vnfInstanceHref} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} + ${outputResponse}= Output response + Set Suite Variable ${response} ${outputResponse} Post coordination of LCM operation Occurance is Forbidden Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations @@ -191,7 +226,7 @@ Post coordination of LCM operation Occurance is Forbidden ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} GET coordination of LCM operation Occurance Log Trying to perform a GET. This method should not be implemented @@ -200,7 +235,7 @@ GET coordination of LCM operation Occurance Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} PUT coordination of LCM operation Occurance Log Trying to perform a PUT. This method should not be implemented @@ -209,7 +244,7 @@ PUT coordination of LCM operation Occurance Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} PATCH coordination of LCM operation Occurance Log Trying to perform a PATCH. This method should not be implemented @@ -218,7 +253,7 @@ PATCH coordination of LCM operation Occurance Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} DELETE coordination of LCM operation Occurance Log Trying to perform a DELETE. This method should not be implemented @@ -227,7 +262,7 @@ DELETE coordination of LCM operation Occurance Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Suite Variable ${response} ${outputResponse} POST API Version Set Headers {"Accept":"${ACCEPT}"} diff --git a/SOL002/VNFLCMCoordination-API/environment/variables.txt b/SOL002/VNFLCMCoordination-API/environment/variables.txt index 3533ae3fa..72d31cc41 100644 --- a/SOL002/VNFLCMCoordination-API/environment/variables.txt +++ b/SOL002/VNFLCMCoordination-API/environment/variables.txt @@ -1,30 +1,36 @@ *** Variables *** - -${SYNCHRONOUS_MODE_SUPPORT} 1 #Set it to 0 if API producer supporting Asynchronous mode, and set it to 1 if API producer supporting Synchronous mode. - -${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f -${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f -${coordinationActionName} 6fc3539c-e602-4afa-8e13-962fb5a7d81f - -${coordinationId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f - -${Id_of_Finished_Coordination_Action} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which has Finished its processing, to test the conflict test suite. -${Id_of_Ongoing_Coordination_Action} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which is currently ongoing. - -${lcmOperationType} INSTANTIATE #Permitted values to represent VNF lifecycle operation types in VNF LCM operation coordination actions - ${AUTH_USAGE} 1 ${AUTHORIZATION_HEADER} Authorization ${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 - ${apiRoot} / ${apiName} lcmcoord ${apiMajorVersion} v1 ${response}= httpresponse - ${EM-VNF_HOST} localhost # Hostname of the NFVO ${EM-VNF_PORT} 8081 # Listening port of the NFVO ${EM-VNF_SCHEMA} https - ${CONTENT_TYPE} application/json -${ACCEPT} application/json \ No newline at end of file +${ACCEPT} application/json + +${SYNCHRONOUS_MODE_SUPPORT} 1 #Set it to 0 if API producer supporting Asynchronous mode, and set it to 1 if API producer supporting Synchronous mode. + +{coordinationId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f + +${Id_of_Finished_Coordination_Action} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which has Finished its processing, to test the conflict test suite. +${Id_of_Ongoing_Coordination_Action} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which is currently ongoing. + +### Template data for coordinationRequest +${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${coordinationActionName} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${lcmOperationType} INSTANTIATE #Permitted values to represent VNF lifecycle operation types in VNF LCM operation coordination actions +${vnfLcmOpOccHref} +${vnfInstanceHref} + +### Template data for coordinationRequest for LCMOpp not in PROCESSING state +${vnfLcmOpOccHrefNotProcessing} +${vnfLcmOpOccIdNotProcessing} + +### Template data for coordinationRequest for LCMOpp when API producer cannot execute immediately the request +${vnfLcmOpOccHrefServiceUnavailable} +${vnfLcmOpOccIdServiceUnavailable} \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/jsons/LcmCoordRequest.json b/SOL002/VNFLCMCoordination-API/jsons/LcmCoordRequest.json index 74f17f714..c0cc402f6 100644 --- a/SOL002/VNFLCMCoordination-API/jsons/LcmCoordRequest.json +++ b/SOL002/VNFLCMCoordination-API/jsons/LcmCoordRequest.json @@ -3,8 +3,12 @@ "vnfLcmOpOccId":"{vnfLcmOpOccId}", "lcmOperationType": "{lcmOperationType}", "coordinationActionName": "{coordinationActionName}", - "_links": {{ - "vnfLcmOpOcc":"", - "vnfInstance":"" - }} + "_links": {{ + "vnfLcmOpOcc": {{ + "href": "{vnfLcmOpOccHref}" + }}, + "vnfInstance": {{ + "href": "{vnfInstanceHref}" + }} + }} }} \ No newline at end of file diff --git a/SOL002/VNFLCMCoordination-API/schemas/LcmCoords.schema.json b/SOL002/VNFLCMCoordination-API/schemas/LcmCoords.schema.json deleted file mode 100644 index 8434d8d67..000000000 --- a/SOL002/VNFLCMCoordination-API/schemas/LcmCoords.schema.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "type": "array", - "items": - { - "description": "This type represents an LCM coordination result.\n", - "type": "object", - "required": [ - "id", - "coordinationResult", - "vnfInstanceId", - "vnfLcmOpOccId", - "lcmOperationType", - "coordinationActionName", - "_links" - ], - "properties": { - "id": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - }, - "coordinationResult": { - "description": "The enumeration LcmCoordResultType defines the permitted values to represent the result of executing an LCM coordination action. The coordination result also implies the action to be performed by the VNFM as the follow-up to this coordination. Value | Description ------|------------ CONTINUE | The related LCM operation shall be continued, staying in the state \"PROCESSING\". ABORT | The related LCM operation shall be aborted by transitioning into the state \"FAILED_TEMP\". CANCELLED | The coordination action has been cancelled upon request of the API consumer, i.e. the VNFM. The related LCM operation shall be aborted by transitioning into the state \"FAILED_TEMP\".\n", - "type": "string", - "enum": [ - "CONTINUE", - "ABORT", - "CANCELLED" - ] - }, - "vnfInstanceId": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - }, - "vnfLcmOpOccId": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - }, - "lcmOperationType": { - "description": "The enumeration LcmOperationForCoordType defines the permitted values to represent VNF lifecycle operation types in VNF LCM operation coordination actions. * INSTANTIATE: Represents the \"Instantiate VNF\" LCM operation. * SCALE: Represents the \"Scale VNF\" LCM operation. * SCALE_TO_LEVEL: Represents the \"Scale VNF to Level\" LCM operation. * CHANGE_FLAVOUR: Represents the \"Change VNF Flavour\" LCM operation. * TERMINATE: Represents the \"Terminate VNF\" LCM operation. * HEAL: Represents the \"Heal VNF\" LCM operation. * OPERATE: Represents the \"Operate VNF\" LCM operation. * CHANGE_EXT_CONN: Represents the \"Change external VNF connectivity\" LCM operation. * MODIFY_INFO: Represents the \"Modify VNF Information\" LCM operation. * CREATE_SNAPSHOT: Represents the \"Create VNF Snapshot\" LCM operation. * REVERT_TO_SNAPSHOT: Represents the \"Revert To VNF Snapshot\" LCM operation. * CHANGE_VNFPKG: Represents the \"Change current VNF package\" LCM operation.\n", - "type": "string", - "enum": [ - "INSTANTIATE", - "SCALE", - "SCALE_TO_LEVEL", - "CHANGE_FLAVOUR", - "TERMINATE", - "HEAL", - "OPERATE", - "CHANGE_EXT_CONN", - "MODIFY_INFO", - "CREATE_SNAPSHOT", - "REVERT_TO_SNAPSHOT", - "CHANGE_VNFPKG" - ] - }, - "coordinationActionName": { - "description": "Indicates the actual LCM coordination action. The coordination actions that a VNF supports are declared in the VNFD.\n", - "type": "string" - }, - "outputParams": { - "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of keyvalue pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259. In the following example, a list of key-value pairs with four keys (\"aString\", \"aNumber\", \"anArray\" and \"anObject\") is provided to illustrate that the values associated with different keys can be of different type.\n", - "type": "object" - }, - "warnings": { - "description": "Warning messages that were generated while the operation was executing.\n", - "type": "string" - }, - "error": { - "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807, 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 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.\n", - "type": "object", - "required": [ - "status", - "detail" - ], - "properties": { - "type": { - "description": "A URI reference according to IETF RFC 3986 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", - "type": "string", - "format": "URI" - }, - "title": { - "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", - "type": "string" - }, - "status": { - "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", - "type": "integer" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem.\n", - "type": "string" - }, - "instance": { - "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n", - "type": "string", - "format": "URI" - } - } - }, - "_links": { - "description": "Links to resources related to this resource.\n", - "type": "object", - "required": [ - "self", - "vnfLcmOpOcc", - "vnfInstance" - ], - "properties": { - "self": { - "description": "This type represents a link to a resource using an absolute URI.\n", - "type": "object", - "required": [ - "href" - ], - "properties": { - "href": { - "description": "String formatted according to IETF RFC 3986.\n", - "type": "string" - } - } - }, - "vnfLcmOpOcc": { - "description": "This type represents a link to a resource using an absolute URI.\n", - "type": "object", - "required": [ - "href" - ], - "properties": { - "href": { - "description": "String formatted according to IETF RFC 3986.\n", - "type": "string" - } - } - }, - "vnfInstance": { - "description": "This type represents a link to a resource using an absolute URI.\n", - "type": "object", - "required": [ - "href" - ], - "properties": { - "href": { - "description": "String formatted according to IETF RFC 3986.\n", - "type": "string" - } - } - } - } - } - } - } - } \ No newline at end of file -- GitLab From 3de4c42ab7ab79de6eeb751d2f1076c1a6522b9b Mon Sep 17 00:00:00 2001 From: muhammadh Date: Tue, 26 Oct 2021 19:13:50 +0500 Subject: [PATCH 17/19] Add 403 Forbidden Testcase, Add variables.txt file --- .../Coordinations.robot | 30 +++-- .../VNFLCMCoordinationKeywords.robot | 127 ++++++++++-------- .../environment/variables.txt | 5 +- 3 files changed, 92 insertions(+), 70 deletions(-) diff --git a/SOL002/VNFLCMCoordination-API/Coordinations.robot b/SOL002/VNFLCMCoordination-API/Coordinations.robot index cc60bcc4c..d415882bd 100644 --- a/SOL002/VNFLCMCoordination-API/Coordinations.robot +++ b/SOL002/VNFLCMCoordination-API/Coordinations.robot @@ -42,8 +42,8 @@ POST Coordination of LCM Operation Occurance and API Producer has Chosen the Asy POST Coordination of a LCM Operation Occurance Forbidden [Documentation] Test ID: 6.3.6.2.3 ... Test title: Post Coordination of an LCM operation occurrence Forbidden - ... Test Objective: The objective is to verify that the coordination of LCM operation occurance has been rejected. - ... pre-condition: LCM operation occurrence resource is in Processing state + ... Test Objective: The objective is to test the failure of a request for the coordination of an LCM operation occurrence + ... pre-condition: The status of the related LCM opeation occurrence is "PROCESSING". The request is performed by a user that has not the grant to run this operation ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 ... Config ID: Config_prod_VE ... Applicability: none @@ -56,7 +56,7 @@ POST Coordination of LCM Operation Occurance Conflict [Documentation] Test ID: 6.3.6.2.4 ... Test title: Post Coordination of an LCM operation occurrence Conflict ... Test Objective: The objective is to verify that no coordination actions can be executed currently, due to a conflict with the state of the "Coordinations" resource. - ... pre-condition: LCM operation occurrence resource is in Processing state + ... pre-condition: The status of the related LCM opeation occurrence is not "PROCESSING" ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 ... Config ID: Config_prod_VE ... Applicability: When there are many coordination actions exist, or conflicting ones, are in progress. @@ -68,8 +68,8 @@ POST Coordination of LCM Operation Occurance Conflict POST Coordination of LCM Operation Occurance Service Unavailable [Documentation] Test ID: 6.3.6.2.5 ... Test title: Post Coordination of an LCM operation occurrence Service Unavailable - ... Test Objective: The objective is to verify that requested coordination operation cannot be executed currently. - ... pre-condition: LCM operation occurrence resource is in Processing state + ... Test Objective: The objective is to test the request for the coordination of an LCM operation occurrence and the verify that the NFVO cannot perform immediately the request, but can perform it sometime in the future. + ... pre-condition: The status of the related LCM opeation occurrence is "PROCESSING" but API producer cannot perform immediately the request ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 ... Config ID: Config_prod_VE ... Applicability: API producer has chosen the synchronous mode @@ -79,8 +79,20 @@ POST Coordination of LCM Operation Occurance Service Unavailable Check HTTP Response Header Contains Retry-After Check HTTP Response Body Json Schema Is ProblemDetails -GET Coordination of a LCM Operation Occurance - Method not implemented +POST Coordination of an LCM operation occurrence without authentication [Documentation] Test ID: 6.3.6.2.6 + ... Test title: Request a Coordination of an LCM operation occurrence without authentication + ... Test objective: The objective is to test the failure of the request for the coordination of an LCM operation occurrence without providing an authentication token + ... Pre-conditions: The status of the related LCM opeation occurrence is "PROCESSING" + ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v3.5.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + Post Request for coordination of an LCM operation occurrence without authorization token + Check HTTP Response Status Code Is 401 + +GET Coordination of a LCM Operation Occurance - Method not implemented + [Documentation] Test ID: 6.3.6.2.7 ... Test title: GET Coordination of a LCM Operation Occurance - Method not implemented ... Test Objective: The objective is to test that GET method for Resource Coordinations is not implemented. ... pre-condition: none @@ -92,7 +104,7 @@ GET Coordination of a LCM Operation Occurance - Method not implemented Check HTTP Response Status Code Is 405 PUT Coordination of a LCM Operation Occurance - Method not implemented - [Documentation] Test ID: 6.3.6.2.7 + [Documentation] Test ID: 6.3.6.2.8 ... Test title: PUT Coordination of a LCM Operation Occurance - Method not implemented ... Test Objective: The objective is to test that PUT method for Resource Coordinations is not implemented. ... pre-condition: none @@ -104,7 +116,7 @@ PUT Coordination of a LCM Operation Occurance - Method not implemented Check HTTP Response Status Code Is 405 PACTH Coordination of a LCM Operation Occurance - Method not implemented - [Documentation] Test ID: 6.3.6.2.8 + [Documentation] Test ID: 6.3.6.2.9 ... Test title: PATCH Coordination of a LCM Operation Occurance - Method not implemented ... Test Objective: The objective is to test that PATCH method for Resource Coordinations is not implemented. ... pre-condition: none @@ -116,7 +128,7 @@ PACTH Coordination of a LCM Operation Occurance - Method not implemented Check HTTP Response Status Code Is 405 DELETE Coordination of a LCM Operation Occurance - Method not implemented - [Documentation] Test ID: 6.3.6.2.9 + [Documentation] Test ID: 6.3.6.2.10 ... Test title: DELETE Coordination of a LCM Operation Occurance - Method not implemented ... Test Objective: The objective is to test that DELETE method for Resource Coordinations is not implemented. ... pre-condition: none diff --git a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot index 61196a33e..2e568f919 100644 --- a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot +++ b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot @@ -37,8 +37,8 @@ Check HTTP Response Body Should be Empty POST Individual LCM Operation Coordination Results Log Trying to perform a POST. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} ${outputResponse}= Output response @@ -46,8 +46,8 @@ POST Individual LCM Operation Coordination Results GET Individual LCM Operation Coordination Results Log Requesting the retrieve of a finished coordination task - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Finished_Coordination_Action} ${outputResponse}= Output response @@ -55,8 +55,8 @@ GET Individual LCM Operation Coordination Results GET Individual LCM Operation Coordination Results of Ongoing Coordination Action Log Requesting the retrieve of an ongoing coordination task - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Ongoing_Coordination_Action} ${outputResponse}= Output response @@ -64,16 +64,16 @@ GET Individual LCM Operation Coordination Results of Ongoing Coordination Action GET Individual LCM Operation Coordination Results - without authentication Log Requesting to retrieve a finished coordination task without authentication - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} GET ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} ${outputResponse}= Output response Set Suite Variable ${response} ${outputResponse} PUT Individual LCM Operation Coordination Results Log Trying to perform a PUT. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} ${outputResponse}= Output response @@ -81,8 +81,8 @@ PUT Individual LCM Operation Coordination Results PATCH Individual LCM Operation Coordination Results Log Trying to perform a PATCH. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} ${outputResponse}= Output response @@ -90,8 +90,8 @@ PATCH Individual LCM Operation Coordination Results DELETE Individual LCM Operation Coordination Results Log Trying to perform a DELETE. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId} ${outputResponse}= Output response @@ -99,8 +99,8 @@ DELETE Individual LCM Operation Coordination Results POST Cancellation of an Ongoing Individual Coordination Action Log Trying to initiates the cancellation of an ongoing coordination action. - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Ongoing_Coordination_Action}/cancel ${outputResponse}= Output response @@ -108,8 +108,8 @@ POST Cancellation of an Ongoing Individual Coordination Action POST Cancellation of an Ongoing Individual Coordination Action - Conflict Log Trying to initiates the cancellation of an ongoing coordination action. - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${Id_of_Finished_Coordination_Action}/cancel ${outputResponse}= Output response @@ -125,8 +125,8 @@ POST Cancellation of an Ongoing Individual Coordination Action without authoriza GET Cancellation of an Ongoing Individual Coordination Action Log Trying to perform a GET. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel ${outputResponse}= Output response @@ -134,8 +134,8 @@ GET Cancellation of an Ongoing Individual Coordination Action PUT Cancellation of an Ongoing Individual Coordination Action Log Trying to perform a PUT. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel ${outputResponse}= Output response @@ -143,8 +143,8 @@ PUT Cancellation of an Ongoing Individual Coordination Action PATCH Cancellation of an Ongoing Individual Coordination Action Log Trying to perform a PATCH. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel ${outputResponse}= Output response @@ -152,16 +152,16 @@ PATCH Cancellation of an Ongoing Individual Coordination Action DELETE Cancellation of an Ongoing Individual Coordination Action Log Trying to perform a DELETE. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/lcmcoord/${apiMajorVersion}/coordinations/${coordinationId}/cancel ${outputResponse}= Output response Set Suite Variable ${response} ${outputResponse} Check HTTP Response Header Contains - [Arguments] ${CONTENT_TYPE} - Should Contain ${response['headers']} ${CONTENT_TYPE} + [Arguments] ${CONTENT_TYPE_JSON} + Should Contain ${response['headers']} ${CONTENT_TYPE_JSON} Log Header is present Check HTTP Location Header Contains URI of Resource That Will be Created @@ -171,8 +171,8 @@ Check HTTP Location Header Contains URI of Resource That Will be Created Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode Pass Execution If ${SYNCHRONOUS_MODE_SUPPORT} == 0 The API producer is in Asynchronous Mode. Skipping the test. Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template} = Get File jsons/LcmCoordRequest.json ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} vnfLcmOpOccHref=${vnfLcmOpOccHref} vnfInstanceHref=${vnfInstanceHref} @@ -183,11 +183,11 @@ Post coordination of LCM operation Occurance and API Producer has Chosen Synchro Post coordination of LCM operation Occurance and API Producer has Chosen Asynchronous Mode Pass Execution If ${SYNCHRONOUS_MODE_SUPPORT} == 1 The API producer is in Synchronous Mode. Skipping the test. Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template} = Get File jsons/LcmCoordRequest.json - ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} vnfLcmOpOccHref=${vnfLcmOpOccHref} vnfInstanceHref=${vnfInstanceHref} Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} ${outputResponse}= Output response Set Suite Variable ${response} ${outputResponse} @@ -195,8 +195,8 @@ Post coordination of LCM operation Occurance and API Producer has Chosen Asynchr Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode - Service Unavailable Pass Execution If ${synchronous_mode} == 0 The API producer is in Asynchronous Mode. Skipping the test. Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template} = Get File jsons/LcmCoordRequest.json ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccIdServiceUnavailable} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} vnfLcmOpOccHref=${vnfLcmOpOccHrefServiceUnavailable} vnfInstanceHref=${vnfInstanceHref} @@ -207,8 +207,8 @@ Post coordination of LCM operation Occurance and API Producer has Chosen Synchro Post coordination of LCM operation Occurance - conflict Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations Log Requesting a new coordination task for an LCM Operation occurrence not in PROCESSING state - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template} = Get File jsons/LcmCoordRequest.json ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccIdNotProcessing} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} vnfLcmOpOccHref=${vnfLcmOpOccHrefNotProcessing} vnfInstanceHref=${vnfInstanceHref} @@ -216,22 +216,31 @@ Post coordination of LCM operation Occurance - conflict ${outputResponse}= Output response Set Suite Variable ${response} ${outputResponse} +Post Request for coordination of an LCM operation occurrence without authorization token + Log Requesting a new coordination task for an LCM Operation occurrence without authorization token + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + ${body}= Get File jsons/LcmCoordRequest.json + POST ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + Post coordination of LCM operation Occurance is Forbidden Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations Log The coordination action request should be rejected - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${INSUFFICIENT_AUTHORIZATION_TOKEN}"} ${template} = Get File jsons/LcmCoordRequest.json - ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} lcmOperationType=${lcmOperationType} coordinationActionName=${coordinationActionName} vnfLcmOpOccHref=${vnfLcmOpOccHref} vnfInstanceHref=${vnfInstanceHref} Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} ${outputResponse}= Output response Set Suite Variable ${response} ${outputResponse} GET coordination of LCM operation Occurance Log Trying to perform a GET. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${outputResponse}= Output response @@ -239,8 +248,8 @@ GET coordination of LCM operation Occurance PUT coordination of LCM operation Occurance Log Trying to perform a PUT. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${outputResponse}= Output response @@ -248,8 +257,8 @@ PUT coordination of LCM operation Occurance PATCH coordination of LCM operation Occurance Log Trying to perform a PATCH. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${outputResponse}= Output response @@ -257,78 +266,78 @@ PATCH coordination of LCM operation Occurance DELETE coordination of LCM operation Occurance Log Trying to perform a DELETE. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${outputResponse}= Output response Set Suite Variable ${response} ${outputResponse} POST API Version - Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version - Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version - Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version - Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version - Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions ${outputResponse}= Output response diff --git a/SOL002/VNFLCMCoordination-API/environment/variables.txt b/SOL002/VNFLCMCoordination-API/environment/variables.txt index 72d31cc41..1a3bda58a 100644 --- a/SOL002/VNFLCMCoordination-API/environment/variables.txt +++ b/SOL002/VNFLCMCoordination-API/environment/variables.txt @@ -2,6 +2,7 @@ ${AUTH_USAGE} 1 ${AUTHORIZATION_HEADER} Authorization ${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${INSUFFICIENT_AUTHORIZATION_TOKEN} Bearer INSUFFICIENT_AUTHORIZATION_TOKEN #The provided authorization token can be insufficient, expired, etc, and server refuses to authorize the request with this token. ${apiRoot} / ${apiName} lcmcoord ${apiMajorVersion} v1 @@ -9,8 +10,8 @@ ${response}= httpresponse ${EM-VNF_HOST} localhost # Hostname of the NFVO ${EM-VNF_PORT} 8081 # Listening port of the NFVO ${EM-VNF_SCHEMA} https -${CONTENT_TYPE} application/json -${ACCEPT} application/json +${CONTENT_TYPE_JSON} application/json +${ACCEPT_JSON} application/json ${SYNCHRONOUS_MODE_SUPPORT} 1 #Set it to 0 if API producer supporting Asynchronous mode, and set it to 1 if API producer supporting Synchronous mode. -- GitLab From 085a2ba3e4f6210fe8d67e564588a25a2ee91cd4 Mon Sep 17 00:00:00 2001 From: hammad zafar Date: Wed, 27 Oct 2021 10:43:10 +0500 Subject: [PATCH 18/19] minor fixes --- SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot | 2 +- SOL002/VNFLCMCoordination-API/environment/variables.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot index 2e568f919..db418d425 100644 --- a/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot +++ b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot @@ -193,7 +193,7 @@ Post coordination of LCM operation Occurance and API Producer has Chosen Asynchr Set Suite Variable ${response} ${outputResponse} Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode - Service Unavailable - Pass Execution If ${synchronous_mode} == 0 The API producer is in Asynchronous Mode. Skipping the test. + Pass Execution If ${SYNCHRONOUS_MODE_SUPPORT} == 0 The API producer is in Asynchronous Mode. Skipping the test. Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} diff --git a/SOL002/VNFLCMCoordination-API/environment/variables.txt b/SOL002/VNFLCMCoordination-API/environment/variables.txt index 1a3bda58a..bd9307485 100644 --- a/SOL002/VNFLCMCoordination-API/environment/variables.txt +++ b/SOL002/VNFLCMCoordination-API/environment/variables.txt @@ -15,7 +15,7 @@ ${ACCEPT_JSON} application/json ${SYNCHRONOUS_MODE_SUPPORT} 1 #Set it to 0 if API producer supporting Asynchronous mode, and set it to 1 if API producer supporting Synchronous mode. -{coordinationId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${coordinationId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${Id_of_Finished_Coordination_Action} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which has Finished its processing, to test the conflict test suite. ${Id_of_Ongoing_Coordination_Action} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Id of Coordination action which is currently ongoing. -- GitLab From 5094d87bebd9df432e5c42ea6f5904dacfcb0447 Mon Sep 17 00:00:00 2001 From: hammad zafar Date: Wed, 27 Oct 2021 16:29:18 +0500 Subject: [PATCH 19/19] declared a variable with appropriate dummy value for better user understanding --- SOL002/VNFLCMCoordination-API/environment/variables.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SOL002/VNFLCMCoordination-API/environment/variables.txt b/SOL002/VNFLCMCoordination-API/environment/variables.txt index bd9307485..74326462b 100644 --- a/SOL002/VNFLCMCoordination-API/environment/variables.txt +++ b/SOL002/VNFLCMCoordination-API/environment/variables.txt @@ -29,8 +29,8 @@ ${vnfLcmOpOccHref} ${vnfInstanceHref} ### Template data for coordinationRequest for LCMOpp not in PROCESSING state -${vnfLcmOpOccHrefNotProcessing} -${vnfLcmOpOccIdNotProcessing} +${vnfLcmOpOccHrefNotProcessing} not-in-PROCESSING-vnfLcmOpOccHref-for-conflict-scenario +${vnfLcmOpOccIdNotProcessing} not-in-PROCESSING-vnfLcmOpOccId-for-conflict-scenario ### Template data for coordinationRequest for LCMOpp when API producer cannot execute immediately the request ${vnfLcmOpOccHrefServiceUnavailable} -- GitLab