diff options
Diffstat (limited to 'robot/resources/demo_preload.robot')
-rw-r--r-- | robot/resources/demo_preload.robot | 48 |
1 files changed, 40 insertions, 8 deletions
diff --git a/robot/resources/demo_preload.robot b/robot/resources/demo_preload.robot index 5b3e14c3..b1eff956 100644 --- a/robot/resources/demo_preload.robot +++ b/robot/resources/demo_preload.robot @@ -5,6 +5,7 @@ Resource test_templates/model_test_template.robot Resource test_templates/vnf_orchestration_test_template.robot Resource asdc_interface.robot Resource vid/vid_interface.robot +Resource policy_interface.robot Library UUID Library Collections @@ -72,14 +73,17 @@ Preload User Model ${status} ${generic_vnf}= Run Keyword And Ignore Error Get Service Instance ${vnf_name} Run Keyword If '${status}' == 'FAIL' FAIL VNF Name: ${vnf_name} is not found. ${vnf_type}= Set Variable ${generic_vnf['vnf-type']} - ${relationships}= Set Variable ${generic_vnf['relationship-list']['relationship']} - ${relationship_data}= Get Relationship Data ${relationships} - ${customer_id}= Catenate - :for ${r} in @{relationship_data} - \ ${service}= Set Variable If '${r['relationship-key']}' == 'service-subscription.service-type' ${r['relationship-value']} ${service} - \ ${service_instance_id}= Set Variable If '${r['relationship-key']}' == 'service-instance.service-instance-id' ${r['relationship-value']} ${service_instance_id} - \ ${customer_id}= Set Variable If '${r['relationship-key']}' == 'customer.global-customer-id' ${r['relationship-value']} ${customer_id} - ${invariantUUID}= Get Persona Model Id ${service_instance_id} ${service} ${customer_id} + ${invariantUUID} ${service} ${customer_id} ${service_instance_id}= Get Generic VNF Info ${generic_vnf} + + ## Reuse for VFW policy update... + ##${relationships}= Set Variable ${generic_vnf['relationship-list']['relationship']} + ##${relationship_data}= Get Relationship Data ${relationships} + ##${customer_id}= Catenate + ##:for ${r} in @{relationship_data} + ##\ ${service}= Set Variable If '${r['relationship-key']}' == 'service-subscription.service-type' ${r['relationship-value']} ${service} + ##\ ${service_instance_id}= Set Variable If '${r['relationship-key']}' == 'service-instance.service-instance-id' ${r['relationship-value']} ${service_instance_id} + ##\ ${customer_id}= Set Variable If '${r['relationship-key']}' == 'customer.global-customer-id' ${r['relationship-value']} ${customer_id} + ##${invariantUUID}= Get Persona Model Id ${service_instance_id} ${service} ${customer_id} # We still need the vf module names. We can get them from VID using the persona_model_id (invariantUUID) from A&AI Setup Browser @@ -92,6 +96,23 @@ Preload User Model Preload Vnf ${service_instance_id} ${vnf_name} ${vnf_type} ${vf_module_name} ${vf_modules} ${vnf_service} demo [Teardown] Close All Browsers +Get Generic VNF Info + [Documentation] Grab some selected informastion from the generic vnf relationships + [Arguments] ${generic_vnf} + ${relationships}= Set Variable ${generic_vnf['relationship-list']['relationship']} + ${relationship_data}= Get Relationship Data ${relationships} + ${customer_id}= Catenate + ${service_instance_id}= Catenate + ${service}= Catenate + :for ${r} in @{relationship_data} + \ ${service}= Set Variable If '${r['relationship-key']}' == 'service-subscription.service-type' ${r['relationship-value']} ${service} + \ ${service_instance_id}= Set Variable If '${r['relationship-key']}' == 'service-instance.service-instance-id' ${r['relationship-value']} ${service_instance_id} + \ ${customer_id}= Set Variable If '${r['relationship-key']}' == 'customer.global-customer-id' ${r['relationship-value']} ${customer_id} + ${invariantUUID}= Get Persona Model Id ${service_instance_id} ${service} ${customer_id} + [Return] ${invariantUUID} ${service} ${customer_id} ${service_instance_id} + + + Get The Selected Modules [Arguments] ${vf_modules} ${vnf_service} ${returnlist} Create List @@ -138,6 +159,17 @@ APPC Mount Point ${vpg_oam_ip}= Get From Dictionary ${stack_info} vpg_private_ip_1 ${appc}= Create Mount Point In APPC ${vnf_id} ${vpg_oam_ip} +Execute VFW Policy Update VNF Name + [Arguments] ${vnf_name} + ${status} ${generic_vnf}= Run Keyword And Ignore Error Get Service Instance ${vnf_name} + Run Keyword If '${status}' == 'FAIL' FAIL VNF Name: ${vnf_name} is not found. + ${invariantUUID} ${service} ${customer_id} ${service_instance_id}= Get Generic VNF Info ${generic_vnf} + Update vVFWCL Policy ${invariantUUID} + +Execute VFW Policy Update + [Arguments] ${resource_id} + Update vVFWCL Policy ${resource_id} + Instantiate VNF [Arguments] ${service} Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone |