summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-04-26 13:09:45 -0400
committerPamela Dragosh <pdragosh@research.att.com>2019-04-26 13:09:52 -0400
commitc7beb45738209526a4794b3b72f0f0bd025d1a82 (patch)
treef28cb9bc2750f2dd485f5b6d9c71891edf44707b
parent6632b5f4a6b3949db71228c84881c4e8badb1b64 (diff)
Hardcode monitoring policy types
For Dublin, hard code these so they are available to pdp group. Issue-ID: POLICY-1705 Change-Id: I705f2fc01864458e3d8ef569d24e51e0d565aed6 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
-rw-r--r--applications/monitoring/src/main/java/org/onap/policy/xacml/pdp/application/monitoring/MonitoringPdpApplication.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/applications/monitoring/src/main/java/org/onap/policy/xacml/pdp/application/monitoring/MonitoringPdpApplication.java b/applications/monitoring/src/main/java/org/onap/policy/xacml/pdp/application/monitoring/MonitoringPdpApplication.java
index 7d0c5f1f..37847723 100644
--- a/applications/monitoring/src/main/java/org/onap/policy/xacml/pdp/application/monitoring/MonitoringPdpApplication.java
+++ b/applications/monitoring/src/main/java/org/onap/policy/xacml/pdp/application/monitoring/MonitoringPdpApplication.java
@@ -43,7 +43,11 @@ import org.onap.policy.pdp.xacml.application.common.std.StdXacmlApplicationServi
public class MonitoringPdpApplication extends StdXacmlApplicationServiceProvider {
private static final String ONAP_MONITORING_BASE_POLICY_TYPE = "onap.Monitoring";
+ private static final String ONAP_MONITORING_CDAP = "onap.policies.monitoring.cdap.tca.hi.lo.app";
+ private static final String ONAP_MONITORING_APPSERVER =
+ "onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server";
private static final String ONAP_MONITORING_DERIVED_POLICY_TYPE = "onap.policies.monitoring";
+ private static final String VERSION_100 = "1.0.0";
private StdCombinedPolicyResultsTranslator translator = new StdCombinedPolicyResultsTranslator();
private List<ToscaPolicyTypeIdentifier> supportedPolicyTypes = new ArrayList<>();
@@ -55,7 +59,9 @@ public class MonitoringPdpApplication extends StdXacmlApplicationServiceProvider
//
// By default this supports just Monitoring policy types
//
- supportedPolicyTypes.add(new ToscaPolicyTypeIdentifier(ONAP_MONITORING_BASE_POLICY_TYPE, "1.0.0"));
+ supportedPolicyTypes.add(new ToscaPolicyTypeIdentifier(ONAP_MONITORING_BASE_POLICY_TYPE, VERSION_100));
+ supportedPolicyTypes.add(new ToscaPolicyTypeIdentifier(ONAP_MONITORING_CDAP, VERSION_100));
+ supportedPolicyTypes.add(new ToscaPolicyTypeIdentifier(ONAP_MONITORING_APPSERVER, VERSION_100));
}
@Override
@@ -81,6 +87,8 @@ public class MonitoringPdpApplication extends StdXacmlApplicationServiceProvider
// back with a JSON payload of the property contents.
//
return (policyTypeId.getName().equals(ONAP_MONITORING_BASE_POLICY_TYPE)
+ || policyTypeId.getName().equals(ONAP_MONITORING_CDAP)
+ || policyTypeId.getName().equals(ONAP_MONITORING_APPSERVER)
|| policyTypeId.getName().startsWith(ONAP_MONITORING_DERIVED_POLICY_TYPE));
}