From c4f54bf8f8520cb270ad3d7f8c91e12a951f138a Mon Sep 17 00:00:00 2001 From: xuegao Date: Tue, 21 Apr 2020 18:05:44 +0200 Subject: [PATCH] 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 --- .../loop/components/external/PolicyComponent.java | 9 +- .../policy/operational/OperationalPolicy.java | 21 --- .../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 +-------------------- .../onap/clamp/loop/LoopControllerTestItCase.java | 2 +- .../microservice/OperationalPolicyPayloadTest.java | 26 ---- .../operational-policy-cds-payload-with-list.json | 152 +-------------------- .../tosca/operational-policy-json-schema.json | 152 +-------------------- .../tosca/operational-policy-properties.json | 31 +---- .../resources/tosca/pdp-group-policy-payload.json | 4 - ui-react/src/api/LoopCache.test.js | 5 +- ui-react/src/api/LoopCache_mokeLoopJsonCache.json | 3 +- .../OperationalPolicyModal.test.js | 1 - .../dialogs/OperationalPolicy/template.json | 15 -- .../components/dialogs/Policy/PolicyModal.test.js | 1 - .../components/loop_viewer/logs/LoopLogs.test.js | 6 +- .../logs/__snapshots__/LoopLogs.test.js.snap | 2 +- .../src/components/loop_viewer/svg/LoopSvg.test.js | 1 - 20 files changed, 16 insertions(+), 737 deletions(-) diff --git a/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java b/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java index 227f40a7..4ea5b711 100644 --- a/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java +++ b/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java @@ -85,13 +85,6 @@ public class PolicyComponent extends ExternalComponent { updatePdpGroupMap(opPolicy.getPdpGroup(), opPolicy.getPdpSubgroup(), opPolicy.getName(), "1.0.0", pdpGroupMap); - if (opPolicy.isLegacy()) { - for (String guardName:opPolicy.createGuardPolicyPayloads().keySet()) { - updatePdpGroupMap(opPolicy.getPdpGroup(), opPolicy.getPdpSubgroup(), - guardName, - "1.0.0", pdpGroupMap); - } - } } for (MicroServicePolicy msPolicy : loop.getMicroServicePolicies()) { @@ -186,7 +179,7 @@ public class PolicyComponent extends ExternalComponent { /** * This is a method that expect the results of the queries getPolicy and - * getPolicyDeployed for a unique policy (op,guard, config, etc ...). It + * getPolicyDeployed for a unique policy (op, config, etc ...). It * re-computes the global policy state for each policy results given. Therefore * this method is called multiple times from the camel route and must be reset * for a new global policy state retrieval. The state to compute the global diff --git a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java index 1e721ce2..b4020c18 100644 --- a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java +++ b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java @@ -293,25 +293,4 @@ public class OperationalPolicy extends Policy implements Serializable { return super.createPolicyPayload(); } } - - /** - * Return a map containing all Guard policies indexed by Guard policy Name. - * - * @return The Guards map - */ - public Map createGuardPolicyPayloads() { - Map result = new HashMap<>(); - - if (this.getConfigurationsJson() != null) { - JsonElement guardsList = this.getConfigurationsJson().get("guard_policies"); - if (guardsList != null) { - for (JsonElement guardElem : guardsList.getAsJsonArray()) { - result.put(guardElem.getAsJsonObject().get("policy-id").getAsString(), - new GsonBuilder().create().toJson(guardElem)); - } - } - } - logger.info("Guard policy payload: " + result); - return result; - } } 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 879c9b70..88d58260 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 2f4d9c8c..691656d8 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 1731308e..f597bdc0 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 7214b022..97302831 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" - ] - } - } - } - } - } - ] - } } } } diff --git a/src/test/java/org/onap/clamp/loop/LoopControllerTestItCase.java b/src/test/java/org/onap/clamp/loop/LoopControllerTestItCase.java index 4d51bb27..26db6b01 100644 --- a/src/test/java/org/onap/clamp/loop/LoopControllerTestItCase.java +++ b/src/test/java/org/onap/clamp/loop/LoopControllerTestItCase.java @@ -94,7 +94,7 @@ public class LoopControllerTestItCase { public void testUpdateOperationalPolicies() { saveTestLoopToDb(); String policy = "[{\"name\":\"OPERATIONAL_CLholmes31_v1_0_vFW_PG_T10_k8s-holmes-rules\"," - + "\"configurationsJson\":{\"guard_policies\":{}," + + "\"configurationsJson\":{" + "\"operational_policy\":{\"controlLoop\":{\"trigger_policy\":\"unique-policy-id-1-modifyConfig\"," + "\"timeout\":\"3600\",\"abatement\":\"false\"," + "\"controlLoopName\":\"LOOP_CLholmes31_v1_0_vFW_PG_T10_k8s-holmes-rules\"}," diff --git a/src/test/java/org/onap/clamp/policy/microservice/OperationalPolicyPayloadTest.java b/src/test/java/org/onap/clamp/policy/microservice/OperationalPolicyPayloadTest.java index 58a432d3..cef82e50 100644 --- a/src/test/java/org/onap/clamp/policy/microservice/OperationalPolicyPayloadTest.java +++ b/src/test/java/org/onap/clamp/policy/microservice/OperationalPolicyPayloadTest.java @@ -59,30 +59,4 @@ public class OperationalPolicyPayloadTest { assertThat(LegacyOperationalPolicy.createPolicyPayloadYamlLegacy(jsonConfig.get("operational_policy"))) .isEqualTo(ResourceFileUtil.getResourceAsString("tosca/operational-policy-payload-legacy.yaml")); } - - @Test - public void testGuardPolicyEmptyPayloadConstruction() throws IOException { - JsonObject jsonConfig = new GsonBuilder().create().fromJson( - ResourceFileUtil.getResourceAsString("tosca/operational-policy-no-guard-properties.json"), - JsonObject.class); - OperationalPolicy policy = new OperationalPolicy("testPolicy", jsonConfig, null, null, null, null, null); - Map guardsMap = policy.createGuardPolicyPayloads(); - assertThat(guardsMap).isEmpty(); - assertThat(guardsMap.entrySet()).isEmpty(); - } - - @Test - public void testGuardPolicyPayloadConstruction() throws IOException { - JsonObject jsonConfig = new GsonBuilder().create().fromJson( - ResourceFileUtil.getResourceAsString("tosca/operational-policy-properties.json"), JsonObject.class); - OperationalPolicy policy = new OperationalPolicy("testPolicy", jsonConfig, null, null, null, null, null); - - Map guardsMap = policy.createGuardPolicyPayloads(); - - JSONAssert.assertEquals(ResourceFileUtil.getResourceAsString("tosca/guard1-policy-payload.json"), - guardsMap.get("guard.minmax.new"), false); - - JSONAssert.assertEquals(ResourceFileUtil.getResourceAsString("tosca/guard2-policy-payload.json"), - guardsMap.get("guard.frequency.new"), false); - } } diff --git a/src/test/resources/tosca/operational-policy-cds-payload-with-list.json b/src/test/resources/tosca/operational-policy-cds-payload-with-list.json index 13b468ea..d9b5aee9 100644 --- a/src/test/resources/tosca/operational-policy-cds-payload-with-list.json +++ b/src/test/resources/tosca/operational-policy-cds-payload-with-list.json @@ -2,8 +2,7 @@ "type": "object", "title": "Configuration", "required": [ - "operational_policy", - "guard_policies" + "operational_policy" ], "properties": { "operational_policy": { @@ -582,155 +581,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" - ] - } - } - } - } - } - ] - } } } } \ No newline at end of file diff --git a/src/test/resources/tosca/operational-policy-json-schema.json b/src/test/resources/tosca/operational-policy-json-schema.json index 9dee089e..081e0f25 100644 --- a/src/test/resources/tosca/operational-policy-json-schema.json +++ b/src/test/resources/tosca/operational-policy-json-schema.json @@ -2,8 +2,7 @@ "type": "object", "title": "Configuration", "required": [ - "operational_policy", - "guard_policies" + "operational_policy" ], "properties": { "operational_policy": { @@ -940,155 +939,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" - ] - } - } - } - } - } - ] - } } } } diff --git a/src/test/resources/tosca/operational-policy-properties.json b/src/test/resources/tosca/operational-policy-properties.json index aaf9dc37..a38334b5 100644 --- a/src/test/resources/tosca/operational-policy-properties.json +++ b/src/test/resources/tosca/operational-policy-properties.json @@ -128,34 +128,5 @@ } } ] - }, - "guard_policies": [ - { - "policy-id": "guard.minmax.new", - "content": { - "actor": "APPC", - "recipe": "Restart", - "targets": ".*", - "clname": "LOOP_ASJOy_v1_0_ResourceInstanceName1_tca", - "guardActiveStart": "00:00:00Z", - "guardActiveEnd": "10:00:00Z", - "min": "0", - "max": "1" - } - }, - { - "policy-id": "guard.frequency.new", - "content": { - "actor": "APPC", - "recipe": "Rebuild", - "targets": ".*", - "clname": "LOOP_ASJOy_v1_0_ResourceInstanceName1_tca", - "guardActiveStart": "00:00:00Z", - "guardActiveEnd": "10:00:00Z", - "limit": "1", - "timeWindow": "2", - "timeUnits": "minute" - } - } - ] + } } diff --git a/src/test/resources/tosca/pdp-group-policy-payload.json b/src/test/resources/tosca/pdp-group-policy-payload.json index dce740fc..17535ecb 100644 --- a/src/test/resources/tosca/pdp-group-policy-payload.json +++ b/src/test/resources/tosca/pdp-group-policy-payload.json @@ -26,10 +26,6 @@ "name": "opLegacyPolicy", "version": "1.0.0" }, - { - "name": "guard1", - "version": "1.0.0" - }, { "name": "opPolicy", "version": "1.0.0" diff --git a/ui-react/src/api/LoopCache.test.js b/ui-react/src/api/LoopCache.test.js index 4642ff52..b0eef755 100644 --- a/ui-react/src/api/LoopCache.test.js +++ b/ui-react/src/api/LoopCache.test.js @@ -34,7 +34,6 @@ describe('Verify LoopCache functions', () => { const opPolicy = [{ "name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca", "configurationsJson": { - "guard_policies": {}, "operational_policy": { "controlLoop": {}, "policies": [] @@ -51,7 +50,6 @@ describe('Verify LoopCache functions', () => { const opPolicy = [{ "name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca", "configurationsJson": { - "guard_policies": {}, "operational_policy": { "controlLoop": {}, "policies": [] @@ -157,7 +155,7 @@ describe('Verify LoopCache functions', () => { "id": 1, "logType": "INFO", "logComponent": "CLAMP", - "message": "Operational and Guard policies UPDATED", + "message": "Operational policies UPDATED", "logInstant": "2019-07-08T09:44:37Z" } ]; @@ -196,7 +194,6 @@ describe('Verify LoopCache functions', () => { it('updateOperationalPolicyProperties', () => { const newOpPolicy = { - "guard_policies": {}, "operational_policy": { "controlLoop": {}, "policies": [] diff --git a/ui-react/src/api/LoopCache_mokeLoopJsonCache.json b/ui-react/src/api/LoopCache_mokeLoopJsonCache.json index 23ea354e..788306b8 100644 --- a/ui-react/src/api/LoopCache_mokeLoopJsonCache.json +++ b/ui-react/src/api/LoopCache_mokeLoopJsonCache.json @@ -88,7 +88,6 @@ { "name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca", "configurationsJson": { - "guard_policies": {}, "operational_policy": { "controlLoop": {}, "policies": [] @@ -113,7 +112,7 @@ "id": 1, "logType": "INFO", "logComponent": "CLAMP", - "message": "Operational and Guard policies UPDATED", + "message": "Operational policies UPDATED", "logInstant": "2019-07-08T09:44:37Z" } ] diff --git a/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.test.js b/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.test.js index c10c6ff0..4c11ce53 100644 --- a/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.test.js +++ b/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.test.js @@ -41,7 +41,6 @@ describe('Verify OperationalPolicyModal', () => { "operationalPolicies": [{ "name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca", "configurationsJson": { - "guard_policies": {}, "operational_policy": { "controlLoop": {}, "policies": [] diff --git a/ui-react/src/components/dialogs/OperationalPolicy/template.json b/ui-react/src/components/dialogs/OperationalPolicy/template.json index 6b4477f8..7c9dc0cd 100644 --- a/ui-react/src/components/dialogs/OperationalPolicy/template.json +++ b/ui-react/src/components/dialogs/OperationalPolicy/template.json @@ -3,21 +3,6 @@ { "name": "OPERATIONAL_LOOP_NAME", "configurationsJson": { - "guard_policies": { - "guard.minmax.new": { - "recipe": "", - "clname": "LOOP_NAME", - "actor": "", - "targets": "", - "min": "", - "max": "", - "limit": "", - "timeUnits": "", - "timeWindow": "", - "guardActiveStart": "00:00:00Z", - "guardActiveEnd": "00:00:01Z" - } - }, "operational_policy": { "controlLoop": { "trigger_policy": "new", diff --git a/ui-react/src/components/dialogs/Policy/PolicyModal.test.js b/ui-react/src/components/dialogs/Policy/PolicyModal.test.js index bf0b9109..d4021c97 100644 --- a/ui-react/src/components/dialogs/Policy/PolicyModal.test.js +++ b/ui-react/src/components/dialogs/Policy/PolicyModal.test.js @@ -42,7 +42,6 @@ describe('Verify PolicyModal', () => { "operationalPolicies": [{ "name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca", "configurationsJson": { - "guard_policies": {}, "operational_policy": { "controlLoop": {}, "policies": [] diff --git a/ui-react/src/components/loop_viewer/logs/LoopLogs.test.js b/ui-react/src/components/loop_viewer/logs/LoopLogs.test.js index 5c478f6a..3b7fd413 100644 --- a/ui-react/src/components/loop_viewer/logs/LoopLogs.test.js +++ b/ui-react/src/components/loop_viewer/logs/LoopLogs.test.js @@ -34,7 +34,7 @@ describe('Verify LoopLogs', () => { "id": 1, "logType": "INFO", "logComponent": "CLAMP", - "message": "Operational and Guard policies UPDATED", + "message": "Operational policies UPDATED", "logInstant": "2019-07-08T09:44:37Z" } ] @@ -51,14 +51,14 @@ describe('Verify LoopLogs', () => { "id": 1, "logType": "INFO", "logComponent": "CLAMP", - "message": "Operational and Guard policies UPDATED", + "message": "Operational policies UPDATED", "logInstant": "2019-07-08T09:44:37Z" }, { "id": 2, "logType": "INFO", "logComponent": "CLAMP", - "message": "Operational and Guard policies UPDATED", + "message": "Operational policies UPDATED", "logInstant": "2019-07-08T09:44:50Z" } ] diff --git a/ui-react/src/components/loop_viewer/logs/__snapshots__/LoopLogs.test.js.snap b/ui-react/src/components/loop_viewer/logs/__snapshots__/LoopLogs.test.js.snap index 174a3202..25736d2e 100644 --- a/ui-react/src/components/loop_viewer/logs/__snapshots__/LoopLogs.test.js.snap +++ b/ui-react/src/components/loop_viewer/logs/__snapshots__/LoopLogs.test.js.snap @@ -51,7 +51,7 @@ exports[`Verify LoopLogs Test the render method 1`] = ` "logComponent": "CLAMP", "logInstant": "2019-07-08T09:44:37Z", "logType": "INFO", - "message": "Operational and Guard policies UPDATED", + "message": "Operational policies UPDATED", } } /> diff --git a/ui-react/src/components/loop_viewer/svg/LoopSvg.test.js b/ui-react/src/components/loop_viewer/svg/LoopSvg.test.js index 17f4b356..e54b500f 100644 --- a/ui-react/src/components/loop_viewer/svg/LoopSvg.test.js +++ b/ui-react/src/components/loop_viewer/svg/LoopSvg.test.js @@ -39,7 +39,6 @@ describe('Verify LoopSvg', () => { "operationalPolicies": [{ "name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca", "configurationsJson": { - "guard_policies": {}, "operational_policy": { "controlLoop": {}, "policies": [] -- 2.16.6