diff --git a/SOL002/VNFConfiguration-API/Configuration.robot b/SOL002/VNFConfiguration-API/Configuration.robot index c660a74a606277874381bd5da3f9942106a46097..0c8e61277b858497ba466ddb95a82f45e90160bf 100644 --- a/SOL002/VNFConfiguration-API/Configuration.robot +++ b/SOL002/VNFConfiguration-API/Configuration.robot @@ -9,7 +9,8 @@ Library DependencyLibrary *** Variables *** ${Etag}= an etag -${Etag_modified}= a modified etag +${Etag_modified}= 12345 +${response}= httpresponse *** Test Cases *** POST Configuration - Method not implemented @@ -21,29 +22,19 @@ POST Configuration - Method not implemented Integer response status 405 Get information about a configuration - [Documentation] Test ID: 9.4.2.1 + [Documentation] Test ID: 9.4.2.2 ... Test title: Get information about a configuration - ... Test objective: The objective is to read configuration information about a VNF instance and/or its VNFC instances - ... Pre-conditions: + ... Test objective: The objective is to test the retrieval of an existing VNF instance configuration + ... Pre-conditions: A VNF instance is up and running. The VNF instance is already configured (Test ID: 9.4.2.1) ... Reference: section 9.4.2 - SOL002 v2.4.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: - Log Query VNF The GET method queries information about a configuration. - 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}/configuration - ${Etag}= Output response headers Etag - Log Validate Status code - Integer response status 200 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE} - ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfConfiguration.schema.json ${json} - Log Validation OK + ... Applicability: The VNF supports the generation of HTTP Etag opaque identifiers + ... Post-Conditions: The VNF configuration is not modified by the operation + Get VNF configuration + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Contains Etag + Check HTTP Response Body Json Schema Is vnfConfiguration + Check Postcondition VNF Configuration Untouched PUT Config - Method not implemented log Trying to perform a PUT. This method should not be implemented @@ -53,59 +44,95 @@ PUT Config - Method not implemented Log Validate Status code Integer response status 405 -PATCH Config - [Documentation] Test ID: 9.4.2.2 - ... Test title: Set or modify a configuration resource - ... Test objective: The objective is to set or modify a configuration resource - ... Pre-conditions: A VNF instance and its VNFC instances exist +Set new VNF Configuration + [Documentation] Test ID: 9.4.2.1 + ... Test title: Set a new VNF Configuration + ... Test objective: The objective is to test the creation of a new VNF configuration + ... Pre-conditions: A VNF instance is up and running ... Reference: section 9.4.2 - SOL002 v2.4.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: Configuration of the VNF instance and/or its VNFC instances has been set - log Trying to perform a PATCH. This method modifies the configuration + ... Applicability: The VNF supports the generation of HTTP Etag opaque identifiers + ... Post-Conditions: The VNF configuration is set + Send VNF configuration + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Contains Etag + Check HTTP Response Body Json Schema Is vnfConfiModifications + Check Postcondition VNF Is Configured + +Set new VNF Configuration - HTTP Etag precondition failed + [Documentation] Test ID: 9.4.2.3 + ... Test title: Set a new VNF Configuration - HTTP Etag precondition failed + ... Test objective: The objective is to test the failure in setting a duplication of VNF configuration identified by an already used HTTP Etag identifier. + ... Pre-conditions: A VNF instance is up and running. The VNF instance is already configured (Test ID: 9.4.2.1) with a given HTTP Etag identifier. + ... Reference: section 9.4.2 - SOL002 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: The VNF supports the generation of HTTP Etag opaque identifiers + ... Post-Conditions: The VNF configuration is not modified by the operation + Send Duplicated VNF configuration + Check HTTP Response Status Code Is 412 + Check HTTP Response Body Json Schema Is ProblemDetails + Check Postcondition VNF Configuration Untouched + +DELETE Config - 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}/configuration + Log Validate Status code + Integer response status 405 + +*** Keywords *** +Get VNF configuration + Log Query VNF The GET method queries information about a configuration. + 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 + ${response}= Get ${apiRoot}/${apiName}/${apiVersion}/configuration + +Send VNF configuration + log Trying to perform a PATCH. This method modifies the configuration Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File json/vnfConfigModifications.json - Patch ${apiRoot}/${apiName}/${apiVersion}/configuration ${body} - Log Validate Status code - ${Etag_modified}= Output response headers Etag - Integer response status 200 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE} - ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfConfigModifications.schema.json ${json} - Log Validation OK + ${response}= Patch ${apiRoot}/${apiName}/${apiVersion}/configuration ${body} -PATCH Config - Precondition failed - [Documentation] Test ID: 9.4.2.2-1 - ... Test title: Set or modify a configuration resource - Precondition failed - ... Test objective: The objective is to set or modify a configuration resource, but a precondition given in an HTTP request header is not fulfilled - ... Pre-conditions: A VNF instance and its VNFC instances exist, ETag modified in the meanwhile - ... Reference: section 9.4.2 - SOL002 v2.4.1 - ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: +Send Duplicated VNF configuration Depends On Test PATCH Alarm # If the previous test scceeded, it means that Etag has been modified - log Trying to perform a PATCH. This method modifies an individual alarm resource + log Trying to perform a PATCH. This method modifies an individual alarm resource Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Set Headers {"If-Match": "${Etag}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File json/vnfConfigModifications.json - Patch ${apiRoot}/${apiName}/${apiVersion}/configuration ${body} - Log Validate Status code - Integer response status 412 - ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} - Log Validation OK + ${response}= Patch ${apiRoot}/${apiName}/${apiVersion}/configuration ${body} -DELETE Config - 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}/configuration - Log Validate Status code - Integer response status 405 \ No newline at end of file +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal ${response.status_code} ${expected_status} + Log Status code validated + +Check HTTP Response Header Contains + [Arguments] ${CONTENT_TYPE} + Should Contain ${response.headers} ${CONTENT_TYPE} + Log Header is present + +Check HTTP Response Body Json Schema Is + [Arguments] ${schema} + ${contentType}= Get Value From Json ${response.headers} $..Content-Type + Should Be Equal ${contentType} ${CONTENT_TYPE} + ${json}= evaluate json.loads('''${response.body}''') json + Validate Json ${schema} ${json} + Log Json Schema Validation OK + +Check Postcondition VNF Configuration Untouched + Log Check Postcondition for GET + #todo + +Check Postcondition VNF Is Configured + Log Check Postcondition for PATCH + Get VNF configuration + ${output}= evaluate json.loads('''${response.body}''') json + ${input}= Get File json/vnfConfigModifications.json + Should Be Equal ${output} ${input} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourWorkflow.robot b/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourWorkflow.robot index 81743ba4ceb186611b1f1dc18a1a242a5f007271..2d74dfe59b26f024d3539efd3ea0900303bc4b55 100644 --- a/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourWorkflow.robot @@ -16,24 +16,34 @@ Suite Teardown Terminate All Processes kill=true *** Test Cases *** +<<<<<<< .merge_file_a08480 Change VNF Flavour Operation [Documentation] Test ID: 5.x.y.x ... Test title: Change VNF Flavour Operation ... Test objective: The objective is to test a change flavour operation of an existing VNF instance ... Pre-conditions: VNF instance in INSTANTIATED state (Test ID: 5.a.b.c) ... Reference: section 5.3.3 - SOL003 v2.4.1 +======= +Change VNF Flavour + [Documentation] Test ID: 5.4.7.1 + ... Test title: Change VNF Flavour Workflow + ... Test objective: The objective is to test the workflow for a change flavour of an existing VNF instance + ... Pre-conditions: VNF instance in INSTANTIATED state (Test ID: 5.4.4.1). NFVO is subscribed to VNF LCM Operation Occurrence notifications (Test ID: 5.4.20.1) + ... Reference: section 5.4.7 - SOL003 v2.4.1 +>>>>>>> .merge_file_a08764 ... Config ID: Config_prod_VNFM - ... Applicability: change flavour operation is supported for the VNF (as capability in the VNFD) + ... Applicability: Multiple flavours are supported for the VNF (as capability in the VNFD). NFVO is able to receive notifications from VNFM ... Post-Conditions: VNF instance still in INSTANTIATED state and the flavour is changed Send Change VNF Flavour Request Check HTTP Response Status Code Is 202 Check HTTP Response Header Contains Location Check Operation Occurrence Id Check Operation Notification For Change Flavour STARTING - Create a new Grant - Sync - CHANGE_FLAVOUR Check Operation Notification For Change Flavour PROCESSING Check Operation Notification For Change Flavour COMPLETED - Check Postcondition VNF CHANGE_FLAVOUR + Check Postcondition VNF Flavor Changed + +#Create a new Grant Sync - CHANGE_FLAVOU Scale REMOVED *** Keywords *** @@ -48,8 +58,7 @@ Precondition Checks ${LccnSubscriptions}= Check subscriptions about one VNFInstance and operation type ${vnfInstanceId} VnfLcmOperationOccurrenceNotification operationType=SCALE ${scaleInfo}= Get Vnf Scale Info ${vnfInstanceId} -Check Postcondition VNF - [Arguments] ${operation} +Check Postcondition VNF Flavor Changed Check resource instantiated ${newFlavour}= Get Vnf Flavour Info ${vnfInstanceId} Should be Equal ${requestedFlavour} ${newFlavour} diff --git a/SOL003/VNFLifecycleManagement-API/CreateVNFWorkflow.robot b/SOL003/VNFLifecycleManagement-API/CreateVNFWorkflow.robot index a529ff4aac42ddbba9d5015fe02a04bf9ee2c3ac..82ae84e33073abbdb02de4b126ca654ddaded339 100644 --- a/SOL003/VNFLifecycleManagement-API/CreateVNFWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/CreateVNFWorkflow.robot @@ -16,35 +16,32 @@ Suite Teardown Terminate All Processes kill=true *** Test Cases *** -Create a VNF Instance - [Documentation] Test ID: 5.x.y.x - ... Test title: Create a VNF instance procedure - ... Test objective: The objective is to test the procedure for the creation of a VNF instance resource. - ... Pre-conditions: - ... Reference: section 5.3.1 - SOL003 v2.4.1; section +Create VNF Instance Resource + [Documentation] Test ID: 5.3.1.1 + ... Test title: Create VNF Instance workflow + ... Test objective: The objective is to test the workflow for the creation of a new VNF instance resource. + ... Pre-conditions: NFVO is subscribed to VNF Identifier Creation notifications (Test ID: 5.4.20.2) + ... Reference: section 5.4.2 - SOL003 v2.4.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... NFVO is not subscribed for - ... Post-Conditions: upon successful completion, the VNF instance resource has been created in "NOT_INSTANTIATED" state. - Send VNF create Request + ... Applicability: NFVO is able to receive notifications from VNFM + ... Post-Conditions: The VNF instance resource has been created in "NOT_INSTANTIATED" state. + Send VNF Instance Resource create Request Check HTTP Response Status Code Is 201 Check HTTP Response Header Contains Location - Check Operation Notification For Create VnfIdentifierCreationNotification - Check Postcondition VNF CREATE + Check Operation Notification For VNF Instance Creation + Check Postcondition VNF Instance Created NOT_INSTANTIATED *** Keywords *** Initialize System Create Sessions -Check Postcondition VNF - [Arguments] ${operation} +Check Postcondition VNF Instance Created + [Arguments] ${status} Check VNF Instance ${vnfInstanceId} Check HTTP Response Status Code Is 200 - Check VNF Status ${response.body.instantiationState} NOT_INSTANTIATED - -Check Operation Notification For Create - [Arguments] ${element} - ${json}= Get File schemas/${element}.schema.json - Configure Notification Handler ${notification_ep} + Check VNF Status ${response.body.instantiationState} ${status} + +Check Operation Notification For VNF Instance Creation + Check VNF Instance Operation Notification VnfIdentifierCreationNotification ${vnfInstanceId} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/DeleteVNFWorkflow.robot b/SOL003/VNFLifecycleManagement-API/DeleteVNFWorkflow.robot index a50fe4e889f350c5adb2378a7fcca8ad3bdbd215..01a0e6474c30007f7a8e382b7932e7ebd0d6db40 100644 --- a/SOL003/VNFLifecycleManagement-API/DeleteVNFWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/DeleteVNFWorkflow.robot @@ -16,32 +16,28 @@ Suite Teardown Terminate All Processes kill=true *** Test Cases *** -Create a VNF Instance - [Documentation] Test ID: 5.x.y.x - ... Test title: Delete a VNF instance procedure - ... Test objective: The objective is to test the procedure for the deletion of a VNF instance resource. - ... Pre-conditions: The resource representing the VNF instance to be deleted needs to be in NOT_INSTANTIATED state +Delete VNF Instance Resource + [Documentation] Test ID: 5.3.2.1 + ... Test title: Delete VNF Instance workflow + ... Test objective: The objective is to test the workflow for the deleteion of an existing VNF instance resource + ... Pre-conditions: The VNF Instance resource is in NOT_INSTANTIATED state. NFVO is subscribed to VNF Identifier Creation notifications (Test ID: 5.4.20.2) ... Reference: section 5.3.2 - SOL003 v2.4.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: The resource representing the VNF instance has been removed from the list of VNF instance resources - Send VNF delete Request + ... Applicability: NFVO is able to receive notifications from VNFM + ... Post-Conditions: The VNF instance resource is deleted on the VNFM. + Send VNF Instance Resource delete Request Check HTTP Response Status Code Is 204 - Check Operation Notification For Create VnfIdentifierDeletionNotification - Check Postcondition VNF DELETE + Check Operation Notification For VNF Instance Deletion + Check Postcondition VNF Instance Deleted *** Keywords *** Initialize System Create Sessions -Check Postcondition VNF - [Arguments] ${operation} +Check Postcondition VNF Instance Deleted Check VNF Instance ${vnfInstanceId} Check HTTP Response Status Code Is 404 - -Check Operation Notification For Create - [Arguments] ${element} - ${json}= Get File schemas/${element}.schema.json - Configure Notification Handler ${notification_ep} - \ No newline at end of file + +Check Operation Notification For VNF Instance Deletion + Check VNF Instance Operation Notification VnfIdentifierDeletionNotification ${vnfInstanceId} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/InstantiateVNFTaskWorkflow.robot b/SOL003/VNFLifecycleManagement-API/InstantiateVNFTaskWorkflow.robot index e9f725a5701c0899b27d17b599db8b705fee4469..1fef05fa5051e7dd5a75a46e6ca8ac6de38cc5ca 100644 --- a/SOL003/VNFLifecycleManagement-API/InstantiateVNFTaskWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/InstantiateVNFTaskWorkflow.robot @@ -18,13 +18,13 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} *** Test Cases *** VNF Instantiation - [Documentation] Test ID: 5.x.y.x - ... Test title: VNF Instantiation - ... Test objective: The objective is to test the instantiation of a VNF instance - ... Pre-conditions: VNF instance resources is created (Test ID: 5.a.b.c) - ... Reference: section 5.x.y - SOL003 v2.4.1 + [Documentation] Test ID: 5.4.4.1 + ... Test title: VNF Instantiation worflow + ... Test objective: The objective is to test the workflow for the instantiation of a VNF instance + ... Pre-conditions: VNF instance resources is already created (Test ID: 5.4.2.1). NFVO is subscribed to VNF LCM Operation Occurrence notifications (Test ID: 5.4.20.1) + ... Reference: section 5.4.4 - SOL003 v2.4.1 ... Config ID: Config_prod_VNFM - ... Applicability: VNFM is in direct mode + ... Applicability: NFVO is able to receive notifications from VNFM ... Post-Conditions: VNF instance in INSTANTIATED state Send VNF Instantiation Request Check HTTP Response Status Code Is 202 diff --git a/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelWorkflow.robot b/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelWorkflow.robot index 01880369a4d8f89639b6c6000bc81dad3bc5019e..876691df6a8397a5e2250af0a33e0c451f2f2eb7 100644 --- a/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelWorkflow.robot @@ -16,25 +16,25 @@ Suite Teardown Terminate All Processes kill=true *** Test Cases *** -Scale out a VNF Instance - [Documentation] Test ID: 5.x.y.x - ... Test title: Scale out VNF operation - ... Test objective: The objective is to test a scale out of an existing VNF instance - ... Pre-conditions: VNF instance in INSTANTIATED state (Test ID: 5.a.b.c) - ... Reference: section 5.4.5 - SOL003 v2.4.1 +VNF Instance Scale To Level + [Documentation] Test ID: 5.4.6.1 + ... Test title: VNF Instance Scale To Level worflow + ... Test objective: The objective is to test the workflow for the scale to level of a VNF instance + ... Pre-conditions: VNF instance in INSTANTIATED state (Test ID: 5.4.4.1). NFVO is subscribed to VNF LCM Operation Occurrence notifications (Test ID: 5.4.20.1) + ... Reference: section 5.4.6 - SOL003 v2.4.1 ... Config ID: Config_prod_VNFM - ... Applicability: Scale operation is supported for the VNF (as capability in the VNFD) - ... NFVO is not subscribed for - ... Post-Conditions: VNF instance still in INSTANTIATED state and VNF was scaled + ... Applicability: NFVO is able to receive notifications from VNFM. Scale operation is supported for the VNF (as capability in the VNFD) + ... Post-Conditions: VNF instance still in INSTANTIATED state and VNF is scaled to the new level Send VNF Scale To Level Request Check HTTP Response Status Code Is 202 Check HTTP Response Header Contains Location Check Operation Occurrence Id Check Operation Notification For Scale STARTING - Create a new Grant - Sync - ScaleToLevel Check Operation Notification For Scale PROCESSING Check Operation Notification For Scale COMPLETED - Check Postcondition VNF + Check Postcondition VNF Scaled To New Level + +#Create a new Grant - Sync - Scale REMOVED *** Keywords *** @@ -45,7 +45,7 @@ Initialize System ${instantiationLevelId}= Get Value From Json ${scaleVnfToLevelRequest} $..instantiationLevelId #How to use this info to get the instantiation scale level? ${scaleInfo}= Get Value From Json ${scaleVnfToLevelRequest} $..scaleInfo -Check Postcondition VNF +Check Postcondition VNF Scaled To New Level Check resource instantiated ${newScaleInfo}= Get Vnf Scale Info ${vnfInstanceId} Compare ScaleInfos ${scaleInfo} ${newScaleInfo} diff --git a/SOL003/VNFLifecycleManagement-API/ScaleVNFWorkflow.robot b/SOL003/VNFLifecycleManagement-API/ScaleVNFWorkflow.robot index 76aa99cca04052e79fe4193b3f9343f5cd49885f..538c00b4eec30c2008aa13a8c6fd9edcf7affc89 100644 --- a/SOL003/VNFLifecycleManagement-API/ScaleVNFWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/ScaleVNFWorkflow.robot @@ -16,26 +16,26 @@ Suite Teardown Terminate All Processes kill=true *** Test Cases *** -Scale out a VNF Instance - [Documentation] Test ID: 5.x.y.x - ... Test title: Scale out VNF operation - ... Test objective: The objective is to test a scale out of an existing VNF instance - ... Pre-conditions: VNF instance in INSTANTIATED state (Test ID: 5.a.b.c) +VNF Instance Scale Out + [Documentation] Test ID: 5.4.5.1 + ... Test title: VNF Instance Scale Out worflow + ... Test objective: The objective is to test the workflow for the scaling out a VNF instance + ... Pre-conditions: VNF instance in INSTANTIATED state (Test ID: 5.4.4.1). NFVO is subscribed to VNF LCM Operation Occurrence notifications (Test ID: 5.4.20.1) ... Reference: section 5.4.5 - SOL003 v2.4.1 ... Config ID: Config_prod_VNFM - ... Applicability: Scale operation is supported for the VNF (as capability in the VNFD) - ... NFVO is not subscribed for - ... Post-Conditions: VNF instance still in INSTANTIATED state and VNF was scaled + ... Applicability: NFVO is able to receive notifications from VNFM. Scale operation is supported for the VNF (as capability in the VNFD) + ... Post-Conditions: VNF instance still in INSTANTIATED state and VNF is scaled out Send VNF Scale Out Request Check HTTP Response Status Code Is 202 Check HTTP Response Header Contains Location Check Operation Occurrence Id Check Operation Notification For Scale STARTING - Create a new Grant - Sync - Scale Check Operation Notification For Scale PROCESSING Check Operation Notification For Scale COMPLETED Check Postcondition VNF SCALE_OUT +#Create a new Grant - Sync - Scale REMOVED + *** Keywords *** Initialize System diff --git a/SOL003/VNFLifecycleManagement-API/SubscriptionKeywords.robot b/SOL003/VNFLifecycleManagement-API/SubscriptionKeywords.robot index 6d30a3cf3fa2c17820fbd768c27bc2af5c0299c4..152afc14b82ea91ff90f18258576ad73ecd64843 100644 --- a/SOL003/VNFLifecycleManagement-API/SubscriptionKeywords.robot +++ b/SOL003/VNFLifecycleManagement-API/SubscriptionKeywords.robot @@ -26,7 +26,7 @@ Create Sessions Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri}:${callback_port} -Configure Notification Handler +Configure Notification Status Handler [Arguments] ${endpoint} ${status}="" Run Keyword If ${status}!="" set to dictionary ${json["operationState"]} dp=${status} ${BODY}= evaluate json.dumps(${json}) json @@ -34,6 +34,15 @@ Configure Notification Handler &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 Create Mock Expectation ${notification_request} ${notification_response} + +Configure Notification VNF Instance Handler + [Arguments] ${endpoint} ${instanceId}="" + Run Keyword If ${instanceId}!="" set to dictionary ${json["vnfInstanceId"]} dp=${instanceId} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle ${element} + &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward [Arguments] ${element} ${endpoint} ${endpoint_fwd} @@ -47,7 +56,14 @@ Check Operation Notification [Arguments] ${element} ${status}="" ${json}= Get File schemas/${element}.schema.json Configure Notification Forward ${element} ${notification_ep} ${notification_ep_fwd} - Configure Notification Handler ${notification_ep_fwd} ${status} + Configure Notification Status Handler ${notification_ep_fwd} ${status} Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} Clear Requests ${notification_ep} Clear Requests ${notification_ep_fwd} + +Check VNF Instance Operation Notification + [Arguments] ${element} ${instance_id} + ${json}= Get File schemas/${element}.schema.json + Configure Notification Forward ${element} ${notification_ep} ${notification_ep_fwd} + Configure Notification VNF Instance Handler ${notification_ep_fwd} ${instance_id} + \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot index c72ab61d24b7481239b49d8f62b2c45235425e90..2eaac649cebe35e9381110b79ac66392ffeba0cb 100644 --- a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +++ b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot @@ -98,7 +98,7 @@ Send VNF Scale To Level Request ${aspectId}= Set Variable ${json.aspectId} ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${body} -Send VNF Create Request +Send VNF Instance Resource Create Request Log Create VNF instance by POST to ${apiRoot}/${apiName}/${apiVersion}/vnf_instances Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} @@ -106,7 +106,7 @@ Send VNF Create Request ${body}= Get File json/createVnfRequest.json ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances ${body} -Send VNF Delete Request +Send VNF Instance Resource Delete Request log Delete an individual VNF instance Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${response}= Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} diff --git a/SOL003/VNFLifecycleManagement-API/environment/variables.txt b/SOL003/VNFLifecycleManagement-API/environment/variables.txt index be88dca1740a47ee64bc9118986a49523499e2a5..69f6a4221aec6ed10f828ed8319055fbdadcba88 100644 --- a/SOL003/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL003/VNFLifecycleManagement-API/environment/variables.txt @@ -17,4 +17,5 @@ ${VnfIdentifierDeletionNotification} {} ${response} {} ${notification_request} [] ${notification_response} [] -${json} {} \ No newline at end of file +${json} {} +${requestedFlavour} test \ No newline at end of file