aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Freeman <bf1936@att.com>2020-05-05 09:07:15 -0500
committerBrian Freeman <bf1936@att.com>2020-05-05 09:07:25 -0500
commitbb58461fbc21a3dee052efd411de3d72a04ec270 (patch)
tree1857ca9522ef37c795447f68c9f8face2911d7fb
parent5c9a4619cec915e5f87a1e0d6fb85bba7e3d3bc9 (diff)
Updates for Policy Version Changes
Issue-ID: INT-1350 Change-Id: I4c5956467b7e674546f89678921342cb7dd3e19c Signed-off-by: Brian Freeman <bf1936@att.com>
-rw-r--r--robot/assets/templates/policy/vFirewall_policy_monitoring_input_tosca.jinja11
-rw-r--r--robot/assets/templates/policy/vFirewall_push.jinja4
-rw-r--r--robot/resources/policy_interface.robot5
-rw-r--r--robot/testsuites/closed-loop.robot2
4 files changed, 12 insertions, 10 deletions
diff --git a/robot/assets/templates/policy/vFirewall_policy_monitoring_input_tosca.jinja b/robot/assets/templates/policy/vFirewall_policy_monitoring_input_tosca.jinja
index 1d5386c7..5ff2ff87 100644
--- a/robot/assets/templates/policy/vFirewall_policy_monitoring_input_tosca.jinja
+++ b/robot/assets/templates/policy/vFirewall_policy_monitoring_input_tosca.jinja
@@ -1,10 +1,11 @@
{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
"topology_template": {
"policies": [
{
"onap.vfirewall.tca": {
"type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "type_version": "1.0.0",
"version": "1.0.0",
"metadata": {
"policy-id": "onap.vfirewall.tca"
@@ -18,10 +19,10 @@
"controlLoopSchemaType": "VM",
"policyScope": "DCAE",
"policyName": "DCAE.Config_tca-hi-lo",
- "policyVersion": "v0.0.1",
+ "policyVersion": "1.0.0",
"thresholds": [
{
- "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
+ "closedLoopControlName": "ControlLoop-vFirewall-{{RESOURCE_ID}}",
"closedLoopEventStatus": "ONSET",
"version": "1.0.2",
"fieldPath": "$$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
@@ -30,7 +31,7 @@
"severity": "MAJOR"
},
{
- "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
+ "closedLoopControlName": "ControlLoop-vFirewall-{{RESOURCE_ID}}",
"closedLoopEventStatus": "ONSET",
"version": "1.0.2",
"fieldPath": "$$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
@@ -47,4 +48,4 @@
}
]
}
-} \ No newline at end of file
+}
diff --git a/robot/assets/templates/policy/vFirewall_push.jinja b/robot/assets/templates/policy/vFirewall_push.jinja
index d9aeca04..92f02fd6 100644
--- a/robot/assets/templates/policy/vFirewall_push.jinja
+++ b/robot/assets/templates/policy/vFirewall_push.jinja
@@ -2,11 +2,11 @@
"policies": [
{
"policy-id": "onap.vfirewall.tca",
- "policy-version": 1
+ "policy-version": "1.0.0"
},
{
"policy-id": "operational.modifyconfig",
"policy-version": "{{OP_POLICY_VERSION}}.0.0"
}
]
-} \ No newline at end of file
+}
diff --git a/robot/resources/policy_interface.robot b/robot/resources/policy_interface.robot
index f3d40219..71311a81 100644
--- a/robot/resources/policy_interface.robot
+++ b/robot/resources/policy_interface.robot
@@ -164,7 +164,7 @@ Run Policy Get Configs Request
Update vVFWCL Policy
[Arguments] ${resource_id}
Log Create vFWCL Monitoring Policy
- Create vFirewall Monitoring Policy
+ Create vFirewall Monitoring Policy ${resource_id}
Sleep 5s
Log Create vFWCL Operational Policy
${op_policy_version}= Create vFirewall Operational Policy ${resource_id}
@@ -210,7 +210,8 @@ Validate the vFWCL Policy
Should Be Equal As Strings ${resp.status_code} 200
Create vFirewall Monitoring Policy
- ${dict}= Create Dictionary
+ [Arguments] ${resource_id}
+ ${dict}= Create Dictionary RESOURCE_ID=${resource_id}
Templating.Create Environment policy ${GLOBAL_TEMPLATE_FOLDER}
${data}= Templating.Apply Template policy ${POLICY_TEMPLATES}/vFirewall_policy_monitoring_input_tosca.jinja ${dict}
${resp}= Run Policy Api Post Request /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies ${data}
diff --git a/robot/testsuites/closed-loop.robot b/robot/testsuites/closed-loop.robot
index d3b161fc..de30af2c 100644
--- a/robot/testsuites/closed-loop.robot
+++ b/robot/testsuites/closed-loop.robot
@@ -24,5 +24,5 @@ VFWCL Closed Loop Test
VFWCL Repush Operation Policy
[TAGS] repushpolicy
- Undeploy Policy operational.modifyconfig
+ Run Keyword And Ignore Error Undeploy Policy operational.modifyconfig
Update vVFWCL Policy ${MODEL_INVARIANT_ID}