import org.immutables.gson.Gson;
import org.immutables.value.Value;
import org.onap.ccsdk.oran.a1policymanagementservice.exceptions.ServiceException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Parser for the Json representing of the component configuration.
*/
public class ApplicationConfigParser {
+ private static final Logger logger = LoggerFactory.getLogger(ApplicationConfigParser.class);
private static final String CONFIG = "config";
private static final String CONTROLLER = "controller";
throw new ServiceException(
"Configuration error, controller configuration not found: " + ric.controllerName());
}
-
}
}
.managedElementIds(parseManagedElementIds(get(ricAsJson, "managedElementIds").getAsJsonArray())) //
.controllerName(controllerNameElement != null ? controllerNameElement.getAsString() : "") //
.build();
- result.add(ricConfig);
+ if (!ricConfig.baseUrl().isEmpty()) {
+ result.add(ricConfig);
+ } else {
+ logger.error("RIC configuration error {}, baseUrl is empty", ricConfig.ricId());
+ }
}
return result;
}