aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java9
-rw-r--r--src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java21
2 files changed, 1 insertions, 29 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 227f40a72..4ea5b7118 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 1e721ce24..b4020c18e 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<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;
- }
}