import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperations;
import org.opendaylight.transportpce.tapi.connectivity.ConnectivityUtils;
import org.opendaylight.transportpce.tapi.connectivity.TapiConnectivityImpl;
-import org.opendaylight.transportpce.tapi.listeners.TapiNetworkModelListenerImpl;
import org.opendaylight.transportpce.tapi.listeners.TapiPceListenerImpl;
import org.opendaylight.transportpce.tapi.listeners.TapiRendererListenerImpl;
import org.opendaylight.transportpce.tapi.listeners.TapiServiceHandlerListenerImpl;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.TapiCommonService;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.connectivity.rev181210.TapiConnectivityService;
+import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev181210.TapiNotificationListener;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.TapiTopologyService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.tapi.rev180928.ServiceInterfacePoints;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
private ListenerRegistration<TransportpcePceListener> pcelistenerRegistration;
private ListenerRegistration<TransportpceRendererListener> rendererlistenerRegistration;
private ListenerRegistration<TransportpceServicehandlerListener> servicehandlerlistenerRegistration;
- private ListenerRegistration<TapiNetworkModelListenerImpl> tapinetworkmodellistenerRegistration;
+ private ListenerRegistration<TapiNotificationListener> tapinetworkmodellistenerRegistration;
private final OrgOpenroadmServiceService serviceHandler;
private final ServiceDataStoreOperations serviceDataStoreOperations;
private final TapiListener tapiListener;
private TapiRendererListenerImpl rendererListenerImpl;
private TapiServiceHandlerListenerImpl serviceHandlerListenerImpl;
private final NotificationService notificationService;
- private TapiNetworkModelListenerImpl tapiNetworkModelListenerImpl;
+ private TapiNotificationListener tapiNetworkModelListenerImpl;
public TapiProvider(DataBroker dataBroker, RpcProviderService rpcProviderService,
OrgOpenroadmServiceService serviceHandler,ServiceDataStoreOperations serviceDataStoreOperations,
TransportpceTapinetworkutilsService tapiNetworkUtils, TapiPceListenerImpl pceListenerImpl,
TapiRendererListenerImpl rendererListenerImpl, TapiServiceHandlerListenerImpl serviceHandlerListenerImpl,
NotificationService notificationService, TapiOrLinkListener orLinkListener,
- TapiNetworkModelListenerImpl tapiNetworkModelListenerImpl) {
+ TapiNotificationListener tapiNetworkModelListenerImpl) {
this.dataBroker = dataBroker;
this.rpcProviderService = rpcProviderService;
this.serviceHandler = serviceHandler;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.context.TopologyKey;
import org.opendaylight.yangtools.yang.binding.EnumTypeObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@Component
public class TapiNetworkModelListenerImpl implements TapiNotificationListener {
private static final Logger LOG = LoggerFactory.getLogger(TapiNetworkModelListenerImpl.class);
private final NetworkTransactionService networkTransactionService;
+ private final NotificationPublishService notificationPublishService;
private final List<ConnectivityService> connectivityServiceChanges = new ArrayList<>();
private final Uuid tapiTopoUuid = new Uuid(UUID.nameUUIDFromBytes(TapiStringConstants.T0_FULL_MULTILAYER
.getBytes(StandardCharsets.UTF_8)).toString());
private final List<LayerProtocolName> orderedServiceLayerList;
- private final NotificationPublishService notificationPublishService;
- public TapiNetworkModelListenerImpl(NetworkTransactionService networkTransactionService,
- NotificationPublishService notificationPublishService) {
+ @Activate
+ public TapiNetworkModelListenerImpl(@Reference NetworkTransactionService networkTransactionService,
+ @Reference NotificationPublishService notificationPublishService) {
this.networkTransactionService = networkTransactionService;
+ this.notificationPublishService = notificationPublishService;
this.orderedServiceLayerList = List.of(LayerProtocolName.PHOTONICMEDIA, LayerProtocolName.ODU,
LayerProtocolName.DSR, LayerProtocolName.ETH);
- this.notificationPublishService = notificationPublishService;
+ LOG.debug("TapiNetworkModelListenerImpl instantiated");
}
@Override
<reference id="tapiNetworkModelService" interface="org.opendaylight.transportpce.tapi.topology.TapiNetworkModelService" />
<reference id="tapiNetworkUtilsImpl"
interface="org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.tapinetworkutils.rev210408.TransportpceTapinetworkutilsService" />
+ <reference id="tapiNetworkModelListenerImpl"
+ interface="org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev181210.TapiNotificationListener" />
<bean id="tapiListener"
class="org.opendaylight.transportpce.tapi.utils.TapiListener">
<argument ref="dataBroker" />
</bean>
- <bean id="tapiNetworkModelListenerImpl" class="org.opendaylight.transportpce.tapi.listeners.TapiNetworkModelListenerImpl">
- <argument ref="networkTransactionImpl" />
- <argument ref="notificationPublishService" />
- </bean>
-
<bean id="tapiNetconfTopologyListener" class="org.opendaylight.transportpce.tapi.topology.TapiNetconfTopologyListener">
<argument ref="tapiNetworkModelService" />
</bean>