import java.util.concurrent.atomic.AtomicBoolean;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
+import org.opendaylight.controller.md.sal.dom.api.DOMActionService;
import org.opendaylight.controller.md.sal.dom.api.DOMNotification;
import org.opendaylight.controller.md.sal.dom.api.DOMRpcAvailabilityListener;
import org.opendaylight.controller.md.sal.dom.api.DOMRpcException;
@Override
public void onDeviceConnected(final SchemaContext remoteSchemaContext,
final NetconfSessionPreferences netconfSessionPreferences, final DOMRpcService deviceRpc) {
+ onDeviceConnected(remoteSchemaContext, netconfSessionPreferences, deviceRpc, null);
+ }
+
+ @Override
+ public void onDeviceConnected(SchemaContext remoteSchemaContext,
+ NetconfSessionPreferences netconfSessionPreferences, DOMRpcService deviceRpc,
+ DOMActionService deviceAction) {
this.currentDeviceRpc = deviceRpc;
final DOMRpcService deviceRpc1 =
new KeepaliveDOMRpcService(deviceRpc, resetKeepaliveTask, defaultRequestTimeoutMillis, executor);
- salFacade.onDeviceConnected(remoteSchemaContext, netconfSessionPreferences, deviceRpc1);
+
+ salFacade.onDeviceConnected(remoteSchemaContext, netconfSessionPreferences, deviceRpc1, deviceAction);
LOG.debug("{}: Netconf session initiated, starting keepalives", id);
scheduleKeepalives();
keepaliveSalFacade.onDeviceConnected(null, null, deviceRpc);
verify(underlyingSalFacade).onDeviceConnected(
- any(SchemaContext.class), any(NetconfSessionPreferences.class), any(DOMRpcService.class));
+ any(SchemaContext.class), any(NetconfSessionPreferences.class), any(DOMRpcService.class), any());
verify(deviceRpc, timeout(15000).times(5)).invokeRpc(any(SchemaPath.class), any(NormalizedNode.class));
}
keepaliveSalFacade.onDeviceConnected(null, null, deviceRpc);
verify(underlyingSalFacade).onDeviceConnected(
- any(SchemaContext.class), any(NetconfSessionPreferences.class), any(DOMRpcService.class));
+ any(SchemaContext.class), any(NetconfSessionPreferences.class), any(DOMRpcService.class), any());
// Should disconnect the session
verify(listener, timeout(15000).times(1)).disconnect();
keepaliveSalFacade.onDeviceConnected(null, null, deviceRpc);
verify(underlyingSalFacade).onDeviceConnected(
- any(SchemaContext.class), any(NetconfSessionPreferences.class), any(DOMRpcService.class));
+ any(SchemaContext.class), any(NetconfSessionPreferences.class), any(DOMRpcService.class), any());
// Shouldn't disconnect the session
verify(listener, times(0)).disconnect();
proxyRpc = (DOMRpcService) invocationOnMock.getArguments()[2];
return null;
}).when(underlyingSalFacade).onDeviceConnected(
- any(SchemaContext.class), any(NetconfSessionPreferences.class), any(DOMRpcService.class));
+ any(SchemaContext.class), any(NetconfSessionPreferences.class), any(DOMRpcService.class), any());
doReturn(Futures.immediateFailedCheckedFuture(new IllegalStateException("illegal-state")))
.when(deviceRpc).invokeRpc(any(SchemaPath.class), any(NormalizedNode.class));