diff --git a/SOL002/VNFLifecycleManagement-API/CancelOperationTask.robot b/SOL002/VNFLifecycleManagement-API/CancelOperationTask.robot index 8d7bd021174882229380f49194b07b9884e3e543..0b2e1c1fd3cc6ba263cddb7ddeed3c45b18b05ef 100644 --- a/SOL002/VNFLifecycleManagement-API/CancelOperationTask.robot +++ b/SOL002/VNFLifecycleManagement-API/CancelOperationTask.robot @@ -1,5 +1,6 @@ *** Settings *** Resource environment/variables.txt +Resource VnfLcmOperationKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library DependencyLibrary Library JSONLibrary @@ -8,82 +9,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 a VNF lifecycle operation if that operation has experienced a temporary failure - 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 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. - 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}/cancel - 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 + [Documentation] Test ID: 6.3.5.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: the related "VNF LCM operation occurrence" is either in "PROCESSING" or "ROLLING_BACK" state. + ... Reference: section 5.4.17.3.1 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: in response header Location should not be null + POST Cancel operation task + Check HTTP Response Status Code Is 202 + Check resource has a temporary failure + +Post Cancel operation task Conflict + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: in response header Location should not be null + 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. - [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 - + [Documentation] Test ID: 6.3.5.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 resource is not found + ... Pre-conditions: + ... Reference: section 5.4.17.3.1 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: in response header Location should not be null + 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/${vnfInstanceId}/cancel - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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/${vnfInstanceId}/cancel - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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/${vnfInstanceId}/cancel - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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/${vnfInstanceId}/cancel - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + DELETE Cancel operation task + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL002/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot b/SOL002/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot index 60be754d3736651c6eefc666403ac5c8ebd825b7..407f5a1841047bd82b7c02f71f9a18f3de4c29dc 100644 --- a/SOL002/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot +++ b/SOL002/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot @@ -1,5 +1,6 @@ *** Settings *** Resource environment/variables.txt +Resource VnfLcmOperationKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem Library JSONLibrary @@ -7,48 +8,66 @@ 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + DELETE Change External VNF Connectivity + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL002/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot b/SOL002/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot index ec54d20ea0d87ee8cf8c99aedd8246308a14c939..b730df485b4c6c164bd48cb0debe9fda6fba9dfc 100644 --- a/SOL002/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot +++ b/SOL002/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot @@ -1,5 +1,6 @@ *** Settings *** Resource environment/variables.txt +Resource VnfLcmOperationKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem Library JSONLibrary @@ -8,87 +9,93 @@ 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 + [Documentation] Test ID: 6.3.5.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_VE + ... Applicability: none + ... Post-Conditions: in response header Location should not be null + POST Change VNF deployment flavour + 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 ${vnfInstanceId} - 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 409 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + [Documentation] Test ID: 6.3.5.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_VE + ... Applicability: none + ... Post-Conditions: none + POST Change VNF deployment flavour + 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. - [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}= Get File jsons/changeVnfFlavourRequest.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 + [Documentation] Test ID: 6.3.5.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_VE + ... Applicability: none + ... Post-Conditions: none + POST Change VNF deployment flavour + 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: 6.3.5.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_VE + ... 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: 6.3.5.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_VE + ... 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: 6.3.5.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_VE + ... 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: 6.3.5.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_VE + ... Applicability: none + ... Post-Conditions: none + DELETE Change VNF deployment flavour + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL002/VNFLifecycleManagement-API/FailOperationTask.robot b/SOL002/VNFLifecycleManagement-API/FailOperationTask.robot index 684ec9519772a140c3a7edc5f5b36f232c727d58..e08cfe3a4d1db10ab71f50afc64e2ce89ad193b5 100644 --- a/SOL002/VNFLifecycleManagement-API/FailOperationTask.robot +++ b/SOL002/VNFLifecycleManagement-API/FailOperationTask.robot @@ -1,92 +1,99 @@ *** Settings *** Resource environment/variables.txt +Resource VnfLcmOperationKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library DependencyLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ -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. -... Once the operation is marked as "finally failed", it cannot be retried or rolled back anymore. -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 202 - ${headers}= Output response headers - Should Contain ${headers} Location - Log Validation OK + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + 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. - 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 - + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + 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. - [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 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + 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/${vnfInstanceId}/fail - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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/${vnfInstanceId}/fail - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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/${vnfInstanceId}/fail - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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/${vnfInstanceId}/fail - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: + Delete Fail operation + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL002/VNFLifecycleManagement-API/HealVNFTask.robot b/SOL002/VNFLifecycleManagement-API/HealVNFTask.robot index ff2fe25c9264bbdc3cdf9b2c485d6d8d89ab916e..c9ab1c8b9bba82dba6edf2dffd593e338e9f4df4 100644 --- a/SOL002/VNFLifecycleManagement-API/HealVNFTask.robot +++ b/SOL002/VNFLifecycleManagement-API/HealVNFTask.robot @@ -1,5 +1,6 @@ *** Settings *** Resource environment/variables.txt +Resource VnfLcmOperationKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem Library JSONLibrary @@ -8,85 +9,93 @@ 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 - + [Documentation] Test ID: 6.3.5.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. - [Setup] Check resource not instantiated ${vnfInstanceId} - 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 + [Documentation] Test ID: 6.3.5.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: + 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. - 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/${badVnfInstanceId}/heal ${body} - Integer response status 404 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + [Documentation] Test ID: 6.3.5.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: + 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: 6.3.5.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: 6.3.5.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: 6.3.5.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: 6.3.5.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/SOL002/VNFLifecycleManagement-API/IndividualSubscription.robot b/SOL002/VNFLifecycleManagement-API/IndividualSubscription.robot index 7b5b22ac6c6106baeeb321e6a97c58bb7ab6d294..f2f183e212be05b1d4111fb17c810ad6691a7289 100644 --- a/SOL002/VNFLifecycleManagement-API/IndividualSubscription.robot +++ b/SOL002/VNFLifecycleManagement-API/IndividualSubscription.robot @@ -1,58 +1,71 @@ *** Settings *** Resource environment/variables.txt +Resource VnfLcmOperationKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library JSONLibrary Library JSONSchemaLibrary schemas/ -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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + Delete Individual subscription + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot b/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot index c50eac8ccc42e19f352328b84552445d03374237..b07af2fcef422996bbfd6961fe43981e4d436606 100644 --- a/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot +++ b/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot @@ -1,14 +1,12 @@ *** Settings *** # Suite setup Expect spec SOL003-VNFLifecycleManagement-API.yaml Resource environment/variables.txt +Resource VnfLcmOperationKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem Library DependencyLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ -Documentation This resource represents an individual VNF instance. The client can use this resource to modify and delete the -... underlying VNF instance, and to read information about the VNF instance. -Suite Setup Check resource existance *** Variables *** @@ -16,124 +14,106 @@ ${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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: + ... Post-Conditions: + POST individual 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: 6.3.5.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_VE + ... 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: 6.3.5.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_VE + ... 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[0]}"} - 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 - ${headers}= Output response headers - Should Contain ${headers} Location - Log Validation OK + [Documentation] Test ID: 6.3.5.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_VE + ... 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. - 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[0]}"} - 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 - ${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: 6.3.5.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_VE + ... Applicability: + ... Post-Conditions: + PATCH individual vnfInstance + Check HTTP Response Status Code Is 412 + Check HTTP Response Body Json Schema Is ProblemDetails PATCH Individual VNFInstance Conflict - # 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 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE} - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK - #[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 + [Documentation] Test ID: 6.3.5.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_VE + ... Applicability: + ... Post-Conditions: + PATCH individual vnfInstance + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails 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: 6.3.5.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_VE + ... Applicability: + ... Post-Conditions: + DELETE individual vnfInstance + Check HTTP Response Status Code Is 204 DELETE Individual VNFInstance Conflict - # 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 - ${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: 6.3.5.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_VE + ... Applicability: + ... Post-Conditions: + DELETE individual vnfInstance + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails *** Keywords *** Check resource existance @@ -157,4 +137,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/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot b/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot index 3d76de314529ad41b883303ada98d0c903d211c9..19866be9c35db83173dab586ec1529be4769ad52 100644 --- a/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot +++ b/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot @@ -1,59 +1,67 @@ *** Settings *** Resource environment/variables.txt +Resource VnfLcmOperationKeywords.robot 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 - *** 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 Individual VNF LCM OP occurences - [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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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 Individual VNF LCM OP occurences - 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + Put multiple VNF instances + Check HTTP Response Status Code Is 405 -PATCH Individual VNF LCM OP occurences - 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + Patch multiple VNF instances + Check HTTP Response Status Code Is 405 -DELETE Individual VNF LCM OP occurences - 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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/SOL002/VNFLifecycleManagement-API/InstantiateVNFTask.robot b/SOL002/VNFLifecycleManagement-API/InstantiateVNFTask.robot index 3d0c9f8f44565fb78fd81d07285f3a73de85126c..bf06b50d857837c1328cd44e8b76d5981b2dcbd7 100644 --- a/SOL002/VNFLifecycleManagement-API/InstantiateVNFTask.robot +++ b/SOL002/VNFLifecycleManagement-API/InstantiateVNFTask.robot @@ -1,5 +1,6 @@ *** Settings *** Resource environment/variables.txt +Resource VnfLcmOperationKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library DependencyLibrary Library OperatingSystem @@ -10,67 +11,78 @@ 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: 6.3.5.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_VE + ... 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. - [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 - ${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.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_VE + ... Applicability: + ... Post-Conditions: + 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_VE + ... 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_VE + ... 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_VE + ... 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_VE + ... Applicability: + ... Post-Conditions: + DELETE instantiate individual vnfInstance + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL002/VNFLifecycleManagement-API/LCMParallelOperation.robot b/SOL002/VNFLifecycleManagement-API/LCMParallelOperation.robot index 4effbe1b51a018e0a58f27014c866e7d3ee81f11..e01a43ac8dbdceb49ce19eca5677cc7e8f595f60 100644 --- a/SOL002/VNFLifecycleManagement-API/LCMParallelOperation.robot +++ b/SOL002/VNFLifecycleManagement-API/LCMParallelOperation.robot @@ -1,5 +1,6 @@ *** Settings *** Resource environment/variables.txt +Resource VnfLcmOperationKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem Library JSONLibrary diff --git a/SOL002/VNFLifecycleManagement-API/NotificationEndpoint.robot b/SOL002/VNFLifecycleManagement-API/NotificationEndpoint.robot index 1c442cd888cd6c2f76d55b5148d973b76653e184..bdf6b50f2bd241bda2a0dd00beeecb3c332dcfd0 100644 --- a/SOL002/VNFLifecycleManagement-API/NotificationEndpoint.robot +++ b/SOL002/VNFLifecycleManagement-API/NotificationEndpoint.robot @@ -2,6 +2,7 @@ Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true Resource environment/variables.txt +Resource VnfLcmOperationKeywords.robot Library MockServerLibrary Library Process Library OperatingSystem @@ -9,92 +10,87 @@ Library OperatingSystem *** 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: 6.3.5.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: 6.3.5.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: 6.3.5.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: 6.3.5.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 PUT Method not implemented - &{req}= Create Mock Request Matcher PUT ${callback_endpoint} - &{rsp}= Create Mock Response status_code=405 - 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + Put notification subscription + Check HTTP Response Status Code Is 405 PATCH subscriptions - Method not implemented - Log PATCH Method not implemented - &{req}= Create Mock Request Matcher PATCH ${callback_endpoint} - &{rsp}= Create Mock Response status_code=405 - 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + Patch notification subscription + Check HTTP Response Status Code Is 405 + DELETE subscriptions - Method not implemented - Log DELETE Method not implemented - &{req}= Create Mock Request Matcher DELETE ${callback_endpoint} - &{rsp}= Create Mock Response status_code=405 - 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + Delete notification subscription + Check HTTP Response Status Code Is 405 *** Keywords *** Create Sessions Start Process java -jar ../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue - Create Mock Session ${callback_uri}:${callback_port} #The API producer is set to NFVO according to SOL003-5.3.9 + Create Mock Session ${callback_uri}:${callback_port} #The API producer is set to NFVO according to SOL002-5.3.9 diff --git a/SOL002/VNFLifecycleManagement-API/OperateVNFTask.robot b/SOL002/VNFLifecycleManagement-API/OperateVNFTask.robot index 6ac1fb6b93f42007a1185f02117c03aa176bb535..77a13a09d20b4ae2ac3d693cf0ad5bf6a4639dd2 100644 --- a/SOL002/VNFLifecycleManagement-API/OperateVNFTask.robot +++ b/SOL002/VNFLifecycleManagement-API/OperateVNFTask.robot @@ -1,5 +1,6 @@ *** Settings *** Resource environment/variables.txt +Resource VnfLcmOperationKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem Library JSONLibrary @@ -8,87 +9,92 @@ 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 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: + POST Operate VNF + Check HTTP Response Status Code Is 202 + Check Operation Occurrence Id -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. - [Setup] Check resource not instantiated ${vnfInstanceId} - 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 a vnfInstance Conflict (Not-Instantiated) + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: + POST Operate VNF + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails -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. - [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 a vnfInstance Not Found + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: + 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: + DELETE Operate VNF + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL002/VNFLifecycleManagement-API/RetryOperationTask.robot b/SOL002/VNFLifecycleManagement-API/RetryOperationTask.robot index d98c4f160b988b44bf8ae6814ada18d41bf72072..3371ce905efded0796acf55b3423b7480472827a 100644 --- a/SOL002/VNFLifecycleManagement-API/RetryOperationTask.robot +++ b/SOL002/VNFLifecycleManagement-API/RetryOperationTask.robot @@ -1,5 +1,6 @@ *** Settings *** Resource environment/variables.txt +Resource VnfLcmOperationKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library DependencyLibrary Library JSONLibrary @@ -9,84 +10,93 @@ 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. - 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 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + 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. - 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 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + 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. - [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 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + 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/${vnfInstanceId}/retry - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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/${vnfInstanceId}/retry - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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/${vnfInstanceId}/retry - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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/${vnfInstanceId}/retry - Log Validate Status code - Integer response status 405 - + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: + Delete Retry operation + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance Set Headers {"Accept":"${ACCEPT}"} diff --git a/SOL002/VNFLifecycleManagement-API/RollbackOperationTask.robot b/SOL002/VNFLifecycleManagement-API/RollbackOperationTask.robot index afd5d3600dff4919b351c289beb262727675dab4..716cdeb8f2cf12d28ab61ad17ed233dc6ecf29ce 100644 --- a/SOL002/VNFLifecycleManagement-API/RollbackOperationTask.robot +++ b/SOL002/VNFLifecycleManagement-API/RollbackOperationTask.robot @@ -1,5 +1,6 @@ *** Settings *** Resource environment/variables.txt +Resource VnfLcmOperationKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library DependencyLibrary Library JSONLibrary @@ -9,83 +10,93 @@ 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. - 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 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + 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. - 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 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + 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. - [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 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + 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/${vnfInstanceId}/rollback - Log Validate Status code - Integer response status 405 - + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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/${vnfInstanceId}/rollback - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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/${vnfInstanceId}/rollback - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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/${vnfInstanceId}/rollback - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: + Delete Rollback operation + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL002/VNFLifecycleManagement-API/ScaleVNFTask.robot b/SOL002/VNFLifecycleManagement-API/ScaleVNFTask.robot index 1c4da0e54f825f476a564746603cd9f8b7130874..29a161476895543e43fe2d4b175097942eeac1ef 100644 --- a/SOL002/VNFLifecycleManagement-API/ScaleVNFTask.robot +++ b/SOL002/VNFLifecycleManagement-API/ScaleVNFTask.robot @@ -1,5 +1,6 @@ *** Settings *** Resource environment/variables.txt +Resource VnfLcmOperationKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem Library JSONLibrary @@ -8,85 +9,92 @@ 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 + [Documentation] Test ID: 6.3.5.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_VE + ... Applicability: + ... Post-Conditions: + POST Scale vnfInstance + Check HTTP Response Status Code Is 202 + Check Operation Occurrence Id 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. - [Setup] Check resource not instantiated ${vnfInstanceId} - 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/${vnfInstanceId}/scale ${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: 6.3.5.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_VE + ... Applicability: + ... Post-Conditions: + POST Scale vnfInstance + 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. - [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 + [Documentation] Test ID: 6.3.5.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_VE + ... Applicability: + ... Post-Conditions: + POST Scale vnfInstance + 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: 6.3.5.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_VE + ... 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: 6.3.5.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_VE + ... 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: 6.3.5.4.6 + ... 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.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.4.7 + ... 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.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: + ... Post-Conditions: + DELETE Scale vnfInstance + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL002/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot b/SOL002/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot index 36b54495ea652cddf05da8ad71d9d57fa1903f28..07cbad5b8cb3a357b338cdc09c9ecf3d098cdd87 100644 --- a/SOL002/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot +++ b/SOL002/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot @@ -1,97 +1,101 @@ *** Settings *** Resource environment/variables.txt +Resource VnfLcmOperationKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ -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 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + POST Scale vnfInstance to level + Check HTTP Response Status Code Is 202 + Check Operation Occurrence Id 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. - [Setup] Check resource not instantiated ${vnfInstanceId} - 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/${vnfInstanceId}/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 + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + POST Scale vnfInstance to level + 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. - [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 + [Documentation] Test ID: 6.3.5.5.3 + ... Test title: Scale a vnfInstance Not Found + ... 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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: + ... Post-Conditions: + POST Scale vnfInstance to level + 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: 6.3.5.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 - SOL002 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: 6.3.5.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 - SOL002 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: 6.3.5.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 - SOL002 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: 6.3.5.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 - SOL002 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 diff --git a/SOL002/VNFLifecycleManagement-API/Subscriptions.robot b/SOL002/VNFLifecycleManagement-API/Subscriptions.robot index 3c4e55907bbaf19b6f1d48e0c6d809b0d32e15ad..d345f528fbb92ab0e7e715063875b4a93d67f584 100644 --- a/SOL002/VNFLifecycleManagement-API/Subscriptions.robot +++ b/SOL002/VNFLifecycleManagement-API/Subscriptions.robot @@ -1,118 +1,125 @@ *** Settings *** Resource environment/variables.txt +Resource VnfLcmOperationKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ *** 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 - +POST Create a new subscription + [Documentation] Test ID: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + DELETE subscriptions + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/TerminateVNFTask.robot b/SOL002/VNFLifecycleManagement-API/TerminateVNFTask.robot index 88b5c0c438ceb6b5ae7c9a5102202e255cd47d61..9f768cdfc9e2d19096857308aae6f9f75b2d0f25 100644 --- a/SOL002/VNFLifecycleManagement-API/TerminateVNFTask.robot +++ b/SOL002/VNFLifecycleManagement-API/TerminateVNFTask.robot @@ -1,5 +1,6 @@ *** Settings *** Resource environment/variables.txt +Resource VnfLcmOperationKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem Library JSONLibrary @@ -8,67 +9,79 @@ 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 + [Documentation] Test ID: 6.3.5.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_VE + ... 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. - [Setup] Check resource not instantiated ${vnfInstanceId} - 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 409 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + [Documentation] Test ID: 6.3.5.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_VE + ... Applicability: none + ... Post-Conditions: + 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: 6.3.5.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_VE + ... 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: 6.3.5.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_VE + ... 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: 6.3.5.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_VE + ... 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: 6.3.5.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_VE + ... Applicability: none + ... Post-Conditions: none + DELETE Scale vnfInstance to level + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL002/VNFLifecycleManagement-API/VNFInstances.robot b/SOL002/VNFLifecycleManagement-API/VNFInstances.robot index 2a5f30c3854cbde693eba44d2b0f980eefe3e670..253ba6d4353ce3db11201505c28e35f0f529a4e8 100644 --- a/SOL002/VNFLifecycleManagement-API/VNFInstances.robot +++ b/SOL002/VNFLifecycleManagement-API/VNFInstances.robot @@ -1,6 +1,7 @@ *** Settings *** # Suite setup Expect spec SOL003-VNFLifecycleManagement-API.yaml Resource environment/variables.txt +Resource VnfLcmOperationKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem Library JSONLibrary @@ -8,88 +9,90 @@ Library JSONSchemaLibrary schemas/ *** Test Cases *** Create a new vnfInstance - #[Setup] #make sure the vnfInstand ${vnfInstanceId} doesn't exist - Log Create VNF instance by POST to ${apiRoot}/${apiName}/${apiVersion}/vnf_instances - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - 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 - Validate Json vnfInstance.schema.json ${result} - Log Validation OK + [Documentation] Test ID: 6.3.5.1.1 + ... Test title: Create a new vnfInstance + ... Test objective: The objective is to create a new VNF instance resource + ... Pre-conditions: + ... Reference: section 5.4.2.3.1 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: + ... Post-Conditions: VNF instance created + 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 - Log Query VNF The GET method queries information about multiple VNF instances. - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Set Headers {"Authorization":"${AUTHORIZATION}"} - 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 + [Documentation] Test ID: 6.3.5.1.2 + ... Test title: Get information about multiple VNF instances + ... Test objective: The objective is to get informations about multiples VNF instances + ... Pre-conditions: + ... Reference: section 5.4.2.3.2 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: + ... Post-Conditions: + 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 - Log Query VNF The GET method queries information about multiple VNF instances. - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Set Headers {"Authorization":"${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_instances?attribute_not_exist=some_value - Log Validate Status code - 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: 6.3.5.1.3 + ... Test title: Get information about multiple VNF instances Bad Request Invalid attribute-based filtering parameters + ... Test objective: The objective is to get informations about multiples VNF instances with Invalid attribute-based filtering parameters + ... Pre-conditions: + ... Reference: section 5.4.2.3.2 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: + ... Post-Conditions: + 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 - 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 - ${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: 6.3.5.1.4 + ... Test title: Get information about multiple VNF instances Bad Request Invalid attribute selector + ... Test objective: The objective is to get informations about multiples VNF instances with Invalid attribute-based filtering parameters + ... Pre-conditions: + ... Reference: section 5.4.2.3.2 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: + ... Post-Conditions: + 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 + [Documentation] Test ID: 6.3.5.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_VE + ... Applicability: + ... Post-Conditions: + PUT multiple vnfInstances + Check HTTP Response Status Code Is 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 + [Documentation] Test ID: 6.3.5.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_VE + ... 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 \ No newline at end of file + [Documentation] Test ID: 6.3.5.1.7 + ... 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.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: + ... Post-Conditions: + DELETE multiple vnfInstances + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot new file mode 100644 index 0000000000000000000000000000000000000000..3d0477b4069468c2721133127cc3bc8abb5c3401 --- /dev/null +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -0,0 +1,866 @@ +*** Settings *** +Resource environment/configuration.txt +Resource environment/variables.txt +Resource environment/scaleVariables.txt +Library MockServerLibrary +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} +Library OperatingSystem +Library BuiltIn +Library JSONLibrary +Library Collections +Library JSONSchemaLibrary schemas/ + +*** Keywords *** + +Get Vnf Instance + [Arguments] ${vnfInstanceId} + 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} + ${body}= Output response body + [Return] ${body} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal ${response.status_code} ${expected_status} + Log Status code validated + +Check Operation Occurrence Id + ${vnfLcmOpOccId}= Get Value From Json ${response.headers} $..Location + Should Not Be Empty ${vnfLcmOpOccId} + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate ${input} .schema.json + Validate Json ${schema} ${response[0]['body']} + Log Json Schema Validation OK + +Check resource Instantiated + Check VNF Instance ${vnfInstanceId} + Check HTTP Response Status Code Is 200 + Check VNF Status ${response.body.instantiationState} INSTANTIATED + +Check resource not Instantiated + Check VNF Instance ${vnfInstanceId} + Check HTTP Response Status Code Is 200 + Check VNF Status ${response.body.instantiationState} NOT_INSTANTIATED + +Check VNF Instance + [Arguments] ${vnfId} + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${response}= Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfId} + +Check VNF Status + [Arguments] ${current} ${expected} + Should Be Equal As Strings ${current} ${expected} + Log VNF Status in the correct status + +Check resource has a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + String response body instantiationState FAILED_TEMP + +Check HTTP Response Header Contains + [Arguments] ${CONTENT_TYPE} + Should Contain ${response.headers} ${CONTENT_TYPE} + Log Header is present + +POST Create a new vnfInstance + Log Create VNF instance by POST to ${apiRoot}/${apiName}/${apiVersion}/vnf_instances + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + 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}"} + Set Headers {"Authorization":"${AUTHORIZATION}"} + 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}"} + Set Headers {"Authorization":"${AUTHORIZATION}"} + 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}"} + GET ${apiRoot}/${apiName}/${apiVersion}/vnf_instances?fields=wrong_field + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PUT multiple vnfInstances + 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 + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PATCH multiple vnfInstances + Log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +DELETE multiple vnfInstances + 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/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +POST individual vnfInstance + 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 + 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/${vnfInstanceId}/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 Change VNF deployment flavour + 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} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +GET Change VNF deployment flavour + 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 + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PUT Change VNF deployment flavour + 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 + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PATCH Change VNF deployment flavour + Log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +DELETE Change VNF deployment flavour + 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 + ${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 Heal 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 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 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 Operate 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 Operate 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 Operate 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 Operate 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} + +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 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 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/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot index b843ddbd954efca9174056b11f4c44c35cf5ec99..8a3b6cb837efa876ab1d48174e907931d35ee02a 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot @@ -1,5 +1,6 @@ *** Settings *** Resource environment/variables.txt +Resource VnfLcmOperationKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library JSONLibrary Library JSONSchemaLibrary schemas/ @@ -8,69 +9,88 @@ Documentation This resource represents VNF lifecycle management operation occ *** 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... 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: 6.3.5.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 - SOL002 v2.4.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + DELETE VNF LCM OP occurences + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL002/VnfLcmMntOperationKeywords.robot b/SOL002/VnfLcmMntOperationKeywords.robot new file mode 100644 index 0000000000000000000000000000000000000000..ed194366e1221ecb792a934a56617aa62ff41ad1 --- /dev/null +++ b/SOL002/VnfLcmMntOperationKeywords.robot @@ -0,0 +1,1065 @@ +*** Settings *** +Resource environment/configuration.txt +Resource environment/variables.txt +Resource environment/scaleVariables.txt +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} +Library OperatingSystem +Library BuiltIn +Library JSONLibrary +Library Collections +Library JSONSchemaLibrary schemas/ + +*** Keywords *** + +Get Vnf Instance + [Arguments] ${vnfInstanceId} + 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} + ${body}= Output response body + [Return] ${body} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal ${response.status_code} ${expected_status} + Log Status code validated + +Check Operation Occurrence Id + ${vnfLcmOpOccId}= Get Value From Json ${response.headers} $..Location + Should Not Be Empty ${vnfLcmOpOccId} + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate ${input} .schema.json + Validate Json ${schema} ${response[0]['body']} + Log Json Schema Validation OK + +Check resource Instantiated + Check VNF Instance ${vnfInstanceId} + Check HTTP Response Status Code Is 200 + Check VNF Status ${response.body.instantiationState} INSTANTIATED + +Check resource not Instantiated + Check VNF Instance ${vnfInstanceId} + Check HTTP Response Status Code Is 200 + Check VNF Status ${response.body.instantiationState} NOT_INSTANTIATED + +Check VNF Instance + [Arguments] ${vnfId} + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${response}= Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfId} + +Check VNF Status + [Arguments] ${current} ${expected} + Should Be Equal As Strings ${current} ${expected} + Log VNF Status in the correct status + +Check resource has a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + String response body instantiationState FAILED_TEMP + +Get Vnf Scale Info + [Arguments] ${vnfInstanceId} + ${vnfInstance}= Get Vnf Instance ${vnfInstanceId} + ${scaleInfo}= Get Value From Json ${vnfInstance} $..scaleStatus + [Return] ${scaleInfo} + +Get Vnf Flavour Info + [Arguments] ${vnfInstanceId} + ${vnfInstance}= Get Vnf Instance ${vnfInstanceId} + ${flavourInfo}= Get Value From Json ${vnfInstance} $..flavourId + [Return] ${flavourInfo} + +Get Vnf Operational State Info + [Arguments] ${vnfInstanceId} + ${vnfInstance}= Get Vnf Instance ${vnfInstanceId} + ${stateInfo}= Get Value From Json ${vnfInstance} $..vnfState + [Return] ${stateInfo} + +Get Vnf Ext Link Id + [Arguments] ${vnfInstanceId} + ${vnfInstance}= Get Vnf Instance ${vnfInstanceId} + [Return] ${vnfInstance.instantiatedVnfInfo.extVirtualLinkInfo.id} + +Check HTTP Response Header Contains + [Arguments] ${CONTENT_TYPE} + Should Contain ${response.headers} ${CONTENT_TYPE} + Log Header is present + +Send VNF Scale Out Request + 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/scaleVnfOutRequest.json + ${json}= evaluate json.loads('''${body}''') json + ${aspectId}= Set Variable ${json.aspectId} + ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} + +Send VNF Scale To Level Request + [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 + ${json}= evaluate json.loads('''${body}''') json + ${aspectId}= Set Variable ${json.aspectId} + ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${body} + +Send VNF Instance Resource Create Request + Log Create VNF instance by POST to ${apiRoot}/${apiName}/${apiVersion}/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 + ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances ${body} + +Send VNF Instance Resource Delete Request + log Delete an individual VNF instance + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${response}= Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} + +Send Change VNF Flavour Request + 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 + ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body} + +Send Change VNF Operational State Request + 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 + ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate ${body} + +Send Heal VNF Request + 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 + ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal ${body} + +Send Change Ext Connectivity Request + 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 + ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${body} + +Send Terminate VNF Request + 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 + ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate ${body} + +Send Info Modification Request + Log Trying to update information 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/patchBodyRequest.json + ${response}= Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} ${body} + +Send Retry Operation Request + Log Retry a VNF lifecycle operation if that operation has experienced a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + +Send Roll back Operation Request + Log Rollback a VNF lifecycle operation if that operation has experienced a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + +Send Fail Operation Request + Log Fail a VNF lifecycle operation if that operation has experienced a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + +Send Cancel Operation Request + Log Cancel an ongoing VNF lifecycle operation + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${CancelMode} + +Create a new Grant - Synchronous mode + [Arguments] ${vnfInstanceId} ${vnfLcmOpOccId} ${operation} + Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiVersion}/grants + Pass Execution If ${SYNC_MODE} == 0 The Granting process is asynchronous mode. Skipping the test + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/grantRequest.json + ${json_body}= evaluate json.loads('''${body}''') json + Set To Dictionary ${json_body} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} operation=${operation} + ${body}= evaluate json.dumps(${json_body}) json + Post ${apiRoot}/${apiName}/${apiVersion}/grants ${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 grant.schema.json ${result} + Log Validation OK + +Create a new Grant - Asynchronous mode + [Arguments] ${vnfInstanceId} ${vnfLcmOpOccId} ${operation} + Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiVersion}/grants + Pass Execution If ${SYNC_MODE} == 1 The Granting process is synchronous mode. Skipping the test + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + ${body}= Get File jsons/grantRequest.json + ${json_body}= evaluate json.loads('''${body}''') json + Set To Dictionary ${json_body} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} operation=${operation} + ${body}= evaluate json.dumps(${json_body}) json + Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body} + Output response + Integer response status 202 + Log Status code validated + ${headers}= Output response headers + Should Contain ${headers} Location + ${contentType}= Output response headers Content-Type + Should Contain ${contentType} ${CONTENT_TYPE} + 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 + 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} + ${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_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/${vnfInstanceId}/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/${vnfInstanceId}/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/${vnfInstanceId}/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 + 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/${vnfInstanceId}/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/CancelOperationTask.robot b/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot index 2cea9e8703f84fcb502f00e17c5aa99d5b7dfbe8..37615b496826ea5fa06592ade88dcd73c24658ff 100644 --- a/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot @@ -19,7 +19,7 @@ Post Cancel operation task ... Post-Conditions: in response header Location should not be null POST Cancel operation task Check HTTP Response Status Code Is 202 - Check resource FAILED_TEMP + Check resource has a temporary failure Post Cancel operation task Conflict [Documentation] Test ID: 7.3.1.16.2 @@ -111,7 +111,6 @@ Check Fail not supported Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} # how to check if Fail is not supported? - Check resource FAILED_TEMP Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} diff --git a/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot b/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot index a46944dfeda640fa9b05b1e994641b561f4d37fa..3d2e02b70b7c8bef3f4080e237386c4c03b91292 100644 --- a/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot @@ -113,7 +113,3 @@ Check Fail not supported Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} # how to check if Fail is not supported? -Check resource FAILED_TEMP - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - String response body operationState FAILED_TEMP \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot b/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot index 12961688657b0279c4df57efda48ebed1f7b6a66..73ac6077be677ae5b4fe4dcf3fbbc5f4a79755a2 100644 --- a/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot +++ b/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot @@ -1,6 +1,6 @@ *** Settings *** Resource environment/configuration.txt -# Suite setup Expect spec SOL003-VNFLifecycleManagement-API.yaml +# Suite setup Expect spec SOL002-VNFLifecycleManagement-API.yaml Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Resource VnfLcmMntOperationKeywords.robot @@ -18,11 +18,11 @@ Post Individual VNFInstance - Method not implemented ... 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 + ... Reference: section 5.4.3.3.1 - SOL002 v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: - POST vnfInstance + POST individual vnfInstance Check HTTP Response Status Code Is 405 Get Information about an individual VNF Instance @@ -30,7 +30,7 @@ Get Information about an individual VNF Instance ... 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 + ... Reference: section 5.4.3.3.2 - SOL002 v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: @@ -44,7 +44,7 @@ PUT Individual VNFInstance - Method not implemented ... 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 + ... Reference: section 5.4.3.3.3 - SOL002 v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: @@ -56,7 +56,7 @@ PATCH Individual VNFInstance ... 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 + ... Reference: section 5.4.3.3.4 - SOL002 v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: @@ -69,7 +69,7 @@ PATCH Individual VNFInstance Precondition failed ... 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 + ... Reference: section 5.4.3.3.4 - SOL002 v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: @@ -82,7 +82,7 @@ PATCH Individual VNFInstance Conflict ... 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 + ... Reference: section 5.4.3.3.4 - SOL002 v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: @@ -96,7 +96,7 @@ DELETE Individual VNFInstance ... 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 + ... Reference: section 5.4.3.3.5 - SOL002 v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: @@ -108,7 +108,7 @@ DELETE Individual VNFInstance Conflict ... 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 + ... Reference: section 5.4.3.3.5 - SOL002 v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: diff --git a/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot b/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot index d1f7d1afaf472b59b006004cf42d2c29ee9131cf..4b504e38f6c8331e82531aa71d37a6cf07b6e242 100644 --- a/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot @@ -7,7 +7,6 @@ Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ Resource VnfLcmMntOperationKeywords.robot -Suite Setup Check resource existance *** Test Cases *** diff --git a/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot b/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot index 88cda66d959b373440af588d87ffa1d7f7a1e70f..f08be584595ca292d3cec188b19f96890b29271f 100644 --- a/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot @@ -24,7 +24,6 @@ POST Operate a vnfInstance Check Operation Occurrence Id 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] 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. @@ -39,7 +38,6 @@ POST Operate a vnfInstance Conflict (Not-Instantiated) POST Operate a vnfInstance Not Found - # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent [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 diff --git a/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot b/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot index a4aa7a8d0460575727b6800775791c0abd00a0c9..c49d5c1b40ccb88cc462fcc30f3b813fd301e8e3 100644 --- a/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot @@ -117,7 +117,3 @@ Check retry not supported Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} # how to check if retry is not supported? -Check resource FAILED_TEMP - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - String response body operationState FAILED_TEMP \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot b/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot index 86605dc875217b0e77dce5b13232c79aa5e4b0f8..404a34a5c455da23a897278a56394a0e4e6eafe2 100644 --- a/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot @@ -116,7 +116,3 @@ Check Rollback not supported Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} # how to check if Rollback is not supported? -Check resource FAILED_TEMP - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - String response body operationState FAILED_TEMP \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot b/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot index fd63e70858fab045371e4516bee3cab409bc6acf..85547b88d21f1e3c17c66469b2a7ec456e44f5a9 100644 --- a/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot +++ b/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot @@ -39,7 +39,7 @@ POST Scale a vnfInstance to level Conflict (Not-Instantiated) Scale a vnfInstance Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent [Documentation] Test ID: 7.3.1.5.3 - ... Test title: POST Scale a vnfInstance to level + ... Test title: Scale a vnfInstance Not Found ... 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 diff --git a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot index 5c39cc48f86bda2947606f5e9bce9172751de8b6..1b1adcee7187c3b335f3108b7c70665ac23f67e7 100644 --- a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +++ b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot @@ -2,6 +2,7 @@ Resource environment/configuration.txt Resource environment/variables.txt Resource environment/scaleVariables.txt +Library MockServerLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem Library BuiltIn @@ -57,6 +58,11 @@ Check VNF Status Should Be Equal As Strings ${current} ${expected} Log VNF Status in the correct status +Check resource has a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + String response body instantiationState FAILED_TEMP + Get Vnf Scale Info [Arguments] ${vnfInstanceId} ${vnfInstance}= Get Vnf Instance ${vnfInstanceId} @@ -314,28 +320,28 @@ POST Change VNF deployment flavour Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body} ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} -GET Change External VNF Connectivity +GET Change VNF deployment flavour 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 ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} -PUT Change External VNF Connectivity +PUT Change VNF deployment flavour 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 ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} -PATCH Change External VNF Connectivity +PATCH Change VNF deployment flavour Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} -DELETE Change External VNF Connectivity +DELETE Change VNF deployment flavour 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 @@ -409,7 +415,7 @@ DELETE VNFInstances - Method not implemented Log Validate Status code Integer response status 405 -POST vnfInstances +POST individual vnfInstance log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} @@ -611,7 +617,7 @@ DELETE Terminate VNF ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} -POST Terminate VNF +POST Heal VNF Log Trying to heal a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} @@ -659,28 +665,28 @@ POST Operate VNF ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} -GET Heal VNF +GET Operate 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 +PUT Operate 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 +PATCH Operate 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 +DELETE Operate 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