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";
// 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
// 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
// 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();
//
assertThat(manager).isNotNull();
assertThat(manager.getPolicyCount()).isZero();
- assertThat(manager.getPolicyTypeCount()).isEqualTo(20);
+ assertThat(manager.getPolicyTypeCount()).isEqualTo(17);
assertThat(manager.getToscaPolicies()).isEmpty();
assertThat(manager.getToscaPolicyIdentifiers()).isEmpty();
- assertThat(manager.getToscaPolicyTypeIdents()).hasSize(20);
+ assertThat(manager.getToscaPolicyTypeIdents()).hasSize(17);
assertThat(manager.findNativeApplication()).isInstanceOf(NativePdpApplication.class);