import org.opendaylight.transportpce.tapi.topology.TapiNetworkModelService;
import org.opendaylight.transportpce.tapi.topology.TapiNetworkModelServiceImpl;
import org.opendaylight.transportpce.tapi.topology.TapiNetworkUtilsImpl;
+import org.opendaylight.transportpce.tapi.topology.TapiOrLinkListener;
import org.opendaylight.transportpce.tapi.topology.TapiPortMappingListener;
import org.opendaylight.transportpce.tapi.utils.TapiLink;
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.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.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.OrgOpenroadmServiceService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
deviceTransactionManager, networkTransaction);
TransportpceNetworkutilsService networkutilsServiceImpl = new NetworkUtilsImpl(
lightyServices.getBindingDataBroker());
- MappingUtils mappingUtils = new MappingUtilsImpl(lightyServices.getBindingDataBroker());
- OpenRoadmInterfaces openRoadmInterfaces = initOpenRoadmInterfaces(mappingUtils);
- PortMapping portMapping = initPortMapping(lightyServices, openRoadmInterfaces);
+ PortMapping portMapping = initPortMapping(lightyServices);
NetworkModelService networkModelService = new NetworkModelServiceImpl(networkTransaction, linkDiscoveryImpl,
portMapping, lightyServices.getBindingNotificationPublishService());
FrequenciesService networkModelWavelengthService =
pceProvider = new PceProvider(lightyServices.getRpcProviderService(), pathComputationService);
LOG.info("Creating OLM beans ...");
+ MappingUtils mappingUtils = new MappingUtilsImpl(lightyServices.getBindingDataBroker());
CrossConnect crossConnect = initCrossConnect(mappingUtils);
+ OpenRoadmInterfaces openRoadmInterfaces = initOpenRoadmInterfaces(mappingUtils, portMapping);
PowerMgmt powerMgmt = new PowerMgmtImpl(lightyServices.getBindingDataBroker(), openRoadmInterfaces,
crossConnect, deviceTransactionManager, olmtimer1, olmtimer2);
OlmPowerService olmPowerService = new OlmPowerServiceImpl(lightyServices.getBindingDataBroker(), powerMgmt,
portMapping);
DeviceRendererService deviceRendererService = new DeviceRendererServiceImpl(
lightyServices.getBindingDataBroker(), deviceTransactionManager, openRoadmInterfaceFactory,
- openRoadmInterfaces, crossConnect, portMapping, networkModelService);
+ openRoadmInterfaces, crossConnect, portMapping);
OtnDeviceRendererService otnDeviceRendererService = new OtnDeviceRendererServiceImpl(openRoadmInterfaceFactory,
crossConnect, openRoadmInterfaces, deviceTransactionManager, networkModelService);
rendererProvider = initRenderer(lightyServices, olmPowerServiceRpc, deviceRendererService,
networkModelListenerImpl, servicehandler);
LOG.info("Creating tapi beans ...");
+ TapiLink tapiLink = new TapiLink(networkTransaction);
R2RTapiLinkDiscovery tapilinkDiscoveryImpl = new R2RTapiLinkDiscovery(networkTransaction,
deviceTransactionManager, tapiLink);
TapiRendererListenerImpl tapiRendererListenerImpl = new TapiRendererListenerImpl(lightyServices
tapilinkDiscoveryImpl, networkTransaction, tapiLink);
TapiNetconfTopologyListener tapiNetConfTopologyListener =
new TapiNetconfTopologyListener(tapiNetworkModelService);
+ TapiOrLinkListener orLinkListener = new TapiOrLinkListener(tapiLink, networkTransaction);
TapiPortMappingListener tapiPortMappingListener =
new TapiPortMappingListener(tapiNetworkModelService);
tapiProvider = initTapi(lightyServices, servicehandler, networkTransaction, serviceDataStoreOperations,
- tapiNetConfTopologyListener, tapiPortMappingListener, tapiNetworkutilsServiceImpl, tapiPceListenerImpl,
- tapiRendererListenerImpl, tapiServiceHandlerListener, lightyServices.getNotificationService());
+ tapiNetConfTopologyListener, tapiPortMappingListener, tapiNetworkutilsServiceImpl, tapiPceListenerImpl,
+ tapiRendererListenerImpl, tapiServiceHandlerListener, lightyServices.getNotificationService(),
+ orLinkListener);
if (activateNbiNotification) {
LOG.info("Creating nbi-notifications beans ...");
nbiNotificationsProvider = new NbiNotificationsProvider(
- publisherServiceList, publisherAlarmList, null, null, lightyServices.getRpcProviderService(),
- lightyServices.getNotificationService(), lightyServices.getAdapterContext().currentSerializer());
+ publisherServiceList, publisherAlarmList, null, null, lightyServices.getRpcProviderService(),
+ lightyServices.getNotificationService(), lightyServices.getAdapterContext().currentSerializer());
}
}
TransportpceTapinetworkutilsService tapiNetworkutilsServiceImpl,
TapiPceListenerImpl pceListenerImpl, TapiRendererListenerImpl rendererListenerImpl,
TapiServiceHandlerListenerImpl serviceHandlerListenerImpl,
- NotificationService notificationService) {
+ NotificationService notificationService, TapiOrLinkListener orLinkListener) {
return new TapiProvider(lightyServices.getBindingDataBroker(), lightyServices.getRpcProviderService(),
servicehandler, serviceDataStoreOperations, new TapiListener(), networkTransactionService,
tapiNetConfTopologyListener, tapiPortMappingListener, tapiNetworkutilsServiceImpl, pceListenerImpl,
- rendererListenerImpl, serviceHandlerListenerImpl, notificationService);
+ rendererListenerImpl, serviceHandlerListenerImpl, notificationService, orLinkListener);
}
private RendererProvider initRenderer(LightyServices lightyServices, TransportpceOlmService olmPowerServiceRpc,
openRoadmInterface710, openRoadmOtnInterface221, openRoadmOtnInterface710);
}
- private PortMapping initPortMapping(LightyServices lightyServices, OpenRoadmInterfaces openRoadmInterfaces) {
+ private PortMapping initPortMapping(LightyServices lightyServices) {
PortMappingVersion710 portMappingVersion710 = new PortMappingVersion710(lightyServices.getBindingDataBroker(),
- deviceTransactionManager, openRoadmInterfaces);
+ deviceTransactionManager);
PortMappingVersion221 portMappingVersion221 = new PortMappingVersion221(lightyServices.getBindingDataBroker(),
- deviceTransactionManager, openRoadmInterfaces);
+ deviceTransactionManager);
PortMappingVersion121 portMappingVersion121 = new PortMappingVersion121(lightyServices.getBindingDataBroker(),
- deviceTransactionManager, openRoadmInterfaces);
+ deviceTransactionManager);
return new PortMappingImpl(lightyServices.getBindingDataBroker(), portMappingVersion710,
portMappingVersion221, portMappingVersion121);
}
- private OpenRoadmInterfaces initOpenRoadmInterfaces(MappingUtils mappingUtils) {
+ private OpenRoadmInterfaces initOpenRoadmInterfaces(MappingUtils mappingUtils, PortMapping portMapping) {
OpenRoadmInterfacesImpl121 openRoadmInterfacesImpl121 = new OpenRoadmInterfacesImpl121(
deviceTransactionManager);
OpenRoadmInterfacesImpl221 openRoadmInterfacesImpl221 = new OpenRoadmInterfacesImpl221(
- deviceTransactionManager);
+ deviceTransactionManager, portMapping, portMapping.getPortMappingVersion221());
OpenRoadmInterfacesImpl710 openRoadmInterfacesImpl710 = new OpenRoadmInterfacesImpl710(
- deviceTransactionManager);
+ deviceTransactionManager, portMapping, portMapping.getPortMappingVersion710());
return new OpenRoadmInterfacesImpl(deviceTransactionManager, mappingUtils, openRoadmInterfacesImpl121,
openRoadmInterfacesImpl221, openRoadmInterfacesImpl710);
}