Added 'onap.monitoring.*' in list of supported policy types 16/98316/5
authorAli Hockla <ah999m@att.com>
Tue, 12 Nov 2019 17:49:32 +0000 (11:49 -0600)
committerHOCKLA <ah999m@att.com>
Wed, 13 Nov 2019 18:27:17 +0000 (12:27 -0600)
Issue-ID: POLICY-2223
Change-Id: I1a7a1b4083ff74ca86455e1ab6ae7f96b8c04d35
Signed-off-by: Ali Hockla <ah999m@att.com>
applications/monitoring/src/main/java/org/onap/policy/xacml/pdp/application/monitoring/MonitoringPdpApplication.java

index 318c941..27bb24e 100644 (file)
@@ -56,7 +56,11 @@ public class MonitoringPdpApplication extends StdXacmlApplicationServiceProvider
     private static final String ONAP_MONITORING_APPSERVER =
             "onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server";
     private static final String ONAP_MONITORING_SONHANDLER = "onap.policies.monitoring.docker.sonhandler.app";
-    private static final String ONAP_MONITORING_DERIVED_POLICY_TYPE = "onap.policies.monitoring";
+    private static final String ONAP_MONITORING_DERIVED_POLICY_TYPE = "onap.policies.monitoring.";
+    // Note: this requirement is temporary; it will no longer be necessary once the PDPs and PAP
+    // are updated to use the PDP Group name instead of the supported types.
+    private static final String ONAP_MONITORING_ALL_DERIVED_POLICY_TYPE = ONAP_MONITORING_DERIVED_POLICY_TYPE + "*";
+
     private static final String VERSION_100 = "1.0.0";
 
     private StdCombinedPolicyResultsTranslator translator = new StdCombinedPolicyResultsTranslator();
@@ -73,6 +77,9 @@ public class MonitoringPdpApplication extends StdXacmlApplicationServiceProvider
         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));
+
+        // temporary requirement
+        supportedPolicyTypes.add(new ToscaPolicyTypeIdentifier(ONAP_MONITORING_ALL_DERIVED_POLICY_TYPE, VERSION_100));
     }
 
     @Override