From c4f54bf8f8520cb270ad3d7f8c91e12a951f138a Mon Sep 17 00:00:00 2001 From: xuegao Date: Tue, 21 Apr 2020 18:05:44 +0200 Subject: Guard policy clean up Remove guard policy related code, so that it will not be shown or created in the legacy policy UI. Issue-ID: CLAMP-825 Change-Id: I6c654fef9fd9df810fd48600c91ffef96db371cd Signed-off-by: xuegao --- .../resources/clds/camel/rest/clamp-api-v2.xml | 49 +------ .../resources/clds/camel/routes/loop-flows.xml | 26 +--- .../resources/clds/camel/routes/policy-flows.xml | 95 ------------- .../operational_policies/operational_policy.json | 152 +-------------------- 4 files changed, 5 insertions(+), 317 deletions(-) (limited to 'src/main/resources/clds') diff --git a/src/main/resources/clds/camel/rest/clamp-api-v2.xml b/src/main/resources/clds/camel/rest/clamp-api-v2.xml index 879c9b707..88d582605 100644 --- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml @@ -157,7 +157,7 @@ + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Operational policies UPDATED','INFO',${exchangeProperty[loopObject]})" /> @@ -532,29 +532,6 @@ - - - ${exchangeProperty['policy'].isLegacy()} == true - - - - ${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()} - - - ${body} - - - - - false - - - - - - @@ -634,27 +611,6 @@ false - - - ${exchangeProperty['policy'].isLegacy()} == true - - - - ${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()} - - - ${body} - - - - false - - - - - @@ -759,8 +715,9 @@ 500 - ADD Operational policy request FAILED + ADD Operational policy request FAILED for loop: ${header.loopName}, ${exception.message}" + diff --git a/src/main/resources/clds/camel/routes/loop-flows.xml b/src/main/resources/clds/camel/routes/loop-flows.xml index 2f4d9c8cf..691656d81 100644 --- a/src/main/resources/clds/camel/routes/loop-flows.xml +++ b/src/main/resources/clds/camel/routes/loop-flows.xml @@ -87,32 +87,8 @@ null + message="Processing Operational Policy: ${exchangeProperty[policyName]} of type ${exchangeProperty[policyType]}" /> - - - ${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()} - - - ${body.getKey()} - - - onap.policies.controlloop.Guard - - - 1.0.0 - - - 1 - - - null - - - - ${exchangeProperty[policyComponent].getState()} diff --git a/src/main/resources/clds/camel/routes/policy-flows.xml b/src/main/resources/clds/camel/routes/policy-flows.xml index 1731308ee..f597bdc08 100644 --- a/src/main/resources/clds/camel/routes/policy-flows.xml +++ b/src/main/resources/clds/camel/routes/policy-flows.xml @@ -313,101 +313,6 @@ - - - - - - - ${exchangeProperty[guardPolicy].getValue()} - - - - POST - - - application/json - - - ${exchangeProperty[X-ONAP-RequestID]} - - - - ${exchangeProperty[X-ONAP-InvocationID]} - - - - ${exchangeProperty[X-ONAP-PartnerName]} - - - - - - - - - ${exchangeProperty[guardPolicy].getKey()} creation status - - - - POLICY - - - - - - - - - - - - - null - - - DELETE - - - ${exchangeProperty[X-ONAP-RequestID]} - - - - ${exchangeProperty[X-ONAP-InvocationID]} - - - - ${exchangeProperty[X-ONAP-PartnerName]} - - - - - - - - - - ${exchangeProperty[guardPolicy].getKey()} removal status - - - - POLICY - - - - - - diff --git a/src/main/resources/clds/json-schema/operational_policies/operational_policy.json b/src/main/resources/clds/json-schema/operational_policies/operational_policy.json index 7214b022c..973028316 100644 --- a/src/main/resources/clds/json-schema/operational_policies/operational_policy.json +++ b/src/main/resources/clds/json-schema/operational_policies/operational_policy.json @@ -2,8 +2,7 @@ "type": "object", "title": "Configuration", "required": [ - "operational_policy", - "guard_policies" + "operational_policy" ], "properties": { "operational_policy": { @@ -315,155 +314,6 @@ } } } - }, - "guard_policies": { - "type": "array", - "format": "tabs-top", - "title": "Associated Guard policies", - "items": { - "headerTemplate": "{{self.policy-id}} - {{self.content.recipe}}", - "anyOf": [ - { - "title": "Guard MinMax", - "type": "object", - "properties": { - "policy-id": { - "type": "string", - "default": "guard.minmax.new", - "pattern": "^(guard.minmax\\..*)$" - }, - "content": { - "properties": { - "actor": { - "type": "string", - "enum": [ - "APPC", - "SO", - "VFC", - "SDNC", - "SDNR" - ] - }, - "recipe": { - "type": "string", - "enum": [ - "Restart", - "Rebuild", - "Migrate", - "Health-Check", - "ModifyConfig", - "VF Module Create", - "VF Module Delete", - "Reroute" - ] - }, - "targets": { - "type": "string", - "default": ".*" - }, - "clname": { - "type": "string", - "template": "{{loopName}}", - "watch": { - "loopName": "operational_policy.controlLoop.controlLoopName" - } - }, - "guardActiveStart": { - "type": "string", - "default": "00:00:00Z" - }, - "guardActiveEnd": { - "type": "string", - "default": "10:00:00Z" - }, - "min": { - "type": "string", - "default": "0" - }, - "max": { - "type": "string", - "default": "1" - } - } - } - } - }, - { - "title": "Guard Frequency", - "type": "object", - "properties": { - "policy-id": { - "type": "string", - "default": "guard.frequency.new", - "pattern": "^(guard.frequency\\..*)$" - }, - "content": { - "properties": { - "actor": { - "type": "string", - "enum": [ - "APPC", - "SO", - "VFC", - "SDNC", - "SDNR" - ] - }, - "recipe": { - "type": "string", - "enum": [ - "Restart", - "Rebuild", - "Migrate", - "Health-Check", - "ModifyConfig", - "VF Module Create", - "VF Module Delete", - "Reroute" - ] - }, - "targets": { - "type": "string", - "default": ".*" - }, - "clname": { - "type": "string", - "template": "{{loopName}}", - "watch": { - "loopName": "operational_policy.controlLoop.controlLoopName" - } - }, - "guardActiveStart": { - "type": "string", - "default": "00:00:00Z" - }, - "guardActiveEnd": { - "type": "string", - "default": "10:00:00Z" - }, - "limit": { - "type": "string" - }, - "timeWindow": { - "type": "string" - }, - "timeUnits": { - "type": "string", - "enum": [ - "minute", - "hour", - "day", - "week", - "month", - "year" - ] - } - } - } - } - } - ] - } } } } -- cgit 1.2.3-korg