Don't use NotificationListener in classes used by TapiProvider.
This is a part of NotificationListener to Listener<?> migration.
JIRA: TRNSPRTPCE-756
Change-Id: I087bc8dacbc710da39c308dc5fbef7028d0d6d56
Signed-off-by: Matej Sramcik <matej.sramcik@pantheon.tech>
import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperations;
import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperationsImpl;
import org.opendaylight.transportpce.tapi.impl.TapiProvider;
-import org.opendaylight.transportpce.tapi.listeners.TapiNetworkModelListenerImpl;
+import org.opendaylight.transportpce.tapi.listeners.TapiNetworkModelNotificationHandler;
import org.opendaylight.transportpce.tapi.topology.TapiNetworkModelService;
import org.opendaylight.transportpce.tapi.topology.TapiNetworkModelServiceImpl;
import org.opendaylight.transportpce.tapi.topology.TapiNetworkUtilsImpl;
new TapiNetworkUtilsImpl(lgServRPS, networkTransaction, tapiLink);
tapiProvider = initTapi(
lightyServices, servicehandler, networkTransaction, serviceDataStoreOperations,
- new TapiNetworkModelListenerImpl(
+ new TapiNetworkModelNotificationHandler(
networkTransaction, lgServBNPS),
tapiLink,
new TapiNetworkModelServiceImpl(
private TapiProvider initTapi(
LightyServices lightyServices, OrgOpenroadmServiceService servicehandler,
NetworkTransactionService networkTransactionService, ServiceDataStoreOperations serviceDataStoreOperations,
- TapiNetworkModelListenerImpl tapiNetworkModelListenerImpl, TapiLink tapiLink,
+ TapiNetworkModelNotificationHandler tapiNetworkModelNotificationHandler, TapiLink tapiLink,
TapiNetworkModelService tapiNetworkModelService) {
return new TapiProvider(
lightyServices.getBindingDataBroker(), lightyServices.getRpcProviderService(),
lightyServices.getNotificationService(), lightyServices.getBindingNotificationPublishService(),
networkTransactionService, servicehandler, serviceDataStoreOperations,
- tapiNetworkModelListenerImpl, tapiNetworkModelService);
+ tapiNetworkModelNotificationHandler, tapiNetworkModelService);
}
private void initRenderer(
import java.util.concurrent.ExecutionException;
import org.opendaylight.transportpce.common.OperationResult;
import org.opendaylight.transportpce.common.ResponseCodes;
-import org.opendaylight.transportpce.tapi.listeners.TapiPceListenerImpl;
-import org.opendaylight.transportpce.tapi.listeners.TapiRendererListenerImpl;
+import org.opendaylight.transportpce.tapi.listeners.TapiPceNotificationHandler;
+import org.opendaylight.transportpce.tapi.listeners.TapiRendererNotificationHandler;
import org.opendaylight.transportpce.tapi.utils.TapiContext;
import org.opendaylight.transportpce.tapi.validation.CreateConnectivityServiceValidation;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev230526.RpcActions;
private OrgOpenroadmServiceService serviceHandler;
private final TapiContext tapiContext;
private final ConnectivityUtils connectivityUtils;
- private TapiPceListenerImpl pceListenerImpl;
- private TapiRendererListenerImpl rendererListenerImpl;
+ private TapiPceNotificationHandler pceListenerImpl;
+ private TapiRendererNotificationHandler rendererListenerImpl;
public TapiConnectivityImpl(OrgOpenroadmServiceService serviceHandler, TapiContext tapiContext,
- ConnectivityUtils connectivityUtils, TapiPceListenerImpl pceListenerImpl,
- TapiRendererListenerImpl rendererListenerImpl) {
+ ConnectivityUtils connectivityUtils, TapiPceNotificationHandler pceListenerImpl,
+ TapiRendererNotificationHandler rendererListenerImpl) {
LOG.info("inside TapiImpl constructor");
this.serviceHandler = serviceHandler;
this.tapiContext = tapiContext;
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.TapiPceListenerImpl;
-import org.opendaylight.transportpce.tapi.listeners.TapiRendererListenerImpl;
-import org.opendaylight.transportpce.tapi.listeners.TapiServiceHandlerListenerImpl;
+import org.opendaylight.transportpce.tapi.listeners.TapiNetworkModelNotificationHandler;
+import org.opendaylight.transportpce.tapi.listeners.TapiPceNotificationHandler;
+import org.opendaylight.transportpce.tapi.listeners.TapiRendererNotificationHandler;
+import org.opendaylight.transportpce.tapi.listeners.TapiServiceNotificationHandler;
import org.opendaylight.transportpce.tapi.topology.TapiNetconfTopologyListener;
import org.opendaylight.transportpce.tapi.topology.TapiNetworkModelService;
import org.opendaylight.transportpce.tapi.topology.TapiOrLinkListener;
import org.opendaylight.transportpce.tapi.utils.TapiLink;
import org.opendaylight.transportpce.tapi.utils.TapiLinkImpl;
import org.opendaylight.transportpce.tapi.utils.TapiListener;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220808.TransportpcePceListener;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220922.Network;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220922.network.Nodes;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.TransportpceRendererListener;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.servicehandler.rev201125.TransportpceServicehandlerListener;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.tapinetworkutils.rev210408.TransportpceTapinetworkutilsService;
import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.OrgOpenroadmServiceService;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkKey;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Network1;
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.notification.rev181210.TapiNotificationListener;
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;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
+import org.opendaylight.yangtools.concepts.ObjectRegistration;
import org.opendaylight.yangtools.concepts.Registration;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.osgi.service.component.annotations.Activate;
private final NetworkTransactionService networkTransactionService;
private final OrgOpenroadmServiceService serviceHandler;
private final ServiceDataStoreOperations serviceDataStoreOperations;
+ private ObjectRegistration<TransportpceTapinetworkutilsService> tapiNetworkutilsServiceRpcRegistration;
private List<Registration> listeners;
- private ListenerRegistration<TransportpcePceListener> pcelistenerRegistration;
- private ListenerRegistration<TransportpceRendererListener> rendererlistenerRegistration;
- private ListenerRegistration<TransportpceServicehandlerListener> servicehandlerlistenerRegistration;
- private ListenerRegistration<TapiNotificationListener> tapinetworkmodellistenerRegistration;
private List<Registration> rpcRegistrations = new ArrayList<>();
+ private Registration pcelistenerRegistration;
+ private Registration rendererlistenerRegistration;
+ private Registration servicehandlerlistenerRegistration;
+ private Registration tapinetworkmodellistenerRegistration;
@Activate
public TapiProvider(@Reference DataBroker dataBroker,
@Reference NetworkTransactionService networkTransactionService,
@Reference OrgOpenroadmServiceService serviceHandler,
@Reference ServiceDataStoreOperations serviceDataStoreOperations,
- @Reference TapiNotificationListener tapiNetworkModelListenerImpl,
+ @Reference TapiNetworkModelNotificationHandler tapiNetworkModelNotificationHandler,
@Reference TapiNetworkModelService tapiNetworkModelServiceImpl) {
this.dataBroker = dataBroker;
this.networkTransactionService = networkTransactionService;
tapiContext, this.serviceDataStoreOperations);
tapiInitialORMapping.performTopoInitialMapping();
tapiInitialORMapping.performServInitialMapping();
- TapiPceListenerImpl pceListenerImpl = new TapiPceListenerImpl(dataBroker);
- TapiRendererListenerImpl rendererListenerImpl = new TapiRendererListenerImpl(dataBroker,
+ TapiPceNotificationHandler pceListenerImpl = new TapiPceNotificationHandler(dataBroker);
+ TapiRendererNotificationHandler rendererListenerImpl = new TapiRendererNotificationHandler(dataBroker,
notificationPublishService);
TapiConnectivityImpl tapiConnectivity = new TapiConnectivityImpl(this.serviceHandler, tapiContext,
InstanceIdentifier.create(ServiceInterfacePoints.class)),
tapiListener));
// Notification Listener
- pcelistenerRegistration = notificationService.registerNotificationListener(pceListenerImpl);
- rendererlistenerRegistration = notificationService.registerNotificationListener(rendererListenerImpl);
- TapiServiceHandlerListenerImpl serviceHandlerListenerImpl = new TapiServiceHandlerListenerImpl(dataBroker);
+ pcelistenerRegistration = notificationService.registerCompositeListener(pceListenerImpl.getCompositeListener());
+ rendererlistenerRegistration = notificationService
+ .registerCompositeListener(rendererListenerImpl.getCompositeListener());
+ TapiServiceNotificationHandler serviceHandlerListenerImpl = new TapiServiceNotificationHandler(dataBroker);
servicehandlerlistenerRegistration = notificationService
- .registerNotificationListener(serviceHandlerListenerImpl);
+ .registerCompositeListener(serviceHandlerListenerImpl.getCompositeListener());
tapinetworkmodellistenerRegistration = notificationService
- .registerNotificationListener(tapiNetworkModelListenerImpl);
+ .registerCompositeListener(tapiNetworkModelNotificationHandler.getCompositeListener());
}
/**
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
+import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ExecutionException;
import java.util.stream.Collectors;
import org.opendaylight.mdsal.binding.api.NotificationPublishService;
+import org.opendaylight.mdsal.binding.api.NotificationService.CompositeListener;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.transportpce.common.network.NetworkTransactionService;
import org.opendaylight.transportpce.tapi.TapiStringConstants;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev181210.Notification;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev181210.NotificationType;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev181210.ObjectType;
-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.notification.rev181210.notification.ChangedAttributes;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev181210.notification.ChangedAttributesBuilder;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev181210.notification.ChangedAttributesKey;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-@Component
-public class TapiNetworkModelListenerImpl implements TapiNotificationListener {
+@Component(service = TapiNetworkModelNotificationHandler.class)
+public class TapiNetworkModelNotificationHandler {
- private static final Logger LOG = LoggerFactory.getLogger(TapiNetworkModelListenerImpl.class);
+ private static final Logger LOG = LoggerFactory.getLogger(TapiNetworkModelNotificationHandler.class);
private final NetworkTransactionService networkTransactionService;
private final NotificationPublishService notificationPublishService;
private final List<ConnectivityService> connectivityServiceChanges = new ArrayList<>();
private final List<LayerProtocolName> orderedServiceLayerList;
@Activate
- public TapiNetworkModelListenerImpl(@Reference NetworkTransactionService networkTransactionService,
+ public TapiNetworkModelNotificationHandler(@Reference NetworkTransactionService networkTransactionService,
@Reference NotificationPublishService notificationPublishService) {
this.networkTransactionService = networkTransactionService;
this.notificationPublishService = notificationPublishService;
LOG.debug("TapiNetworkModelListenerImpl instantiated");
}
- @Override
- public void onNotification(Notification notification) {
+ public CompositeListener getCompositeListener() {
+ return new CompositeListener(Set.of(
+ new CompositeListener.Component<>(Notification.class, this::onNotification)));
+ }
+
+ private void onNotification(Notification notification) {
LOG.info("Received network model notification {}", notification);
if (notification.getNotificationType() == NotificationType.ATTRIBUTEVALUECHANGE
&& notification.getTargetObjectType() == ObjectType.NODEEDGEPOINT) {
import java.util.List;
import java.util.Map;
import java.util.Optional;
+import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ExecutionException;
import java.util.stream.Collectors;
import org.opendaylight.mdsal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.NotificationService.CompositeListener;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.transportpce.common.network.NetworkTransactionImpl;
import org.opendaylight.transportpce.common.network.NetworkTransactionService;
import org.opendaylight.transportpce.tapi.TapiStringConstants;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220808.ServicePathRpcResult;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220808.TransportpcePceListener;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220808.service.path.rpc.result.PathDescription;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220808.service.path.rpc.result.PathDescriptionBuilder;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220922.Network;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class TapiPceListenerImpl implements TransportpcePceListener {
+public class TapiPceNotificationHandler {
- private static final Logger LOG = LoggerFactory.getLogger(TapiPceListenerImpl.class);
+ private static final Logger LOG = LoggerFactory.getLogger(TapiPceNotificationHandler.class);
private final Uuid tapiTopoUuid = new Uuid(UUID.nameUUIDFromBytes(TapiStringConstants.T0_FULL_MULTILAYER
.getBytes(Charset.forName("UTF-8"))).toString());
private Connection topConnXpdrXpdrPhtn;
private Connection topConnXpdrXpdrOdu;
- public TapiPceListenerImpl(DataBroker dataBroker) {
+ public TapiPceNotificationHandler(DataBroker dataBroker) {
this.connectionFullMap = new HashMap<>();
this.dataBroker = dataBroker;
this.networkTransactionService = new NetworkTransactionImpl(this.dataBroker);
this.topConnXpdrXpdrOdu = null;
}
- @Override
- public void onServicePathRpcResult(ServicePathRpcResult notification) {
+ public CompositeListener getCompositeListener() {
+ return new CompositeListener(Set.of(
+ new CompositeListener.Component<>(ServicePathRpcResult.class, this::onServicePathRpcResult)));
+ }
+
+ private void onServicePathRpcResult(ServicePathRpcResult notification) {
if (compareServicePathRpcResult(notification)) {
LOG.warn("ServicePathRpcResult already wired !");
return;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
+import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ExecutionException;
import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.mdsal.binding.api.NotificationPublishService;
+import org.opendaylight.mdsal.binding.api.NotificationService.CompositeListener;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.transportpce.common.network.NetworkTransactionImpl;
import org.opendaylight.transportpce.common.network.NetworkTransactionService;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.RendererRpcResultSp;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.TransportpceRendererListener;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev230726.PublishTapiNotificationService;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev230726.PublishTapiNotificationServiceBuilder;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.AdministrativeState;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class TapiRendererListenerImpl implements TransportpceRendererListener {
+public class TapiRendererNotificationHandler {
- private static final Logger LOG = LoggerFactory.getLogger(TapiRendererListenerImpl.class);
+ private static final Logger LOG = LoggerFactory.getLogger(TapiRendererNotificationHandler.class);
private final DataBroker dataBroker;
private Uuid serviceUuid;
private RendererRpcResultSp serviceRpcResultSp;
private final NetworkTransactionService networkTransactionService;
private final NotificationPublishService notificationPublishService;
- public TapiRendererListenerImpl(DataBroker dataBroker, NotificationPublishService notificationPublishService) {
+ public TapiRendererNotificationHandler(DataBroker dataBroker,
+ NotificationPublishService notificationPublishService) {
this.dataBroker = dataBroker;
this.networkTransactionService = new NetworkTransactionImpl(this.dataBroker);
this.notificationPublishService = notificationPublishService;
}
- @Override
- public void onRendererRpcResultSp(RendererRpcResultSp notification) {
+ public CompositeListener getCompositeListener() {
+ return new CompositeListener(Set.of(
+ new CompositeListener.Component<>(RendererRpcResultSp.class, this::onRendererRpcResultSp)));
+ }
+
+ private void onRendererRpcResultSp(RendererRpcResultSp notification) {
if (compareServiceRpcResultSp(notification)) {
LOG.warn("ServiceRpcResultSp already wired !");
return;
*/
package org.opendaylight.transportpce.tapi.listeners;
+import java.util.Set;
import org.opendaylight.mdsal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.NotificationService.CompositeListener;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.servicehandler.rev201125.ServiceRpcResultSh;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.servicehandler.rev201125.TransportpceServicehandlerListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class TapiServiceHandlerListenerImpl implements TransportpceServicehandlerListener {
+public class TapiServiceNotificationHandler {
- private static final Logger LOG = LoggerFactory.getLogger(TapiServiceHandlerListenerImpl.class);
+ private static final Logger LOG = LoggerFactory.getLogger(TapiServiceNotificationHandler.class);
private final DataBroker dataBroker;
- public TapiServiceHandlerListenerImpl(DataBroker dataBroker) {
+ public TapiServiceNotificationHandler(DataBroker dataBroker) {
this.dataBroker = dataBroker;
+ }
+ public CompositeListener getCompositeListener() {
+ return new CompositeListener(Set.of(
+ new CompositeListener.Component<>(ServiceRpcResultSh.class, this::onServiceRpcResultSh)));
}
- @Override
- public void onServiceRpcResultSh(ServiceRpcResultSh notification) {
+ private void onServiceRpcResultSh(ServiceRpcResultSh notification) {
LOG.info("Avoid dataBroker error {}", dataBroker.getClass().getCanonicalName());
}
}
import org.opendaylight.transportpce.servicehandler.listeners.RendererListener;
import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperations;
import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperationsImpl;
-import org.opendaylight.transportpce.tapi.listeners.TapiPceListenerImpl;
-import org.opendaylight.transportpce.tapi.listeners.TapiRendererListenerImpl;
-import org.opendaylight.transportpce.tapi.listeners.TapiServiceHandlerListenerImpl;
+import org.opendaylight.transportpce.tapi.listeners.TapiPceNotificationHandler;
+import org.opendaylight.transportpce.tapi.listeners.TapiRendererNotificationHandler;
+import org.opendaylight.transportpce.tapi.listeners.TapiServiceNotificationHandler;
import org.opendaylight.transportpce.tapi.topology.TopologyUtils;
import org.opendaylight.transportpce.tapi.utils.TapiConnectivityDataUtils;
import org.opendaylight.transportpce.tapi.utils.TapiContext;
@Mock
private NotificationPublishService notificationPublishService;
@Mock
- private TapiPceListenerImpl tapipceListenerImpl;
+ private TapiPceNotificationHandler tapipceNotificationHandler;
@Mock
- private TapiRendererListenerImpl tapirendererListenerImpl;
+ private TapiRendererNotificationHandler tapirendererNotificationHandler;
@Mock
- private TapiServiceHandlerListenerImpl tapiserviceHandlerListenerImpl;
+ private TapiServiceNotificationHandler tapiserviceNotificationHandler;
@Mock
private PceListener pceListenerImpl;
@Mock
networkModelListenerImpl, serviceDataStoreOperations, catalogDataStoreOperations);
TapiConnectivityImpl tapiConnectivity = new TapiConnectivityImpl(serviceHandler, tapiContext, connectivityUtils,
- tapipceListenerImpl, tapirendererListenerImpl);
+ tapipceNotificationHandler, tapirendererNotificationHandler);
ListenableFuture<RpcResult<CreateConnectivityServiceOutput>> result =
tapiConnectivity.createConnectivityService(new CreateConnectivityServiceInputBuilder().build());
when(pathComputationService.pathComputationRequest(any())).thenReturn(Futures.immediateFuture(any()));
TapiConnectivityImpl tapiConnectivity = new TapiConnectivityImpl(serviceHandler, tapiContext, connectivityUtils,
- tapipceListenerImpl, tapirendererListenerImpl);
+ tapipceNotificationHandler, tapirendererNotificationHandler);
ListenableFuture<RpcResult<CreateConnectivityServiceOutput>> result =
tapiConnectivity.createConnectivityService(input);
result.addListener(new Runnable() {
networkModelListenerImpl, serviceDataStoreOperations, catalogDataStoreOperations);
TapiConnectivityImpl tapiConnectivity = new TapiConnectivityImpl(serviceHandler, tapiContext, connectivityUtils,
- tapipceListenerImpl, tapirendererListenerImpl);
+ tapipceNotificationHandler, tapirendererNotificationHandler);
ListenableFuture<RpcResult<DeleteConnectivityServiceOutput>> result =
tapiConnectivity.deleteConnectivityService(new DeleteConnectivityServiceInputBuilder().build());
networkModelListenerImpl, serviceDataStoreOperations, catalogDataStoreOperations);
TapiConnectivityImpl tapiConnectivity = new TapiConnectivityImpl(serviceHandler, tapiContext, connectivityUtils,
- tapipceListenerImpl, tapirendererListenerImpl);
+ tapipceNotificationHandler, tapirendererNotificationHandler);
ListenableFuture<RpcResult<DeleteConnectivityServiceOutput>> result =
tapiConnectivity.deleteConnectivityService(input);
result.addListener(new Runnable() {
networkModelListenerImpl, serviceDataStoreOperations, catalogDataStoreOperations);
TapiConnectivityImpl tapiConnectivity = new TapiConnectivityImpl(serviceHandler, tapiContext, connectivityUtils,
- tapipceListenerImpl, tapirendererListenerImpl);
+ tapipceNotificationHandler, tapirendererNotificationHandler);
ServiceCreateInput createInput = TapiConnectivityDataUtils.buildServiceCreateInput();
serviceDataStoreOperations.createService(createInput);
import org.opendaylight.transportpce.common.network.NetworkTransactionService;
import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperations;
import org.opendaylight.transportpce.tapi.impl.TapiProvider;
+import org.opendaylight.transportpce.tapi.listeners.TapiNetworkModelNotificationHandler;
import org.opendaylight.transportpce.tapi.topology.TapiNetworkModelService;
import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.OrgOpenroadmServiceService;
-import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev181210.TapiNotificationListener;
@ExtendWith(MockitoExtension.class)
public class TapiProviderTest {
@Mock
private ServiceDataStoreOperations serviceDataStoreOperations;
@Mock
- private TapiNotificationListener tapiNetworkModelListenerImpl;
+ private TapiNetworkModelNotificationHandler tapiNetworkModelNotificationHandler;
@Mock
private TapiNetworkModelService tapiNetworkModelServiceImpl;
doReturn(emptyFluentFuture()).when(networkTransactionService).commit();
new TapiProvider(dataBroker, rpcProviderRegistry, notificationService, notificationPublishService,
networkTransactionService, serviceHandler, serviceDataStoreOperations,
- tapiNetworkModelListenerImpl, tapiNetworkModelServiceImpl);
+ tapiNetworkModelNotificationHandler, tapiNetworkModelServiceImpl);
verify(rpcProviderRegistry, times(2)).registerRpcImplementations(any());
verify(dataBroker, times(4)).registerDataTreeChangeListener(any(), any());
}
-}
\ No newline at end of file
+}