Merge "Fix entityId bug"
authorChristophe Closset <christophe.closset@intl.att.com>
Thu, 23 Apr 2020 08:49:36 +0000 (08:49 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 23 Apr 2020 08:49:36 +0000 (08:49 +0000)
23 files changed:
src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java
src/main/java/org/onap/clamp/loop/template/LoopElementModel.java
src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java
src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java
src/main/resources/clds/camel/rest/clamp-api-v2.xml
src/main/resources/clds/camel/routes/loop-flows.xml
src/main/resources/clds/camel/routes/policy-flows.xml
src/main/resources/clds/json-schema/operational_policies/operational_policy.json
src/test/java/org/onap/clamp/loop/LoopControllerTestItCase.java
src/test/java/org/onap/clamp/policy/microservice/OperationalPolicyPayloadTest.java
src/test/resources/tosca/operational-policy-cds-payload-with-list.json
src/test/resources/tosca/operational-policy-json-schema.json
src/test/resources/tosca/operational-policy-properties.json
src/test/resources/tosca/pdp-group-policy-payload.json
ui-react/src/api/LoopCache.test.js
ui-react/src/api/LoopCache_mokeLoopJsonCache.json
ui-react/src/components/dialogs/ManageDictionaries/ManageDictionaries.js
ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.test.js
ui-react/src/components/dialogs/OperationalPolicy/template.json
ui-react/src/components/dialogs/Policy/PolicyModal.test.js
ui-react/src/components/loop_viewer/logs/LoopLogs.test.js
ui-react/src/components/loop_viewer/logs/__snapshots__/LoopLogs.test.js.snap
ui-react/src/components/loop_viewer/svg/LoopSvg.test.js

index 227f40a..4ea5b71 100644 (file)
@@ -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
index 4a46a95..35fdf43 100644 (file)
@@ -75,8 +75,8 @@ public class LoopElementModel extends AuditEntity implements Serializable {
     @Column(columnDefinition = "MEDIUMTEXT", name = "blueprint_yaml")
     private String blueprint;
 
-    public static String MICRO_SERVICE_TYPE = "MICRO_SERVICE_TYPE";
-    public static String OPERATIONAL_POLICY_TYPE = "OPERATIONAL_POLICY_TYPE";
+    public static final String MICRO_SERVICE_TYPE = "MICRO_SERVICE_TYPE";
+    public static final String OPERATIONAL_POLICY_TYPE = "OPERATIONAL_POLICY_TYPE";
     /**
      * The type of element.
      */
index 1e721ce..b4020c1 100644 (file)
@@ -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<String, String> createGuardPolicyPayloads() {
-        Map<String, String> 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;
-    }
 }
index b1aa4ad..8bd8aac 100644 (file)
@@ -45,9 +45,19 @@ public class OperationalPolicyRepresentationBuilder {
             EELFManager.getInstance().getLogger(OperationalPolicyRepresentationBuilder.class);
 
     public static final String PROPERTIES = "properties";
+    public static final String ITEMS = "items";
+    public static final String ANY_OF = "anyOf";
+    public static final String TITLE = "title";
+    public static final String RECIPE = "recipe";
+    public static final String DEFAULT = "default";
+    public static final String STRING = "string";
     public static final String TYPE = "type";
     public static final String TYPE_LIST = "list";
 
+    private OperationalPolicyRepresentationBuilder() {
+       throw new IllegalStateException("This is Utility class, not supposed to be initiated.");
+    }
+
     /**
      * This method generates the operational policy json representation that will be
      * used by ui for rendering. It uses the model (VF and VFModule) defined in the
@@ -65,21 +75,21 @@ public class OperationalPolicyRepresentationBuilder {
                     ResourceFileUtil
                             .getResourceAsString("clds/json-schema/operational_policies/operational_policy.json"),
                     JsonObject.class);
-            jsonSchema.get("properties").getAsJsonObject()
-                    .get("operational_policy").getAsJsonObject().get("properties").getAsJsonObject().get("policies")
-                    .getAsJsonObject().get("items").getAsJsonObject().get("properties").getAsJsonObject().get("target")
-                    .getAsJsonObject().get("anyOf").getAsJsonArray().addAll(createAnyOfArray(modelJson, true));
+            jsonSchema.get(PROPERTIES).getAsJsonObject()
+                    .get("operational_policy").getAsJsonObject().get(PROPERTIES).getAsJsonObject().get("policies")
+                    .getAsJsonObject().get(ITEMS).getAsJsonObject().get(PROPERTIES).getAsJsonObject().get("target")
+                    .getAsJsonObject().get(ANY_OF).getAsJsonArray().addAll(createAnyOfArray(modelJson, true));
 
             // update CDS recipe and payload information to schema
-            JsonArray actors = jsonSchema.get("properties").getAsJsonObject()
-                    .get("operational_policy").getAsJsonObject().get("properties").getAsJsonObject().get("policies")
-                    .getAsJsonObject().get("items").getAsJsonObject().get("properties").getAsJsonObject().get("actor")
-                    .getAsJsonObject().get("anyOf").getAsJsonArray();
+            JsonArray actors = jsonSchema.get(PROPERTIES).getAsJsonObject()
+                    .get("operational_policy").getAsJsonObject().get(PROPERTIES).getAsJsonObject().get("policies")
+                    .getAsJsonObject().get(ITEMS).getAsJsonObject().get(PROPERTIES).getAsJsonObject().get("actor")
+                    .getAsJsonObject().get(ANY_OF).getAsJsonArray();
 
             for (JsonElement actor : actors) {
-                if ("CDS".equalsIgnoreCase(actor.getAsJsonObject().get("title").getAsString())) {
-                    actor.getAsJsonObject().get("properties").getAsJsonObject().get("recipe").getAsJsonObject()
-                            .get("anyOf").getAsJsonArray()
+                if ("CDS".equalsIgnoreCase(actor.getAsJsonObject().get(TITLE).getAsString())) {
+                    actor.getAsJsonObject().get(PROPERTIES).getAsJsonObject().get(RECIPE).getAsJsonObject()
+                            .get(ANY_OF).getAsJsonArray()
                             .addAll(createAnyOfArrayForCdsRecipe(modelJson));
                 }
             }
@@ -93,9 +103,9 @@ public class OperationalPolicyRepresentationBuilder {
     private static JsonObject createSchemaProperty(String title, String type, String defaultValue, String readOnlyFlag,
                                                    String[] enumArray) {
         JsonObject property = new JsonObject();
-        property.addProperty("title", title);
-        property.addProperty("type", type);
-        property.addProperty("default", defaultValue);
+        property.addProperty(TITLE, title);
+        property.addProperty(TYPE, type);
+        property.addProperty(DEFAULT, defaultValue);
         property.addProperty("readOnly", readOnlyFlag);
 
         if (enumArray != null) {
@@ -114,15 +124,15 @@ public class OperationalPolicyRepresentationBuilder {
 
         for (Entry<String, JsonElement> entry : modelVnfs.entrySet()) {
             JsonObject vnfOneOfSchema = new JsonObject();
-            vnfOneOfSchema.addProperty("title", "VNF" + "-" + entry.getKey());
+            vnfOneOfSchema.addProperty(TITLE, "VNF" + "-" + entry.getKey());
             JsonObject properties = new JsonObject();
             if (generateType) {
-                properties.add("type", createSchemaProperty("Type", "string", "VNF", "True", null));
+                properties.add(TYPE, createSchemaProperty("Type", STRING, "VNF", "True", null));
             }
-            properties.add("resourceID", createSchemaProperty("Resource ID", "string",
+            properties.add("resourceID", createSchemaProperty("Resource ID", STRING,
                     modelVnfs.get(entry.getKey()).getAsJsonObject().get("name").getAsString(), "True", null));
 
-            vnfOneOfSchema.add("properties", properties);
+            vnfOneOfSchema.add(PROPERTIES, properties);
             vnfSchemaArray.add(vnfOneOfSchema);
         }
         return vnfSchemaArray;
@@ -143,39 +153,39 @@ public class OperationalPolicyRepresentationBuilder {
 
         for (Entry<String, JsonElement> entry : modelVfModules.entrySet()) {
             JsonObject vfModuleOneOfSchema = new JsonObject();
-            vfModuleOneOfSchema.addProperty("title", "VFMODULE" + "-" + entry.getKey());
+            vfModuleOneOfSchema.addProperty(TITLE, "VFMODULE" + "-" + entry.getKey());
             JsonObject properties = new JsonObject();
             if (generateType) {
-                properties.add("type", createSchemaProperty("Type", "string", "VFMODULE", "True", null));
+                properties.add(TYPE, createSchemaProperty("Type", STRING, "VFMODULE", "True", null));
             }
             properties.add("resourceID",
-                    createSchemaProperty("Resource ID", "string",
+                    createSchemaProperty("Resource ID", STRING,
                             modelVfModules.get(entry.getKey()).getAsJsonObject().get("vfModuleModelName").getAsString(),
                             "True", null));
             properties.add("modelInvariantId",
-                    createSchemaProperty("Model Invariant Id (ModelInvariantUUID)", "string",
+                    createSchemaProperty("Model Invariant Id (ModelInvariantUUID)", STRING,
                             modelVfModules.get(entry.getKey()).getAsJsonObject().get("vfModuleModelInvariantUUID")
                                     .getAsString(),
                             "True", null));
             properties.add("modelVersionId",
-                    createSchemaProperty("Model Version Id (ModelUUID)", "string",
+                    createSchemaProperty("Model Version Id (ModelUUID)", STRING,
                             modelVfModules.get(entry.getKey()).getAsJsonObject().get("vfModuleModelUUID").getAsString(),
                             "True", null));
             properties.add("modelName",
-                    createSchemaProperty("Model Name", "string",
+                    createSchemaProperty("Model Name", STRING,
                             modelVfModules.get(entry.getKey()).getAsJsonObject().get("vfModuleModelName").getAsString(),
                             "True", null));
-            properties.add("modelVersion", createSchemaProperty("Model Version", "string",
+            properties.add("modelVersion", createSchemaProperty("Model Version", STRING,
                     modelVfModules.get(entry.getKey()).getAsJsonObject().get("vfModuleModelVersion").getAsString(),
                     "True", null));
             properties
                     .add("modelCustomizationId",
-                            createSchemaProperty("Customization ID", "string",
+                            createSchemaProperty("Customization ID", STRING,
                                     modelVfModules.get(entry.getKey()).getAsJsonObject()
                                             .get("vfModuleModelCustomizationUUID").getAsString(), "True",
                                     null));
 
-            vfModuleOneOfSchema.add("properties", properties);
+            vfModuleOneOfSchema.add(PROPERTIES, properties);
             vfModuleOneOfSchemaArray.add(vfModuleOneOfSchema);
         }
         return vfModuleOneOfSchemaArray;
@@ -213,9 +223,9 @@ public class OperationalPolicyRepresentationBuilder {
                 JsonObject workflows = controllerProperties.getAsJsonObject("workflows");
                 for (Entry<String, JsonElement> workflowsEntry : workflows.entrySet()) {
                     JsonObject obj = new JsonObject();
-                    obj.addProperty("title", workflowsEntry.getKey());
-                    obj.addProperty("type", "object");
-                    obj.add("properties", createPayloadProperty(workflowsEntry.getValue().getAsJsonObject(),
+                    obj.addProperty(TITLE, workflowsEntry.getKey());
+                    obj.addProperty(TYPE, "object");
+                    obj.add(PROPERTIES, createPayloadProperty(workflowsEntry.getValue().getAsJsonObject(),
                             controllerProperties, workflowsEntry.getKey()));
                     schemaArray.add(obj);
                 }
@@ -228,21 +238,21 @@ public class OperationalPolicyRepresentationBuilder {
     private static JsonObject createPayloadProperty(JsonObject workFlow,
                                                     JsonObject controllerProperties, String workFlowName) {
         JsonObject payload = new JsonObject();
-        payload.addProperty("title", "Payload");
-        payload.addProperty("type", "object");
-        payload.add("properties", createInputPropertiesForPayload(workFlow,
+        payload.addProperty(TITLE, "Payload");
+        payload.addProperty(TYPE, "object");
+        payload.add(PROPERTIES, createInputPropertiesForPayload(workFlow,
                                                                   controllerProperties));
         JsonObject properties = new JsonObject();
-        properties.add("recipe", createRecipeForCdsWorkflow(workFlowName));
+        properties.add(RECIPE, createRecipeForCdsWorkflow(workFlowName));
         properties.add("payload", payload);
         return properties;
     }
 
     private static JsonObject createRecipeForCdsWorkflow(String workflow) {
         JsonObject recipe = new JsonObject();
-        recipe.addProperty("title", "recipe");
-        recipe.addProperty("type", "string");
-        recipe.addProperty("default", workflow);
+        recipe.addProperty(TITLE, RECIPE);
+        recipe.addProperty(TYPE, STRING);
+        recipe.addProperty(DEFAULT, workflow);
         JsonObject options = new JsonObject();
         options.addProperty("hidden", true);
         recipe.add("options", options);
@@ -264,18 +274,18 @@ public class OperationalPolicyRepresentationBuilder {
         JsonObject inputs = workFlow.getAsJsonObject("inputs");
         JsonObject jsonObject = new JsonObject();
         jsonObject.add("artifact_name", createSchemaProperty(
-                "artifact name", "string", artifactName, "True", null));
+                "artifact name", STRING, artifactName, "True", null));
         jsonObject.add("artifact_version", createSchemaProperty(
-                "artifact version", "string", artifactVersion, "True", null));
+                "artifact version", STRING, artifactVersion, "True", null));
         jsonObject.add("mode", createCdsInputProperty(
-                "mode", "string", "async" ,null));
+                "mode", STRING, "async" ,null));
         jsonObject.add("data", createDataProperty(inputs));
         return jsonObject;
     }
 
     private static JsonObject createDataProperty(JsonObject inputs) {
         JsonObject data = new JsonObject();
-        data.addProperty("title", "data");
+        data.addProperty(TITLE, "data");
         JsonObject dataObj = new JsonObject();
         addDataFields(inputs, dataObj);
         data.add(PROPERTIES, dataObj);
@@ -305,7 +315,7 @@ public class OperationalPolicyRepresentationBuilder {
                                                      String defaultValue,
                                                      JsonObject cdsProperty) {
         JsonObject property = new JsonObject();
-        property.addProperty("title", title);
+        property.addProperty(TITLE, title);
 
         if (TYPE_LIST.equalsIgnoreCase(type)) {
             property.addProperty(TYPE, "array");
@@ -315,14 +325,14 @@ public class OperationalPolicyRepresentationBuilder {
                               dataObject);
                 JsonObject listProperties = new JsonObject();
                 listProperties.add(PROPERTIES, dataObject);
-                property.add("items", listProperties);
+                property.add(ITEMS, listProperties);
             }
         } else {
             property.addProperty(TYPE, type);
         }
 
         if (defaultValue != null) {
-            property.addProperty("default", defaultValue);
+            property.addProperty(DEFAULT, defaultValue);
         }
         return property;
     }
index 97768e4..86a64f6 100644 (file)
                                        <to
                                                uri="bean:org.onap.clamp.loop.LoopController?method=updateOperationalPolicies(${header.loopName},${header.OperationalPoliciesArray})" />
                                        <to
-                                               uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Operational and Guard policies UPDATED','INFO',${exchangeProperty[loopObject]})" />
+                                               uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Operational policies UPDATED','INFO',${exchangeProperty[loopObject]})" />
                                        <to
                                                uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
                                        <doCatch>
 
                                                <to uri="direct:delete-policy" />
                                                <to uri="direct:create-policy" />
-                                               <choice>
-                                                       <when>
-                                                               <simple>${exchangeProperty['policy'].isLegacy()} == true
-                                                               </simple>
-                                                               <log loggingLevel="INFO"
-                                                                       message="Processing all GUARD policies (LEGACY) defined in loop ${exchangeProperty[loopObject].getName()}" />
-                                                               <split>
-                                                                       <simple>${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()}
-                                                                       </simple>
-                                                                       <setProperty propertyName="guardPolicy">
-                                                                               <simple>${body}</simple>
-                                                                       </setProperty>
-                                                                       <log loggingLevel="INFO"
-                                                                               message="Processing Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" />
-
-                                                                       <setProperty propertyName="raiseHttpExceptionFlag">
-                                                                               <simple resultType="java.lang.Boolean">false</simple>
-                                                                       </setProperty>
-                                                                       <to uri="direct:delete-guard-policy" />
-                                                                       <to uri="direct:create-guard-policy" />
-                                                               </split>
-                                                       </when>
-                                               </choice>
                                        </split>
 
                                        <delay>
                                                        <simple resultType="java.lang.Boolean">false</simple>
                                                </setProperty>
                                                <to uri="direct:delete-policy" />
-                                               <choice>
-                                                       <when>
-                                                               <simple>${exchangeProperty['policy'].isLegacy()} == true
-                                                               </simple>
-                                                               <log loggingLevel="INFO"
-                                                                       message="Deleting all GUARD policies (LEGACY) defined in loop ${exchangeProperty[loopObject].getName()}" />
-                                                               <split>
-                                                                       <simple>${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()}
-                                                                       </simple>
-                                                                       <setProperty propertyName="guardPolicy">
-                                                                               <simple>${body}</simple>
-                                                                       </setProperty>
-                                                                       <log loggingLevel="INFO"
-                                                                               message="Deleting Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" />
-                                                                       <setProperty propertyName="raiseHttpExceptionFlag">
-                                                                               <simple resultType="java.lang.Boolean">false</simple>
-                                                                       </setProperty>
-                                                                       <to uri="direct:delete-guard-policy" />
-                                                               </split>
-                                                       </when>
-                                               </choice>
                                        </split>
                                        <to
                                                uri="bean:org.onap.clamp.loop.LoopController?method=deleteLoop(${header.loopName})" />
                                                        <constant>500</constant>
                                                </setHeader>
                                                <setBody>
-                                                       <simple>ADD Operational policy request FAILED</simple>
+                                                       <simple>ADD Operational policy request FAILED for loop: ${header.loopName}, ${exception.message}"</simple>
                                                </setBody>
+                                               
                                        </doCatch>
                                </doTry>
                        </route>
index 2f4d9c8..691656d 100644 (file)
                                <constant>null</constant>
                        </setBody>
                        <log loggingLevel="INFO"
-                               message="Processing Micro Service Policy: ${exchangeProperty[policyName]} of type ${exchangeProperty[policyType]}" />
+                               message="Processing Operational Policy: ${exchangeProperty[policyName]} of type ${exchangeProperty[policyType]}" />
                        <to uri="direct:verify-one-policy" />
-                       <log loggingLevel="INFO"
-                               message="Processing all GUARD policies defined in loop ${exchangeProperty[loopObject].getName()}" />
-                       <split>
-                               <simple>${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()}
-                               </simple>
-                               <setProperty propertyName="policyName">
-                                       <simple>${body.getKey()}</simple>
-                               </setProperty>
-                               <setProperty propertyName="policyType">
-                                       <simple>onap.policies.controlloop.Guard</simple>
-                               </setProperty>
-                               <setProperty propertyName="policyTypeVersion">
-                                       <simple>1.0.0</simple>
-                               </setProperty>
-                               <setProperty propertyName="policyVersion">
-                                       <simple>1</simple>
-                               </setProperty>
-                               <setBody>
-                                       <constant>null</constant>
-                               </setBody>
-                               <log loggingLevel="INFO"
-                                       message="Processing Guard Policy: ${exchangeProperty[policyName]} of type ${exchangeProperty[policyType]}" />
-                               <to uri="direct:verify-one-policy" />
-                       </split>
                </split>
                <setProperty propertyName="policyState">
                        <simple> ${exchangeProperty[policyComponent].getState()}
index 1731308..f597bdc 100644 (file)
             </doFinally>
         </doTry>
     </route>
-    <route id="create-guard-policy">
-        <from uri="direct:create-guard-policy"/>
-        <doTry>
-            <log loggingLevel="INFO"
-                 message="Creating Guard Policy: ${exchangeProperty[guardPolicy].getKey()}"/>
-            <to
-                    uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Create Guard Policy')"/>
-            <setBody>
-                <simple>${exchangeProperty[guardPolicy].getValue()}
-                </simple>
-            </setBody>
-            <setHeader headerName="CamelHttpMethod">
-                <constant>POST</constant>
-            </setHeader>
-            <setHeader headerName="Content-Type">
-                <constant>application/json</constant>
-            </setHeader>
-            <setHeader headerName="X-ONAP-RequestID">
-                <simple>${exchangeProperty[X-ONAP-RequestID]}
-                </simple>
-            </setHeader>
-            <setHeader headerName="X-ONAP-InvocationID">
-                <simple>${exchangeProperty[X-ONAP-InvocationID]}
-                </simple>
-            </setHeader>
-            <setHeader headerName="X-ONAP-PartnerName">
-                <simple>${exchangeProperty[X-ONAP-PartnerName]}
-                </simple>
-            </setHeader>
-            <log loggingLevel="INFO"
-                 message="Endpoint to create guard policy: {{clamp.config.policy.api.url}}/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies"></log>
-            <toD
-                    uri="{{clamp.config.policy.api.url}}/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies?bridgeEndpoint=true&amp;useSystemProperties=true&amp;mapHttpMessageHeaders=false&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;authUsername={{clamp.config.policy.api.userName}}&amp;authPassword={{clamp.config.policy.api.password}}&amp;connectionTimeToLive=5000&amp;httpClient.connectTimeout=10000&amp;httpClient.socketTimeout=20000&amp;authenticationPreemptive=true&amp;connectionClose=true"/>
-            <doFinally>
-                <to uri="direct:reset-raise-http-exception-flag"/>
-                <to
-                        uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()"/>
-                <setProperty propertyName="logMessage">
-                    <simple>${exchangeProperty[guardPolicy].getKey()} creation status
-                    </simple>
-                </setProperty>
-                <setProperty propertyName="logComponent">
-                    <simple>POLICY</simple>
-                </setProperty>
-                <to uri="direct:dump-loop-log-http-response"/>
-            </doFinally>
-        </doTry>
-    </route>
-
-    <route id="delete-guard-policy">
-        <from uri="direct:delete-guard-policy"/>
-        <doTry>
-            <log loggingLevel="INFO"
-                 message="Deleting Guard Policy: ${exchangeProperty[guardPolicy].getKey()}"/>
-            <to
-                    uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Delete Guard Policy')"/>
-            <setBody>
-                <constant>null</constant>
-            </setBody>
-            <setHeader headerName="CamelHttpMethod">
-                <constant>DELETE</constant>
-            </setHeader>
-            <setHeader headerName="X-ONAP-RequestID">
-                <simple>${exchangeProperty[X-ONAP-RequestID]}
-                </simple>
-            </setHeader>
-            <setHeader headerName="X-ONAP-InvocationID">
-                <simple>${exchangeProperty[X-ONAP-InvocationID]}
-                </simple>
-            </setHeader>
-            <setHeader headerName="X-ONAP-PartnerName">
-                <simple>${exchangeProperty[X-ONAP-PartnerName]}
-                </simple>
-            </setHeader>
-            <log loggingLevel="INFO"
-                 message="Endpoint to delete guard policy: {{clamp.config.policy.api.url}}/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/${exchangeProperty[guardPolicy].getKey()}/versions/1"></log>
-            <toD
-                    uri="{{clamp.config.policy.api.url}}/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/${exchangeProperty[guardPolicy].getKey()}/versions/1?bridgeEndpoint=true&amp;useSystemProperties=true&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;deleteWithBody=false&amp;mapHttpMessageBody=false&amp;mapHttpMessageFormUrlEncodedBody=false&amp;authUsername={{clamp.config.policy.api.userName}}&amp;authPassword={{clamp.config.policy.api.password}}&amp;connectionTimeToLive=5000&amp;httpClient.connectTimeout=10000&amp;httpClient.socketTimeout=20000&amp;authenticationPreemptive=true&amp;connectionClose=true"/>
-
-            <doFinally>
-                <to uri="direct:reset-raise-http-exception-flag"/>
-                <to
-                        uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()"/>
-                <setProperty propertyName="logMessage">
-                    <simple>${exchangeProperty[guardPolicy].getKey()} removal status
-                    </simple>
-                </setProperty>
-                <setProperty propertyName="logComponent">
-                    <simple>POLICY</simple>
-                </setProperty>
-                <to uri="direct:dump-loop-log-http-response"/>
-            </doFinally>
-        </doTry>
-    </route>
-
     <route id="add-all-to-active-pdp-group">
         <from uri="direct:add-all-to-active-pdp-group"/>
         <doTry>
index 7214b02..9730283 100644 (file)
@@ -2,8 +2,7 @@
   "type": "object",
   "title": "Configuration",
   "required": [
-    "operational_policy",
-    "guard_policies"
+    "operational_policy"
   ],
   "properties": {
     "operational_policy": {
           }
         }
       }
-    },
-    "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"
-                    ]
-                  }
-                }
-              }
-            }
-          }
-        ]
-      }
     }
   }
 }
index 4d51bb2..26db6b0 100644 (file)
@@ -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\"},"
index 58a432d..cef82e5 100644 (file)
@@ -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<String, String> 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<String, String> 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);
-    }
 }
index 81f21d0..190636c 100644 (file)
@@ -2,8 +2,7 @@
   "type": "object",
   "title": "Configuration",
   "required": [
-    "operational_policy",
-    "guard_policies"
+    "operational_policy"
   ],
   "properties": {
     "operational_policy": {
           }
         }
       }
-    },
-    "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
index f6c180a..32adce9 100644 (file)
@@ -2,8 +2,7 @@
   "type": "object",
   "title": "Configuration",
   "required": [
-    "operational_policy",
-    "guard_policies"
+    "operational_policy"
   ],
   "properties": {
     "operational_policy": {
           }
         }
       }
-    },
-    "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
index aaf9dc3..a38334b 100644 (file)
         }
       }
     ]
-  },
-  "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"
-      }
-    }
-  ]
+  }
 }
index dce740f..17535ec 100644 (file)
               "name": "opLegacyPolicy",
               "version": "1.0.0"
             },
-            {
-              "name": "guard1",
-              "version": "1.0.0"
-            },
             {
               "name": "opPolicy",
               "version": "1.0.0"
index 4642ff5..b0eef75 100644 (file)
@@ -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": []
index 23ea354..788306b 100644 (file)
@@ -88,7 +88,6 @@
     {
       "name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca",
       "configurationsJson": {
-        "guard_policies": {},
         "operational_policy": {
           "controlLoop": {},
           "policies": []
       "id": 1,
       "logType": "INFO",
       "logComponent": "CLAMP",
-      "message": "Operational and Guard policies UPDATED",
+      "message": "Operational policies UPDATED",
       "logInstant": "2019-07-08T09:44:37Z"
     }
   ]
index 2af1b7c..538688d 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 
-import React from 'react';
+import React, { forwardRef } from 'react';
 import Button from 'react-bootstrap/Button';
 import Modal from 'react-bootstrap/Modal';
 import styled from 'styled-components';
@@ -30,7 +30,6 @@ import MaterialTable, {MTableToolbar} from "material-table";
 import IconButton from '@material-ui/core/IconButton';
 import Tooltip from '@material-ui/core/Tooltip';
 import Grid from '@material-ui/core/Grid';
-import { forwardRef }  from 'react';
 import AddBox from '@material-ui/icons/AddBox';
 import ArrowUpward from '@material-ui/icons/ArrowUpward';
 import Check from '@material-ui/icons/Check';
@@ -204,7 +203,7 @@ export default class ManageDictionaries extends React.Component {
                                        cellStyle: cellStyle,
                                        headerStyle: headerStyle
                                 },
-                                {  
+                                {
                                    title: "Sub-Dictionary", field: "subDictionary",
                                      editComponent: props => (
                                                 <div>
@@ -214,7 +213,7 @@ export default class ManageDictionaries extends React.Component {
                                    cellStyle: cellStyle,
                                    headerStyle: headerStyle
                                 },
-                               {     
+                               {   
                                        title: "Updated By", field: "updatedBy", editable: 'never',
                                        cellStyle: cellStyle,
                                        headerStyle: headerStyle
@@ -294,7 +293,7 @@ export default class ManageDictionaries extends React.Component {
         var dictionaryElements = [];
         if (event.target.files[0].type === 'text/csv' ) {
             if (event.target.files && event.target.files[0]) {
-                let reader = new FileReader();
+                const reader = new FileReader();
                 reader.onload = function(e) {
                     var dictElems = reader.result.split('\n');
                     var jsonObj = [];
@@ -312,7 +311,6 @@ export default class ManageDictionaries extends React.Component {
                     const mandatoryKeys = [ 'Element Short Name', 'Element Name', 'Element Type' ];
                     const validTypes = ['string','number','datetime','json','map'];
                     if (!dictElems){
-                        
                         text.setState({validData: false});
                     } else if (headers.length !== dictKeys.length){
                         text.setState({validImport: false});
@@ -373,7 +371,7 @@ export default class ManageDictionaries extends React.Component {
         }
 
     }
-    
+   
     render() {
         return (
             <ModalStyled size="xl" show={this.state.show} onHide={this.handleClose} backdrop="static" keyboard={false} >
@@ -440,7 +438,7 @@ export default class ManageDictionaries extends React.Component {
                 new Promise((resolve, reject) => {
                                 setTimeout(() => {
                                     {
-                                        let data = this.state.dictionaryNames;
+                                        const data = this.state.dictionaryNames;
                     const index = data.indexOf(oldData);
                     data.splice(index, 1);
                     this.setState({ data }, () => resolve());
index c10c6ff..4c11ce5 100644 (file)
@@ -41,7 +41,6 @@ describe('Verify OperationalPolicyModal', () => {
             "operationalPolicies": [{
                 "name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca",
                 "configurationsJson": {
-                    "guard_policies": {},
                     "operational_policy": {
                         "controlLoop": {},
                         "policies": []
index 6b4477f..7c9dc0c 100644 (file)
@@ -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",
index bf0b910..d4021c9 100644 (file)
@@ -42,7 +42,6 @@ describe('Verify PolicyModal', () => {
             "operationalPolicies": [{
                 "name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca",
                 "configurationsJson": {
-                    "guard_policies": {},
                     "operational_policy": {
                         "controlLoop": {},
                         "policies": []
index 5c478f6..3b7fd41 100644 (file)
@@ -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"
                        }
                        ]
index 174a320..25736d2 100644 (file)
@@ -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",
           }
         }
       />
index 17f4b35..e54b500 100644 (file)
@@ -39,7 +39,6 @@ describe('Verify LoopSvg', () => {
         "operationalPolicies": [{
             "name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca",
             "configurationsJson": {
-                "guard_policies": {},
                 "operational_policy": {
                     "controlLoop": {},
                     "policies": []