use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber in project lispflowmapping by opendaylight.
the class LispNotificationHelperTest method getTransportAddressFromRlocTest_withDistinguishedNameAddress.
/**
* Tests {@link LispNotificationHelper#getTransportAddressFromRloc} method with DistinguishedName type address.
*/
@Test
public void getTransportAddressFromRlocTest_withDistinguishedNameAddress() {
final TransportAddress result = new TransportAddressBuilder().setIpAddress(new IpAddressBinary(ADDRESS_IPV4_BINARY)).setPort(new PortNumber(PORT)).build();
assertEquals(result, LispNotificationHelper.getTransportAddressFromRloc(RLOC_DISTINGUISHED_NAME_ADDRESS));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber in project lispflowmapping by opendaylight.
the class LispMappingService method onAddMapping.
@Override
public void onAddMapping(AddMapping mapRegisterNotification) {
Pair<MapNotify, List<TransportAddress>> result = handleMapRegister(mapRegisterNotification.getMapRegister());
if (result != null && result.getLeft() != null) {
MapNotify mapNotify = result.getLeft();
List<TransportAddress> rlocs = result.getRight();
if (rlocs == null) {
TransportAddressBuilder tab = new TransportAddressBuilder();
tab.setIpAddress(mapRegisterNotification.getTransportAddress().getIpAddress());
tab.setPort(new PortNumber(LispMessage.PORT_NUM));
sendMapNotify(mapNotify, tab.build());
} else {
for (TransportAddress ta : rlocs) {
sendMapNotify(mapNotify, ta);
}
}
} else {
LOG.debug("Not sending Map-Notify");
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber 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.openflow.common.types.rev130731.PortNumber in project genius by opendaylight.
the class NxMatchTcpSourcePort method populateBuilder.
@Override
protected void populateBuilder(NxmOfTcpSrcBuilder builder) {
builder.setPort(new PortNumber(port));
builder.setMask(mask);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber in project genius by opendaylight.
the class NxMatchUdpDestinationPort method populateBuilder.
@Override
protected void populateBuilder(NxmOfUdpDstBuilder builder) {
builder.setPort(new PortNumber(port));
builder.setMask(mask);
}
Aggregations