import javax.ws.rs.core.Response.Status;
-
-
-
-
-
-
-import org.onap.dmaap.dbcapi.aaf.database.DatabaseClass;
+import org.onap.dmaap.dbcapi.database.DatabaseClass;
import org.onap.dmaap.dbcapi.logging.BaseLoggingClass;
import org.onap.dmaap.dbcapi.model.ApiError;
import org.onap.dmaap.dbcapi.model.DcaeLocation;
mr_clusters.put( cluster.getDcaeLocationName(), cluster );
DcaeLocationService svc = new DcaeLocationService();
DcaeLocation loc = svc.getDcaeLocation( cluster.getDcaeLocationName() );
- if ( loc.isCentral() ) {
+ if ( loc == null ) {
+ logger.error( "DcaeLocation not found for cluster in " + cluster.getDcaeLocationName() );
+ cluster.setLastMod();
+ cluster.setStatus(DmaapObject_Status.INVALID);
+ mr_clusters.put( cluster.getDcaeLocationName(), cluster );
+ } else if ( loc.isCentral() ) {
ApiError resp = TopicService.setBridgeClientPerms( cluster );
if ( ! resp.is2xx() ) {
logger.error( "Unable to provision Bridge to " + cluster.getDcaeLocationName() );