From d4b134ae54a260f084be82ba1a6fcd4e6a3040e1 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Wed, 19 Aug 2020 11:34:37 -0400 Subject: Remove old cdap policy type Actually, this does not need to have any specific monitoring policy type designated because since Frankfurt we added the feature to support onap.monitoring.* Issue-ID: POLICY-2772 Change-Id: Ief24550c3e90b7a54ad3c1c381330580ca738798 Signed-off-by: Pamela Dragosh --- .../application/monitoring/MonitoringPdpApplication.java | 13 +------------ .../monitoring/MonitoringPdpApplicationTest.java | 10 +--------- 2 files changed, 2 insertions(+), 21 deletions(-) (limited to 'applications/monitoring') 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 5c41a9e2..ada347e2 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 @@ -51,10 +51,6 @@ public class MonitoringPdpApplication extends StdXacmlApplicationServiceProvider private static final Logger LOGGER = LoggerFactory.getLogger(MonitoringPdpApplication.class); public static final String ONAP_MONITORING_BASE_POLICY_TYPE = "onap.Monitoring"; - public static final String ONAP_MONITORING_CDAP = "onap.policies.monitoring.cdap.tca.hi.lo.app"; - public static final String ONAP_MONITORING_APPSERVER = - "onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server"; - public static final String ONAP_MONITORING_SONHANDLER = "onap.policies.monitoring.docker.sonhandler.app"; public static final String ONAP_MONITORING_DERIVED_POLICY_TYPE = "onap.policies.monitoring."; public static final String VERSION_100 = "1.0.0"; @@ -70,9 +66,6 @@ public class MonitoringPdpApplication extends StdXacmlApplicationServiceProvider // By default this supports just Monitoring policy types // 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)); - supportedPolicyTypes.add(new ToscaPolicyTypeIdentifier(ONAP_MONITORING_SONHANDLER, VERSION_100)); } @Override @@ -97,11 +90,7 @@ public class MonitoringPdpApplication extends StdXacmlApplicationServiceProvider // of the policy type. Since we are only packaging a decision // 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().equals(ONAP_MONITORING_SONHANDLER) - || policyTypeId.getName().startsWith(ONAP_MONITORING_DERIVED_POLICY_TYPE)); + return policyTypeId.getName().startsWith(ONAP_MONITORING_DERIVED_POLICY_TYPE); } @Override diff --git a/applications/monitoring/src/test/java/org/onap/policy/xacml/pdp/application/monitoring/MonitoringPdpApplicationTest.java b/applications/monitoring/src/test/java/org/onap/policy/xacml/pdp/application/monitoring/MonitoringPdpApplicationTest.java index fd6711d4..04895b8b 100644 --- a/applications/monitoring/src/test/java/org/onap/policy/xacml/pdp/application/monitoring/MonitoringPdpApplicationTest.java +++ b/applications/monitoring/src/test/java/org/onap/policy/xacml/pdp/application/monitoring/MonitoringPdpApplicationTest.java @@ -143,15 +143,7 @@ public class MonitoringPdpApplicationTest { // can support the correct policy types. // assertThat(service.canSupportPolicyType( - new ToscaPolicyTypeIdentifier(MonitoringPdpApplication.ONAP_MONITORING_CDAP, "1.0.0"))).isTrue(); - assertThat(service.canSupportPolicyType( - new ToscaPolicyTypeIdentifier(MonitoringPdpApplication.ONAP_MONITORING_APPSERVER, "1.0.0"))).isTrue(); - assertThat(service.canSupportPolicyType( - new ToscaPolicyTypeIdentifier(MonitoringPdpApplication.ONAP_MONITORING_SONHANDLER, "1.0.0"))).isTrue(); - assertThat(service.canSupportPolicyType( - new ToscaPolicyTypeIdentifier("onap.Monitoring", "1.0.0"))).isTrue(); - assertThat(service.canSupportPolicyType( - new ToscaPolicyTypeIdentifier("onap.Monitoring", "1.5.0"))).isTrue(); + new ToscaPolicyTypeIdentifier("onap.policies.monitoring.tcagen2", "1.0.0"))).isTrue(); assertThat(service.canSupportPolicyType( new ToscaPolicyTypeIdentifier( "onap.policies.monitoring.foobar", "1.0.1"))).isTrue(); -- cgit 1.2.3-korg