diff --git a/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot b/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot index 3be16bb27cd089216408d5b8528f50aa1007bea0..f35468e68228868ee349bfeac9c9d48b7ab75924 100644 --- a/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot @@ -1,6 +1,7 @@ *** Settings *** Resource environment/configuration.txt Resource environment/variables.txt +Resource VnfLcmMntOperationKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library DependencyLibrary Library JSONLibrary @@ -9,80 +10,92 @@ Documentation This task resource represents the "Cancel operation" operation. Suite Setup Check resource existance *** Test Cases *** -Post Cancel operation task - [Documentation] The POST method initiates cancelling an ongoing VNF lifecycle operation while it is being executed or rolled back, i.e. - ... the related "VNF LCM operation occurrence" is either in "PROCESSING" or "ROLLING_BACK" state. - Log Cancel an ongoing VNF lifecycle operation - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Log Cancel a VNF lifecycle operation - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${CancelMode} - Log Validate Status code - Integer response status 202 - ${headers}= Output response headers - Should Contain ${headers} Location - Log Validation OK - +Post Cancel operation task + [Documentation] Test ID: 7.3.1.16.1 + ... Test title: POST Cancel operation task + ... Test objective: The POST method initiates cancelling an ongoing VNF lifecycle operation while it is being executed or rolled back, i.e. the related "VNF LCM operation occurrence" is either in "PROCESSING" or "ROLLING_BACK" state. + ... Pre-conditions: none + ... Reference: section 5.4.17.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: in response header Location should not be null + POST Cancel operation task + Check HTTP Response Status Code Is 202 + Post Cancel operation task Conflict - [Documentation] Conflict. - ... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. - ... Typically, this is due to the fact that the VNF instance resource is not in STARTING, PROCESSING or ROLLING_BACK state, - ... or another error handling action is starting, such as retry or rollback. - ... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error. + [Documentation] Test ID: 7.3.1.16.2 + ... Test title: POST Cancel operation task + ... Test objective: The POST method is NOT cancelling an ongoing VNF lifecycle operation due to the fact that the VNF instance resource is not in STARTING, PROCESSING or ROLLING_BACK state + ... Pre-conditions: operation is not in STARTING, PROCESSING or ROLLING_BACK state + ... Reference: section 5.4.17.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: in response header Location should not be null Depends on test Check resource FAILED_TEMP - Log Cancel an operation - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail - Integer response status 409 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + POST Cancel operation task + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails Post Cancel operation task Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent - [Documentation] Not Found - ... Error: The API producer did not find a current representation for the target resource or is not willing to disclose that one exists. - ... Specifically in case of this task resource, the response code 404 shall also be returned - ... if the task is not supported for the VNF LCM operation occurrence represented by the parent resource, - ... which means that the task resource consequently does not exist. - ... In this case, the response body shall be present, and shall contain a ProblemDetails structure, in which the �detail� attribute shall convey more information about the error. + [Documentation] Test ID: 7.3.1.16.2 + ... Test title: POST Cancel operation task + ... Test objective: The objective is to test that POST method cannot cancel a VNF lifecycle operation because the operation is not supported + ... Pre-conditions: + ... Reference: section 5.4.17.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: in response header Location should not be null [Setup] Check Fail not supported - log Final fail an operation - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel - Log Validate Status code - Integer response status 409 - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK - + POST Cancel operation task + Check HTTP Response Status Code Is 404 GET Cancel operation task - Method not implemented - log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.16.3 + ... Test title: GET Cancel operation task - Method not implemented + ... Test objective: The objective is to test that GET method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.17.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET Cancel operation task + Check HTTP Response Status Code Is 405 PUT Cancel operation task - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.16.3 + ... Test title: PUT Cancel operation task - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.17.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT Cancel operation task + Check HTTP Response Status Code Is 405 PATCH Cancel operation task - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.16.4 + ... Test title: PATCH Cancel operation task - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.17.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH Cancel operation task + Check HTTP Response Status Code Is 405 DELETE Cancel operation task - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.16.5 + ... Test title: DELETE Cancel operation task - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.17.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE Cancel operation task + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot b/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot index 374c52c85929f005fd362bab2a721ee0bfbb67cd..1bd859eaa16327a0094c9ce2f4bd21184a5f544e 100644 --- a/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot +++ b/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot @@ -2,54 +2,73 @@ Resource environment/configuration.txt Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} +Resource VnfLcmMntOperationKeywords.robot Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ Suite Setup Check resource existance *** Test Cases *** -Change external VNF connectivity - [Documentation] The POST method changes the external connectivity of a VNF instance - Log Trying to change the external connectivity of a VNF instance. - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/changeExtVnfConnectivityRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${body} - Integer response status 202 - Log Status code validated - ${headers}= Output response headers - Should Contain ${headers} Location - Log Validation OK - +POST Change external VNF connectivity + [Documentation] Test ID: 7.3.1.10.1 + ... Test title: POST Change external VNF connectivity + ... Test objective: The objective is to test that POST method trigger a change in VNF external connectivity + ... Pre-conditions: none + ... Reference: section 5.4.11.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: in response header Location should not be null + POST Change External VNF Connectivity + Check HTTP Response Status Code Is 202 + Check Operation Occurrence Id GET Change external VNF connectivity - Method not implemented - log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.10.2 + ... Test title: GET Change external VNF connectivity - Method not implemented + ... Test objective: The objective is to test that GET method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.11.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET Change External VNF Connectivity + Check HTTP Response Status Code Is 405 PUT Change external VNF connectivity - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.10.3 + ... Test title: PUT Change external VNF connectivity - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.11.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT Change External VNF Connectivity + Check HTTP Response Status Code Is 405 PATCH Change external VNF connectivity - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.10.4 + ... Test title: PATCH Change external VNF connectivity - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.11.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH Change External VNF Connectivity + Check HTTP Response Status Code Is 405 DELETE Change external VNF connectivity - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.10.5 + ... Test title: DELETE Change external VNF connectivity - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.11.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE Change External VNF Connectivity + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot b/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot index fc2902c5d1c94e6c333c20edf153daa49b13353e..5d4605c6a4cb14427f041fd0c68cf6b8b9ff129a 100644 --- a/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot +++ b/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot @@ -2,97 +2,104 @@ Resource environment/configuration.txt Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} +Resource VnfLcmMntOperationKeywords.robot Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ Suite Setup Check resource existance *** Test Cases *** -Change deployment flavour of a vnfInstance - [Documentation] Changes the deployment flavour of a VNF instance.. - Log Trying to change the deployment flavour of a VNF instance. - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/changeVnfFlavourRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body} - Integer response status 202 - Log Status code validated - ${headers}= Output response headers - Should Contain ${headers} Location - Log Validation OK +POST Change deployment flavour of a vnfInstance + [Documentation] Test ID: 7.3.1.6.1 + ... Test title: POST Change deployment flavour of a vnfInstance + ... Test objective: The objective is to test that POST method trigger a change in VNF deployment flavour + ... Pre-conditions: none + ... Reference: section 5.4.7.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: in response header Location should not be null + POST Change VNF deployment flavour ${vnfInstanceId} + Check HTTP Response Status Code Is 202 + Check Operation Occurrence Id Change deployment flavour of a vnfInstance Conflict (Not-Instantiated) - # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state - [Documentation] Conflict. - ... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. - ... Typically, this is due to the fact that the VNF instance resource is in NOT-INSTANTIATED state, - ... or that another lifecycle management operation is ongoing. - ... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error. - [Setup] Check resource not instantiated - Log Trying to change the deployment flavour of a VNF instance. - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body_file}= Get File jsons/changeVnfFlavourRequest.json - ${body}= evaluate json.loads('''${body_file}''') json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body} - Integer response status 409 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK - + [Documentation] Test ID: 7.3.1.6.2 + ... Test title: POST Change deployment flavour of a vnfInstance + ... Test objective: The objective is to test that POST method can't trigger a change in VNF deployment flavour because of a conflict with the state of the VNF instance resource. + ... Pre-conditions: VNF instance resource is not in NOT-INSTANTIATED state + ... Reference: section 5.4.7.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + [Setup] Check resource not instantiated + POST Change VNF deployment flavour ${instantiatedVnfInstanceId} + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails Change deployment flavour of a vnfInstance Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent - [Documentation] Not Found - ... Error: The API producer did not find a current representation for the target resource or is not willing to disclose that one exists. - ... Specifically in case of this task resource, the response code 404 shall also returned if the task is not supported for the VNF instance represented by the parent resource, which means that the task resource consequently does not exist. - ... In this case, the response body shall be present, and shall contain a ProblemDetails structure, in which the �detail� attribute shall convey more information about the error. + [Documentation] Test ID: 7.3.1.6.3 + ... Test title: POST Change deployment flavour of a vnfInstance + ... Test objective: The objective is to test that POST method can't trigger a change in VNF deployment flavour because the VNF instance resource is not found. + ... Pre-conditions: VNF instance resource is not in NOT-INSTANTIATED state + ... Reference: section 5.4.7.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none [Setup] Check change flavour not supported - Log Trying to change the deployment flavour of a VNF instance, not exist - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body_file}= Get File jsons/changeVnfFlavourRequest.json - ${body}= evaluate json.loads('''${body_file}''') json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body} - Integer response status 404 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + POST Change VNF deployment flavour ${notFoundVnfInstanceId} + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails GET Change deployment flavour VNFInstance - Method not implemented - log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.16.4 + ... Test title: GET Cancel operation task - Method not implemented + ... Test objective: The objective is to test that GET method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.7.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET Change VNF deployment flavour + Check HTTP Response Status Code Is 405 PUT Change deployment flavour VNFInstance - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.16.5 + ... Test title: PUT Cancel operation task - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.7.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT Change VNF deployment flavour + Check HTTP Response Status Code Is 405 PATCH Change deployment flavour VNFInstance - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.16.6 + ... Test title: PATCH Cancel operation task - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.7.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH Change VNF deployment flavour + Check HTTP Response Status Code Is 405 DELETE Change deployment flavour VNFInstance - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.16.7 + ... Test title: DELETE Cancel operation task - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.7.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE Change VNF deployment flavour + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance @@ -109,6 +116,13 @@ Check resource not instantiated Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} String response body instantiationState NOT_INSTANTIATED +Check resource instantiated + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${instantiatedVnfInstanceId} + String response body instantiationState INSTANTIATED + Check change flavour not supported Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} diff --git a/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot b/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot index d008d1d35e51abd075d489f831bec9a68e97b575..3c32ba2bae59ccdf0095d42aa3a0ed395fadd2c1 100644 --- a/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot @@ -5,6 +5,7 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library DependencyLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ +Resource VnfLcmMntOperationKeywords.robot Documentation This task resource represents the "Fail operation" operation. ... The client can use this resource to mark a VNF lifecycle management operation occurrence as "finally failed", ... i.e. change the state of the related VNF LCM operation occurrence resource to "FAILED", if it is not assumed that a subsequent retry or rollback will succeed. @@ -13,80 +14,95 @@ Suite Setup Check resource existance *** Test Cases *** Post Fail operation task - [Documentation] The POST method marks a VNF lifecycle management operation occurrence as "finally failed" if that operation occurrence is in "FAILED_TEMP" state. - Log Final fail a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Log Execute Query and validate response - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail - Output response - Log Validate Status code - Integer response status 200 - Log Validation OK + [Documentation] Test ID: 7.3.1.15.1 + ... Test title: Post Fail operation task + ... Test objective: The objective is to test that POST method mark as "finally failed" a VNF lifecycle operation if that operation has experienced a temporary failure + ... Pre-conditions: the related "VNF LCM operation occurrence" resource is in "FAILED_TEMP" state. + ... Reference: section 5.4.16.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Depends on test Check resource FAILED_TEMP + Post Fail operation + Check HTTP Response Status Code Is 202 + Check Operation Occurrence Id Post Fail operation task Conflict (Not-FAILED_TEMP) # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state - [Documentation] Conflict. - ... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. - ... Typically, this is due to the fact that the VNF instance resource is not in FAILED_TEMP state, - ... or another error handling action is starting, such as retry or rollback. - ... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error. + [Documentation] Test ID: 7.3.1.15.2 + ... Test title: Post Fail operation task + ... Test objective: The objective is to test that POST method cannot mark as "finally failed" a VNF lifecycle operation if that operation has experienced a temporary failure + ... Pre-conditions: the related "VNF LCM operation occurrence" resource is not in "FAILED_TEMP" state. + ... Reference: section 5.4.16.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none Depends on test failure Check resource FAILED_TEMP - Log Final Fail an operation - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail - Integer response status 409 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK - - + Post Fail operation + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails Post Fail operation task Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent - [Documentation] Not Found - ... Error: The API producer did not find a current representation for the target resource or is not willing to disclose that one exists. - ... Specifically in case of this task resource, the response code 404 shall also be returned - ... if the task is not supported for the VNF LCM operation occurrence represented by the parent resource, - ... which means that the task resource consequently does not exist. - ... In this case, the response body shall be present, and shall contain a ProblemDetails structure, in which the �detail� attribute shall convey more information about the error. + [Documentation] Test ID: 7.3.1.15.3 + ... Test title: Post Fail operation task + ... Test objective: The objective is to test that POST method cannot mark as "finally failed" a VNF lifecycle operation because the operation is not supported + ... Pre-conditions: + ... Reference: section 5.4.16.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none [Setup] Check Fail not supported - log Final fail an operation - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail - Log Validate Status code - Integer response status 409 - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + Post Fail operation + Check HTTP Response Status Code Is 404 GET Fail operation task - Method not implemented - log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.15.4 + ... Test title: GET Fail operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.16.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Get Fail operation + Check HTTP Response Status Code Is 405 PUT Fail operation task - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.15.5 + ... Test title: PUT Fail operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.16.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Put Fail operation + Check HTTP Response Status Code Is 405 PATCH Fail operation task - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.15.6 + ... Test title: GET Fail operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.16.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Patch Fail operation + Check HTTP Response Status Code Is 405 DELETE Fail operation task - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.15.7 + ... Test title: DELETE Fail operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.16.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Delete Fail operation + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL003/VNFLifecycleManagement-API/HealVNFTask.robot b/SOL003/VNFLifecycleManagement-API/HealVNFTask.robot index 989c088b3886898cec9d55341064de9c97c7dc81..9e3a82dbb8b0bdd784ffa81073255a8f2feba1d6 100644 --- a/SOL003/VNFLifecycleManagement-API/HealVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/HealVNFTask.robot @@ -5,91 +5,103 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Resource VnfLcmMntOperationKeywords.robot Suite Setup Check resource existance *** Test Cases *** -Heal a vnfInstance - [Documentation] Heal a VNF instance - Log Trying to heal a VNF instance. - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/healVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal ${body} - Integer response status 202 - Log Status code validated - ${headers}= Output response headers - Should Contain ${headers} Location - Log Validation OK +POST Heal a vnfInstance + [Documentation] Test ID: 7.3.1.8.1 + ... Test title: POST Heal a vnfInstance + ... Test objective: The objective is to test that POST method heal a VNF instance + ... Pre-conditions: none + ... Reference: section 5.4.9.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + POST Terminate VNF + Check HTTP Response Status Code Is 202 + Check Operation Occurrence Id Heal a vnfInstance Conflict (Not-Instantiated) # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state - [Documentation] Conflict. - ... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. - ... Typically, this is due to the fact that the VNF instance resource is in NOT-INSTANTIATED state, - ... or that another lifecycle management operation is ongoing. - ... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error. + [Documentation] Test ID: 7.3.1.8.2 + ... Test title: POST Heal a vnfInstance (Not-Instantiated) + ... Test objective: The objective is to test that the operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. + ... Pre-conditions: the VNF instance resource is in NOT-INSTANTIATED state + ... Reference: section 5.4.9.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: [Setup] Check resource not instantiated - Log Trying to heal a VNF instance. - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/healVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal ${body} - Integer response status 409 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + POST Terminate VNF + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails Heal a vnfInstance Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent - [Documentation] Not Found - ... Error: The API producer did not find a current representation for the target resource or is not willing to disclose that one exists. - ... Specifically in case of this task resource, the response code 404 shall also returned if the task is not supported for the VNF instance represented by the parent resource, which means that the task resource consequently does not exist. - ... In this case, the response body shall be present, and shall contain a ProblemDetails structure, in which the �detail� attribute shall convey more information about the error. + [Documentation] Test ID: 7.3.1.8.3 + ... Test title: POST Heal a vnfInstance (Not-Instantiated) + ... Test objective: The objective is to test that the operation cannot be executed because the VNF instance resource is not found. + ... Pre-conditions: the VNF instance resource is not existing + ... Reference: section 5.4.9.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: [Setup] Check heal not supported - Log Trying to heal a VNF instance, not exist - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/healVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal ${body} - Integer response status 404 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + POST Terminate VNF + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails + GET Heal VNFInstance - Method not implemented - log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.8.4 + ... Test title: GET Heal a vnfInstance - Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.9.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + GET Heal VNF + Check HTTP Response Status Code Is 405 PUT Heal VNFInstance - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.8.4 + ... Test title: PUT Heal a vnfInstance - Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.9.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + PUT Heal VNF + Check HTTP Response Status Code Is 405 PATCH Heal VNFInstance - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.8.4 + ... Test title: PATCH Heal a vnfInstance - Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.9.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + PATCH Heal VNF + Check HTTP Response Status Code Is 405 DELETE Heal VNFInstance - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.8.4 + ... Test title: DELETE Heal a vnfInstance - Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.9.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + DELETE Heal VNF + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL003/VNFLifecycleManagement-API/IndividualSubscription.robot b/SOL003/VNFLifecycleManagement-API/IndividualSubscription.robot index 0273b05b2b6f8c0f0e362a23369d7e4d94290b4f..d38ba6d77b7cfd9bdc4f391fafebee5fdb040f57 100644 --- a/SOL003/VNFLifecycleManagement-API/IndividualSubscription.robot +++ b/SOL003/VNFLifecycleManagement-API/IndividualSubscription.robot @@ -4,56 +4,72 @@ Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library JSONLibrary Library JSONSchemaLibrary schemas/ +Resource VnfLcmMntOperationKeywords.robot Documentation This resource represents an individual subscription. The client can use this resource to read and to terminate a ... subscription to notifications related to VNF lifecycle management Suite Setup Check resource existance *** Test Cases *** Post Individual Subscription - Method not implemented - 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":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.18.1 + ... Test title: Post Individual Subscription - Method not implemented + ... Test objective: The objective is to test that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.19.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Post Create Individual subscription + Check HTTP Response Status Code Is 405 -Get Information about an individual subscription - log Trying to get information about an individual subscription - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Log Validate Status code - Integer response status 200 - ${result}= Output response body - Validate Json Subscription.schema.json ${result} - Log Validation OK +GET Individual Subscription + [Documentation] Test ID: 7.3.1.18.2 + ... Test title: GET Individual Subscription + ... Test objective: The objective is Get the an individual subscription + ... Pre-conditions: none + ... Reference: section 5.4.19.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get Individual Subscription + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is Subscription PUT an individual subscription - Method not implemented - 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":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.18.3 + ... Test title: PUT Individual Subscription - Method not implemented + ... Test objective: The objective is to test that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.19.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Put Individual subscription + Check HTTP Response Status Code Is 405 PATCH an individual subscription - Method not implemented - 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":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.18.4 + ... Test title: PATCH Individual Subscription - Method not implemented + ... Test objective: The objective is to test that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.19.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Patch Individual subscription + Check HTTP Response Status Code Is 405 DELETE an individual subscription - log Try to delete an individual subscription - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Log Validate Status code - Integer response status 204 + [Documentation] Test ID: 7.3.1.18.5 + ... Test title: DELETE Individual Subscription - Method not implemented + ... Test objective: The objective is to test that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.19.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Delete Individual subscription + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot b/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot index b6bdbb8f1aedc67d287f61346ee680c3a3a72d66..888c086ba7e7156006265162d30f4b78a4995e97 100644 --- a/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot +++ b/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot @@ -2,7 +2,8 @@ Resource environment/configuration.txt # Suite setup Expect spec SOL003-VNFLifecycleManagement-API.yaml Resource environment/variables.txt -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} +Resource VnfLcmMntOperationKeywords.robot Library OperatingSystem Library DependencyLibrary Library JSONLibrary @@ -16,119 +17,112 @@ ${original_etag} 1234 *** Test Cases *** Post Individual VNFInstance - Method not implemented - 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":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.2.1 + ... Test title: Post Individual VNFInstance - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.3.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + POST vnfInstance + Check HTTP Response Status Code Is 405 Get Information about an individual VNF Instance - log Trying to get information about an individual VNF instance - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Log Validate Status code - Integer response status 200 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE} - ${result}= Output response body - Validate Json vnfInstance.schema.json ${result} - Log Validation OK - ${etag} Output response headers ETag - Set Suite Variable ${original_etag} ${etag} + [Documentation] Test ID: 7.3.1.2.2 + ... Test title: Get Information about an individual VNF Instance + ... Test objective: The objective is to create a new VNF instance resource + ... Pre-conditions: none + ... Reference: section 5.4.3.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + GET individual vnfInstance + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is vnfInstance + SET etag PUT Individual VNFInstance - Method not implemented - 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":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Log Validate Status code - Integer response status 405 - + [Documentation] Test ID: 7.3.1.2.3 + ... Test title: PUT Individual VNFInstance - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.3.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + PUT individual vnfInstance + Check HTTP Response Status Code Is 405 + PATCH Individual VNFInstance - [Documentation] Modify VNF Information - ... This method modifies an individual VNF instance resource. - ... Changes to the VNF configurable properties are applied to the configuration in the VNF instance, and are reflected in the representation of this resource. - ... Other changes are applied to the VNF instance information managed by the VNFM, and are reflected in the representation of this resource - log Trying to modify an individual VNF instance - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} - Set Headers {"If-Match": "${original_etag}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/patchBodyRequest.json - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} ${body} - Log Validate Status code - Integer response status 202 - ${headers}= Output response headers - Should Contain ${headers} Location - Log Validation OK + [Documentation] Test ID: 7.3.1.2.4 + ... Test title: PATCH Individual VNFInstance + ... Test objective: This method modifies an individual VNF instance resource + ... Pre-conditions: none + ... Reference: section 5.4.3.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + PATCH individual vnfInstance + Check HTTP Response Status Code Is 202 + Check Operation Occurrence Id PATCH Individual VNFInstance Precondition failed - [Documentation] Precondition Failed - ... A precondition given in an HTTP request header is not fulfilled. - ... Typically, this is due to an ETag mismatch, indicating that the resource was modified by another entity. - ... The response body should contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error. + [Documentation] Test ID: 7.3.1.2.5 + ... Test title: PATCH Individual VNFInstance Precondition failed + ... Test objective: The objective is to create a new VNF instance resource + ... Pre-conditions: A precondition given in an HTTP request header is not fulfilled. Typically, this is due to an ETag mismatch, indicating that the resource was modified by another entity + ... Reference: section 5.4.3.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: Depends On Test PATCH Individual VNFInstance # If the previous test scceeded, it means that Etag has been modified - log Trying to modify an individual VNF instance Precondition failed - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} - Set Headers {"If-Match": "${original_etag}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/patchBodyRequest.json - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} ${body} - Log Validate Status code - Integer response status 412 - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + PATCH individual vnfInstance + Check HTTP Response Status Code Is 412 + Check HTTP Response Body Json Schema Is ProblemDetails PATCH Individual VNFInstance Conflict + [Documentation] Test ID: 7.3.1.2.6 + ... Test title: PATCH Individual VNFInstance Precondition failed + ... Test objective: The objective is to create a new VNF instance resource + ... Pre-conditions: none + ... Reference: section 5.4.3.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: # TODO: Need to set the pre-condition of the test - [Documentation] Conflict - ... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. - ... Typically, this is due to the fact that another LCM operation is ongoing. The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error. [Setup] Launch another LCM operation - log Trying to modify an individual VNF instance - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/patchBodyRequest.json - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} ${body} - Log Validate Status code - Integer response status 409 - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + PATCH individual vnfInstance + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails #[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished DELETE Individual VNFInstance - [Documentation] Delete VNF Identifier This method deletes an individual VNF instance resource. - log Trying to delete an individual VNF instance - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Log Validate Status code - Integer response status 204 - Log Validation OK + [Documentation] Test ID: 7.3.1.2.7 + ... Test title: DELETE Individual VNFInstance + ... Test objective: The objective is to delete a VNF instance + ... Pre-conditions: none + ... Reference: section 5.4.3.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + DELETE individual vnfInstance + Check HTTP Response Status Code Is 204 DELETE Individual VNFInstance Conflict + [Documentation] Test ID: 7.3.1.2.8 + ... Test title: DELETE Individual VNFInstance + ... Test objective: The objective is to verify that The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. + ... Pre-conditions: VNF instance resource is in INSTANTIATED state + ... Reference: section 5.4.3.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: # TODO: Need to set the pre-condition of the test. The VnfInstance shall in INSTANTIATED state - [Documentation] Conflict - ... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. - ... Typically, this is due to the fact that the VNF instance resource is in INSTANTIATED state. - ... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error. [Setup] Check resource instantiated - log Trying to delete an individual VNF instance Conflict - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${instantiatedVnfInstanceId} - Log Validate Status code - Integer response status 409 - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + DELETE individual vnfInstance + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails *** Keywords *** Check resource existance @@ -152,3 +146,6 @@ Launch another LCM operation ${body}= Get File jsons/scaleVnfToLevelRequest.json Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${body} Integer response status 202 +SET etag + ${etag} Output response headers ETag + Set Suite Variable ${original_etag} ${etag} diff --git a/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot b/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot index 55a084d812cdeeedbe75a5a2e0b33ea82c3ebaf0..d0e79a45a7b1c5b82bf8edd7b48656e516bb1762 100644 --- a/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot +++ b/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot @@ -4,57 +4,66 @@ Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library JSONLibrary Library JSONSchemaLibrary schemas/ -Documentation This resource represents a VNF lifecycle management operation occurrence. The client can use this resource to read -... status information about an individual VNF lifecycle management operation occurrence. Further, the client can use task -... resources which are children of this resource to request cancellation of an operation in progress, and to request the -... handling of operation errors via retrying the operation, rolling back the operation, or permanently failing the operation +Resource VnfLcmMntOperationKeywords.robot *** Test Cases *** Post Individual VNF LCM OP occurences - Method not implemented - log Trying to perform a POST. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - Log Validate Status code - Integer response status 405 - -Get stauts information about multiple VNF instances - [Documentation] Get Operation Status - ... The client can use this method to retrieve status information about a VNF lifecycle management operation occurrence - ... by reading an individual �VNF LCM operation occurrence� resource. - Log Query status information about multiple VNF lifecycle management operation occurrences. - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - Log Validate Status code - Integer response status 200 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE} - ${result}= Output response body - Validate Json VnfLcmOpOcc.schema.json ${result} - Log Validation OK + [Documentation] Test ID: 7.3.1.12.1 + ... Test title: Post Individual VNF LCM OP occurences - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.13.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Post Individual VNF LCM OP occurences + Check HTTP Response Status Code Is 405 + +Get status information about multiple VNF instances + [Documentation] Test ID: 7.3.1.12.2 + ... Test title: Get status information about multiple VNF instances + ... Test objective: The objective is to test that this method retrieve status information about a VNF lifecycle management operation occurrence + ... Pre-conditions: none + ... Reference: section 5.4.13.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get multiple VNF instances + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is VnfLcmOpOcc -PUT stauts information about multiple VNF instances - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - Log Validate Status code - Integer response status 405 +PUT status information about multiple VNF instances - Method not implemented + [Documentation] Test ID: 7.3.1.12.3 + ... Test title: Put Individual VNF LCM OP occurences - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.13.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Put multiple VNF instances + Check HTTP Response Status Code Is 405 -PATCH stauts information about multiple VNF instances - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - Log Validate Status code - Integer response status 405 +PATCH status information about multiple VNF instances - Method not implemented + [Documentation] Test ID: 7.3.1.12.4 + ... Test title: Patch Individual VNF LCM OP occurences - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.13.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Patch multiple VNF instances + Check HTTP Response Status Code Is 405 -DELETE stauts information about multiple VNF instances - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - Log Validate Status code - Integer response status 405 \ No newline at end of file +DELETE status information about multiple VNF instances - Method not implemented + [Documentation] Test ID: 7.3.1.12.5 + ... Test title: Delete Individual VNF LCM OP occurences - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.13.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Delete multiple VNF instances + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot b/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot index b728e71dd0904e14b0af10a05720f3d2a6c10ace..37a570c5e8091a9b440f979c69512ab4d41f9274 100644 --- a/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot @@ -6,70 +6,86 @@ Library DependencyLibrary Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Resource VnfLcmMntOperationKeywords.robot Suite Setup Check resource existance *** Test Cases *** Instantiate a vnfInstance - [Documentation] Instantiate VNF The POST method instantiates a VNF instance. - Log Trying to Instantiate a vnf Instance - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/instantiateVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate ${body} - Integer response status 202 - Log Status code validated - ${headers}= Output response headers - Should Contain ${headers} Location - Log Validation OK + [Documentation] Test ID: 7.3.1.3.1 + ... Test title: Post Instantiate Individual VNFInstance + ... Test objective: The objective is to instantiate a VNF instance + ... Pre-conditions: none + ... Reference: section 5.4.4.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + POST instantiate individual vnfInstance + Check HTTP Response Status Code Is 202 + Check Operation Occurrence Id Instantiate a vnfInstance Conflict # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state - [Documentation] Conflict. - ... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. - ... Typically, this is due to the fact that the VNF instance resource is in INSTANTIATED state. - ... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error. + [Documentation] Test ID: 7.3.1.3.2 + ... Test title: Post Instantiate Individual VNFInstance + ... Test objective: The objective is to verify that the instantiation of the vnf cannot be executed currently, due to a conflict with the state of the VNF instance resource. + ... Pre-conditions: VNF instance resource is in INSTANTIATED state + ... Reference: section 5.4.4.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: [Setup] Check resource instantiated - Log Trying to Instantiate a vnf Instance - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/instantiateVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${instantiatedVnfInstanceId}/instantiate ${body} - Integer response status 409 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + POST instantiate individual vnfInstance + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails GET Instantiate VNFInstance - Method not implemented - log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.3.3 + ... Test title: GET Instantiate Individual VNFInstance - Method not implemented + ... Test objective: The objective is to test that GET method is not implemented + ... Pre-conditions: + ... Reference: section 5.4.4.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + GET instantiate individual vnfInstance + Check HTTP Response Status Code Is 405 PUT Instantiate VNFInstance - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.3.4 + ... Test title: PUT Instantiate Individual VNFInstance - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: + ... Reference: section 5.4.4.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + PUT instantiate individual vnfInstance + Check HTTP Response Status Code Is 405 PATCH Instantiate VNFInstance - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.3.5 + ... Test title: PATCH Instantiate Individual VNFInstance - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: + ... Reference: section 5.4.4.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + PATCH instantiate individual vnfInstance + Check HTTP Response Status Code Is 405 DELETE Instantiate VNFInstance - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.3.6 + ... Test title: DELETE Instantiate Individual VNFInstance - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: + ... Reference: section 5.4.4.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + DELETE instantiate individual vnfInstance + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL003/VNFLifecycleManagement-API/NotificationEndpoint.robot b/SOL003/VNFLifecycleManagement-API/NotificationEndpoint.robot index 05e513a317fb12bddbd13a07a6018f031245bfbc..94a9f7532f8c858260e3185cc6103341418fc074 100644 --- a/SOL003/VNFLifecycleManagement-API/NotificationEndpoint.robot +++ b/SOL003/VNFLifecycleManagement-API/NotificationEndpoint.robot @@ -3,6 +3,7 @@ Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true Resource environment/configuration.txt Resource environment/variables.txt +Resource VnfLcmMntOperationKeywords.robot Library MockServerLibrary Library Process Library OperatingSystem @@ -13,77 +14,86 @@ ${sleep_interval} 20s *** Test Cases *** Deliver a notification - Operation Occurence - log The POST method delivers a notification from the server to the client. - ${json}= Get File schemas/vnfLcmOperationOccurrenceNotification.schema.json - ${BODY}= evaluate json.loads('''${json}''') json - Log Creating mock request and response to handle vnfLcmOperationOccurrenceNotification - &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY} - &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${req} ${rsp} - Sleep ${sleep_interval} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} + [Documentation] Test ID: 7.3.1.19.1 + ... Test title: POST Deliver a notification - Operation Occurence + ... Test objective: The objective is to test that POST method trigger a notification about lifecycle changes triggered by a VNF LCM +operation occurrence + ... Pre-conditions: none + ... Reference: section 5.4.20.3.1 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + POST Operation occurrence Deliver a notification - Id Creation - log The POST method delivers a notification from the server to the client. - ${json}= Get File schemas/vnfIdentifierCreationNotification.schema.json - ${BODY}= evaluate json.loads('''${json}''') json - Log Creating mock request and response to handle vnfLcmOperationOccurrenceNotification - &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY} - &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${req} ${rsp} - Sleep ${sleep_interval} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} + [Documentation] Test ID: 7.3.1.19.2 + ... Test title: Deliver a notification - Id Creation + ... Test objective: The objective is to test that POST method trigger a notification about the creation of a VNF identifier and the related to a VNF instance resource. + ... Pre-conditions: none + ... Reference: section 5.4.20.3.1 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + POST Id creation Deliver a notification - Id deletion - log The POST method delivers a notification from the server to the client. - ${json}= Get File schemas/vnfIdentifierCreationNotification.schema.json - ${BODY}= evaluate json.loads('''${json}''') json - Log Creating mock request and response to handle vnfLcmOperationOccurrenceNotification - &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY} - &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${req} ${rsp} - Sleep ${sleep_interval} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} + [Documentation] Test ID: 7.3.1.19.3 + ... Test title: Deliver a notification - Id deletion + ... Test objective: The objective is to test that POST method trigger A notification about the deletion of a VNF identifier and the related to a VNF instance resource + ... Pre-conditions: none + ... Reference: section 5.4.20.3.1 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + POST Id deletion -Test a notification end point - log The GET method allows the server to test the notification endpoint - &{req}= Create Mock Request Matcher GET ${callback_endpoint} - &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${req} ${rsp} - Sleep ${sleep_interval} - Verify Mock Expectation ${req} - Clear Requests ${callback_endpoint} +GET Test a notification end point + [Documentation] Test ID: 7.3.1.19.4 + ... Test title: GET Test a notification end point + ... Test objective: The objective is to test that GET method allows the server to test the notification endpoint that is provided by the client + ... Pre-conditions: none + ... Reference: section 5.4.20.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET test endpoint PUT notification - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Put ${callback_endpoint} - Log Validate Status code - Output response - Integer response status 405 + [Documentation] Test ID: 7.3.1.19.5 + ... Test title: PUT Individual Subscription - Method not implemented + ... Test objective: The objective is to test that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.20.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Put notification subscription + Check HTTP Response Status Code Is 405 PATCH subscriptions - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Patch ${callback_endpoint} - Log Validate Status code - Output response - Integer response status 405 - -DELETE subscriptions - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Delete ${callback_endpoint} - Log Validate Status code - Output response - Integer response status 405 + [Documentation] Test ID: 7.3.1.19.6 + ... Test title: PATCH Individual Subscription - Method not implemented + ... Test objective: The objective is to test that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.20.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Patch notification subscription + Check HTTP Response Status Code Is 405 +DELETE subscriptions - Method not implemented + [Documentation] Test ID: 7.3.1.19.7 + ... Test title: DELETE Individual Subscription - Method not implemented + ... Test objective: The objective is to test that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.20.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Delete notification subscription + Check HTTP Response Status Code Is 405 + *** Keywords *** Create Sessions Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance diff --git a/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot b/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot index a4f5c940fbc2108e4136e43f8d49dc4043202bbd..c457baba2de6072c79468667fda7fc6b619f95c2 100644 --- a/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot @@ -5,92 +5,102 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Resource VnfLcmMntOperationKeywords.robot + Suite Setup Check resource existance *** Test Cases *** -Operate a vnfInstance - [Documentation] Change the operational state of a VNF instance - Log Trying to change the operational state of a VNF instance. - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/operateVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate ${body} - Integer response status 202 - Log Status code validated - ${headers}= Output response headers - Should Contain ${headers} Location - Log Validation OK +POST Operate a vnfInstance + [Documentation] Test ID: 7.3.1.9.1 + ... Test title: POST Operate a vnfInstance + ... Test objective: The objective is to test that POST method operate a VNF instance + ... Pre-conditions: none + ... Reference: section 5.4.10.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + POST Operate VNF + Check HTTP Response Status Code Is 202 + Check Operation Occurrence Id -Operate a vnfInstance Conflict (Not-Instantiated) +POST Operate a vnfInstance Conflict (Not-Instantiated) # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state - [Documentation] Conflict. - ... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. - ... Typically, this is due to the fact that the VNF instance resource is in NOT-INSTANTIATED state, - ... or that another lifecycle management operation is ongoing. - ... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error. + [Documentation] Test ID: 7.3.1.9.2 + ... Test title: POST Operate a vnfInstance + ... Test objective: The objective is to test that the operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. + ... Pre-conditions: the VNF instance resource is in NOT-INSTANTIATED state + ... Reference: section 5.4.10.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: [Setup] Check resource not instantiated - Log Trying to change the operational state of a VNF instance. - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/operateVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate ${body} - Integer response status 409 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK - + POST Operate VNF + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails -Operate a vnfInstance Not Found +POST Operate a vnfInstance Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent - [Documentation] Not Found - ... Error: The API producer did not find a current representation for the target resource or is not willing to disclose that one exists. - ... Specifically in case of this task resource, the response code 404 shall also returned if the task is not supported for the VNF instance represented by the parent resource, which means that the task resource consequently does not exist. - ... In this case, the response body shall be present, and shall contain a ProblemDetails structure, in which the �detail� attribute shall convey more information about the error. + [Documentation] Test ID: 7.3.1.9.3 + ... Test title: POST Operate a vnfInstance + ... Test objective: The objective is to test that the operation cannot be executed currently, because the resource is not existing + ... Pre-conditions: the VNF instance resource is in not existing + ... Reference: section 5.4.10.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: [Setup] Check operate not supported - Log Trying to change the operational state of a VNF instance, not exist - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/operateVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate ${body} - Integer response status 404 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + POST Operate VNF + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails GET Operate VNFInstance - Method not implemented - log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.9.4 + ... Test title: GET Operate a vnfInstance - Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.10.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + GET Operate VNF + Check HTTP Response Status Code Is 405 PUT Operate VNFInstance - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate - Log Validate Status code - Output response - Integer response status 405 + [Documentation] Test ID: 7.3.1.9.5 + ... Test title: PUT Operate a vnfInstance - Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.10.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + PUT Operate VNF + Check HTTP Response Status Code Is 405 PATCH Operate VNFInstance - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.9.6 + ... Test title: PATCH Operate a vnfInstance - Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.10.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + PATCH Operate VNF + Check HTTP Response Status Code Is 405 DELETE Operate VNFInstance - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.9.4 + ... Test title: DELETE Operate a vnfInstance - Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.10.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + DELETE Operate VNF + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot b/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot index 20ea983a0719756bdf25f5c559f21e2173ad84ca..78db6617e593ccc9e48ba5f357d0521927c6ff09 100644 --- a/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot @@ -5,88 +5,103 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library DependencyLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ +Resource VnfLcmMntOperationKeywords.robot + Documentation This task resource represents the "Retry operation" operation. The client can use this resource to initiate retrying a VNF lifecycle operation. Suite Setup Check resource existance *** Test Cases *** Post Retry operation task - [Documentation] The POST method initiates retrying a VNF lifecycle operation if that operation has experienced a temporary failure, - ... i.e. the related "VNF LCM operation occurrence" resource is in "FAILED_TEMP" state. + [Documentation] Test ID: 7.3.1.13.1 + ... Test title: Post Retry operation task + ... Test objective: The objective is to test that POST method The POST method initiates retrying a VNF lifecycle operation if that operation has experienced a temporary failure + ... Pre-conditions: the related "VNF LCM operation occurrence" resource is in "FAILED_TEMP" state. + ... Reference: section 5.4.14.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none Depends on test Check resource FAILED_TEMP - Log Retry a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Log Execute Query and validate response - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry - Log Validate Status code - Integer response status 202 - ${headers}= Output response headers - Should Contain ${headers} Location - Log Validation OK + Post Retry operation + Check HTTP Response Status Code Is 202 + Check Operation Occurrence Id Post Retry operation task Conflict (Not-FAILED_TEMP) # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state - [Documentation] Conflict. - ... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. - ... Typically, this is due to the fact that the VNF instance resource is not in FAILED_TEMP state, - ... or another error handling action is starting, such as rollback or fail. - ... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error. + [Documentation] Test ID: 7.3.1.13.2 + ... Test title: Post Retry operation task + ... Test objective: The objective is to test that the retry operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. (i.e. the VNF instance resource is not in FAILED_TEMP state) + ... Pre-conditions: the related "VNF LCM operation occurrence" resource is not in "FAILED_TEMP" state. + ... Reference: section 5.4.14.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none Depends on test failure Check resource FAILED_TEMP - Log Retry an operation - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry - Output response - Integer response status 409 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + Post Retry operation + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails Post Retry operation task Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent - [Documentation] Not Found - ... Error: The API producer did not find a current representation for the target resource or is not willing to disclose that one exists. - ... Specifically in case of this task resource, the response code 404 shall also be returned - ... if the task is not supported for the VNF LCM operation occurrence represented by the parent resource, - ... which means that the task resource consequently does not exist. - ... In this case, the response body shall be present, and shall contain a ProblemDetails structure, in which the �detail� attribute shall convey more information about the error. + [Documentation] Test ID: 7.3.1.13.3 + ... Test title: Post Retry operation task + ... Test objective: The objective is to test that the retry operation cannot be executed because the operation is not supported + ... Pre-conditions: + ... Reference: section 5.4.14.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none [Setup] Check retry not supported - log Retry an operation - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry - Log Validate Status code - Integer response status 409 - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + Post Retry operation + Check HTTP Response Status Code Is 404 GET Retry operation task - Method not implemented - log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.13.4 + ... Test title: GET Retry operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.9.14.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Get Retry operation + Check HTTP Response Status Code Is 405 PUT Retry operation task - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.13.5 + ... Test title: PUT Retry operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.9.14.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Put Retry operation + Check HTTP Response Status Code Is 405 PATCH Retry operation task - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.13.6 + ... Test title: PATCH Retry operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.9.14.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Patch Retry operation + Check HTTP Response Status Code Is 405 DELETE Retry operation task - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.13.7 + ... Test title: DELETE Retry operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.9.14.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Delete Retry operation + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot b/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot index bfd7e64d83e7fac966144970c3ec02fe9c505024..1340d482667275d79238273378a1ead5876e3905 100644 --- a/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot @@ -5,89 +5,102 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library DependencyLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ +Resource VnfLcmMntOperationKeywords.robot Documentation This task resource represents the "Rollback operation" operation. The client can use this resource to initiate rolling back a VNF lifecycle operation Suite Setup Check resource existance *** Test Cases *** Post Rollback operation task - [Documentation] The POST method initiates rolling back a VNF lifecycle operation if that operation has experienced a temporary failure, - ... i.e. the related �VNF LCM operation occurrence� resource is in �FAILED_TEMP� state. + [Documentation] Test ID: 7.3.1.14.1 + ... Test title: Post Rollback operation task + ... Test objective: The objective is to test that POST method The POST method initiates rollback a VNF lifecycle operation if that operation has experienced a temporary failure + ... Pre-conditions: the related "VNF LCM operation occurrence" resource is in "FAILED_TEMP" state. + ... Reference: section 5.4.15.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none Depends on test Check resource FAILED_TEMP - Log Rollback a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Log Execute Query and validate response - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback - Log Validate Status code - Integer response status 202 - ${headers}= Output response headers - Should Contain ${headers} Location - Log Validation OK + Post Rollback operation + Check HTTP Response Status Code Is 202 + Check Operation Occurrence Id Post Rollback operation task Conflict (Not-FAILED_TEMP) # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state - [Documentation] Conflict. - ... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. - ... Typically, this is due to the fact that the VNF instance resource is not in FAILED_TEMP state, - ... or another error handling action is starting, such as retry or fail. - ... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error. + [Documentation] Test ID: 7.3.1.14.2 + ... Test title: Post Rollback operation task + ... Test objective: The objective is to test that POST method The POST method initiates rollback a VNF lifecycle operation if that operation has experienced a temporary failure + ... Pre-conditions: the related "VNF LCM operation occurrence" resource is not in "FAILED_TEMP" state. + ... Reference: section 5.4.15.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none Depends on test failure Check resource FAILED_TEMP - Log Rollback an operation - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback - Integer response status 409 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK - + Post Rollback operation + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails Post Rollback operation task Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent - [Documentation] Not Found - ... Error: The API producer did not find a current representation for the target resource or is not willing to disclose that one exists. - ... Specifically in case of this task resource, the response code 404 shall also be returned - ... if the task is not supported for the VNF LCM operation occurrence represented by the parent resource, - ... which means that the task resource consequently does not exist. - ... In this case, the response body shall be present, and shall contain a ProblemDetails structure, in which the �detail� attribute shall convey more information about the error. + [Documentation] Test ID: 7.3.1.14.3 + ... Test title: Post Rollback operation task + ... Test objective: The objective is to test that the retry operation cannot be executed because the operation is not supported + ... Pre-conditions: + ... Reference: section 5.4.15.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none [Setup] Check Rollback not supported - log Rollback an operation - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback - Log Validate Status code - Output response - Integer response status 409 - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + Post Rollback operation + Check HTTP Response Status Code Is 404 GET Rollback operation task - Method not implemented - log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback - Log Validate Status code - Integer response status 405 - + [Documentation] Test ID: 7.3.1.14.4 + ... Test title: GET Retry operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.15.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Get Rollback operation + Check HTTP Response Status Code Is 405 + PUT Rollback operation task - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.14.5 + ... Test title: PUT Retry operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.15.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Put Rollback operation + Check HTTP Response Status Code Is 405 PATCH Rollback operation task - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.14.6 + ... Test title: PATCH Retry operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.15.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Patch Rollback operation + Check HTTP Response Status Code Is 405 DELETE Rollback operation task - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.14.7 + ... Test title: DELETE Retry operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.15.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Delete Rollback operation + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL003/VNFLifecycleManagement-API/ScaleVNFTask.robot b/SOL003/VNFLifecycleManagement-API/ScaleVNFTask.robot index 80c53f5a7aa402315bfb38f38a53351b109dd12c..85c93ddb46eb0567093f3c494d99aedcc40a17bf 100644 --- a/SOL003/VNFLifecycleManagement-API/ScaleVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/ScaleVNFTask.robot @@ -5,89 +5,100 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Resource VnfLcmMntOperationKeywords.robot Suite Setup Check resource existance *** Test Cases *** -Scale a vnfInstance - [Documentation] Instantiate VNF The POST method instantiates a VNF instance. - Log Trying to Instantiate a vnf Instance - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} - Integer response status 202 - Log Status code validated - ${headers}= Output response headers - Should Contain ${headers} Location - Log Validation OK +POST Scale a vnfInstance + [Documentation] Test ID: 7.3.1.4.1 + ... Test title: POST Scale a vnfInstance + ... Test objective: The objective is to scale a VNF instance + ... Pre-conditions: none + ... Reference: section 5.4.5.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + POST Scale vnfInstance ${instantiatedVnfInstanceId} + Check HTTP Response Status Code Is 202 + Check Operation Occurrence Id -Scale a vnfInstance Conflict (Not-Instantiated) +POST Scale a vnfInstance Conflict (Not-Instantiated) # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state - [Documentation] Conflict. - ... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. - ... Typically, this is due to the fact that the VNF instance resource is in NOT-INSTANTIATED state, or that another lifecycle management operation is ongoing. - ... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error. + [Documentation] Test ID: 7.3.1.4.2 + ... Test title: POST Scale a vnfInstance Conflict (Not-Instantiated) + ... Test objective: The objective is to verify that the operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. + ... Pre-conditions: VNF instance resource is in NOT-INSTANTIATED state + ... Reference: section 5.4.5.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: [Setup] Check resource not instantiated - Log Trying to Scale a vnf Instance - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${notInstantiatedVnfInstanceId}/scale ${body} - Integer response status 409 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK - + POST Scale vnfInstance ${notInstantiatedVnfInstanceId} + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails -Scale a vnfInstance Not Found +POST Scale a vnfInstance Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent - [Documentation] Not Found - ... Error: The API producer did not find a current representation for the target resource or is not willing to disclose that one exists. - ... Specifically in case of this task resource, the response code 404 shall also returned if the task is not supported for the VNF instance represented by the parent resource, which means that the task resource consequently does not exist. - ... In this case, the response body shall be present, and shall contain a ProblemDetails structure, in which the �detail� attribute shall convey more information about the error. + [Documentation] Test ID: 7.3.1.4.3 + ... Test title: POST Scale a vnfInstance Not Found + ... Test objective: The objective is to verify that the operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. + ... Pre-conditions: + ... Reference: section 5.4.5.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: [Setup] Check scale not supported - Log Trying to scale a vnf Instance, not exist - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} - Integer response status 404 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + POST Scale vnfInstance ${notFoundVnfInstanceId} + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails GET Scale VNFInstance - Method not implemented - log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.4.4 + ... Test title: GET Scale VNFInstance - Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: + ... Reference: section 5.4.5.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + GET Scale vnfInstance + Check HTTP Response Status Code Is 405 PUT Scale VNFInstance - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.4.5 + ... Test title: PUT Scale VNFInstance - Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: + ... Reference: section 5.4.5.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + PUT Scale vnfInstance + Check HTTP Response Status Code Is 405 PATCH Scale VNFInstance - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.4.4 + ... Test title: PATCH Scale VNFInstance - Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: + ... Reference: section 5.4.5.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + PATCH Scale vnfInstance + Check HTTP Response Status Code Is 405 DELETE Scale VNFInstance - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.4.4 + ... Test title: DELETE Scale VNFInstance - Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: + ... Reference: section 5.4.5.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + DELETE Scale vnfInstance + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot b/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot index 880f1d466889d90629e54dc271838757497bb85c..b31f58f4faa9ee0931534a881f361a4d2341d577 100644 --- a/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot +++ b/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot @@ -5,94 +5,102 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Resource VnfLcmMntOperationKeywords.robot Suite Setup Check resource existance *** Test Cases *** -Scale a vnfInstance to level - [Documentation] Instantiate VNF The POST method instantiates a VNF instance. - Log Trying to Instantiate a vnf Instance - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfToLevelRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${body} - Integer response status 202 - Log Status code validated - ${headers}= Output response headers - Should Contain ${headers} Location - Log Validation OK +POST Scale a vnfInstance to level + [Documentation] Test ID: 7.3.1.5.1 + ... Test title: POST Scale a vnfInstance to level + ... Test objective: The objective is to scale a VNF instance to a target level. + ... Pre-conditions: none + ... Reference: section 5.4.6.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + POST Scale vnfInstance to level ${instantiatedVnfInstanceId} + Check HTTP Response Status Code Is 202 + Check Operation Occurrence Id -Scale a vnfInstance to level Conflict (Not-Instantiated) +POST Scale a vnfInstance to level Conflict (Not-Instantiated) # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state - [Documentation] Conflict. - ... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. - ... Typically, this is due to the fact that the VNF instance resource is in NOT-INSTANTIATED state, or that another lifecycle management operation is ongoing. - ... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error. + [Documentation] Test ID: 7.3.1.5.2 + ... Test title: POST Scale a vnfInstance to level + ... Test objective: The objective is to verify that the operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. + ... Pre-conditions: VNF instance resource is in NOT-INSTANTIATED state + ... Reference: section 5.4.6.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: [Setup] Check resource not instantiated - Log Trying to Scale a vnf Instance - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfToLevelRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${notInstantiatedVnfInstanceId}/scale_to_level ${body} - Integer response status 409 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + POST Scale vnfInstance to level ${notInstantiatedInstanceId} + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails Scale a vnfInstance Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent - [Documentation] Not Found - ... Error: The API producer did not find a current representation for the target resource or is not willing to disclose that one exists. - ... Specifically in case of this task resource, the response code 404 shall also returned if the task is not supported for the VNF instance represented by the parent resource, which means that the task resource consequently does not exist. - ... In this case, the response body shall be present, and shall contain a ProblemDetails structure, in which the �detail� attribute shall convey more information about the error. + [Documentation] Test ID: 7.3.1.5.3 + ... Test title: POST Scale a vnfInstance to level + ... Test objective: The objective is to verify that the operation cannot be executed , because the VNF instance resource can't be found. + ... Pre-conditions: VNF instance resource is in NOT-INSTANTIATED state + ... Reference: section 5.4.6.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: [Setup] Check scale to level not supported - Log Trying to scale a vnf Instance, not exist - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfToLevelRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${body} - Integer response status 404 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + POST Scale vnfInstance to level ${notFoundInstanceId} + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails GET Scale to level VNFInstance - Method not implemented - log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level - Log Validate Status code - Output response - Integer response status 405 + [Documentation] Test ID: 7.3.1.5.4 + ... Test title: GET Scale to level VNFInstance - Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: + ... Reference: section 5.4.6.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + GET Scale vnfInstance to level + Check HTTP Response Status Code Is 405 PUT Scale to level VNFInstance - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level - Log Validate Status code - Output response - Integer response status 405 + [Documentation] Test ID: 7.3.1.5.5 + ... Test title: GET Scale to level VNFInstance - Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: + ... Reference: section 5.4.6.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + PUT Scale vnfInstance to level + Check HTTP Response Status Code Is 405 PATCH Scale to level VNFInstance - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level - Log Validate Status code - Output response - Integer response status 405 + [Documentation] Test ID: 7.3.1.5.6 + ... Test title: GET Scale to level VNFInstance - Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: + ... Reference: section 5.4.6.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + PATCH Scale vnfInstance to level + Check HTTP Response Status Code Is 405 DELETE Scale to level VNFInstance - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level - Log Validate Status code - Output response - Integer response status 405 + [Documentation] Test ID: 7.3.1.5.7 + ... Test title: DELETE Scale to level VNFInstance - Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: + ... Reference: section 5.4.6.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + DELETE Scale vnfInstance to level + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance @@ -106,7 +114,7 @@ Check resource not instantiated Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${notInstantiatedVnfInstanceId} String response body instantiationState NOT_INSTANTIATED Check scale to level not supported diff --git a/SOL003/VNFLifecycleManagement-API/Subscriptions.robot b/SOL003/VNFLifecycleManagement-API/Subscriptions.robot index 87caa20cc32b30bf4d31ae1bf86f42b4d690eb82..ded88b62e5d1d637e9f07d2f17e5f9d219c12960 100644 --- a/SOL003/VNFLifecycleManagement-API/Subscriptions.robot +++ b/SOL003/VNFLifecycleManagement-API/Subscriptions.robot @@ -5,115 +5,123 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Resource VnfLcmMntOperationKeywords.robot -*** Test Cases *** -Create a new subscription - Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiVersion}/subscriptions - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/lccnSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - Integer response status 201 - Log Status code validated - ${headers}= Output response headers - Should Contain ${headers} Location - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE} - ${result}= Output response body - Validate Json Subscription.schema.json ${result} - Log Validation OK +*** Test Cases *** +POST Create a new subscription + [Documentation] Test ID: 7.3.1.17.1 + ... Test title: POST Create a new subscription + ... Test objective: The POST method creates a new subscription + ... Pre-conditions: none + ... Reference: section 5.4.18.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: in response header Location should not be null + ... POST Cancel operation task + Post Create subscription + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is Subscription Create a new Subscription - DUPLICATION - Log Trying to create a subscription with an already created content - Pass Execution If ${VNFM_DUPLICATION} == 0 VNFM is not permitting duplication. Skipping the test - Set Headers {"Accept": "${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/lccnSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - Integer response status 201 - Log Status code validated - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE} - ${result}= Output response body - Validate Json Subscription.schema.json ${result} - Log Validation OK + [Documentation] Test ID: 7.3.1.17.2 + ... Test title: POST Create a new subscription - DUPLICATION + ... Test objective: The POST method creates a new subscription even if an existing subscription to same content exist + ... Pre-conditions: none + ... Reference: section 5.4.18.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: in response header Location should not be null + ... POST Cancel operation task + Post Create subscription - DUPLICATION + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is Subscription Create a new Subscription - NO-DUPLICATION - Log Trying to create a subscription with an already created content - Pass Execution If ${VNFM_DUPLICATION} == 1 VNFM permits duplication. Skipping the test - Set Headers {"Accept": "${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/lccnSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - Integer response status 303 - Log Status code validated - ${headers}= Output response headers - Should Contain ${headers} Location - Log Validation OK - + [Documentation] Test ID: 7.3.1.17.3 + ... Test title: POST Create a new subscription - NO-DUPLICATION + ... Test objective: The POST method creates a new subscription even if an existing subscription to same content exist + ... Pre-conditions: none + ... Reference: section 5.4.18.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: in response header Location should not be null + ... POST Cancel operation task + Post Create subscription - NO-DUPLICATION + Check HTTP Response Status Code Is 303 + Check Operation Occurrence Id + GET Subscriptions - Log Get the list of active subscriptions - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions - Log Validate Status code - Integer response status 200 - ${result}= Output response body - Validate Json Subscriptions.schema.json ${result} - Log Validation OK + [Documentation] Test ID: 7.3.1.17.4 + ... Test title: GET Subscriptions + ... Test objective: The objective is Get the list of active subscriptions + ... Pre-conditions: none + ... Reference: section 5.4.18.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get subscriptions + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is Subscriptions GET Subscription - Filter - Log Get the list of active subscriptions using a filter - Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter} - Integer response status 200 - Log Received a 200 OK as expected - ${result}= Output response body - Validate Json Subscriptions.schema.json ${result} - Log Validation OK + [Documentation] Test ID: 7.3.1.17.5 + ... Test title: GET Subscriptions - Filter + ... Test objective: The objective is Get the list of active subscriptions using a filter + ... Pre-conditions: none + ... Reference: section 5.4.18.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get subscriptions - filter + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is Subscriptions GET subscriptions - Bad Request Invalid attribute-based filtering parameters - Log Get the list of active subscriptions using an invalid filter - Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter_invalid} - Integer response status 400 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE} - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + [Documentation] Test ID: 7.3.1.17.6 + ... Test title: GET Subscriptions - Filter + ... Test objective: The objective is Get the list of active subscriptions using a filter + ... Pre-conditions: none + ... Reference: section 5.4.18.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get subscriptions - invalid filter + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails PUT subscriptions - Method not implemented - 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":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.17.7 + ... Test title: PUT subscriptions - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.18.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT subscriptions + Check HTTP Response Status Code Is 405 PATCH subscriptions - Method not implemented - 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":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.17.8 + ... Test title: PATCH subscriptions - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.18.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH subscriptions + Check HTTP Response Status Code Is 405 DELETE subscriptions - Method not implemented - 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":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.17.9 + ... Test title: DELETE subscriptions - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.18.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE subscriptions + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/TerminateVNFTask.robot b/SOL003/VNFLifecycleManagement-API/TerminateVNFTask.robot index ca86a5531be0cb2e2823cb9e289d2d0ac757954f..5573682b5153d34fd0e9d39c3762e56dc836da20 100644 --- a/SOL003/VNFLifecycleManagement-API/TerminateVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/TerminateVNFTask.robot @@ -2,74 +2,89 @@ Resource environment/configuration.txt Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} +Resource VnfLcmMntOperationKeywords.robot Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ Suite Setup Check resource existance *** Test Cases *** -Terminate a vnfInstance - [Documentation] Terminates a VNF instance - Log Trying to terminate a VNF instance. - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/terminateVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate ${body} - Integer response status 202 - Log Status code validated - ${headers}= Output response headers - Should Contain ${headers} Location - Log Validation OK +POST Terminate a vnfInstance + [Documentation] Test ID: 7.3.1.7.1 + ... Test title: POST Terminate a vnfInstance + ... Test objective: The objective is to test that POST method terminate a VNF instance + ... Pre-conditions: none + ... Reference: section 5.4.8.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + POST Terminate VNF + Check HTTP Response Status Code Is 202 + Check Operation Occurrence Id Terminate a vnfInstance Conflict (Not-Instantiated) # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state - [Documentation] Conflict. - ... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. - ... Typically, this is due to the fact that the VNF instance resource is in NOT-INSTANTIATED state, - ... or that another lifecycle management operation is ongoing. - ... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error. + [Documentation] Test ID: 7.3.1.7.2 + ... Test title: POST Terminate a vnfInstance + ... Test objective: The objective is to test that the operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. + ... Pre-conditions: VNF instance resource is in NOT-INSTANTIATED state + ... Reference: section 5.4.8.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: [Setup] Check resource not instantiated - Log Trying to terminate a VNF instance. - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/terminateVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${notInstantiatedVnfInstanceId}/terminate ${body} - Integer response status 409 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + POST Terminate VNF + Check HTTP Response Status Code Is 202 + Check HTTP Response Body Json Schema Is ProblemDetails GET Terminate VNFInstance - Method not implemented - log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.7.3 + ... Test title: GET Terminate VNFInstance - Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.8.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET Scale vnfInstance to level + Check HTTP Response Status Code Is 405 PUT Terminate VNFInstance - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.7.4 + ... Test title: GET Terminate VNFInstance - Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.8.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT Scale vnfInstance to level + Check HTTP Response Status Code Is 405 PATCH Terminate VNFInstance - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.7.5 + ... Test title: GET Terminate VNFInstance - Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.8.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH Scale vnfInstance to level + Check HTTP Response Status Code Is 405 DELETE Terminate VNFInstance - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.7.6 + ... Test title: GET Terminate VNFInstance - Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.8.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE Scale vnfInstance to level + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL003/VNFLifecycleManagement-API/VNFInstances.robot b/SOL003/VNFLifecycleManagement-API/VNFInstances.robot index ec71cb3bec2e0be086afffa2111d88edc5562467..924863ff15d074a7f5d5c1a82835a34b8fe39348 100644 --- a/SOL003/VNFLifecycleManagement-API/VNFInstances.robot +++ b/SOL003/VNFLifecycleManagement-API/VNFInstances.robot @@ -3,13 +3,14 @@ Resource environment/configuration.txt Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} +Resource VnfLcmMntOperationKeywords.robot Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ *** Test Cases *** -Create a new vnfInstance - [Documentation] Test ID: 5.4.2.1 +POST Create a new vnfInstance + [Documentation] Test ID: 7.3.1.1.1 ... Test title: Create a VNF instance ... Test objective: The objective is to create a new VNF instance resource ... Pre-conditions: VNF instance with the given vnfInstanceId doesn't exist @@ -17,25 +18,12 @@ Create a new vnfInstance ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: VNF instance created - Log Create VNF instance by POST to /vnf_instances - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/createVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances ${body} - Integer response status 201 - Log Status code validated - ${headers}= Output response headers -# Should Contain ${headers} Location -# ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE} - ${result}= Output response body -# ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfInstance.schema.json ${result} - Log Validation OK + POST Create a new vnfInstance + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is vnfInstance Get information about multiple VNF instances - [Documentation] Test ID: 5.4.2.2 + [Documentation] Test ID: 7.3.1.1.2 ... Test title: Get information about multiple VNF instances ... Test objective: The objective is to query information about multiple VNF instances ... Pre-conditions: @@ -43,22 +31,12 @@ Get information about multiple VNF instances ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: - Log Query VNF The GET method queries information about multiple VNF instances. - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances - Log Validate Status code - Integer response status 200 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE} - ${result}= Output response body - Validate Json vnfInstances.schema.json ${result} - Log Validation OK + GET multiple vnfInstances + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is vnfInstances Get information about multiple VNF instances Bad Request Invalid attribute-based filtering parameters - [Documentation] Test ID: 5.4.2.2-1 + [Documentation] Test ID: 7.3.1.1.3 ... Test title: Get information about multiple VNF instances - Invalid attribute-based filtering parameters ... Test objective: The objective is to query information about multiple VNF instances with Invalid attribute-based filtering parameters ... Pre-conditions: @@ -66,20 +44,13 @@ Get information about multiple VNF instances Bad Request Invalid attribute-based ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: - Log Query VNF The GET method queries information about multiple VNF instances. - Log Query VNF The GET method queries information about multiple VNF instances. - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_instances?attribute_not_exist=some_value - Log Validate Status code - Integer response status 400 - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + GET multiple vnfInstances with bad attribute + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + Get information about multiple VNF instances Bad Request Invalid attribute selector - [Documentation] Test ID: 5.4.2.2-1 + [Documentation] Test ID: 7.3.1.1.4 ... Test title: Get information about multiple VNF instances - Invalid attribute selector ... Test objective: The objective is to query information about multiple VNF instances with Invalid attribute selector ... Pre-conditions: @@ -87,40 +58,42 @@ Get information about multiple VNF instances Bad Request Invalid attribute selec ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: - Log Query VNF The GET method queries information about multiple VNF instances. - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_instances?fields=wrong_field - Log Validate Status code - Integer response status 400 - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + GET multiple vnfInstances with bad filter + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails -PUT VNFInstances - Method not implemented - 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":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances - Log Validate Status code - Integer response status 405 - -PATCH VNFInstances - Method not implemented - 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":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances - Log Validate Status code - Integer response status 405 +PUT multiples VNFInstances - Method not implemented + [Documentation] Test ID: 7.3.1.1.5 + ... Test title: PUT multiples VNFInstances - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: + ... Reference: section 5.4.2.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + PUT multiple vnfInstances + Check HTTP Response Status Code Is 405 + +PATCH multiples VNFInstances - Method not implemented + [Documentation] Test ID: 7.3.1.1.6 + ... Test title: PATCH multiples VNFInstances - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: + ... Reference: section 5.4.2.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + PATCH multiple vnfInstances + Check HTTP Response Status Code Is 405 DELETE VNFInstances - Method not implemented - 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":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.1.7 + ... Test title: DELETE multiples VNFInstances - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: + ... Reference: section 5.4.2.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + DELETE multiple vnfInstances + Check HTTP Response Status Code Is 405 diff --git a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot index f0a4975a944e14fb0d304a0bc7df95f3de558ef2..290bf517b3784f07194fb962d3279180dbcca339 100644 --- a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +++ b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot @@ -30,9 +30,9 @@ Check Operation Occurrence Id Should Not Be Empty ${vnfLcmOpOccId} Check HTTP Response Body Json Schema Is - [Arguments] ${schema} - Validate Json ${schema} ${response.body} - ${vnfInstanceId}= evaluate ${response.body.id} + [Arguments] ${input} + ${schema} = Catenate ${input} .schema.json + Validate Json ${schema} ${response[0]['body']} Log Json Schema Validation OK Check resource Instantiated @@ -228,4 +228,835 @@ Create a new Grant - Asynchronous mode Should Contain ${headers} Location ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} - Log Validation OK \ No newline at end of file + Log Validation OK + +POST Cancel operation task + Log Cancel an ongoing VNF lifecycle operation + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Cancel a VNF lifecycle operation + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${CancelMode} + Log Validate Status code + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +GET Cancel operation task + log Trying to perform a GET. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PUT Cancel operation task + log Trying to perform a PUT. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PATCH Cancel operation task + Log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +DELETE Cancel operation task + Log Trying to perform a DELETE. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +POST Change External VNF Connectivity + Log Trying to change the external connectivity of a VNF instance. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/changeExtVnfConnectivityRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +GET Change External VNF Connectivity + log Trying to perform a GET. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PUT Change External VNF Connectivity + log Trying to perform a PUT. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PATCH Change External VNF Connectivity + Log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +DELETE Change External VNF Connectivity + Log Trying to perform a DELETE. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +POST Change VNF deployment flavour + [Arguments] ${instanceId} + Log Trying to change the deployment flavour of a VNF instance. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/changeVnfFlavourRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${instanceId}/change_flavour ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +GET Change External VNF Connectivity + log Trying to perform a GET. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${instanceId}/change_flavour + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PUT Change External VNF Connectivity + log Trying to perform a PUT. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${instanceId}/change_flavour + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PATCH Change External VNF Connectivity + Log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${instanceId}/change_flavour + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +DELETE Change External VNF Connectivity + Log Trying to perform a DELETE. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${instanceId}/change_flavour + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +POST Create a new vnfInstance + Log Create VNF instance by POST to /vnf_instances + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/createVnfRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +GET multiple vnfInstances + Log Query VNF The GET method queries information about multiple VNF instances. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +GET multiple vnfInstances with bad attribute + Log Query VNF The GET method queries information about multiple VNF instances. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances?attribute_not_exist=some_value + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +GET multiple vnfInstances with bad filter + Log Query VNF The GET method queries information about multiple VNF instances. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances?attribute_not_exist=some_value + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PUT VNFInstances - Method not implemented + 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":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances + Log Validate Status code + Integer response status 405 + +PATCH VNFInstances - Method not implemented + 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":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances + Log Validate Status code + Integer response status 405 + +DELETE VNFInstances - Method not implemented + 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":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances + Log Validate Status code + Integer response status 405 + +POST vnfInstances + 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":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +GET individual vnfInstance + log Trying to get information about an individual VNF instance + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PUT individual vnfInstance + 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":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PATCH individual vnfInstance + log Trying to modify an individual VNF instance + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} + Set Headers {"If-Match": "${original_etag}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/patchBodyRequest.json + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +DELETE individual vnfInstance + log Trying to delete an individual VNF instance + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +POST instantiate individual vnfInstance + Log Trying to Instantiate a vnf Instance + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/instantiateVnfRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +GET instantiate individual vnfInstance + log Trying to perform a GET. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PUT instantiate individual vnfInstance + log Trying to perform a GET. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PATCH instantiate individual vnfInstance + log Trying to perform a GET. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +DELETE instantiate individual vnfInstance + log Trying to perform a GET. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +POST Scale vnfInstance + [Arguments] ${instanceId} + Log Trying to Instantiate a vnf Instance + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/scaleVnfRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${instanceId}/scale ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +GET Scale vnfInstance + Log Trying to get a scale a vnf Instance + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/scaleVnfRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +PUT Scale vnfInstance + Log Trying to modify a scale vnf Instance + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/scaleVnfRequest.json + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +PATCH Scale vnfInstance + Log Trying to modify a scale vnf Instance + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/scaleVnfRequest.json + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +DELETE Scale vnfInstance + Log Trying to modify a scale vnf Instance + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/scaleVnfRequest.json + Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +POST Scale vnfInstance to level + [Arguments] ${instanceId} + Log Trying to scale a vnf Instance to level + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/scaleVnfToLevelRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${instanceId}/scale_to_level ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +GET Scale vnfInstance to level + log Trying to perform a GET. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PUT Scale vnfInstance to level + log Trying to perform a PUT. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PATCH Scale vnfInstance to level + log Trying to perform a PATCH. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +DELETE Scale vnfInstance to level + log Trying to perform a PATCH. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +POST Terminate VNF + Log Trying to terminate a VNF instance. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/terminateVnfRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +GET Terminate VNF + log Trying to perform a GET. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PUT Terminate VNF + log Trying to perform a PUT. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PATCH Terminate VNF + log Trying to perform a PATCH. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +DELETE Terminate VNF + log Trying to perform a PATCH. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +POST Terminate VNF + Log Trying to heal a VNF instance. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/healVnfRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +GET Heal VNF + log Trying to perform a GET. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PUT Heal VNF + log Trying to perform a PUT. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PATCH Heal VNF + log Trying to perform a PATCH. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +DELETE Heal VNF + log Trying to perform a PATCH. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +POST Operate VNF + Log Trying to operate a VNF instance. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/operateVnfRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +GET Heal VNF + log Trying to perform a GET. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PUT Heal VNF + log Trying to perform a PUT. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PATCH Heal VNF + log Trying to perform a PATCH. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +DELETE Heal VNF + log Trying to perform a PATCH. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Post VNF LCM OP occurences + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +GET VNF LCM OP occurences + Log Query status information about multiple VNF lifecycle management operation occurrences. + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +GET VNF LCM OP occurences invalid attribute + Log Query status information about multiple VNF lifecycle management operation occurrences. + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs?attribute_not_exist=some_value + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +GET VNF LCM OP occurences invalid filter + Log Query status information about multiple VNF lifecycle management operation occurrences. + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs?fields=wrong_field + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +PUT VNF LCM OP occurences + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +PATCH VNF LCM OP occurences + log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +DELETE VNF LCM OP occurences + log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Post Individual VNF LCM OP occurences + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Get multiple VNF instances + Log Query status information about multiple VNF lifecycle management operation occurrences. + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Put multiple VNF instances + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Patch multiple VNF instances + log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Delete multiple VNF instances + log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Post Retry operation + Log Retry a VNF lifecycle operation if that operation has experienced a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Get Retry operation + Log Trying to perform a GET. This method should not be implemented. + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Put Retry operation + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Patch Retry operation + log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Delete Retry operation + log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Post Rollback operation + Log Rollback a VNF lifecycle operation if that operation has experienced a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Get Rollback operation + Log Trying to perform a GET. This method should not be implemented. + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Put Rollback operation + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Patch Rollback operation + log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Delete Rollback operation + log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Post Fail operation + Log mark as Failed a VNF lifecycle operation if that operation has experienced a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Get Fail operation + Log Trying to perform a GET. This method should not be implemented. + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Put Fail operation + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Patch Fail operation + log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Delete Fail operation + log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Post Create subscription + Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/lccnSubscriptionRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Post Create subscription - DUPLICATION + Log Trying to create a subscription with an already created content + Pass Execution If ${VNFM_DUPLICATION} == 0 VNFM is not permitting duplication. Skipping the test + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + ${body}= Get File jsons/lccnSubscriptionRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Post Create subscription - NO-DUPLICATION + Log Trying to create a subscription with an already created content + Pass Execution If ${VNFM_DUPLICATION} == 1 VNFM permits duplication. Skipping the test + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + ${body}= Get File jsons/lccnSubscriptionRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Get subscriptions + Log Get the list of active subscriptions + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Get subscriptions - filter + Log Get the list of active subscriptions using a filter + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Get subscriptions - invalid filter + Log Get the list of active subscriptions using an invalid filter + Set Headers {"Accept": "${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter_invalid} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +PUT subscriptions + 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":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +PATCH subscriptions + 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":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +DELETE subscriptions + 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":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Post Create Individual subscription + 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":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Get Individual subscription + log Trying to get information about an individual subscription + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Put Individual subscription + 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":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Patch Individual subscription + 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":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Delete Individual subscription + log Try to delete an individual subscription + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Put Notification subscription + log Trying to perform a PUT. This method should not be implemented + Put ${callback_endpoint} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Patch Notification subscription + log Trying to perform a PATCH. This method should not be implemented + Patch ${callback_endpoint} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Delete Notification subscription + log Trying to perform a DELETE. This method should not be implemented + Delete ${callback_endpoint} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +POST Operation occurrence + log The POST method delivers a notification from the server to the client. + ${json}= Get File schemas/NsLcmOperationOccurrenceNotification.schema.json + ${BODY}= evaluate json.loads('''${json}''') json + Log Creating mock request and response to handle NSLcmOperationOccurrenceNotification + &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY} + &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 + Create Mock Expectation ${req} ${rsp} + Sleep ${sleep_interval} + Log Verifying results + Verify Mock Expectation ${req} + Log Cleaning the endpoint + Clear Requests ${callback_endpoint} +POST Id creation + log The POST method delivers a notification from the server to the client. + ${json}= Get File schemas/vnfIdentifierCreationNotification.schema.json + ${BODY}= evaluate json.loads('''${json}''') json + Log Creating mock request and response to handle vnfLcmOperationOccurrenceNotification + &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY} + &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 + Create Mock Expectation ${req} ${rsp} + Sleep ${sleep_interval} + Log Verifying results + Verify Mock Expectation ${req} + Log Cleaning the endpoint + Clear Requests ${callback_endpoint} +POST Id deletion + log The POST method delivers a notification from the server to the client. + ${json}= Get File schemas/vnfIdentifierCreationNotification.schema.json + ${BODY}= evaluate json.loads('''${json}''') json + Log Creating mock request and response to handle vnfLcmOperationOccurrenceNotification + &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY} + &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 + Create Mock Expectation ${req} ${rsp} + Sleep ${sleep_interval} + Log Verifying results + Verify Mock Expectation ${req} + Log Cleaning the endpoint + Clear Requests ${callback_endpoint} +GET test endpoint + log The GET method allows the server to test the notification endpoint + &{req}= Create Mock Request Matcher GET ${callback_endpoint} + &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 + Create Mock Expectation ${req} ${rsp} + Sleep ${sleep_interval} + Verify Mock Expectation ${req} + Clear Requests ${callback_endpoint} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot b/SOL003/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot index 4c8207e5d04e715c2474942de561232d5d47449b..9595cfe7b78233c33c31be49f3a76ddd4258dfb4 100644 --- a/SOL003/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot +++ b/SOL003/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot @@ -4,74 +4,92 @@ Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library JSONLibrary Library JSONSchemaLibrary schemas/ -Documentation This resource represents VNF lifecycle management operation occurrences. The client can use this resource to query -... status information about multiple VNF lifecycle management operation occurrences. +Resource VnfLcmMntOperationKeywords.robot *** Test Cases *** Post VNF LCM OP occurences - Method not implemented - log Trying to perform a POST. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.11.1 + ... Test title: Post VNF LCM OP occurences - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.12.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Post VNF LCM OP occurences + Check HTTP Response Status Code Is 405 -Get stauts information about multiple VNF LCM OP OCC - Log Query status information about multiple VNF lifecycle management operation occurrences. - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs - Log Validate Status code - Integer response status 200 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE} - ${result}= Output response body - Validate Json VnfLcmOpOccs.schema.json ${result} - Log Validation OK +Get status information about multiple VNF LCM OP OCC + [Documentation] Test ID: 7.3.1.11.2 + ... Test title: Get status information about multiple VNF LCM OP OCC + ... Test objective: The objective is to test that GET method retrieve Query status information about multiple VNF lifecycle management operation occurrences. + ... Pre-conditions: none + ... Reference: section 5.4.12.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET VNF LCM OP occurences + Check HTTP Response Status Code Is 202 + Check HTTP Response Body Json Schema Is VnfLcmOpOccs -Get stauts information about multiple VNF LCM OP OCC Bad Request Invalid attribute-based filtering parameters - Log Query status information about multiple VNF lifecycle management operation occurrences. - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs?attribute_not_exist=some_value - Log Validate Status code - Integer response status 400 - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +Get status information about multiple VNF LCM OP OCC Bad Request Invalid attribute-based filtering parameters + [Documentation] Test ID: 7.3.1.11.3 + ... Test title: Get status information about multiple VNF LCM OP OCC Bad Request Invalid attribute-based filtering parameters + ... Test objective: The objective is to test that GET method fail retrieving status information about multiple VNF lifecycle management operation occurrences because attribute is invalid. + ... Pre-conditions: none + ... Reference: section 5.4.12.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET VNF LCM OP occurences invalid attribute + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails -Get stauts information about multiple VNF LCM OP OCC Bad Request Invalid attribute selector - Log Query VNF The GET method queries information about multiple VNF instances. - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs?fields=wrong_field - Log Validate Status code - Integer response status 400 - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +Get status information about multiple VNF LCM OP OCC Bad Request Invalid attribute selector + [Documentation] Test ID: 7.3.1.11.4 + ... Test title: Get status information about multiple VNF LCM OP OCC Bad Request Invalid attribute selector + ... Test objective: The objective is to test that GET method fail retrieving status information about multiple VNF lifecycle management operation occurrences because attribute is invalid. + ... Pre-conditions: none + ... Reference: section 5.4.12.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET VNF LCM OP occurences invalid filter + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails -PUT stauts information about multiple VNF LCM OP OCC - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs - Log Validate Status code - Integer response status 405 +PUT status information about multiple VNF LCM OP OCC - Method not implemented + [Documentation] Test ID: 7.3.1.11.5 + ... Test title: PUT status information about multiple VNF LCM OP OCC - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.12.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT VNF LCM OP occurences + Check HTTP Response Status Code Is 405 -PATCH stauts information about multiple VNF LCM OP OCC - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs - Log Validate Status code - Integer response status 405 +PATCH status information about multiple VNF LCM OP OCC - Method not implemented + [Documentation] Test ID: 7.3.1.11.6 + ... Test title: PATCH status information about multiple VNF LCM OP OCC - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.12.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT VNF LCM OP occurences + Check HTTP Response Status Code Is 405 -DELETE stauts information about multiple VNF LCM OP OCC - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs - Log Validate Status code - Integer response status 405 \ No newline at end of file +DELETE status information about multiple VNF LCM OP OCC - Method not implemented + [Documentation] Test ID: 7.3.1.11.7 + ... Test title: DELETE status information about multiple VNF LCM OP OCC - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.12.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE VNF LCM OP occurences + Check HTTP Response Status Code Is 405 diff --git a/SOL003/VNFLifecycleManagement-API/environment/variables.txt b/SOL003/VNFLifecycleManagement-API/environment/variables.txt index a4c8fadf5dbe365f906555d75930d36856b4b3b9..fe5c9214e77a8906b50e93b72099179658256180 100644 --- a/SOL003/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL003/VNFLifecycleManagement-API/environment/variables.txt @@ -1,6 +1,8 @@ *** Variables *** ${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${instantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Change with an instantiated vnfInstanceID +${notInstantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f #Change with an instantiated vnfInstanceID +${notFoundVnfInstanceId} xxxxxxx-yyyyyyy-tttt-az98-uuuuuu #Change with an instantiated vnfInstanceID ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d ${callback_endpoint} /notification diff --git a/SOL005/NSLifecycleManagement-API/CancelOperationTask.robot b/SOL005/NSLifecycleManagement-API/CancelOperationTask.robot index 5098d591b4a4350d1203ae4cac5ff32cdb7534c8..53ef3f9bca23b367a9c9b2d79b22493f59cafb50 100644 --- a/SOL005/NSLifecycleManagement-API/CancelOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/CancelOperationTask.robot @@ -11,26 +11,25 @@ Library JSONSchemaLibrary schemas/ Post Cancel operation task [Documentation] Test ID: 5.3.2.14.1 ... Test title: Post Cancel operation task - ... Test objective: The objective is to test that POST method cancel an LCM operation + ... Test objective: The objective is to test that POST method cancel the NS LCM operation ... Pre-conditions: NS instance status equal to STARTING, PROCESSING or ROLLING_BACK ... Reference: section 6.4.15.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none - Depends on test Check resource FAILED_TEMP + ... Post-Conditions: NS instance status equal to FAILED_TEMP POST Cancel operation task Check HTTP Response Status Code Is 202 + Check resource FAILED_TEMP Post Cancel operation task Not Found [Documentation] Test ID: 5.3.2.14.2 ... Test title: Post Cancel operation task Not Found - ... Test objective: The objective is to test that POST method fail if LCM operation not found + ... Test objective: The objective is to test that POST method fail completing the Cancel NS LCM operation if the resource is not found ... Pre-conditions: none ... Reference: section 6.4.15.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - [Setup] Check Cancel not supported POST Cancel operation task Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails @@ -38,13 +37,12 @@ Post Cancel operation task Not Found Post Cancel operation task Conflict [Documentation] Test ID: 5.3.2.14.3 ... Test title: Post Cancel operation task Conflict - ... Test objective: The objective is to test that POST method fail if a status conflict exist on LCM operation - ... Pre-conditions: none + ... Test objective: The objective is to test that POST method fail if a status conflict exist on the NS LCM operation. (i.e. NS instance status not equal to STARTING, PROCESSING or ROLLING_BACK) + ... Pre-conditions: NS instance status not equal to STARTING, PROCESSING or ROLLING_BACK ... Reference: section 6.4.15.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Depends on test failure Check resource FAILED_TEMP POST Cancel operation task Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL005/NSLifecycleManagement-API/ContinueOperationTask.robot b/SOL005/NSLifecycleManagement-API/ContinueOperationTask.robot index f36f78bc9d82514c680eb2fb5652f2d2be7d87f7..80e0c93f7bdeb37906b0f33903c8739f9e113d76 100644 --- a/SOL005/NSLifecycleManagement-API/ContinueOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/ContinueOperationTask.robot @@ -16,21 +16,20 @@ Post Continue operation task ... Reference: section 6.4.13.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none - Depends on test Check resource FAILED_TEMP + ... Post-Conditions: NS instance status not equal to FAILED_TEMP POST Continue operation task Check HTTP Response Status Code Is 202 + Check resource not FAILED_TEMP Post Continue operation task Not Found [Documentation] Test ID: 5.3.2.12.2 ... Test title: Post Continue operation task Not Found - ... Test objective: The objective is to test that POST method fail if operation is not found + ... Test objective: The objective is to test that POST method cannot perform a continue operation task because the resource is not found ... Pre-conditions: none ... Reference: section 6.4.13.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - [Setup] Check Continue not supported POST Continue operation task Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails @@ -38,13 +37,12 @@ Post Continue operation task Not Found Post Continue operation task Conflict [Documentation] Test ID: 5.3.2.12.3 ... Test title: Post Continue operation task Conflict - ... Test objective: The objective is to test that POST method fail in case of operation status conflict - ... Pre-conditions: none + ... Test objective: The objective is to test that POST method fail in case of operation status conflict (i.e. NS instance status not equal to FAILED_TEMP ) + ... Pre-conditions: NS instance status not equal to FAILED_TEMP ... Reference: section 6.4.13.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none - Depends on test failure Check resource FAILED_TEMP + ... Post-Conditions: none POST Continue operation task Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL005/NSLifecycleManagement-API/FailOperationTask.robot b/SOL005/NSLifecycleManagement-API/FailOperationTask.robot index 3853ed3e7312e243b0bf350baed3b8e45d3cb350..1f8a95d182b85e43c6c5405cace059feb2ef5d5a 100644 --- a/SOL005/NSLifecycleManagement-API/FailOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/FailOperationTask.robot @@ -17,20 +17,20 @@ Post Fail operation task ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Depends on test Check resource FAILED_TEMP POST Fail operation task Check HTTP Response Status Code Is 202 + Check resource not FAILED_TEMP + Post Fail operation task Not Found [Documentation] Test ID: 5.3.2.13.2 ... Test title: Post Fail operation task Not Found - ... Test objective: The objective is to test that POST method fail if the LCM operation is not found + ... Test objective: The objective is to test that POST method fail if the LCM NS resource is not found ... Pre-conditions: none ... Reference: section 6.4.14.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - [Setup] Check Fail not supported POST Fail operation task Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails @@ -38,13 +38,12 @@ Post Fail operation task Not Found Post Fail operation task Conflict [Documentation] Test ID: 5.3.2.13.3 ... Test title: Post Fail operation task Conflict - ... Test objective: The objective is to test that POST method fail in case of status conflict on the LCM operation - ... Pre-conditions: none + ... Test objective: The objective is to test that POST method fail in case of status conflict on the LCM NS operation (i.e NS instance status not equal to FAILED_TEMP) + ... Pre-conditions: NS instance status not equal to FAILED_TEMP ... Reference: section 6.4.14.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Depends on test failure Check resource FAILED_TEMP POST Fail operation task Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL005/NSLifecycleManagement-API/HealNSTask.robot b/SOL005/NSLifecycleManagement-API/HealNSTask.robot index 442089bde0cdd0b37d434c60e95aa0617cf75369..d09fe9ae4132646770da4b1996a5b4ef291a8133 100644 --- a/SOL005/NSLifecycleManagement-API/HealNSTask.robot +++ b/SOL005/NSLifecycleManagement-API/HealNSTask.robot @@ -12,11 +12,11 @@ POST Heal a NSInstance [Documentation] Test ID: 5.3.2.6.1 ... Test title: POST Heal a NSInstance ... Test objective: The objective is to test that POST method allow to create a Heal NS instance - ... Pre-conditions: none + ... Pre-conditions: resource status have to be NOT_INSTANTIATED ... Reference: section 6.4.7.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The Heal NS instance is created on the NFVO + ... Post-Conditions: none POST Heal NSInstance Check HTTP Response Status Code Is 202 Check HTTP Response Header Contains Location @@ -25,12 +25,11 @@ POST Heal a NSInstance Conflict [Documentation] Test ID: 5.3.2.6.2 ... Test title: POST Heal a NSInstance Conflict ... Test objective: The objective is to test that POST method fail if NS instance is not in NOT_INSTANTIATE state - ... Pre-conditions: none + ... Pre-conditions: resource status have not to be NOT_INSTANTIATED ... Reference: section 6.4.7.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The Heal NS instance is not created on the NFVO - [Setup] Check resource not_instantiated + ... Post-Conditions: none POST Heal NSInstance Check HTTP Response Status Code Is 409 Check HTTP Response Header Contains ${CONTENT_TYPE} diff --git a/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot b/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot index e994731fc116f531cd70580569848192748cb80e..7c1c8e00094f5821110b7924bead423c1da86158 100644 --- a/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot +++ b/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot @@ -74,12 +74,11 @@ DELETE Individual NSInstance Conflict [Documentation] Test ID: 5.3.2.2.5 ... Test title: DELETE Individual NSInstance Conflict ... Test objective: The objective is to test that DELETE method is allowed to delete a NS instance - ... Pre-conditions: At least one running instance of a NS + ... Pre-conditions: At least one instantiated instance of a NS ... Reference: section 6.4.3.3.5 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The NS instance is deleted from the NFVO - [Setup] Check resource instantiated DELETE IndividualNSInstance Check HTTP Response Status Code Is 409 Check HTTP Response Header ContentType is ${CONTENT_TYPE} diff --git a/SOL005/NSLifecycleManagement-API/InstantiateNSTask.robot b/SOL005/NSLifecycleManagement-API/InstantiateNSTask.robot index 9d4a26a65bcf54b1a8c9e62931e893f88a5c9620..d7083856066134ee0cc714fe78f4d77d99f2c6ab 100644 --- a/SOL005/NSLifecycleManagement-API/InstantiateNSTask.robot +++ b/SOL005/NSLifecycleManagement-API/InstantiateNSTask.robot @@ -20,17 +20,17 @@ Post Instantiate a nsInstance POST Instatiate nsInstance Check HTTP Response Status Code Is 202 Check HTTP Response Header Contains Location + Check resource INSTANTIATED Post Instantiate a nsInstance Conflict [Documentation] Test ID: 5.3.2.3.2 ... Test title: Post Instantiate a nsInstance Conflict - ... Test objective: The objective is to test that the operation can't be performed due to a conflict with the state of resource - ... Pre-conditions: none + ... Test objective: The objective is to test that the operation can't be performed due to a conflict with the state of resource (i.e. the resource is in INSTANTIATED state) + ... Pre-conditions: resource is in INSTANTIATED state ... Reference: section 6.4.4.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The NS instance is not instantiated on the NFVO - [Setup] Check resource instantiated POST Instatiate nsInstance Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot index be83b24aa8ba3b90d350de25bfd2fa385c9559e4..a22b64496740e65107381a8bab9f2b8f557e548e 100644 --- a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot +++ b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot @@ -60,6 +60,12 @@ Check resource FAILED_TEMP Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} String response body operationState FAILED_TEMP +Check resource not + [Arguments] ${status} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} + Should Not Be Equal As Strings response body operationState ${status} + Check Operation Notification Status is [Arguments] ${status} Check Operation Notification NsLcmOperationOccurrenceNotification ${status} diff --git a/SOL005/NSLifecycleManagement-API/RetryOperationTask.robot b/SOL005/NSLifecycleManagement-API/RetryOperationTask.robot index 217d5f361e93f376286c369e29acb8bafcc516ad..7ac47b1f53ddeaeaa58a18c2d0b358496fdf7486 100644 --- a/SOL005/NSLifecycleManagement-API/RetryOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/RetryOperationTask.robot @@ -16,11 +16,11 @@ Post Retry operation task ... Reference: section 6.4.11.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none - Depends on test Check resource FAILED_TEMP + ... Post-Conditions: NS instance status not equal to FAILED_TEMP POST Retry operation task Check HTTP Response Status Code Is 202 Check HTTP Response Header Contains Location + Check resource not FAILED_TEMP Post Retry operation task Not Found [Documentation] Test ID: 5.3.2.10.2 @@ -31,7 +31,6 @@ Post Retry operation task Not Found ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - [Setup] Check retry not supported POST Retry operation task Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails @@ -39,13 +38,12 @@ Post Retry operation task Not Found Post Retry operation task Conflict [Documentation] Test ID: 5.3.2.10.3 ... Test title: Post Retry operation task Conflict - ... Test objective: The objective is to test that POST method fail in case of NS lifecycle operation status conflict - ... Pre-conditions: none + ... Test objective: The objective is to test that POST method fail in case of NS lifecycle operation status conflict (i.e. NS instance status not equal to FAILED_TEMP) + ... Pre-conditions: NS instance status not equal to FAILED_TEMP ... Reference: section 6.4.11.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Depends on test failure Check resource FAILED_TEMP POST Retry operation task Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL005/NSLifecycleManagement-API/RollbackOperationTask.robot b/SOL005/NSLifecycleManagement-API/RollbackOperationTask.robot index a94b61ddb3cb2720fa9dde171d035c2a0750752d..9f2598eb7b5d912a57752f75dba6a9a86ebb8546 100644 --- a/SOL005/NSLifecycleManagement-API/RollbackOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/RollbackOperationTask.robot @@ -11,13 +11,12 @@ Library JSONSchemaLibrary schemas/ Post Rollback operation task [Documentation] Test ID: 5.3.2.11.1 ... Test title: Post Rollback operation task - ... Test objective: The objective is to test that POST method trigger a rollback on the LCM operation + ... Test objective: The objective is to test that POST method trigger a rollback on the NS LCM operation ... Pre-conditions: NS instance status equal to FAILED_TEMP ... Reference: section 6.4.12.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none - Depends on test Check resource FAILED_TEMP + ... Post-Conditions: NS instance status not equal to FAILED_TEMP POST Rollback operation task Check HTTP Response Status Code Is 202 @@ -31,7 +30,6 @@ Post Rollback operation task Not Found ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - [Setup] Check Rollback not supported POST Rollback operation task Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails @@ -39,13 +37,12 @@ Post Rollback operation task Not Found Post Rollback operation task Conflict [Documentation] Test ID: 5.3.2.11.3 ... Test title: Post Rollback operation task Conflict - ... Test objective: The objective is to test that POST method fail in case of operation status conflict - ... Pre-conditions: none + ... Test objective: The objective is to test that POST method fail in case of operation status conflict (i.e. NS instance status not equal to FAILED_TEMP) + ... Pre-conditions: NS instance status not equal to FAILED_TEMP ... Reference: section 6.4.12.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Depends on test failure Check resource FAILED_TEMP POST Rollback operation task Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL005/NSLifecycleManagement-API/ScaleNSTask.robot b/SOL005/NSLifecycleManagement-API/ScaleNSTask.robot index 7c297851e5bfa51522816f98673dd345518a72ed..02f83863a1111632edf84ff7d6a0034e43beb0d4 100644 --- a/SOL005/NSLifecycleManagement-API/ScaleNSTask.robot +++ b/SOL005/NSLifecycleManagement-API/ScaleNSTask.robot @@ -12,7 +12,7 @@ POST Scale a nsInstance [Documentation] Test ID: 5.3.2.4.1 ... Test title: POST Scale a nsInstance ... Test objective: The objective is to test that POST method allow to create a Scale NS instance - ... Pre-conditions: none + ... Pre-conditions: the resource is in NOT_INSTANTIATED state ... Reference: section 6.4.5.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none @@ -24,13 +24,12 @@ POST Scale a nsInstance POST Instantiate a nsInstance Conflict [Documentation] Test ID: 5.3.2.4.2 ... Test title: POST Instantiate a nsInstance Conflict - ... Test objective: The objective is to test that POST method allow to create a Scale NS instance - ... Pre-conditions: none + ... Test objective: The objective is to test that POST method can't Scale NS instance because of conflict in resource status (i.e. because the resource is in not in NOT_INSTANTIATED state) + ... Pre-conditions: the resource is in not in NOT_INSTANTIATED state ... Reference: section 6.4.5.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The Scale NS instance is not created on the NFVO - [Setup] Check resource not_instantiated POST scale nsInstance Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL005/NSLifecycleManagement-API/Subscriptions.robot b/SOL005/NSLifecycleManagement-API/Subscriptions.robot index 38196cee6a24ab83e8bcf58b8ce841905d3f0835..8a8d3c5688e075fcc89b8f90025265433c7e56e9 100644 --- a/SOL005/NSLifecycleManagement-API/Subscriptions.robot +++ b/SOL005/NSLifecycleManagement-API/Subscriptions.robot @@ -25,8 +25,8 @@ POST Create a new subscription POST Create a new Subscription - DUPLICATION [Documentation] Test ID: 5.3.2.15.2 ... Test title: POST Create a new subscription - DUPLICATION - ... Test objective: The objective is to test that POST method create a duplicate subscription - ... Pre-conditions: none + ... Test objective: The objective is to test that POST method create a duplicate subscription if NFVO is permitting duplication + ... Pre-conditions: a subscription have already to exist ... Reference: section 6.4.16.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none @@ -39,7 +39,7 @@ POST Create a new Subscription - DUPLICATION POST Create a new Subscription - NO-DUPLICATION [Documentation] Test ID: 5.3.2.15.3 ... Test title: POST Create a new subscription - NO-DUPLICATION - ... Test objective: The objective is to test that POST method create a duplicate subscription + ... Test objective: The objective is to test that POST method can't create a duplicate subscription if NFVO is not permitting duplication ... Pre-conditions: none ... Reference: section 6.4.16.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO diff --git a/SOL005/NSLifecycleManagement-API/TerminateNSTask.robot b/SOL005/NSLifecycleManagement-API/TerminateNSTask.robot index 39e7905e3921f234cbaf414143a3d6c33c3ea73b..8cd3f4718476e735df7350cb07f7f72c8cb6cc0d 100644 --- a/SOL005/NSLifecycleManagement-API/TerminateNSTask.robot +++ b/SOL005/NSLifecycleManagement-API/TerminateNSTask.robot @@ -20,17 +20,17 @@ POST Terminate a NSInstance POST Terminate NSInstance Check HTTP Response Status Code Is 202 Check HTTP Response Header Contains Location - + Check resource NOT_INSTANTIATED + POST Terminate a NSInstance Conflict [Documentation] Test ID: 5.3.2.7.2 ... Test title: POST Terminate a NSInstance Conflict - ... Test objective: The objective is to test that POST method can't terminate the NS because the resource is not in INSTANTIATED state - ... Pre-conditions: none + ... Test objective: The objective is to test that POST method can't terminate the NS because of conflict in resource status (i.e. the resource is not in INSTANTIATED state) + ... Pre-conditions: the resource is not in INSTANTIATED state ... Reference: section 6.4.8.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - [Setup] Check resource not_instantiated POST Terminate NSInstance Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot b/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot index 74a22d17eea03eca872391ce3ae8ec3f7b9acc4c..51762166b72bb03fc4ab82135d29081bdd55a28e 100644 --- a/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot +++ b/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot @@ -25,12 +25,11 @@ POST Update a NSInstance Conflict [Documentation] Test ID: 5.3.2.5.2 ... Test title: POST Update a NSInstance Conflict ... Test objective: The objective is to test that POST method fail if a scale Instance is not existing or is not in NOT_INSTANTIATED state - ... Pre-conditions: an existing Scale Instance + ... Pre-conditions: an existing NS Scale Instance ... Reference: section 6.4.6.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The Scale NS instance is not updated on the NFVO - [Setup] Check resource not_instantiated POST Update NSInstance Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails