use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.ConnectionInfoBuilder in project genius by opendaylight.
the class OvsdbTestUtil method getConnectionInfo.
/* methods */
public static ConnectionInfo getConnectionInfo(int port, String strIpAddress) {
IpAddress ipAddress = IpAddressBuilder.getDefaultInstance(strIpAddress);
PortNumber portNumber = new PortNumber(port);
ConnectionInfo connectionInfo = new ConnectionInfoBuilder().setRemoteIp(ipAddress).setRemotePort(portNumber).build();
return connectionInfo;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.ConnectionInfoBuilder in project genius by opendaylight.
the class OvsdbSouthboundTestUtil method getConnectionInfo.
public static ConnectionInfo getConnectionInfo(final String addressStr, final String portStr) {
InetAddress inetAddress = null;
try {
inetAddress = InetAddress.getByName(addressStr);
} catch (UnknownHostException e) {
LOG.warn("Could not allocate InetAddress", e);
}
IpAddress address = createIpAddress(inetAddress);
PortNumber port = new PortNumber(Integer.parseInt(portStr));
LOG.info("connectionInfo: {}", new ConnectionInfoBuilder().setRemoteIp(address).setRemotePort(port).build());
return new ConnectionInfoBuilder().setRemoteIp(address).setRemotePort(port).build();
}
Aggregations