From 3bb6cf4b938d3e725860606d3ddaa8eecd872151 Mon Sep 17 00:00:00 2001 From: DR695H Date: Thu, 20 Jun 2019 15:04:04 -0400 Subject: replace aai, closeloop, sdc with jinja Issue-ID: TEST-158 Change-Id: I95a783f26e28512cb4fc98e50931d62001c489c6 Signed-off-by: DR695H --- .../templates/policy/closedloop_configpolicy.jinja | 36 ++++++++++++++++++++++ .../policy/closedloop_configpolicy.template | 36 ---------------------- .../templates/policy/closedloop_createpolicy.jinja | 21 +++++++++++++ .../policy/closedloop_createpolicy.template | 21 ------------- .../templates/policy/closedloop_deletepolicy.jinja | 5 +++ .../policy/closedloop_deletepolicy.template | 5 --- .../policy/closedloop_getconfigpolicy.jinja | 8 +++++ .../policy/closedloop_getconfigpolicy.template | 8 ----- .../templates/policy/closedloop_opspolicy.jinja | 25 +++++++++++++++ .../templates/policy/closedloop_opspolicy.template | 25 --------------- .../templates/policy/closedloop_pushpolicy.jinja | 5 +++ .../policy/closedloop_pushpolicy.template | 5 --- 12 files changed, 100 insertions(+), 100 deletions(-) create mode 100644 robot/assets/templates/policy/closedloop_configpolicy.jinja delete mode 100644 robot/assets/templates/policy/closedloop_configpolicy.template create mode 100644 robot/assets/templates/policy/closedloop_createpolicy.jinja delete mode 100644 robot/assets/templates/policy/closedloop_createpolicy.template create mode 100644 robot/assets/templates/policy/closedloop_deletepolicy.jinja delete mode 100644 robot/assets/templates/policy/closedloop_deletepolicy.template create mode 100644 robot/assets/templates/policy/closedloop_getconfigpolicy.jinja delete mode 100644 robot/assets/templates/policy/closedloop_getconfigpolicy.template create mode 100644 robot/assets/templates/policy/closedloop_opspolicy.jinja delete mode 100644 robot/assets/templates/policy/closedloop_opspolicy.template create mode 100644 robot/assets/templates/policy/closedloop_pushpolicy.jinja delete mode 100644 robot/assets/templates/policy/closedloop_pushpolicy.template (limited to 'robot/assets/templates/policy') diff --git a/robot/assets/templates/policy/closedloop_configpolicy.jinja b/robot/assets/templates/policy/closedloop_configpolicy.jinja new file mode 100644 index 00000000..3f3575b4 --- /dev/null +++ b/robot/assets/templates/policy/closedloop_configpolicy.jinja @@ -0,0 +1,36 @@ +{ + "service": "tca_policy", + "location": "SampleServiceLocation", + "uuid": "test", + "policyName": "MicroServicevDNS", + "description": "MicroService vDNS Policy", + "configName": "SampleConfigName", + "templateVersion": "OpenSource.version.1", + "version": "1.1.0", + "priority": "1", + "policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", + "riskType": "SampleRiskType", + "riskLevel": "1", + "guard": "False", + "content": { + "tca_policy": { + "domain": "measurementsForVfScaling", + "metricsPerEventName": [{ + "eventName": "vLoadBalancer", + "controlLoopSchemaType": "VM", + "policyScope": "DCAE", + "policyName": "DCAE.Config_tca-hi-lo", + "policyVersion": "v0.0.1", + "thresholds": [{ + "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", + "version": "1.0.2", + "fieldPath": "$$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta", + "thresholdValue": 300, + "direction": "GREATER_OR_EQUAL", + "severity": "CRITICAL", + "closedLoopEventStatus": "ONSET" + }] + }] + } + } +} diff --git a/robot/assets/templates/policy/closedloop_configpolicy.template b/robot/assets/templates/policy/closedloop_configpolicy.template deleted file mode 100644 index 3f3575b4..00000000 --- a/robot/assets/templates/policy/closedloop_configpolicy.template +++ /dev/null @@ -1,36 +0,0 @@ -{ - "service": "tca_policy", - "location": "SampleServiceLocation", - "uuid": "test", - "policyName": "MicroServicevDNS", - "description": "MicroService vDNS Policy", - "configName": "SampleConfigName", - "templateVersion": "OpenSource.version.1", - "version": "1.1.0", - "priority": "1", - "policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", - "riskType": "SampleRiskType", - "riskLevel": "1", - "guard": "False", - "content": { - "tca_policy": { - "domain": "measurementsForVfScaling", - "metricsPerEventName": [{ - "eventName": "vLoadBalancer", - "controlLoopSchemaType": "VM", - "policyScope": "DCAE", - "policyName": "DCAE.Config_tca-hi-lo", - "policyVersion": "v0.0.1", - "thresholds": [{ - "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", - "version": "1.0.2", - "fieldPath": "$$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta", - "thresholdValue": 300, - "direction": "GREATER_OR_EQUAL", - "severity": "CRITICAL", - "closedLoopEventStatus": "ONSET" - }] - }] - } - } -} diff --git a/robot/assets/templates/policy/closedloop_createpolicy.jinja b/robot/assets/templates/policy/closedloop_createpolicy.jinja new file mode 100644 index 00000000..bbb1f1ad --- /dev/null +++ b/robot/assets/templates/policy/closedloop_createpolicy.jinja @@ -0,0 +1,21 @@ +{ + "policyConfigType": "BRMS_PARAM", + "policyName": "{{policy_name}}", + "policyDescription": "Create BRMS Param policy", + "attributes": { + "RULE": { + "templateName": "ClosedLoopDemo_closedLoopControlName", + "aaiNamedQueryUUID": "2", + "aaiPassword": "2", + "aaiPatternMatch": "2", + "aaiURL": "2", + "actor": "2", + "appcTopic": "2", + "closedLoopControlName": "2", + "msoPassword": "2", + "msoURL": "2", + "msoUsername": "2", + "aaiUsername": "3" + } + } +} diff --git a/robot/assets/templates/policy/closedloop_createpolicy.template b/robot/assets/templates/policy/closedloop_createpolicy.template deleted file mode 100644 index 7c693e84..00000000 --- a/robot/assets/templates/policy/closedloop_createpolicy.template +++ /dev/null @@ -1,21 +0,0 @@ -{ - "policyConfigType": "BRMS_PARAM", - "policyName": "${policy_name}", - "policyDescription": "Create BRMS Param policy", - "attributes": { - "RULE": { - "templateName": "ClosedLoopDemo_closedLoopControlName", - "aaiNamedQueryUUID": "2", - "aaiPassword": "2", - "aaiPatternMatch": "2", - "aaiURL": "2", - "actor": "2", - "appcTopic": "2", - "closedLoopControlName": "2", - "msoPassword": "2", - "msoURL": "2", - "msoUsername": "2", - "aaiUsername": "3" - } - } -} diff --git a/robot/assets/templates/policy/closedloop_deletepolicy.jinja b/robot/assets/templates/policy/closedloop_deletepolicy.jinja new file mode 100644 index 00000000..73c5badf --- /dev/null +++ b/robot/assets/templates/policy/closedloop_deletepolicy.jinja @@ -0,0 +1,5 @@ +{ + "pdpGroup": "default", + "policyComponent": "PDP", + "policyName": "{{policy_name}}" +} diff --git a/robot/assets/templates/policy/closedloop_deletepolicy.template b/robot/assets/templates/policy/closedloop_deletepolicy.template deleted file mode 100644 index 55510102..00000000 --- a/robot/assets/templates/policy/closedloop_deletepolicy.template +++ /dev/null @@ -1,5 +0,0 @@ -{ - "pdpGroup": "default", - "policyComponent": "PDP", - "policyName": "${policy_name}" -} diff --git a/robot/assets/templates/policy/closedloop_getconfigpolicy.jinja b/robot/assets/templates/policy/closedloop_getconfigpolicy.jinja new file mode 100644 index 00000000..f1142b57 --- /dev/null +++ b/robot/assets/templates/policy/closedloop_getconfigpolicy.jinja @@ -0,0 +1,8 @@ +{ + "configAttributes" : { + }, + "configName" : ".*", + "ecompName" : "DCAE", + "policyName" : "{{config_policy_name}}", + "unique" : true +} \ No newline at end of file diff --git a/robot/assets/templates/policy/closedloop_getconfigpolicy.template b/robot/assets/templates/policy/closedloop_getconfigpolicy.template deleted file mode 100644 index 34145e5b..00000000 --- a/robot/assets/templates/policy/closedloop_getconfigpolicy.template +++ /dev/null @@ -1,8 +0,0 @@ -{ - "configAttributes" : { - }, - "configName" : ".*", - "ecompName" : "DCAE", - "policyName" : "${config_policy_name}", - "unique" : true -} \ No newline at end of file diff --git a/robot/assets/templates/policy/closedloop_opspolicy.jinja b/robot/assets/templates/policy/closedloop_opspolicy.jinja new file mode 100644 index 00000000..0a2cc08a --- /dev/null +++ b/robot/assets/templates/policy/closedloop_opspolicy.jinja @@ -0,0 +1,25 @@ + +{ + "policyConfigType": "BRMS_PARAM", + "policyName": "{{policy_name}}", + "policyDescription": "Create BRMS Param policy for vFW", + "attributes": { + "RULE": { + "templateName": "ControlLoopDemo__closedLoopControlName", + "closedLoopControlName": "CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8", + "policyVersion": "v1.0", + "aaiNamedQueryUUID": "null", + "aaiPassword": "null", + "aaiURL": "null", + "actor": "APPC", + "appcTopic": "APPC-CL", + "msoPassword": "null", + "msoURL": "null", + "msoUsername": "null", + "aaiUsername": "null", + "notificationTopic": "POLICY-CL-MGT", + "aaiPatternMatch": 1 + } + } +} + diff --git a/robot/assets/templates/policy/closedloop_opspolicy.template b/robot/assets/templates/policy/closedloop_opspolicy.template deleted file mode 100644 index 722c9dca..00000000 --- a/robot/assets/templates/policy/closedloop_opspolicy.template +++ /dev/null @@ -1,25 +0,0 @@ - -{ - "policyConfigType": "BRMS_PARAM", - "policyName": "${policy_name}", - "policyDescription": "Create BRMS Param policy for vFW", - "attributes": { - "RULE": { - "templateName": "ControlLoopDemo__closedLoopControlName", - "closedLoopControlName": "CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8", - "policyVersion": "v1.0", - "aaiNamedQueryUUID": "null", - "aaiPassword": "null", - "aaiURL": "null", - "actor": "APPC", - "appcTopic": "APPC-CL", - "msoPassword": "null", - "msoURL": "null", - "msoUsername": "null", - "aaiUsername": "null", - "notificationTopic": "POLICY-CL-MGT", - "aaiPatternMatch": 1 - } - } -} - diff --git a/robot/assets/templates/policy/closedloop_pushpolicy.jinja b/robot/assets/templates/policy/closedloop_pushpolicy.jinja new file mode 100644 index 00000000..7be4c9a9 --- /dev/null +++ b/robot/assets/templates/policy/closedloop_pushpolicy.jinja @@ -0,0 +1,5 @@ +{ + "policyName" : "{{policy_name}}", + "policyType" : "{{policy_type}}", + "pdpGroup" : "default" +} \ No newline at end of file diff --git a/robot/assets/templates/policy/closedloop_pushpolicy.template b/robot/assets/templates/policy/closedloop_pushpolicy.template deleted file mode 100644 index ce1d4859..00000000 --- a/robot/assets/templates/policy/closedloop_pushpolicy.template +++ /dev/null @@ -1,5 +0,0 @@ -{ - "policyName" : "${policy_name}", - "policyType" : "${policy_type}", - "pdpGroup" : "default" -} \ No newline at end of file -- cgit 1.2.3-korg