aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources
diff options
context:
space:
mode:
Diffstat (limited to 'robot/resources')
-rw-r--r--robot/resources/so/add_service_recipe.robot9
-rw-r--r--robot/resources/test_templates/pnf_orchestration_test_template.robot2
-rw-r--r--robot/resources/test_templates/pnf_registration_without_SO_template.robot26
3 files changed, 20 insertions, 17 deletions
diff --git a/robot/resources/so/add_service_recipe.robot b/robot/resources/so/add_service_recipe.robot
index 6d7fa035..a5dca694 100644
--- a/robot/resources/so/add_service_recipe.robot
+++ b/robot/resources/so/add_service_recipe.robot
@@ -26,7 +26,7 @@ Add Service Recipe
${auth}= Create List ${GLOBAL_SO_CATDB_USERNAME} ${GLOBAL_SO_PASSWORD}
${get_resp}= SO.Run Post Request ${GLOBAL_SO_CATDB_ENDPOINT} ${SERVICE_RECIPE_PATH} ${data} auth=${auth}
Should Be Equal As Strings ${get_resp.status_code} 201
- [Return] ${get_resp.status_code} ${get_resp.json()}
+ [Return] ${id}
Get Service Recipe
[Documentation] Gets service recipe/s in SO
@@ -50,3 +50,10 @@ Get First Free Service Recipe Id
${biggest_id}= Get From List ${ids} -1
Log Biggest id is ${biggest_id} first free is ${biggest_id+1}
[Return] ${biggest_id+1}
+
+Delete Service Recipe
+ [Documentation] Deletes service recipe/s in SO
+ [Arguments] ${service_id}
+ ${auth}= Create List ${GLOBAL_SO_CATDB_USERNAME} ${GLOBAL_SO_PASSWORD}
+ ${get_resp}= SO.Run Delete Request ${GLOBAL_SO_CATDB_ENDPOINT} ${SERVICE_RECIPE_PATH}/${service_id} auth=${auth}
+ Should Be Equal As Strings ${get_resp.status_code} 201 \ No newline at end of file
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