use of org.opendaylight.netconf.sal.connect.util.RemoteDeviceId in project netconf by opendaylight.
the class RemoteDeviceIdTest method testHashCode.
@Test
public void testHashCode() {
final String name = "name";
final InetSocketAddress address = new InetSocketAddress("127.0.0.1", 8000);
final RemoteDeviceId remoteDeviceId = new RemoteDeviceId(name, address);
final RemoteDeviceId remoteDeviceIdEqualName = new RemoteDeviceId(name, address);
final RemoteDeviceId remoteDeviceIdDiffName = new RemoteDeviceId("test-diff", address);
assertEquals(remoteDeviceIdEqualName.hashCode(), remoteDeviceId.hashCode());
assertNotEquals(remoteDeviceIdDiffName.hashCode(), remoteDeviceId.hashCode());
}
use of org.opendaylight.netconf.sal.connect.util.RemoteDeviceId in project netconf by opendaylight.
the class WriteCandidateRunningTxTest method setUp.
@Before
public void setUp() {
doReturn(FluentFutures.immediateFluentFuture(new DefaultDOMRpcResult())).when(rpc).invokeRpc(any(), any());
netconfOps = new NetconfBaseOps(rpc, new EmptyMountPointContext(SCHEMA_CONTEXT));
id = new RemoteDeviceId("device1", InetSocketAddress.createUnresolved("0.0.0.0", 17830));
}
use of org.opendaylight.netconf.sal.connect.util.RemoteDeviceId in project netconf by opendaylight.
the class WriteCandidateTxTest method setUp.
@Before
public void setUp() {
doReturn(FluentFutures.immediateFluentFuture(new DefaultDOMRpcResult())).when(rpc).invokeRpc(any(), any());
netconfOps = new NetconfBaseOps(rpc, new EmptyMountPointContext(SCHEMA_CONTEXT));
id = new RemoteDeviceId("device1", InetSocketAddress.createUnresolved("0.0.0.0", 17830));
}
use of org.opendaylight.netconf.sal.connect.util.RemoteDeviceId in project netconf by opendaylight.
the class WriteRunningTxTest method setUp.
@Before
public void setUp() {
doReturn(FluentFutures.immediateFluentFuture(new DefaultDOMRpcResult())).when(rpc).invokeRpc(any(), any());
netconfOps = new NetconfBaseOps(rpc, new EmptyMountPointContext(SCHEMA_CONTEXT));
id = new RemoteDeviceId("device1", InetSocketAddress.createUnresolved("0.0.0.0", 17830));
}
use of org.opendaylight.netconf.sal.connect.util.RemoteDeviceId in project netconf by opendaylight.
the class NetconfRemoteSchemaYangSourceProviderTest method setUp.
@Before
public void setUp() throws Exception {
final DOMRpcResult value = new DefaultDOMRpcResult(getNode(), Set.of());
final FluentFuture<DOMRpcResult> response = FluentFutures.immediateFluentFuture(value);
doReturn(response).when(service).invokeRpc(any(QName.class), any(ContainerNode.class));
provider = new NetconfRemoteSchemaYangSourceProvider(new RemoteDeviceId("device1", InetSocketAddress.createUnresolved("localhost", 17830)), service);
}
Aggregations