+ throw new ServiceException("Unhandled protocol");
+ }
+ }
+
+ private ControllerConfig getControllerConfig(Ric ric) throws ServiceException {
+ String controllerName = ric.getConfig().controllerName();
+ if (controllerName.isEmpty()) {
+ throw new ServiceException("No controller configured for RIC: " + ric.name());
+ }
+ return this.appConfig.getControllerConfig(controllerName);
+ }
+
+ private void assertNoControllerConfig(Ric ric, A1ProtocolType version) throws ServiceException {
+ if (!ric.getConfig().controllerName().isEmpty()) {
+ throw new ServiceException(
+ "Controller config should be empty, ric: " + ric.name() + " when using protocol version: " + version);