import org.opendaylight.transportpce.servicehandler.listeners.NetworkModelListenerImpl;
import org.opendaylight.transportpce.servicehandler.listeners.PceListenerImpl;
import org.opendaylight.transportpce.servicehandler.listeners.RendererListenerImpl;
+import org.opendaylight.transportpce.servicehandler.listeners.ServiceListener;
import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperations;
import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperationsImpl;
import org.opendaylight.transportpce.tapi.R2RTapiLinkDiscovery;
import org.opendaylight.transportpce.tapi.topology.TapiPortMappingListener;
import org.opendaylight.transportpce.tapi.utils.TapiListener;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.TransportpceNetworkutilsService;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.TransportpceOlmService;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev210618.TransportpceOlmService;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.tapinetworkutils.rev210408.TransportpceTapinetworkutilsService;
import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.OrgOpenroadmServiceService;
import org.slf4j.Logger;
/**
* List of publisher topics.
*/
- private final List<String> publisherTopicList =
- Arrays.asList("PceListener", "ServiceHandlerOperations", "ServiceHandler", "RendererListener");
+ private final List<String> publisherTopicList = Arrays.asList("PceListener", "ServiceHandlerOperations",
+ "ServiceHandler", "RendererListener");
+ private final List<String> publisherTopicAlarmList = Arrays.asList("ServiceListener");
- public TransportPCEImpl(LightyServices lightyServices, boolean activateNbiNotification) {
+ public TransportPCEImpl(LightyServices lightyServices, boolean activateNbiNotification,
+ String olmtimer1, String olmtimer2) {
LOG.info("Initializing transaction providers ...");
deviceTransactionManager = new DeviceTransactionManagerImpl(lightyServices.getBindingMountPointService(),
MAX_DURATION_TO_SUBMIT_TRANSACTION);
LOG.info("Creating OLM beans ...");
CrossConnect crossConnect = initCrossConnect(mappingUtils);
PowerMgmt powerMgmt = new PowerMgmtImpl(lightyServices.getBindingDataBroker(), openRoadmInterfaces,
- crossConnect, deviceTransactionManager);
+ crossConnect, deviceTransactionManager, olmtimer1, olmtimer2);
OlmPowerService olmPowerService = new OlmPowerServiceImpl(lightyServices.getBindingDataBroker(), powerMgmt,
deviceTransactionManager, portMapping, mappingUtils, openRoadmInterfaces);
olmProvider = new OlmProvider(lightyServices.getRpcProviderService(), olmPowerService);
OtnDeviceRendererService otnDeviceRendererService = new OtnDeviceRendererServiceImpl(openRoadmInterfaceFactory,
crossConnect, openRoadmInterfaces, deviceTransactionManager, networkModelService);
rendererProvider = initRenderer(lightyServices, olmPowerServiceRpc, deviceRendererService,
- otnDeviceRendererService);
+ otnDeviceRendererService, portMapping);
LOG.info("Creating service-handler beans ...");
RendererServiceOperations rendererServiceOperations = new RendererServiceOperationsImpl(deviceRendererService,
otnDeviceRendererService, olmPowerServiceRpc, lightyServices.getBindingDataBroker(),
- lightyServices.getBindingNotificationPublishService());
+ lightyServices.getBindingNotificationPublishService(), portMapping);
ServiceDataStoreOperations serviceDataStoreOperations = new ServiceDataStoreOperationsImpl(
lightyServices.getBindingDataBroker());
RendererListenerImpl rendererListenerImpl = new RendererListenerImpl(pathComputationService,
- lightyServices.getBindingNotificationPublishService());
+ lightyServices.getBindingNotificationPublishService(), networkModelService);
PceListenerImpl pceListenerImpl = new PceListenerImpl(rendererServiceOperations, pathComputationService,
lightyServices.getBindingNotificationPublishService(), serviceDataStoreOperations);
+ ServiceListener serviceListener = new ServiceListener(lightyServices.getBindingDataBroker(),
+ lightyServices.getBindingNotificationPublishService());
NetworkModelListenerImpl networkModelListenerImpl = new NetworkModelListenerImpl(
lightyServices.getBindingNotificationPublishService(), serviceDataStoreOperations);
ServicehandlerImpl servicehandler = new ServicehandlerImpl(lightyServices.getBindingDataBroker(),
pceListenerImpl, rendererListenerImpl, networkModelListenerImpl, serviceDataStoreOperations, "N/A");
servicehandlerProvider = new ServicehandlerProvider(lightyServices.getBindingDataBroker(),
lightyServices.getRpcProviderService(), lightyServices.getNotificationService(),
- serviceDataStoreOperations, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl,
- servicehandler);
+ serviceDataStoreOperations, pceListenerImpl, serviceListener, rendererListenerImpl,
+ networkModelListenerImpl, servicehandler);
LOG.info("Creating tapi beans ...");
R2RTapiLinkDiscovery tapilinkDiscoveryImpl = new R2RTapiLinkDiscovery(lightyServices.getBindingDataBroker(),
if (activateNbiNotification) {
LOG.info("Creating nbi-notifications beans ...");
nbiNotificationsProvider = new NbiNotificationsProvider(
- publisherTopicList, null, null, lightyServices.getRpcProviderService(),
+ publisherTopicList, publisherTopicAlarmList, null, null, lightyServices.getRpcProviderService(),
lightyServices.getNotificationService(), lightyServices.getAdapterContext().currentSerializer());
}
}
}
private RendererProvider initRenderer(LightyServices lightyServices, TransportpceOlmService olmPowerServiceRpc,
- DeviceRendererService deviceRendererService, OtnDeviceRendererService otnDeviceRendererService) {
+ DeviceRendererService deviceRendererService, OtnDeviceRendererService otnDeviceRendererService,
+ PortMapping portMapping) {
DeviceRendererRPCImpl deviceRendererRPC = new DeviceRendererRPCImpl(deviceRendererService,
otnDeviceRendererService);
RendererServiceOperationsImpl rendererServiceOperations = new RendererServiceOperationsImpl(
deviceRendererService, otnDeviceRendererService, olmPowerServiceRpc,
- lightyServices.getBindingDataBroker(), lightyServices.getBindingNotificationPublishService());
+ lightyServices.getBindingDataBroker(), lightyServices.getBindingNotificationPublishService(),
+ portMapping);
return new RendererProvider(lightyServices.getRpcProviderService(), deviceRendererRPC,
rendererServiceOperations);
}