From 044f47d64a1d9f958d1cd80be9b1fae44bbaf314 Mon Sep 17 00:00:00 2001 From: Krzysztof Kuzmicki Date: Thu, 23 Jan 2020 14:37:30 +0100 Subject: Add teardown to pnf_registrate test cases Issue-ID: INT-1407 Signed-off-by: Krzysztof Kuzmicki Change-Id: I65836640e554237d3ac5adfcfa1d9d0f502329d4 --- .../pnf_orchestration_test_template.robot | 2 +- .../pnf_registration_without_SO_template.robot | 26 +++++++++------------- 2 files changed, 12 insertions(+), 16 deletions(-) (limited to 'robot/resources/test_templates') diff --git a/robot/resources/test_templates/pnf_orchestration_test_template.robot b/robot/resources/test_templates/pnf_orchestration_test_template.robot index bb3f1816..6877441e 100644 --- a/robot/resources/test_templates/pnf_orchestration_test_template.robot +++ b/robot/resources/test_templates/pnf_orchestration_test_template.robot @@ -31,7 +31,7 @@ Orchestrate PNF Login To VID GUI ${service_instance_id} ${request_id}= Wait Until Keyword Succeeds 300s 5s Create VID PNF Service Instance ${full_customer_name} ${service_model_type} ${service} ${service_name} ${project_name} ${owning_entity} ${product_family} ${lcp_region} ${tenant_name} ${pnf_correlation_id} Wait Until Keyword Succeeds 60s 20s Validate Service Instance ${service_instance_id} ${service} ${full_customer_name} - [Return] ${service} ${request_id} ${full_customer_name} + [Return] ${service_instance_id} ${request_id} ${full_customer_name} Create Customer For PNF diff --git a/robot/resources/test_templates/pnf_registration_without_SO_template.robot b/robot/resources/test_templates/pnf_registration_without_SO_template.robot index 0f36adc9..63131b8f 100644 --- a/robot/resources/test_templates/pnf_registration_without_SO_template.robot +++ b/robot/resources/test_templates/pnf_registration_without_SO_template.robot @@ -115,27 +115,17 @@ Check SO service completition status Instantiate PNF_macro service and succesfully registrate PNF template [Documentation] Test case template for design, create, instantiate PNF/macro service and succesfully registrate PNF [Arguments] ${service_name} ${PNF_entry_dict} ${pnf_correlation_id} ${service}=pNF ${product_family}=pNF ${customer_name}=ETE_Customer - Log To Console \nDistributing TOSCA Based PNF Model - ${status} ${value}= Run Keyword And Ignore Error Distribute Model ${service} ${service_name} cds=False instantiationType=Macro resourceType=PNF - ${distribution_status_value} Get Service Model Parameter from SDC Service Catalog ${service_name} distributionStatus - Run Keyword If "${value}"=='409 != 201' Log To Console TOSCA Based PNF Model is already distributed with status ${distribution_status_value} - ... ELSE IF "${status}"=='PASS' Log To Console TOSCA Based PNF Model has been distributed - ... ELSE Log To Console Check Model Distribution for PNF + ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resources} ${catalog_resource_ids} ${catalog_service_id} Model Distribution For Directory ${service} ${service_name} cds=False instantiationType=Macro resourceType=PNF ${UUID}= Get Service Model Parameter from SDC Service Catalog ${service_name} uuid - Get First Free Service Recipe Id Log To Console Creating Service Recipe for TOSCA Based PNF Model - ${status} ${value}= Run Keyword And Ignore Error Add Service Recipe ${UUID} mso/async/services/CreateVcpeResCustService_simplified - Run Keyword If "${value}"=='409 != 201' Log To Console Service Recipe for TOSCA Based PNF Model is already assigned - ... ELSE IF "${status}"=='PASS' Log To Console Service Recipe for TOSCA Based PNF Model has been assigned - ... ELSE Log To Console Check Service Recipe for TOSCA Based PNF Model assignmenta + ${service_recipe_id}= Add Service Recipe ${UUID} mso/async/services/CreateVcpeResCustService_simplified Inventory Tenant If Not Exists CloudOwner ${region} SharedNode OwnerType v1 CloudZone ${tenant_id} ${tenant_name} - Load OwningEntity lineOfBusiness LOB-${customer_name} - Load OwningEntity platform Platform-${customer_name} Load OwningEntity project Project-${customer_name} Load OwningEntity owningEntity OE-${customer_name} - ${service} ${request_id} ${full_customer_name} Orchestrate PNF ${customer_name} ${service} ${product_family} ${pnf_correlation_id} ${tenant_id} ${tenant_name} ${service_name} Project-${customer_name} OE-${customer_name} + ${service_instance_id} ${request_id} ${full_customer_name} Orchestrate PNF ${customer_name} ${service} ${product_family} ${pnf_correlation_id} ${tenant_id} ${tenant_name} ${service_name} Project-${customer_name} OE-${customer_name} Wait Until Keyword Succeeds 120s 40s Send and verify VES integration request in SO and A&AI ${request_id} ${PNF_entry_dict} + [Teardown] Instantiate PNF_macro service Teardown ${catalog_service_id} ${catalog_resource_ids} ${PNF_entry_dict} ${service_instance_id} ${service_recipe_id} Send and verify VES integration request in SO and A&AI @@ -143,4 +133,10 @@ Send and verify VES integration request in SO and A&AI [Arguments] ${request_id} ${PNF_entry_dict} Send VES integration request ${PNF_entry_dict} Verify PNF Integration Request in A&AI ${PNF_entry_dict} - Wait Until Keyword Succeeds 30s 10s Check SO service completition status ${request_id} COMPLETE \ No newline at end of file + Wait Until Keyword Succeeds 30s 10s Check SO service completition status ${request_id} COMPLETE + +Instantiate PNF_macro service Teardown + [Arguments] ${catalog_service_id} ${catalog_resource_ids} ${PNF_entry_dict} ${service_instance_id} ${service_recipe_id} + Teardown Models ${catalog_service_id} ${catalog_resource_ids} + Delete Service Recipe ${service_recipe_id} + Cleanup PNF entry in A&AI ${PNF_entry_dict} \ No newline at end of file -- cgit 1.2.3-korg