summaryrefslogtreecommitdiffstats
path: root/robot
diff options
context:
space:
mode:
authorBrian Freeman <bf1936@att.com>2019-04-30 09:47:44 -0500
committerBrian Freeman <bf1936@att.com>2019-04-30 09:48:18 -0500
commitc967dd69ee01fe702ffd25ba3f04c15f7af19b2a (patch)
tree25196a054c9cb5b2c0dd2a8f433cc58c1f6faea3 /robot
parente14d257db3c028af381ca277e6559d01262524af (diff)
Updates for new policy
Fix for APPC mount of multiple VM VNFs Issue-ID: POLICY-1685 Change-Id: If8de8ecaa2052044af0512206fe8b326b21f50c4 Signed-off-by: Brian Freeman <bf1936@att.com>
Diffstat (limited to 'robot')
-rw-r--r--robot/assets/templates/policy/vFirewall_policy_monitoring_input_tosca.template14
-rw-r--r--robot/resources/demo_preload.robot8
-rw-r--r--robot/resources/policy_interface.robot34
-rw-r--r--robot/resources/test_templates/vnf_orchestration_test_template.robot4
4 files changed, 46 insertions, 14 deletions
diff --git a/robot/assets/templates/policy/vFirewall_policy_monitoring_input_tosca.template b/robot/assets/templates/policy/vFirewall_policy_monitoring_input_tosca.template
index ff95f481..d1e65222 100644
--- a/robot/assets/templates/policy/vFirewall_policy_monitoring_input_tosca.template
+++ b/robot/assets/templates/policy/vFirewall_policy_monitoring_input_tosca.template
@@ -14,18 +14,18 @@
"domain": "measurementsForVfScaling",
"metricsPerEventName": [
{
- "eventName": "vLoadBalancer",
+ "eventName": "vFirewallBroadcastPackets",
"controlLoopSchemaType": "VNF",
- "policyScope": "resource=vLoadBalancer;type=configuration",
- "policyName": "onap.vfirewall.tca",
+ "policyScope": "DCAE",
+ "policyName": "DCAE.Config_tca-hi-lo",
"policyVersion": "v0.0.1",
"thresholds": [
{
"closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
"closedLoopEventStatus": "ONSET",
"version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
- "thresholdValue": 500,
+ "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
+ "thresholdValue": 300,
"direction": "LESS_OR_EQUAL",
"severity": "MAJOR"
},
@@ -33,8 +33,8 @@
"closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
"closedLoopEventStatus": "ONSET",
"version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
- "thresholdValue": 5000,
+ "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
+ "thresholdValue": 700,
"direction": "GREATER_OR_EQUAL",
"severity": "CRITICAL"
}
diff --git a/robot/resources/demo_preload.robot b/robot/resources/demo_preload.robot
index ee09dc5b..74ee63ba 100644
--- a/robot/resources/demo_preload.robot
+++ b/robot/resources/demo_preload.robot
@@ -176,7 +176,7 @@ APPC Mount Point
Instantiate VNF
[Arguments] ${service} ${vf_module_label}=NULL
Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone
- ${vf_module_name} ${service} ${generic_vnfs}= Orchestrate VNF DemoCust ${service} ${service} ${TENANT_NAME}
+ ${vf_module_name_list} ${service} ${generic_vnfs}= Orchestrate VNF DemoCust ${service} ${service} ${TENANT_NAME}
Save For Delete
Log to Console Customer Name=${CUSTOMER_NAME}
Log to Console VNF Module Name=${vf_module_name}
@@ -186,9 +186,11 @@ Instantiate VNF
:for ${vf_module} in @{generic_vnfs}
\ ${generic_vnf}= Get From Dictionary ${generic_vnfs} ${vf_module}
\ ${model_invariant_id}= Set Variable If '${vf_module_label}' in '${vf_module}' ${generic_vnf['model-invariant-id']} ${model_invariant_id}
- Log to Console ModelInvariantID=${model_invariant_id}
+ Log to Console Update old vFWCL Policy for ModelInvariantID=${model_invariant_id}
${status} ${value}= Run Keyword And Ignore Error Update vVFWCL Policy ${model_invariant_id}
- ${status} ${value}= Run Keyword And Ignore Error APPC Mount Point ${vf_module_name}
+ :FOR ${vf_module_name} IN @{vf_module_name_list}
+ \ Log To Console APPC Mount Point for VNF Module Name=${vf_module_name}
+ \ ${status} ${value}= Run Keyword And Ignore Error APPC Mount Point ${vf_module_name}
Instantiate Demo VNF
[Arguments] ${service} ${vf_module_label}=NULL
diff --git a/robot/resources/policy_interface.robot b/robot/resources/policy_interface.robot
index 8bbbb62a..91d0d98b 100644
--- a/robot/resources/policy_interface.robot
+++ b/robot/resources/policy_interface.robot
@@ -53,6 +53,15 @@ Run Policy Put Request
Log Received response from policy ${resp.text}
[Return] ${resp}
+Run Policy Get Request
+ [Documentation] Runs Policy Get request
+ [Arguments] ${data_path}
+ Log Creating session ${POLICY_ENDPOINT}
+ ${session}= Create Session policy ${POLICY_ENDPOINT}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH} Environment=TEST
+ ${resp}= Get Request policy ${data_path} headers=${headers}
+ Log Received response from policy ${resp.text}
+
Run Policy Post Request
[Documentation] Runs Policy Post request
[Arguments] ${data_path} ${data}
@@ -62,7 +71,7 @@ Run Policy Post Request
${resp}= Post Request policy ${data_path} data=${data} headers=${headers}
Log Received response from policy ${resp.text}
[Return] ${resp}
-
+
Run Policy Delete Request
[Documentation] Runs Policy Delete request
[Arguments] ${data_path} ${data}
@@ -85,7 +94,7 @@ Run Policy Get Configs Request
-Update vVFWCL Policy
+Update vVFWCL Policy Old
[Arguments] ${resource_id}
Run Keyword and Ignore Error Delete vFWCL Policy
Sleep 20s
@@ -99,8 +108,23 @@ Update vVFWCL Policy
Reboot Drools
Sleep 20s
Log To Console Validate vFWCL Policy
+ Validate the vFWCL Policy Old
+
+Update vVFWCL Policy
+ [Arguments] ${resource_id}
+ Log To Console Create vFWCL Monitoring Policy
+ Create vFirewall Monitoring Policy
+ Sleep 5s
+ Log To Console Create vFWCL Operational Policy
+ Create vFirewall Operational Policy ${resource_id}
+ Sleep 5s
+ Log To Console Push vFWCL To PDP Group
+ Push vFirewall Policies To PDP Group
+ Sleep 20s
+ Log To Console Validate vFWCL Policy
Validate the vFWCL Policy
+
Delete vFWCL Policy
${data}= OperatingSystem.Get File ${POLICY_TEMPLATES}/FirewallPolicy_delete.template
${resp}= Run Policy Delete Request /pdp/api/deletePolicy ${data}
@@ -134,12 +158,16 @@ Reboot Drools
Log stdout=${stdout}
Should Contain ${stdout} is running
-Validate the vFWCL Policy
+Validate the vFWCL Policy Old
${resp}= Run Drools Get Request /policy/pdp/engine/controllers/amsterdam/drools
Should Be Equal As Strings ${resp.status_code} 200
${resp}= Run Drools Get Request /policy/pdp/engine/controllers/amsterdam/drools/facts/closedloop-amsterdam/org.onap.policy.controlloop.Params
Should Be Equal As Strings ${resp.status_code} 200
+Validate the vFWCL Policy
+ ${resp}= Run Policy Get Request /policy/pap/v1/pdps
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
Create vFirewall Monitoring Policy
${dict}= Create Dictionary
diff --git a/robot/resources/test_templates/vnf_orchestration_test_template.robot b/robot/resources/test_templates/vnf_orchestration_test_template.robot
index 31c81181..b3a4bdda 100644
--- a/robot/resources/test_templates/vnf_orchestration_test_template.robot
+++ b/robot/resources/test_templates/vnf_orchestration_test_template.robot
@@ -69,6 +69,7 @@ Orchestrate VNF
${vnflist}= Get From Dictionary ${GLOBAL_SERVICE_VNF_MAPPING} ${service}
${generic_vnfs}= Create Dictionary
${vnf_name_index}= Set Variable 0
+ ${vf_module_name_list}= Create List
${uuid}= Evaluate str("${uuid}")[:8]
:for ${vnf} in @{vnflist}
# APPC max is 50 characters
@@ -88,7 +89,8 @@ Orchestrate VNF
# TODO: Need to look at a better way to default ipv4_oam_interface search for Heatbridge
\ Execute Heatbridge ${vf_module_name} ${service_instance_id} ${vnf} ipv4_oam_interface
\ Validate VF Module ${vf_module_name} ${vnf}
- [Return] ${vf_module_name} ${service} ${generic_vnfs}
+ \ Append To List ${vf_module_name_list} ${vf_module_name}
+ [Return] ${vf_module_name_list} ${service} ${generic_vnfs}
Orchestrate Demo VNF