diff --git a/.gitignore b/.gitignore index 1b6e272e04717ec62023ea57fe18977d0f287ce8..94620f93eb62e4349c38c392fa918e6e71799ba9 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/ApiVersion.robot b/SOL002/VNFLCMCoordination-API/ApiVersion.robot new file mode 100644 index 0000000000000000000000000000000000000000..b1b0cad8ce86523782abfe5ccb025dff2527057b --- /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 0000000000000000000000000000000000000000..56f6f36cb7cc29e5644d40820fc259cdbd7ee1b7 --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/CancelCoordinationActionTask.robot @@ -0,0 +1,97 @@ +*** 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 - Conflict + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +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 + ... 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.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 + ... 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.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 + ... 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.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 + ... 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 0000000000000000000000000000000000000000..d415882bd940a8a19086b373750c078ddbea09fd --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/Coordinations.robot @@ -0,0 +1,140 @@ +*** 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 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 + ... 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 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 + ... Test title: Post Coordination of an LCM operation occurrence Forbidden + ... 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 + ... 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: 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. + ... Post-Condition: none + Post coordination of LCM operation Occurance - conflict + 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 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 + ... Post-Condition: none + Post coordination of LCM operation Occurance and API Producer has Chosen Synchronous Mode - Service Unavailable + Check HTTP Response Status Code Is 503 + Check HTTP Response Header Contains Retry-After + Check HTTP Response Body Json Schema Is ProblemDetails + +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 + ... 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.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 + ... 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.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 + ... 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.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 + ... 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 0000000000000000000000000000000000000000..c62a741d80d497d1ad8d65c425fd6f04c62fb663 --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/IndividualCoordinationAction.robot @@ -0,0 +1,96 @@ +*** 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 + +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 + ... 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.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 + ... 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.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 + ... 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 0000000000000000000000000000000000000000..1e5d7e566bd08752758bc1749022dcdcbec99ee0 --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/README.md @@ -0,0 +1,12 @@ +# NFV API Tests + +This is a development folder for ETSI STF 557. +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 2018 \ 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 0000000000000000000000000000000000000000..db418d425f755386fd1102fe7b2182115c94485b --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/VNFLCMCoordinationKeywords.robot @@ -0,0 +1,344 @@ +*** 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 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']} + +POST Individual LCM Operation Coordination Results + Log Trying to perform a POST. This method should not be implemented + 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 + Set Suite Variable ${response} ${outputResponse} + +GET Individual LCM Operation Coordination Results + Log Requesting the retrieve of a finished coordination task + 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 + Set Suite Variable ${response} ${outputResponse} + +GET Individual LCM Operation Coordination Results of Ongoing Coordination Action + Log Requesting the retrieve of an ongoing coordination task + 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 + 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_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_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 + Set Suite 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_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 + Set Suite 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_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 + 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_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 + 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. + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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_JSON} + Should Contain ${response['headers']} ${CONTENT_TYPE_JSON} + 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} + +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_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} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} + ${outputResponse}= Output response + 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. + Log Create coordination action by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations + 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} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} + ${outputResponse}= Output response + 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_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}"} + 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} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} + ${outputResponse}= Output response + 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_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} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/coordinations ${body} + ${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_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} 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_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 + Set Suite 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_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 + Set Suite 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_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 + Set Suite 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_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_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_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_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_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_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_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_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_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_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_JSON}"} + 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 0000000000000000000000000000000000000000..74326462b8cff61c04550850e1e829f60526646c --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/environment/variables.txt @@ -0,0 +1,37 @@ +*** Variables *** +${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 +${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_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. + +${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} 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} +${vnfLcmOpOccIdServiceUnavailable} \ 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 0000000000000000000000000000000000000000..c0cc402f6ed59da45a2ed4165636a5d709d84ee1 --- /dev/null +++ b/SOL002/VNFLCMCoordination-API/jsons/LcmCoordRequest.json @@ -0,0 +1,14 @@ +{{ + "vnfInstanceId":"{vnfInstanceId}", + "vnfLcmOpOccId":"{vnfLcmOpOccId}", + "lcmOperationType": "{lcmOperationType}", + "coordinationActionName": "{coordinationActionName}", + "_links": {{ + "vnfLcmOpOcc": {{ + "href": "{vnfLcmOpOccHref}" + }}, + "vnfInstance": {{ + "href": "{vnfInstanceHref}" + }} + }} +}} \ 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 0000000000000000000000000000000000000000..a79641197fe678896eb17d04beaac08068ea3285 --- /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 0000000000000000000000000000000000000000..fdadd65b75a5c0ba3b2036f5cf91b61a1abcc967 --- /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/ProblemDetails.schema.Json b/SOL002/VNFLCMCoordination-API/schemas/ProblemDetails.schema.Json new file mode 100644 index 0000000000000000000000000000000000000000..2cc0528478c0d6444e204373a243129ef666252e --- /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 90992d5b26efa8fd2f2ff212eb800f9d7b6486fd..e4673a0c1bb78b07b967c6df5e4c071bb387d9a2 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.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 @@ -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 @@ -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 \ No newline at end of file