From 90004c2b5b66db4daa6c9c97365babc4b18ae59c Mon Sep 17 00:00:00 2001 From: aureliano sinatra Date: Thu, 18 Jul 2019 16:52:51 +0200 Subject: [PATCH] refactoring completed SOL5 + documentation SOL3... missing workflow --- .../CancelOperationTask.robot | 17 +- .../ChangeExternalVNFConnectivityTask.robot | 10 +- .../FailOperationTask.robot | 132 ++++--- .../IndividualSubscription.robot | 90 +++-- .../IndividualVnfLcmOperationOccurence.robot | 105 ++--- .../NotificationEndpoint.robot | 132 ++++--- .../OperateVNFTask.robot | 2 + .../RetryOperationTask.robot | 133 ++++--- .../RollbackOperationTask.robot | 135 ++++--- .../Subscriptions.robot | 198 +++++----- .../VnfLcmMntOperationKeywords.robot | 372 +++++++++++++++++- .../VnfLcmOperationOccurences.robot | 142 ++++--- .../CancelOperationTask.robot | 14 +- .../ContinueOperationTask.robot | 14 +- .../FailOperationTask.robot | 11 +- .../HealNSTask.robot | 9 +- .../IndividualNSInstance.robot | 3 +- .../InstantiateNSTask.robot | 6 +- .../NSLCMOperationKeywords.robot | 6 + .../RetryOperationTask.robot | 10 +- .../RollbackOperationTask.robot | 11 +- .../ScaleNSTask.robot | 7 +- .../Subscriptions.robot | 6 +- .../TerminateNSTask.robot | 8 +- .../UpdateNSTask.robot | 3 +- 25 files changed, 1023 insertions(+), 553 deletions(-) diff --git a/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot b/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot index 8c6e12d8..f35468e6 100644 --- a/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot @@ -38,16 +38,17 @@ Post Cancel operation task Conflict Post Cancel operation task Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent - [Documentation] Not Found - ... Error: The API producer did not find a current representation for the target resource or is not willing to disclose that one exists. - ... Specifically in case of this task resource, the response code 404 shall also be returned - ... if the task is not supported for the VNF LCM operation occurrence represented by the parent resource, - ... which means that the task resource consequently does not exist. - ... In this case, the response body shall be present, and shall contain a ProblemDetails structure, in which the �detail� attribute shall convey more information about the error. + [Documentation] Test ID: 7.3.1.16.2 + ... Test title: POST Cancel operation task + ... Test objective: The objective is to test that POST method cannot cancel a VNF lifecycle operation because the operation is not supported + ... Pre-conditions: + ... Reference: section 5.4.17.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: in response header Location should not be null [Setup] Check Fail not supported POST Cancel operation task - Check HTTP Response Status Code Is 409 - Check HTTP Response Body Json Schema Is ProblemDetails + Check HTTP Response Status Code Is 404 GET Cancel operation task - Method not implemented [Documentation] Test ID: 7.3.1.16.3 ... Test title: GET Cancel operation task - Method not implemented diff --git a/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot b/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot index 3d77e4f6..1bd859ea 100644 --- a/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot +++ b/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot @@ -10,7 +10,7 @@ Suite Setup Check resource existance *** Test Cases *** POST Change external VNF connectivity - [Documentation] Test ID: 7.3.1.14.1 + [Documentation] Test ID: 7.3.1.10.1 ... Test title: POST Change external VNF connectivity ... Test objective: The objective is to test that POST method trigger a change in VNF external connectivity ... Pre-conditions: none @@ -23,7 +23,7 @@ POST Change external VNF connectivity Check Operation Occurrence Id GET Change external VNF connectivity - Method not implemented - [Documentation] Test ID: 7.3.1.14.2 + [Documentation] Test ID: 7.3.1.10.2 ... Test title: GET Change external VNF connectivity - Method not implemented ... Test objective: The objective is to test that GET method is not implemented ... Pre-conditions: none @@ -35,7 +35,7 @@ GET Change external VNF connectivity - Method not implemented Check HTTP Response Status Code Is 405 PUT Change external VNF connectivity - Method not implemented - [Documentation] Test ID: 7.3.1.14.3 + [Documentation] Test ID: 7.3.1.10.3 ... Test title: PUT Change external VNF connectivity - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none @@ -47,7 +47,7 @@ PUT Change external VNF connectivity - Method not implemented Check HTTP Response Status Code Is 405 PATCH Change external VNF connectivity - Method not implemented - [Documentation] Test ID: 7.3.1.14.4 + [Documentation] Test ID: 7.3.1.10.4 ... Test title: PATCH Change external VNF connectivity - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none @@ -59,7 +59,7 @@ PATCH Change external VNF connectivity - Method not implemented Check HTTP Response Status Code Is 405 DELETE Change external VNF connectivity - Method not implemented - [Documentation] Test ID: 7.3.1.14.5 + [Documentation] Test ID: 7.3.1.10.5 ... Test title: DELETE Change external VNF connectivity - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none diff --git a/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot b/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot index d008d1d3..3c32ba2b 100644 --- a/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot @@ -5,6 +5,7 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library DependencyLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ +Resource VnfLcmMntOperationKeywords.robot Documentation This task resource represents the "Fail operation" operation. ... The client can use this resource to mark a VNF lifecycle management operation occurrence as "finally failed", ... i.e. change the state of the related VNF LCM operation occurrence resource to "FAILED", if it is not assumed that a subsequent retry or rollback will succeed. @@ -13,80 +14,95 @@ Suite Setup Check resource existance *** Test Cases *** Post Fail operation task - [Documentation] The POST method marks a VNF lifecycle management operation occurrence as "finally failed" if that operation occurrence is in "FAILED_TEMP" state. - Log Final fail a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Log Execute Query and validate response - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail - Output response - Log Validate Status code - Integer response status 200 - Log Validation OK + [Documentation] Test ID: 7.3.1.15.1 + ... Test title: Post Fail operation task + ... Test objective: The objective is to test that POST method mark as "finally failed" a VNF lifecycle operation if that operation has experienced a temporary failure + ... Pre-conditions: the related "VNF LCM operation occurrence" resource is in "FAILED_TEMP" state. + ... Reference: section 5.4.16.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Depends on test Check resource FAILED_TEMP + Post Fail operation + Check HTTP Response Status Code Is 202 + Check Operation Occurrence Id Post Fail operation task Conflict (Not-FAILED_TEMP) # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state - [Documentation] Conflict. - ... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. - ... Typically, this is due to the fact that the VNF instance resource is not in FAILED_TEMP state, - ... or another error handling action is starting, such as retry or rollback. - ... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error. + [Documentation] Test ID: 7.3.1.15.2 + ... Test title: Post Fail operation task + ... Test objective: The objective is to test that POST method cannot mark as "finally failed" a VNF lifecycle operation if that operation has experienced a temporary failure + ... Pre-conditions: the related "VNF LCM operation occurrence" resource is not in "FAILED_TEMP" state. + ... Reference: section 5.4.16.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none Depends on test failure Check resource FAILED_TEMP - Log Final Fail an operation - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail - Integer response status 409 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK - - + Post Fail operation + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails Post Fail operation task Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent - [Documentation] Not Found - ... Error: The API producer did not find a current representation for the target resource or is not willing to disclose that one exists. - ... Specifically in case of this task resource, the response code 404 shall also be returned - ... if the task is not supported for the VNF LCM operation occurrence represented by the parent resource, - ... which means that the task resource consequently does not exist. - ... In this case, the response body shall be present, and shall contain a ProblemDetails structure, in which the �detail� attribute shall convey more information about the error. + [Documentation] Test ID: 7.3.1.15.3 + ... Test title: Post Fail operation task + ... Test objective: The objective is to test that POST method cannot mark as "finally failed" a VNF lifecycle operation because the operation is not supported + ... Pre-conditions: + ... Reference: section 5.4.16.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none [Setup] Check Fail not supported - log Final fail an operation - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail - Log Validate Status code - Integer response status 409 - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + Post Fail operation + Check HTTP Response Status Code Is 404 GET Fail operation task - Method not implemented - log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.15.4 + ... Test title: GET Fail operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.16.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Get Fail operation + Check HTTP Response Status Code Is 405 PUT Fail operation task - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.15.5 + ... Test title: PUT Fail operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.16.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Put Fail operation + Check HTTP Response Status Code Is 405 PATCH Fail operation task - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.15.6 + ... Test title: GET Fail operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.16.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Patch Fail operation + Check HTTP Response Status Code Is 405 DELETE Fail operation task - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.15.7 + ... Test title: DELETE Fail operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.16.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Delete Fail operation + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL003/VNFLifecycleManagement-API/IndividualSubscription.robot b/SOL003/VNFLifecycleManagement-API/IndividualSubscription.robot index 0273b05b..d38ba6d7 100644 --- a/SOL003/VNFLifecycleManagement-API/IndividualSubscription.robot +++ b/SOL003/VNFLifecycleManagement-API/IndividualSubscription.robot @@ -4,56 +4,72 @@ Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library JSONLibrary Library JSONSchemaLibrary schemas/ +Resource VnfLcmMntOperationKeywords.robot Documentation This resource represents an individual subscription. The client can use this resource to read and to terminate a ... subscription to notifications related to VNF lifecycle management Suite Setup Check resource existance *** Test Cases *** Post Individual Subscription - Method not implemented - log Trying to perform a POST. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.18.1 + ... Test title: Post Individual Subscription - Method not implemented + ... Test objective: The objective is to test that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.19.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Post Create Individual subscription + Check HTTP Response Status Code Is 405 -Get Information about an individual subscription - log Trying to get information about an individual subscription - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Log Validate Status code - Integer response status 200 - ${result}= Output response body - Validate Json Subscription.schema.json ${result} - Log Validation OK +GET Individual Subscription + [Documentation] Test ID: 7.3.1.18.2 + ... Test title: GET Individual Subscription + ... Test objective: The objective is Get the an individual subscription + ... Pre-conditions: none + ... Reference: section 5.4.19.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get Individual Subscription + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is Subscription PUT an individual subscription - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.18.3 + ... Test title: PUT Individual Subscription - Method not implemented + ... Test objective: The objective is to test that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.19.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Put Individual subscription + Check HTTP Response Status Code Is 405 PATCH an individual subscription - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.18.4 + ... Test title: PATCH Individual Subscription - Method not implemented + ... Test objective: The objective is to test that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.19.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Patch Individual subscription + Check HTTP Response Status Code Is 405 DELETE an individual subscription - log Try to delete an individual subscription - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Log Validate Status code - Integer response status 204 + [Documentation] Test ID: 7.3.1.18.5 + ... Test title: DELETE Individual Subscription - Method not implemented + ... Test objective: The objective is to test that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.19.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Delete Individual subscription + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot b/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot index 55a084d8..d0e79a45 100644 --- a/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot +++ b/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot @@ -4,57 +4,66 @@ Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library JSONLibrary Library JSONSchemaLibrary schemas/ -Documentation This resource represents a VNF lifecycle management operation occurrence. The client can use this resource to read -... status information about an individual VNF lifecycle management operation occurrence. Further, the client can use task -... resources which are children of this resource to request cancellation of an operation in progress, and to request the -... handling of operation errors via retrying the operation, rolling back the operation, or permanently failing the operation +Resource VnfLcmMntOperationKeywords.robot *** Test Cases *** Post Individual VNF LCM OP occurences - Method not implemented - log Trying to perform a POST. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - Log Validate Status code - Integer response status 405 - -Get stauts information about multiple VNF instances - [Documentation] Get Operation Status - ... The client can use this method to retrieve status information about a VNF lifecycle management operation occurrence - ... by reading an individual �VNF LCM operation occurrence� resource. - Log Query status information about multiple VNF lifecycle management operation occurrences. - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - Log Validate Status code - Integer response status 200 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE} - ${result}= Output response body - Validate Json VnfLcmOpOcc.schema.json ${result} - Log Validation OK + [Documentation] Test ID: 7.3.1.12.1 + ... Test title: Post Individual VNF LCM OP occurences - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.13.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Post Individual VNF LCM OP occurences + Check HTTP Response Status Code Is 405 + +Get status information about multiple VNF instances + [Documentation] Test ID: 7.3.1.12.2 + ... Test title: Get status information about multiple VNF instances + ... Test objective: The objective is to test that this method retrieve status information about a VNF lifecycle management operation occurrence + ... Pre-conditions: none + ... Reference: section 5.4.13.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get multiple VNF instances + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is VnfLcmOpOcc -PUT stauts information about multiple VNF instances - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - Log Validate Status code - Integer response status 405 +PUT status information about multiple VNF instances - Method not implemented + [Documentation] Test ID: 7.3.1.12.3 + ... Test title: Put Individual VNF LCM OP occurences - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.13.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Put multiple VNF instances + Check HTTP Response Status Code Is 405 -PATCH stauts information about multiple VNF instances - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - Log Validate Status code - Integer response status 405 +PATCH status information about multiple VNF instances - Method not implemented + [Documentation] Test ID: 7.3.1.12.4 + ... Test title: Patch Individual VNF LCM OP occurences - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.13.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Patch multiple VNF instances + Check HTTP Response Status Code Is 405 -DELETE stauts information about multiple VNF instances - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - Log Validate Status code - Integer response status 405 \ No newline at end of file +DELETE status information about multiple VNF instances - Method not implemented + [Documentation] Test ID: 7.3.1.12.5 + ... Test title: Delete Individual VNF LCM OP occurences - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.13.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Delete multiple VNF instances + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/NotificationEndpoint.robot b/SOL003/VNFLifecycleManagement-API/NotificationEndpoint.robot index 05e513a3..94a9f753 100644 --- a/SOL003/VNFLifecycleManagement-API/NotificationEndpoint.robot +++ b/SOL003/VNFLifecycleManagement-API/NotificationEndpoint.robot @@ -3,6 +3,7 @@ Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true Resource environment/configuration.txt Resource environment/variables.txt +Resource VnfLcmMntOperationKeywords.robot Library MockServerLibrary Library Process Library OperatingSystem @@ -13,77 +14,86 @@ ${sleep_interval} 20s *** Test Cases *** Deliver a notification - Operation Occurence - log The POST method delivers a notification from the server to the client. - ${json}= Get File schemas/vnfLcmOperationOccurrenceNotification.schema.json - ${BODY}= evaluate json.loads('''${json}''') json - Log Creating mock request and response to handle vnfLcmOperationOccurrenceNotification - &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY} - &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${req} ${rsp} - Sleep ${sleep_interval} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} + [Documentation] Test ID: 7.3.1.19.1 + ... Test title: POST Deliver a notification - Operation Occurence + ... Test objective: The objective is to test that POST method trigger a notification about lifecycle changes triggered by a VNF LCM +operation occurrence + ... Pre-conditions: none + ... Reference: section 5.4.20.3.1 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + POST Operation occurrence Deliver a notification - Id Creation - log The POST method delivers a notification from the server to the client. - ${json}= Get File schemas/vnfIdentifierCreationNotification.schema.json - ${BODY}= evaluate json.loads('''${json}''') json - Log Creating mock request and response to handle vnfLcmOperationOccurrenceNotification - &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY} - &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${req} ${rsp} - Sleep ${sleep_interval} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} + [Documentation] Test ID: 7.3.1.19.2 + ... Test title: Deliver a notification - Id Creation + ... Test objective: The objective is to test that POST method trigger a notification about the creation of a VNF identifier and the related to a VNF instance resource. + ... Pre-conditions: none + ... Reference: section 5.4.20.3.1 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + POST Id creation Deliver a notification - Id deletion - log The POST method delivers a notification from the server to the client. - ${json}= Get File schemas/vnfIdentifierCreationNotification.schema.json - ${BODY}= evaluate json.loads('''${json}''') json - Log Creating mock request and response to handle vnfLcmOperationOccurrenceNotification - &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY} - &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${req} ${rsp} - Sleep ${sleep_interval} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} + [Documentation] Test ID: 7.3.1.19.3 + ... Test title: Deliver a notification - Id deletion + ... Test objective: The objective is to test that POST method trigger A notification about the deletion of a VNF identifier and the related to a VNF instance resource + ... Pre-conditions: none + ... Reference: section 5.4.20.3.1 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + POST Id deletion -Test a notification end point - log The GET method allows the server to test the notification endpoint - &{req}= Create Mock Request Matcher GET ${callback_endpoint} - &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${req} ${rsp} - Sleep ${sleep_interval} - Verify Mock Expectation ${req} - Clear Requests ${callback_endpoint} +GET Test a notification end point + [Documentation] Test ID: 7.3.1.19.4 + ... Test title: GET Test a notification end point + ... Test objective: The objective is to test that GET method allows the server to test the notification endpoint that is provided by the client + ... Pre-conditions: none + ... Reference: section 5.4.20.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET test endpoint PUT notification - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Put ${callback_endpoint} - Log Validate Status code - Output response - Integer response status 405 + [Documentation] Test ID: 7.3.1.19.5 + ... Test title: PUT Individual Subscription - Method not implemented + ... Test objective: The objective is to test that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.20.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Put notification subscription + Check HTTP Response Status Code Is 405 PATCH subscriptions - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Patch ${callback_endpoint} - Log Validate Status code - Output response - Integer response status 405 - -DELETE subscriptions - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Delete ${callback_endpoint} - Log Validate Status code - Output response - Integer response status 405 + [Documentation] Test ID: 7.3.1.19.6 + ... Test title: PATCH Individual Subscription - Method not implemented + ... Test objective: The objective is to test that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.20.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Patch notification subscription + Check HTTP Response Status Code Is 405 +DELETE subscriptions - Method not implemented + [Documentation] Test ID: 7.3.1.19.7 + ... Test title: DELETE Individual Subscription - Method not implemented + ... Test objective: The objective is to test that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.20.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Delete notification subscription + Check HTTP Response Status Code Is 405 + *** Keywords *** Create Sessions Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance diff --git a/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot b/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot index 111f24e2..c457baba 100644 --- a/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot @@ -5,6 +5,8 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Resource VnfLcmMntOperationKeywords.robot + Suite Setup Check resource existance *** Test Cases *** diff --git a/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot b/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot index 20ea983a..78db6617 100644 --- a/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot @@ -5,88 +5,103 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library DependencyLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ +Resource VnfLcmMntOperationKeywords.robot + Documentation This task resource represents the "Retry operation" operation. The client can use this resource to initiate retrying a VNF lifecycle operation. Suite Setup Check resource existance *** Test Cases *** Post Retry operation task - [Documentation] The POST method initiates retrying a VNF lifecycle operation if that operation has experienced a temporary failure, - ... i.e. the related "VNF LCM operation occurrence" resource is in "FAILED_TEMP" state. + [Documentation] Test ID: 7.3.1.13.1 + ... Test title: Post Retry operation task + ... Test objective: The objective is to test that POST method The POST method initiates retrying a VNF lifecycle operation if that operation has experienced a temporary failure + ... Pre-conditions: the related "VNF LCM operation occurrence" resource is in "FAILED_TEMP" state. + ... Reference: section 5.4.14.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none Depends on test Check resource FAILED_TEMP - Log Retry a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Log Execute Query and validate response - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry - Log Validate Status code - Integer response status 202 - ${headers}= Output response headers - Should Contain ${headers} Location - Log Validation OK + Post Retry operation + Check HTTP Response Status Code Is 202 + Check Operation Occurrence Id Post Retry operation task Conflict (Not-FAILED_TEMP) # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state - [Documentation] Conflict. - ... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. - ... Typically, this is due to the fact that the VNF instance resource is not in FAILED_TEMP state, - ... or another error handling action is starting, such as rollback or fail. - ... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error. + [Documentation] Test ID: 7.3.1.13.2 + ... Test title: Post Retry operation task + ... Test objective: The objective is to test that the retry operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. (i.e. the VNF instance resource is not in FAILED_TEMP state) + ... Pre-conditions: the related "VNF LCM operation occurrence" resource is not in "FAILED_TEMP" state. + ... Reference: section 5.4.14.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none Depends on test failure Check resource FAILED_TEMP - Log Retry an operation - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry - Output response - Integer response status 409 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + Post Retry operation + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails Post Retry operation task Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent - [Documentation] Not Found - ... Error: The API producer did not find a current representation for the target resource or is not willing to disclose that one exists. - ... Specifically in case of this task resource, the response code 404 shall also be returned - ... if the task is not supported for the VNF LCM operation occurrence represented by the parent resource, - ... which means that the task resource consequently does not exist. - ... In this case, the response body shall be present, and shall contain a ProblemDetails structure, in which the �detail� attribute shall convey more information about the error. + [Documentation] Test ID: 7.3.1.13.3 + ... Test title: Post Retry operation task + ... Test objective: The objective is to test that the retry operation cannot be executed because the operation is not supported + ... Pre-conditions: + ... Reference: section 5.4.14.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none [Setup] Check retry not supported - log Retry an operation - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry - Log Validate Status code - Integer response status 409 - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + Post Retry operation + Check HTTP Response Status Code Is 404 GET Retry operation task - Method not implemented - log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.13.4 + ... Test title: GET Retry operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.9.14.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Get Retry operation + Check HTTP Response Status Code Is 405 PUT Retry operation task - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.13.5 + ... Test title: PUT Retry operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.9.14.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Put Retry operation + Check HTTP Response Status Code Is 405 PATCH Retry operation task - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.13.6 + ... Test title: PATCH Retry operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.9.14.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Patch Retry operation + Check HTTP Response Status Code Is 405 DELETE Retry operation task - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.13.7 + ... Test title: DELETE Retry operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.9.14.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Delete Retry operation + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot b/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot index bfd7e64d..1340d482 100644 --- a/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot @@ -5,89 +5,102 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library DependencyLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ +Resource VnfLcmMntOperationKeywords.robot Documentation This task resource represents the "Rollback operation" operation. The client can use this resource to initiate rolling back a VNF lifecycle operation Suite Setup Check resource existance *** Test Cases *** Post Rollback operation task - [Documentation] The POST method initiates rolling back a VNF lifecycle operation if that operation has experienced a temporary failure, - ... i.e. the related �VNF LCM operation occurrence� resource is in �FAILED_TEMP� state. + [Documentation] Test ID: 7.3.1.14.1 + ... Test title: Post Rollback operation task + ... Test objective: The objective is to test that POST method The POST method initiates rollback a VNF lifecycle operation if that operation has experienced a temporary failure + ... Pre-conditions: the related "VNF LCM operation occurrence" resource is in "FAILED_TEMP" state. + ... Reference: section 5.4.15.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none Depends on test Check resource FAILED_TEMP - Log Rollback a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Log Execute Query and validate response - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback - Log Validate Status code - Integer response status 202 - ${headers}= Output response headers - Should Contain ${headers} Location - Log Validation OK + Post Rollback operation + Check HTTP Response Status Code Is 202 + Check Operation Occurrence Id Post Rollback operation task Conflict (Not-FAILED_TEMP) # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state - [Documentation] Conflict. - ... The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. - ... Typically, this is due to the fact that the VNF instance resource is not in FAILED_TEMP state, - ... or another error handling action is starting, such as retry or fail. - ... The response body shall contain a ProblemDetails structure, in which the �detail� attribute should convey more information about the error. + [Documentation] Test ID: 7.3.1.14.2 + ... Test title: Post Rollback operation task + ... Test objective: The objective is to test that POST method The POST method initiates rollback a VNF lifecycle operation if that operation has experienced a temporary failure + ... Pre-conditions: the related "VNF LCM operation occurrence" resource is not in "FAILED_TEMP" state. + ... Reference: section 5.4.15.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none Depends on test failure Check resource FAILED_TEMP - Log Rollback an operation - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback - Integer response status 409 - Log Status code validated - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK - + Post Rollback operation + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails Post Rollback operation task Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent - [Documentation] Not Found - ... Error: The API producer did not find a current representation for the target resource or is not willing to disclose that one exists. - ... Specifically in case of this task resource, the response code 404 shall also be returned - ... if the task is not supported for the VNF LCM operation occurrence represented by the parent resource, - ... which means that the task resource consequently does not exist. - ... In this case, the response body shall be present, and shall contain a ProblemDetails structure, in which the �detail� attribute shall convey more information about the error. + [Documentation] Test ID: 7.3.1.14.3 + ... Test title: Post Rollback operation task + ... Test objective: The objective is to test that the retry operation cannot be executed because the operation is not supported + ... Pre-conditions: + ... Reference: section 5.4.15.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none [Setup] Check Rollback not supported - log Rollback an operation - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback - Log Validate Status code - Output response - Integer response status 409 - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + Post Rollback operation + Check HTTP Response Status Code Is 404 GET Rollback operation task - Method not implemented - log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback - Log Validate Status code - Integer response status 405 - + [Documentation] Test ID: 7.3.1.14.4 + ... Test title: GET Retry operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.15.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Get Rollback operation + Check HTTP Response Status Code Is 405 + PUT Rollback operation task - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.14.5 + ... Test title: PUT Retry operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.15.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Put Rollback operation + Check HTTP Response Status Code Is 405 PATCH Rollback operation task - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.14.6 + ... Test title: PATCH Retry operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.15.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Patch Rollback operation + Check HTTP Response Status Code Is 405 DELETE Rollback operation task - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.14.7 + ... Test title: DELETE Retry operation task- Method not implemented + ... Test objective: The objective is to verify that the method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.15.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: + Delete Rollback operation + Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existance diff --git a/SOL003/VNFLifecycleManagement-API/Subscriptions.robot b/SOL003/VNFLifecycleManagement-API/Subscriptions.robot index 87caa20c..ded88b62 100644 --- a/SOL003/VNFLifecycleManagement-API/Subscriptions.robot +++ b/SOL003/VNFLifecycleManagement-API/Subscriptions.robot @@ -5,115 +5,123 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Resource VnfLcmMntOperationKeywords.robot -*** Test Cases *** -Create a new subscription - Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiVersion}/subscriptions - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/lccnSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - Integer response status 201 - Log Status code validated - ${headers}= Output response headers - Should Contain ${headers} Location - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE} - ${result}= Output response body - Validate Json Subscription.schema.json ${result} - Log Validation OK +*** Test Cases *** +POST Create a new subscription + [Documentation] Test ID: 7.3.1.17.1 + ... Test title: POST Create a new subscription + ... Test objective: The POST method creates a new subscription + ... Pre-conditions: none + ... Reference: section 5.4.18.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: in response header Location should not be null + ... POST Cancel operation task + Post Create subscription + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is Subscription Create a new Subscription - DUPLICATION - Log Trying to create a subscription with an already created content - Pass Execution If ${VNFM_DUPLICATION} == 0 VNFM is not permitting duplication. Skipping the test - Set Headers {"Accept": "${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/lccnSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - Integer response status 201 - Log Status code validated - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE} - ${result}= Output response body - Validate Json Subscription.schema.json ${result} - Log Validation OK + [Documentation] Test ID: 7.3.1.17.2 + ... Test title: POST Create a new subscription - DUPLICATION + ... Test objective: The POST method creates a new subscription even if an existing subscription to same content exist + ... Pre-conditions: none + ... Reference: section 5.4.18.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: in response header Location should not be null + ... POST Cancel operation task + Post Create subscription - DUPLICATION + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is Subscription Create a new Subscription - NO-DUPLICATION - Log Trying to create a subscription with an already created content - Pass Execution If ${VNFM_DUPLICATION} == 1 VNFM permits duplication. Skipping the test - Set Headers {"Accept": "${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/lccnSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - Integer response status 303 - Log Status code validated - ${headers}= Output response headers - Should Contain ${headers} Location - Log Validation OK - + [Documentation] Test ID: 7.3.1.17.3 + ... Test title: POST Create a new subscription - NO-DUPLICATION + ... Test objective: The POST method creates a new subscription even if an existing subscription to same content exist + ... Pre-conditions: none + ... Reference: section 5.4.18.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: in response header Location should not be null + ... POST Cancel operation task + Post Create subscription - NO-DUPLICATION + Check HTTP Response Status Code Is 303 + Check Operation Occurrence Id + GET Subscriptions - Log Get the list of active subscriptions - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions - Log Validate Status code - Integer response status 200 - ${result}= Output response body - Validate Json Subscriptions.schema.json ${result} - Log Validation OK + [Documentation] Test ID: 7.3.1.17.4 + ... Test title: GET Subscriptions + ... Test objective: The objective is Get the list of active subscriptions + ... Pre-conditions: none + ... Reference: section 5.4.18.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get subscriptions + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is Subscriptions GET Subscription - Filter - Log Get the list of active subscriptions using a filter - Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter} - Integer response status 200 - Log Received a 200 OK as expected - ${result}= Output response body - Validate Json Subscriptions.schema.json ${result} - Log Validation OK + [Documentation] Test ID: 7.3.1.17.5 + ... Test title: GET Subscriptions - Filter + ... Test objective: The objective is Get the list of active subscriptions using a filter + ... Pre-conditions: none + ... Reference: section 5.4.18.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get subscriptions - filter + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is Subscriptions GET subscriptions - Bad Request Invalid attribute-based filtering parameters - Log Get the list of active subscriptions using an invalid filter - Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter_invalid} - Integer response status 400 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE} - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK + [Documentation] Test ID: 7.3.1.17.6 + ... Test title: GET Subscriptions - Filter + ... Test objective: The objective is Get the list of active subscriptions using a filter + ... Pre-conditions: none + ... Reference: section 5.4.18.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get subscriptions - invalid filter + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails PUT subscriptions - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.17.7 + ... Test title: PUT subscriptions - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.18.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT subscriptions + Check HTTP Response Status Code Is 405 PATCH subscriptions - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.17.8 + ... Test title: PATCH subscriptions - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.18.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH subscriptions + Check HTTP Response Status Code Is 405 DELETE subscriptions - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.17.9 + ... Test title: DELETE subscriptions - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.18.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE subscriptions + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot index c4e885ed..290bf517 100644 --- a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +++ b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot @@ -689,4 +689,374 @@ DELETE Heal VNF ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} - +Post VNF LCM OP occurences + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +GET VNF LCM OP occurences + Log Query status information about multiple VNF lifecycle management operation occurrences. + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +GET VNF LCM OP occurences invalid attribute + Log Query status information about multiple VNF lifecycle management operation occurrences. + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs?attribute_not_exist=some_value + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +GET VNF LCM OP occurences invalid filter + Log Query status information about multiple VNF lifecycle management operation occurrences. + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs?fields=wrong_field + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +PUT VNF LCM OP occurences + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +PATCH VNF LCM OP occurences + log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +DELETE VNF LCM OP occurences + log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Post Individual VNF LCM OP occurences + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Get multiple VNF instances + Log Query status information about multiple VNF lifecycle management operation occurrences. + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Put multiple VNF instances + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Patch multiple VNF instances + log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Delete multiple VNF instances + log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Post Retry operation + Log Retry a VNF lifecycle operation if that operation has experienced a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Get Retry operation + Log Trying to perform a GET. This method should not be implemented. + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Put Retry operation + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Patch Retry operation + log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Delete Retry operation + log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Post Rollback operation + Log Rollback a VNF lifecycle operation if that operation has experienced a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Get Rollback operation + Log Trying to perform a GET. This method should not be implemented. + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Put Rollback operation + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Patch Rollback operation + log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Delete Rollback operation + log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Post Fail operation + Log mark as Failed a VNF lifecycle operation if that operation has experienced a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Get Fail operation + Log Trying to perform a GET. This method should not be implemented. + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Put Fail operation + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Patch Fail operation + log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Delete Fail operation + log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Post Create subscription + Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${body}= Get File jsons/lccnSubscriptionRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Post Create subscription - DUPLICATION + Log Trying to create a subscription with an already created content + Pass Execution If ${VNFM_DUPLICATION} == 0 VNFM is not permitting duplication. Skipping the test + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + ${body}= Get File jsons/lccnSubscriptionRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Post Create subscription - NO-DUPLICATION + Log Trying to create a subscription with an already created content + Pass Execution If ${VNFM_DUPLICATION} == 1 VNFM permits duplication. Skipping the test + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + ${body}= Get File jsons/lccnSubscriptionRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Get subscriptions + Log Get the list of active subscriptions + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Get subscriptions - filter + Log Get the list of active subscriptions using a filter + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Get subscriptions - invalid filter + Log Get the list of active subscriptions using an invalid filter + Set Headers {"Accept": "${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter_invalid} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +PUT subscriptions + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +PATCH subscriptions + log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +DELETE subscriptions + log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Post Create Individual subscription + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Get Individual subscription + log Trying to get information about an individual subscription + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Put Individual subscription + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Patch Individual subscription + log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Delete Individual subscription + log Try to delete an individual subscription + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Put Notification subscription + log Trying to perform a PUT. This method should not be implemented + Put ${callback_endpoint} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Patch Notification subscription + log Trying to perform a PATCH. This method should not be implemented + Patch ${callback_endpoint} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +Delete Notification subscription + log Trying to perform a DELETE. This method should not be implemented + Delete ${callback_endpoint} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +POST Operation occurrence + log The POST method delivers a notification from the server to the client. + ${json}= Get File schemas/NsLcmOperationOccurrenceNotification.schema.json + ${BODY}= evaluate json.loads('''${json}''') json + Log Creating mock request and response to handle NSLcmOperationOccurrenceNotification + &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY} + &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 + Create Mock Expectation ${req} ${rsp} + Sleep ${sleep_interval} + Log Verifying results + Verify Mock Expectation ${req} + Log Cleaning the endpoint + Clear Requests ${callback_endpoint} +POST Id creation + log The POST method delivers a notification from the server to the client. + ${json}= Get File schemas/vnfIdentifierCreationNotification.schema.json + ${BODY}= evaluate json.loads('''${json}''') json + Log Creating mock request and response to handle vnfLcmOperationOccurrenceNotification + &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY} + &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 + Create Mock Expectation ${req} ${rsp} + Sleep ${sleep_interval} + Log Verifying results + Verify Mock Expectation ${req} + Log Cleaning the endpoint + Clear Requests ${callback_endpoint} +POST Id deletion + log The POST method delivers a notification from the server to the client. + ${json}= Get File schemas/vnfIdentifierCreationNotification.schema.json + ${BODY}= evaluate json.loads('''${json}''') json + Log Creating mock request and response to handle vnfLcmOperationOccurrenceNotification + &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY} + &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 + Create Mock Expectation ${req} ${rsp} + Sleep ${sleep_interval} + Log Verifying results + Verify Mock Expectation ${req} + Log Cleaning the endpoint + Clear Requests ${callback_endpoint} +GET test endpoint + log The GET method allows the server to test the notification endpoint + &{req}= Create Mock Request Matcher GET ${callback_endpoint} + &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 + Create Mock Expectation ${req} ${rsp} + Sleep ${sleep_interval} + Verify Mock Expectation ${req} + Clear Requests ${callback_endpoint} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot b/SOL003/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot index 4c8207e5..9595cfe7 100644 --- a/SOL003/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot +++ b/SOL003/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot @@ -4,74 +4,92 @@ Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} Library JSONLibrary Library JSONSchemaLibrary schemas/ -Documentation This resource represents VNF lifecycle management operation occurrences. The client can use this resource to query -... status information about multiple VNF lifecycle management operation occurrences. +Resource VnfLcmMntOperationKeywords.robot *** Test Cases *** Post VNF LCM OP occurences - Method not implemented - log Trying to perform a POST. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs - Log Validate Status code - Integer response status 405 + [Documentation] Test ID: 7.3.1.11.1 + ... Test title: Post VNF LCM OP occurences - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.12.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Post VNF LCM OP occurences + Check HTTP Response Status Code Is 405 -Get stauts information about multiple VNF LCM OP OCC - Log Query status information about multiple VNF lifecycle management operation occurrences. - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs - Log Validate Status code - Integer response status 200 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE} - ${result}= Output response body - Validate Json VnfLcmOpOccs.schema.json ${result} - Log Validation OK +Get status information about multiple VNF LCM OP OCC + [Documentation] Test ID: 7.3.1.11.2 + ... Test title: Get status information about multiple VNF LCM OP OCC + ... Test objective: The objective is to test that GET method retrieve Query status information about multiple VNF lifecycle management operation occurrences. + ... Pre-conditions: none + ... Reference: section 5.4.12.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET VNF LCM OP occurences + Check HTTP Response Status Code Is 202 + Check HTTP Response Body Json Schema Is VnfLcmOpOccs -Get stauts information about multiple VNF LCM OP OCC Bad Request Invalid attribute-based filtering parameters - Log Query status information about multiple VNF lifecycle management operation occurrences. - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs?attribute_not_exist=some_value - Log Validate Status code - Integer response status 400 - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +Get status information about multiple VNF LCM OP OCC Bad Request Invalid attribute-based filtering parameters + [Documentation] Test ID: 7.3.1.11.3 + ... Test title: Get status information about multiple VNF LCM OP OCC Bad Request Invalid attribute-based filtering parameters + ... Test objective: The objective is to test that GET method fail retrieving status information about multiple VNF lifecycle management operation occurrences because attribute is invalid. + ... Pre-conditions: none + ... Reference: section 5.4.12.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET VNF LCM OP occurences invalid attribute + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails -Get stauts information about multiple VNF LCM OP OCC Bad Request Invalid attribute selector - Log Query VNF The GET method queries information about multiple VNF instances. - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs?fields=wrong_field - Log Validate Status code - Integer response status 400 - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +Get status information about multiple VNF LCM OP OCC Bad Request Invalid attribute selector + [Documentation] Test ID: 7.3.1.11.4 + ... Test title: Get status information about multiple VNF LCM OP OCC Bad Request Invalid attribute selector + ... Test objective: The objective is to test that GET method fail retrieving status information about multiple VNF lifecycle management operation occurrences because attribute is invalid. + ... Pre-conditions: none + ... Reference: section 5.4.12.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET VNF LCM OP occurences invalid filter + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails -PUT stauts information about multiple VNF LCM OP OCC - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs - Log Validate Status code - Integer response status 405 +PUT status information about multiple VNF LCM OP OCC - Method not implemented + [Documentation] Test ID: 7.3.1.11.5 + ... Test title: PUT status information about multiple VNF LCM OP OCC - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.12.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT VNF LCM OP occurences + Check HTTP Response Status Code Is 405 -PATCH stauts information about multiple VNF LCM OP OCC - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs - Log Validate Status code - Integer response status 405 +PATCH status information about multiple VNF LCM OP OCC - Method not implemented + [Documentation] Test ID: 7.3.1.11.6 + ... Test title: PATCH status information about multiple VNF LCM OP OCC - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.12.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT VNF LCM OP occurences + Check HTTP Response Status Code Is 405 -DELETE stauts information about multiple VNF LCM OP OCC - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs - Log Validate Status code - Integer response status 405 \ No newline at end of file +DELETE status information about multiple VNF LCM OP OCC - Method not implemented + [Documentation] Test ID: 7.3.1.11.7 + ... Test title: DELETE status information about multiple VNF LCM OP OCC - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: section 5.4.12.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE VNF LCM OP occurences + Check HTTP Response Status Code Is 405 diff --git a/SOL005/NSLifecycleManagement-API/CancelOperationTask.robot b/SOL005/NSLifecycleManagement-API/CancelOperationTask.robot index 5098d591..53ef3f9b 100644 --- a/SOL005/NSLifecycleManagement-API/CancelOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/CancelOperationTask.robot @@ -11,26 +11,25 @@ Library JSONSchemaLibrary schemas/ Post Cancel operation task [Documentation] Test ID: 5.3.2.14.1 ... Test title: Post Cancel operation task - ... Test objective: The objective is to test that POST method cancel an LCM operation + ... Test objective: The objective is to test that POST method cancel the NS LCM operation ... Pre-conditions: NS instance status equal to STARTING, PROCESSING or ROLLING_BACK ... Reference: section 6.4.15.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none - Depends on test Check resource FAILED_TEMP + ... Post-Conditions: NS instance status equal to FAILED_TEMP POST Cancel operation task Check HTTP Response Status Code Is 202 + Check resource FAILED_TEMP Post Cancel operation task Not Found [Documentation] Test ID: 5.3.2.14.2 ... Test title: Post Cancel operation task Not Found - ... Test objective: The objective is to test that POST method fail if LCM operation not found + ... Test objective: The objective is to test that POST method fail completing the Cancel NS LCM operation if the resource is not found ... Pre-conditions: none ... Reference: section 6.4.15.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - [Setup] Check Cancel not supported POST Cancel operation task Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails @@ -38,13 +37,12 @@ Post Cancel operation task Not Found Post Cancel operation task Conflict [Documentation] Test ID: 5.3.2.14.3 ... Test title: Post Cancel operation task Conflict - ... Test objective: The objective is to test that POST method fail if a status conflict exist on LCM operation - ... Pre-conditions: none + ... Test objective: The objective is to test that POST method fail if a status conflict exist on the NS LCM operation. (i.e. NS instance status not equal to STARTING, PROCESSING or ROLLING_BACK) + ... Pre-conditions: NS instance status not equal to STARTING, PROCESSING or ROLLING_BACK ... Reference: section 6.4.15.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Depends on test failure Check resource FAILED_TEMP POST Cancel operation task Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL005/NSLifecycleManagement-API/ContinueOperationTask.robot b/SOL005/NSLifecycleManagement-API/ContinueOperationTask.robot index f36f78bc..80e0c93f 100644 --- a/SOL005/NSLifecycleManagement-API/ContinueOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/ContinueOperationTask.robot @@ -16,21 +16,20 @@ Post Continue operation task ... Reference: section 6.4.13.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none - Depends on test Check resource FAILED_TEMP + ... Post-Conditions: NS instance status not equal to FAILED_TEMP POST Continue operation task Check HTTP Response Status Code Is 202 + Check resource not FAILED_TEMP Post Continue operation task Not Found [Documentation] Test ID: 5.3.2.12.2 ... Test title: Post Continue operation task Not Found - ... Test objective: The objective is to test that POST method fail if operation is not found + ... Test objective: The objective is to test that POST method cannot perform a continue operation task because the resource is not found ... Pre-conditions: none ... Reference: section 6.4.13.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - [Setup] Check Continue not supported POST Continue operation task Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails @@ -38,13 +37,12 @@ Post Continue operation task Not Found Post Continue operation task Conflict [Documentation] Test ID: 5.3.2.12.3 ... Test title: Post Continue operation task Conflict - ... Test objective: The objective is to test that POST method fail in case of operation status conflict - ... Pre-conditions: none + ... Test objective: The objective is to test that POST method fail in case of operation status conflict (i.e. NS instance status not equal to FAILED_TEMP ) + ... Pre-conditions: NS instance status not equal to FAILED_TEMP ... Reference: section 6.4.13.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none - Depends on test failure Check resource FAILED_TEMP + ... Post-Conditions: none POST Continue operation task Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL005/NSLifecycleManagement-API/FailOperationTask.robot b/SOL005/NSLifecycleManagement-API/FailOperationTask.robot index 3853ed3e..1f8a95d1 100644 --- a/SOL005/NSLifecycleManagement-API/FailOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/FailOperationTask.robot @@ -17,20 +17,20 @@ Post Fail operation task ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Depends on test Check resource FAILED_TEMP POST Fail operation task Check HTTP Response Status Code Is 202 + Check resource not FAILED_TEMP + Post Fail operation task Not Found [Documentation] Test ID: 5.3.2.13.2 ... Test title: Post Fail operation task Not Found - ... Test objective: The objective is to test that POST method fail if the LCM operation is not found + ... Test objective: The objective is to test that POST method fail if the LCM NS resource is not found ... Pre-conditions: none ... Reference: section 6.4.14.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - [Setup] Check Fail not supported POST Fail operation task Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails @@ -38,13 +38,12 @@ Post Fail operation task Not Found Post Fail operation task Conflict [Documentation] Test ID: 5.3.2.13.3 ... Test title: Post Fail operation task Conflict - ... Test objective: The objective is to test that POST method fail in case of status conflict on the LCM operation - ... Pre-conditions: none + ... Test objective: The objective is to test that POST method fail in case of status conflict on the LCM NS operation (i.e NS instance status not equal to FAILED_TEMP) + ... Pre-conditions: NS instance status not equal to FAILED_TEMP ... Reference: section 6.4.14.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Depends on test failure Check resource FAILED_TEMP POST Fail operation task Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL005/NSLifecycleManagement-API/HealNSTask.robot b/SOL005/NSLifecycleManagement-API/HealNSTask.robot index 442089bd..d09fe9ae 100644 --- a/SOL005/NSLifecycleManagement-API/HealNSTask.robot +++ b/SOL005/NSLifecycleManagement-API/HealNSTask.robot @@ -12,11 +12,11 @@ POST Heal a NSInstance [Documentation] Test ID: 5.3.2.6.1 ... Test title: POST Heal a NSInstance ... Test objective: The objective is to test that POST method allow to create a Heal NS instance - ... Pre-conditions: none + ... Pre-conditions: resource status have to be NOT_INSTANTIATED ... Reference: section 6.4.7.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The Heal NS instance is created on the NFVO + ... Post-Conditions: none POST Heal NSInstance Check HTTP Response Status Code Is 202 Check HTTP Response Header Contains Location @@ -25,12 +25,11 @@ POST Heal a NSInstance Conflict [Documentation] Test ID: 5.3.2.6.2 ... Test title: POST Heal a NSInstance Conflict ... Test objective: The objective is to test that POST method fail if NS instance is not in NOT_INSTANTIATE state - ... Pre-conditions: none + ... Pre-conditions: resource status have not to be NOT_INSTANTIATED ... Reference: section 6.4.7.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The Heal NS instance is not created on the NFVO - [Setup] Check resource not_instantiated + ... Post-Conditions: none POST Heal NSInstance Check HTTP Response Status Code Is 409 Check HTTP Response Header Contains ${CONTENT_TYPE} diff --git a/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot b/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot index e994731f..7c1c8e00 100644 --- a/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot +++ b/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot @@ -74,12 +74,11 @@ DELETE Individual NSInstance Conflict [Documentation] Test ID: 5.3.2.2.5 ... Test title: DELETE Individual NSInstance Conflict ... Test objective: The objective is to test that DELETE method is allowed to delete a NS instance - ... Pre-conditions: At least one running instance of a NS + ... Pre-conditions: At least one instantiated instance of a NS ... Reference: section 6.4.3.3.5 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The NS instance is deleted from the NFVO - [Setup] Check resource instantiated DELETE IndividualNSInstance Check HTTP Response Status Code Is 409 Check HTTP Response Header ContentType is ${CONTENT_TYPE} diff --git a/SOL005/NSLifecycleManagement-API/InstantiateNSTask.robot b/SOL005/NSLifecycleManagement-API/InstantiateNSTask.robot index 9d4a26a6..d7083856 100644 --- a/SOL005/NSLifecycleManagement-API/InstantiateNSTask.robot +++ b/SOL005/NSLifecycleManagement-API/InstantiateNSTask.robot @@ -20,17 +20,17 @@ Post Instantiate a nsInstance POST Instatiate nsInstance Check HTTP Response Status Code Is 202 Check HTTP Response Header Contains Location + Check resource INSTANTIATED Post Instantiate a nsInstance Conflict [Documentation] Test ID: 5.3.2.3.2 ... Test title: Post Instantiate a nsInstance Conflict - ... Test objective: The objective is to test that the operation can't be performed due to a conflict with the state of resource - ... Pre-conditions: none + ... Test objective: The objective is to test that the operation can't be performed due to a conflict with the state of resource (i.e. the resource is in INSTANTIATED state) + ... Pre-conditions: resource is in INSTANTIATED state ... Reference: section 6.4.4.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The NS instance is not instantiated on the NFVO - [Setup] Check resource instantiated POST Instatiate nsInstance Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot index be83b24a..a22b6449 100644 --- a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot +++ b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot @@ -60,6 +60,12 @@ Check resource FAILED_TEMP Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} String response body operationState FAILED_TEMP +Check resource not + [Arguments] ${status} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} + Should Not Be Equal As Strings response body operationState ${status} + Check Operation Notification Status is [Arguments] ${status} Check Operation Notification NsLcmOperationOccurrenceNotification ${status} diff --git a/SOL005/NSLifecycleManagement-API/RetryOperationTask.robot b/SOL005/NSLifecycleManagement-API/RetryOperationTask.robot index 217d5f36..7ac47b1f 100644 --- a/SOL005/NSLifecycleManagement-API/RetryOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/RetryOperationTask.robot @@ -16,11 +16,11 @@ Post Retry operation task ... Reference: section 6.4.11.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none - Depends on test Check resource FAILED_TEMP + ... Post-Conditions: NS instance status not equal to FAILED_TEMP POST Retry operation task Check HTTP Response Status Code Is 202 Check HTTP Response Header Contains Location + Check resource not FAILED_TEMP Post Retry operation task Not Found [Documentation] Test ID: 5.3.2.10.2 @@ -31,7 +31,6 @@ Post Retry operation task Not Found ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - [Setup] Check retry not supported POST Retry operation task Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails @@ -39,13 +38,12 @@ Post Retry operation task Not Found Post Retry operation task Conflict [Documentation] Test ID: 5.3.2.10.3 ... Test title: Post Retry operation task Conflict - ... Test objective: The objective is to test that POST method fail in case of NS lifecycle operation status conflict - ... Pre-conditions: none + ... Test objective: The objective is to test that POST method fail in case of NS lifecycle operation status conflict (i.e. NS instance status not equal to FAILED_TEMP) + ... Pre-conditions: NS instance status not equal to FAILED_TEMP ... Reference: section 6.4.11.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Depends on test failure Check resource FAILED_TEMP POST Retry operation task Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL005/NSLifecycleManagement-API/RollbackOperationTask.robot b/SOL005/NSLifecycleManagement-API/RollbackOperationTask.robot index a94b61dd..9f2598eb 100644 --- a/SOL005/NSLifecycleManagement-API/RollbackOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/RollbackOperationTask.robot @@ -11,13 +11,12 @@ Library JSONSchemaLibrary schemas/ Post Rollback operation task [Documentation] Test ID: 5.3.2.11.1 ... Test title: Post Rollback operation task - ... Test objective: The objective is to test that POST method trigger a rollback on the LCM operation + ... Test objective: The objective is to test that POST method trigger a rollback on the NS LCM operation ... Pre-conditions: NS instance status equal to FAILED_TEMP ... Reference: section 6.4.12.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none - Depends on test Check resource FAILED_TEMP + ... Post-Conditions: NS instance status not equal to FAILED_TEMP POST Rollback operation task Check HTTP Response Status Code Is 202 @@ -31,7 +30,6 @@ Post Rollback operation task Not Found ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - [Setup] Check Rollback not supported POST Rollback operation task Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails @@ -39,13 +37,12 @@ Post Rollback operation task Not Found Post Rollback operation task Conflict [Documentation] Test ID: 5.3.2.11.3 ... Test title: Post Rollback operation task Conflict - ... Test objective: The objective is to test that POST method fail in case of operation status conflict - ... Pre-conditions: none + ... Test objective: The objective is to test that POST method fail in case of operation status conflict (i.e. NS instance status not equal to FAILED_TEMP) + ... Pre-conditions: NS instance status not equal to FAILED_TEMP ... Reference: section 6.4.12.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Depends on test failure Check resource FAILED_TEMP POST Rollback operation task Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL005/NSLifecycleManagement-API/ScaleNSTask.robot b/SOL005/NSLifecycleManagement-API/ScaleNSTask.robot index 7c297851..02f83863 100644 --- a/SOL005/NSLifecycleManagement-API/ScaleNSTask.robot +++ b/SOL005/NSLifecycleManagement-API/ScaleNSTask.robot @@ -12,7 +12,7 @@ POST Scale a nsInstance [Documentation] Test ID: 5.3.2.4.1 ... Test title: POST Scale a nsInstance ... Test objective: The objective is to test that POST method allow to create a Scale NS instance - ... Pre-conditions: none + ... Pre-conditions: the resource is in NOT_INSTANTIATED state ... Reference: section 6.4.5.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none @@ -24,13 +24,12 @@ POST Scale a nsInstance POST Instantiate a nsInstance Conflict [Documentation] Test ID: 5.3.2.4.2 ... Test title: POST Instantiate a nsInstance Conflict - ... Test objective: The objective is to test that POST method allow to create a Scale NS instance - ... Pre-conditions: none + ... Test objective: The objective is to test that POST method can't Scale NS instance because of conflict in resource status (i.e. because the resource is in not in NOT_INSTANTIATED state) + ... Pre-conditions: the resource is in not in NOT_INSTANTIATED state ... Reference: section 6.4.5.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The Scale NS instance is not created on the NFVO - [Setup] Check resource not_instantiated POST scale nsInstance Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL005/NSLifecycleManagement-API/Subscriptions.robot b/SOL005/NSLifecycleManagement-API/Subscriptions.robot index 38196cee..8a8d3c56 100644 --- a/SOL005/NSLifecycleManagement-API/Subscriptions.robot +++ b/SOL005/NSLifecycleManagement-API/Subscriptions.robot @@ -25,8 +25,8 @@ POST Create a new subscription POST Create a new Subscription - DUPLICATION [Documentation] Test ID: 5.3.2.15.2 ... Test title: POST Create a new subscription - DUPLICATION - ... Test objective: The objective is to test that POST method create a duplicate subscription - ... Pre-conditions: none + ... Test objective: The objective is to test that POST method create a duplicate subscription if NFVO is permitting duplication + ... Pre-conditions: a subscription have already to exist ... Reference: section 6.4.16.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none @@ -39,7 +39,7 @@ POST Create a new Subscription - DUPLICATION POST Create a new Subscription - NO-DUPLICATION [Documentation] Test ID: 5.3.2.15.3 ... Test title: POST Create a new subscription - NO-DUPLICATION - ... Test objective: The objective is to test that POST method create a duplicate subscription + ... Test objective: The objective is to test that POST method can't create a duplicate subscription if NFVO is not permitting duplication ... Pre-conditions: none ... Reference: section 6.4.16.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO diff --git a/SOL005/NSLifecycleManagement-API/TerminateNSTask.robot b/SOL005/NSLifecycleManagement-API/TerminateNSTask.robot index 39e7905e..8cd3f471 100644 --- a/SOL005/NSLifecycleManagement-API/TerminateNSTask.robot +++ b/SOL005/NSLifecycleManagement-API/TerminateNSTask.robot @@ -20,17 +20,17 @@ POST Terminate a NSInstance POST Terminate NSInstance Check HTTP Response Status Code Is 202 Check HTTP Response Header Contains Location - + Check resource NOT_INSTANTIATED + POST Terminate a NSInstance Conflict [Documentation] Test ID: 5.3.2.7.2 ... Test title: POST Terminate a NSInstance Conflict - ... Test objective: The objective is to test that POST method can't terminate the NS because the resource is not in INSTANTIATED state - ... Pre-conditions: none + ... Test objective: The objective is to test that POST method can't terminate the NS because of conflict in resource status (i.e. the resource is not in INSTANTIATED state) + ... Pre-conditions: the resource is not in INSTANTIATED state ... Reference: section 6.4.8.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - [Setup] Check resource not_instantiated POST Terminate NSInstance Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot b/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot index 74a22d17..51762166 100644 --- a/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot +++ b/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot @@ -25,12 +25,11 @@ POST Update a NSInstance Conflict [Documentation] Test ID: 5.3.2.5.2 ... Test title: POST Update a NSInstance Conflict ... Test objective: The objective is to test that POST method fail if a scale Instance is not existing or is not in NOT_INSTANTIATED state - ... Pre-conditions: an existing Scale Instance + ... Pre-conditions: an existing NS Scale Instance ... Reference: section 6.4.6.3.1 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The Scale NS instance is not updated on the NFVO - [Setup] Check resource not_instantiated POST Update NSInstance Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails -- GitLab