From e31a7f33d74ea5080db331280381cfcbce975b37 Mon Sep 17 00:00:00 2001 From: Jerry Flood Date: Thu, 7 Dec 2017 19:44:44 -0500 Subject: Fix preload of dcae collector IP and APPC Issue-ID: TEST-72 Change-Id: I382073fe6d85786ba548d795fc86f57f22888763 Signed-off-by: Jerry Flood --- .../test_templates/closedloop_test_template.robot | 65 ++++++++++++++++++++-- 1 file changed, 59 insertions(+), 6 deletions(-) (limited to 'robot/resources/test_templates/closedloop_test_template.robot') diff --git a/robot/resources/test_templates/closedloop_test_template.robot b/robot/resources/test_templates/closedloop_test_template.robot index 1a136130..db49e317 100644 --- a/robot/resources/test_templates/closedloop_test_template.robot +++ b/robot/resources/test_templates/closedloop_test_template.robot @@ -19,12 +19,14 @@ ${PUSH_POLICY_TEMPLATE} robot/assets/templates/policy/closedloop_pushpolicy.te ${DEL_POLICY_TEMPLATE} robot/assets/templates/policy/closedloop_deletepolicy.template ${GECONFIG_VFW_TEMPLATE} robot/assets/templates/policy/closedloop_getconfigpolicy.template + # 'Normal' number of pg streams that will be set when policy is triggered ${VFWPOLICYRATE} 5 # Max nslookup requests per second before triggering event. ${VLBPOLICYRATE} 20 +${CLCONFIG_POLICY_NAME} BRMSParamvFirewall ${CONFIG_POLICY_NAME} vFirewall ${CONFIG_POLICY_TYPE} Unknown ${OPS_POLICY_NAME} @@ -49,16 +51,25 @@ ${Expected_Direction_3} GREATER_OR_EQUAL ${DNSSCALINGSTACK} *** Keywords *** +VFWCL Policy + Log Suite name ${SUITE NAME} ${TEST NAME} ${PREV TEST NAME} + Initialize VFWCL Policy + ${stacknamemap}= Orchestrate VNF vFWCL closedloop + Policy Check FirewallCL Stack ${stacknamemap} ${VFWPOLICYRATE} + Delete VNF + VFW Policy Log Suite name ${SUITE NAME} ${TEST NAME} ${PREV TEST NAME} Initialize VFW Policy - ${stackname}= Orchestrate VNF vFW closedloop + ${stacknamemap}= Orchestrate VNF vFW closedloop + ${stackname}= Get From Dictionary ${stacknamemap} vFW Policy Check Firewall Stack ${stackname} ${VFWPOLICYRATE} Delete VNF VDNS Policy Initialize VDNS Policy - ${stackname}= Orchestrate VNF vDNS closedloop + ${stacknamemap}= Orchestrate VNF vDNS closedloop + ${stackname}= Get From Dictionary ${stacknamemap} vLB ${dnsscaling}= Policy Check vLB Stack ${stackname} ${VLBPOLICYRATE} Set Test Variable ${DNSSCALINGSTACK} ${dnsscaling} Delete VNF @@ -70,6 +81,14 @@ Initialize VFW Policy # Push Ops Policy ${OPS_POLICY_NAME} ${OPS_POLICY_TYPE} Get Configs VFW Policy +Initialize VFWCL Policy +# Create Config Policy +# Push Config Policy ${CONFIG_POLICY_NAME} ${CONFIG_POLICY_TYPE} +# Create Ops Policy +# Push Ops Policy ${OPS_POLICY_NAME} ${OPS_POLICY_TYPE} + Get Configs VFWCL Policy + + Initialize VDNS Policy Get Configs VDNS Policy @@ -100,6 +119,33 @@ Get Configs VFW Policy ${direction_1}= Get Variable Value ${config["content"]["thresholds"][1]["direction"]} Should Be Equal ${direction_1} ${Expected_Direction_2} +Get Configs VFWCL Policy + [Documentation] Get Config Policy for VFWCL + ${getconfigpolicy}= Catenate ${CLCONFIG_POLICY_NAME} + ${configpolicy_name}= Create Dictionary config_policy_name=${getconfigpolicy} + ${output} = Fill JSON Template File ${GECONFIG_VFW_TEMPLATE} ${configpolicy_name} + ${get_resp} = Run Policy Get Configs Request ${RESOURCE_PATH_GET_CONFIG} ${output} + Should Be Equal As Strings ${get_resp.status_code} 200 + + ${json}= Parse Json ${get_resp.content} + ${config}= Parse Json ${json[0]["config"]} + + # Extract object1 from Array + ${severity}= Get Variable Value ${config["content"]["thresholds"][0]["severity"]} + Should Be Equal ${severity} ${Expected_Severity_1} + ${Thresold_Value}= Get Variable Value ${config["content"]["thresholds"][0]["thresholdValue"]} + Should Be Equal ${Thresold_Value} ${Expected_Threshold_1} + ${direction}= Get Variable Value ${config["content"]["thresholds"][0]["direction"]} + Should Be Equal ${direction} ${Expected_Direction_1} + + # Extract object2 from Array + ${severity_1}= Get Variable Value ${config["content"]["thresholds"][1]["severity"]} + Should Be Equal ${severity_1} ${Expected_Severity_2} + ${Thresold_Value_1}= Get Variable Value ${config["content"]["thresholds"][1]["thresholdValue"]} + Should Be Equal ${Thresold_Value_1} ${Expected_Threshold_2} + ${direction_1}= Get Variable Value ${config["content"]["thresholds"][1]["direction"]} + Should Be Equal ${direction_1} ${Expected_Direction_2} + Get Configs VDNS Policy [Documentation] Get Config Policy for VDNS ${getconfigpolicy}= Catenate .*vLoadBalancer* @@ -188,16 +234,23 @@ Delete Ops Policy ${put_resp} = Run Policy Delete Request ${RESOURCE_PATH_CREATE_DELETE} ${output} Should Be Equal As Strings ${put_resp.status_code} 200 +Orchestrate VNF vFWCL closedloop + [Documentation] VNF Orchestration for vFW + Log VNF Orchestration flow TEST NAME=${TEST NAME} + Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone + ${stack_name_map} ${service}= Orchestrate VNF ETE_CLP vFWCL vFWCL ${TENANT_NAME} + [Return] ${stack_name_map} + Orchestrate VNF vFW closedloop [Documentation] VNF Orchestration for vFW Log VNF Orchestration flow TEST NAME=${TEST NAME} Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone - ${stack_name} ${service}= Orchestrate VNF ETE_CLP vFWCL vFWCL ${TENANT_NAME} - [Return] ${stack_name} + ${stack_name_map} ${service}= Orchestrate VNF ETE_CLP vFW vFW ${TENANT_NAME} + [Return] ${stack_name_map} Orchestrate VNF vDNS closedloop [Documentation] VNF Orchestration for vLB Log VNF Orchestration flow TEST NAME=${TEST NAME} Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone - ${stack_name} ${service}= Orchestrate VNF ETE_CLP vLB vLB ${TENANT_NAME} - [Return] ${stack_name} + ${stack_name_map} ${service}= Orchestrate VNF ETE_CLP vLB vLB ${TENANT_NAME} + [Return] ${stack_name_map} -- cgit 1.2.3-korg