This migrates away from char[]-based getValue() and constructors.
Change-Id: I6cf3c40361352629e5810969f7f01148f31d7ba0
JIRA: MDSAL-364
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
if (needComma) {
sb.append(",");
}
- sb.append(a.getValue());
+ sb.append(a.stringValue());
needComma = true;
}
sb.append("}");
// AFI = 16387, LCAF Type 12, Source/Destination Key
// Example rendering:
// 192.0.2.1/32|192.0.2.2/32
- return getPrefixString(dst, (new String(addr.getSourceDestKey().getSource().getValue()))
- + "|" + getPrefixString(dst, new String(addr.getSourceDestKey().getDest().getValue())));
+ return getPrefixString(dst, addr.getSourceDestKey().getSource().stringValue()
+ + "|" + getPrefixString(dst, addr.getSourceDestKey().getDest().stringValue()));
}
protected static String getStringFromKeyValueAddress(Destination dst, KeyValueAddress addr) {
// AFI = 16387, LCAF Type 15, Key/Value Address Pair
// Example rendering:
// 192.0.2.1=>192.0.2.2
- return getPrefixString(dst, new String(addr.getKeyValueAddress().getKey().getValue())
- + "=>" + getPrefixString(dst, new String(addr.getKeyValueAddress().getValue().getValue())));
+ return getPrefixString(dst, addr.getKeyValueAddress().getKey().stringValue()
+ + "=>" + getPrefixString(dst, addr.getKeyValueAddress().getValue().stringValue()));
}
protected static String getStringFromMac(Destination dst, Mac addr) {
public static Eid toIpPrefixEid(IpAddress addr, int vni) {
// If you touch this, be sure that sfclisp compiles!
int mask = addressTypeFromIpAddress(addr) == Ipv4Afi.class ? 32 : 128;
- IpPrefix prefix = asIpPrefix(String.valueOf(addr.getValue()), mask);
+ IpPrefix prefix = asIpPrefix(addr.stringValue(), mask);
// XXX getMapping rcp fails if VNI set to 0
return toEidNoVni(prefix);
}
}
private static IpPrefix normalizeIpPrefix(IpPrefix address) throws UnknownHostException {
- String[] prefix = splitPrefix(String.valueOf(address.getValue()));
+ String[] prefix = splitPrefix(address.stringValue());
short mask = Short.parseShort(prefix[1]);
InetAddress normalizedAddress = normalizeIP(InetAddresses.forString(prefix[0]), mask);
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.ServicePathIdType;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.ServicePathLcaf;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SimpleAddress;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SimpleAddressBuilder;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SourceDestKeyLcaf;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.Address;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.DistinguishedName;
public class LispAddressUtilTest {
- private static final char[] DUMMY_CHARACTER_ARRAY_TEST = new char[]{'a', 'b', 'c', 'd'};
private static final Long NUMBER_TEST = 5L;
private static final byte[] IPV4_ADDRESS_BYTES_A_TEST = new byte[]{(byte) 192, (byte) 168, 1, 1};
*/
@Test
public void addressFromSimpleAddressTest_asAddress() {
- final SimpleAddress simpleAddress = new SimpleAddress(DUMMY_CHARACTER_ARRAY_TEST);
+ final SimpleAddress simpleAddress = SimpleAddressBuilder.getDefaultInstance("abcd");
final Class<? extends LispAddressFamily> addressClass = LispAddressUtil.addressTypeFromSimpleAddress(
simpleAddress);
assertEquals(DistinguishedNameAfi.class, addressClass);
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
-
import junitx.framework.ArrayAssert;
import junitx.framework.Assert;
-
import org.junit.Test;
import org.opendaylight.lispflowmapping.lisp.serializer.address.LispAddressSerializer;
import org.opendaylight.lispflowmapping.lisp.serializer.exception.LispSerializationException;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.AfiListLcaf;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SimpleAddress;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SimpleAddressBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.Address;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.AfiList;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.afi.list.AfiListBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.rloc.container.Rloc;
List<SimpleAddress> addressList = afiList.getAfiList().getAddressList();
assertEquals(2, addressList.size());
- assertEquals("170.187.204.221", String.valueOf(addressList.get(0).getValue()));
- assertEquals("1122:3344:1122:3344:1122:3344:1122:3344", String.valueOf(addressList.get(1).getValue()));
+ assertEquals("170.187.204.221", addressList.get(0).stringValue());
+ assertEquals("1122:3344:1122:3344:1122:3344:1122:3344", addressList.get(1).stringValue());
}
@Test
@Test
public void serialize__Simple() throws Exception {
AfiListBuilder listBuilder = new AfiListBuilder();
- List<SimpleAddress> addressList = new ArrayList<SimpleAddress>();
+ List<SimpleAddress> addressList = new ArrayList<>();
addressList.add(SimpleAddressBuilder.getDefaultInstance("170.187.204.221"));
addressList.add(SimpleAddressBuilder.getDefaultInstance("1122:3344:1122:3344:1122:3344:1122:3344"));
listBuilder.setAddressList(addressList);
RlocBuilder rb = new RlocBuilder();
rb.setAddressType(AfiListLcaf.class);
rb.setVirtualNetworkId(null);
- rb.setAddress((Address)
- new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
- .lisp.address.address.AfiListBuilder()
- .setAfiList(listBuilder.build()).build());
+ rb.setAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+ .lisp.address.address.AfiListBuilder()
+ .setAfiList(listBuilder.build()).build());
ByteBuffer buf = ByteBuffer.allocate(LispAddressSerializer.getInstance().getAddressSize(rb.build()));
LispAddressSerializer.getInstance().serialize(buf, rb.build());
@Test
public void serialize__NoAddresses() throws Exception {
AfiListBuilder listBuilder = new AfiListBuilder();
- List<SimpleAddress> addressList = new ArrayList<SimpleAddress>();
+ List<SimpleAddress> addressList = new ArrayList<>();
listBuilder.setAddressList(addressList);
RlocBuilder rb = new RlocBuilder();
rb.setAddressType(AfiListLcaf.class);
rb.setVirtualNetworkId(null);
- rb.setAddress((Address)
- new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
- .lisp.address.address.AfiListBuilder()
- .setAfiList(listBuilder.build()).build());
+ rb.setAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+ .lisp.address.address.AfiListBuilder()
+ .setAfiList(listBuilder.build()).build());
ByteBuffer buf = ByteBuffer.allocate(LispAddressSerializer.getInstance().getAddressSize(rb.build()));
LispAddressSerializer.getInstance().serialize(buf, rb.build());
import static org.junit.Assert.assertEquals;
import java.nio.ByteBuffer;
-
import junitx.framework.ArrayAssert;
-
import org.junit.Test;
import org.opendaylight.lispflowmapping.lisp.serializer.address.LispAddressSerializer;
import org.opendaylight.lispflowmapping.lisp.serializer.exception.LispSerializationException;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.ApplicationDataLcaf;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SimpleAddress;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.Address;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.ApplicationData;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.application.data.ApplicationDataBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid;
assertEquals(ApplicationDataLcaf.class, address.getAddressType());
ApplicationData appAddress = (ApplicationData) address.getAddress();
- assertEquals("17.34.51.68", String.valueOf(appAddress.getApplicationData().getAddress().getValue()));
+ assertEquals("17.34.51.68", appAddress.getApplicationData().getAddress().stringValue());
assertEquals(ByteUtil.getPartialInt(new byte[] { (byte) 0xAA, (byte) 0xBB, (byte) 0xCC }),
appAddress.getApplicationData().getIpTos().intValue());
assertEquals((byte) 0xDD, appAddress.getApplicationData().getProtocol().byteValue());
"00 02 11 22 33 44 55 66 77 88 99 AA BB CC AA BB CC DD"), null); // AFI=2,
// IPv6
- assertEquals("1122:3344:5566:7788:99aa:bbcc:aabb:ccdd", String.valueOf(
- ((ApplicationData) appAddress.getAddress()).getApplicationData().getAddress().getValue()));
+ assertEquals("1122:3344:5566:7788:99aa:bbcc:aabb:ccdd",
+ ((ApplicationData) appAddress.getAddress()).getApplicationData().getAddress().stringValue());
}
@Test
EidBuilder eb = new EidBuilder();
eb.setAddressType(ApplicationDataLcaf.class);
eb.setVirtualNetworkId(null);
- eb.setAddress((Address)
- new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
- .lisp.address.address.ApplicationDataBuilder()
- .setApplicationData(addressBuilder.build()).build());
+ eb.setAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+ .lisp.address.address.ApplicationDataBuilder()
+ .setApplicationData(addressBuilder.build()).build());
ByteBuffer buf = ByteBuffer.allocate(LispAddressSerializer.getInstance().getAddressSize(eb.build()));
LispAddressSerializer.getInstance().serialize(buf, eb.build());
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
-
import junitx.framework.ArrayAssert;
-
import org.junit.Test;
import org.opendaylight.lispflowmapping.lisp.serializer.address.LispAddressSerializer;
import org.opendaylight.lispflowmapping.lisp.serializer.exception.LispSerializationException;
import org.opendaylight.lispflowmapping.tools.junit.BaseTestCase;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.ExplicitLocatorPathLcaf;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SimpleAddressBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.Address;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.ExplicitLocatorPath;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.explicit.locator.path.ExplicitLocatorPathBuilder;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.explicit.locator.path.explicit.locator.path.Hop;
List<Hop> hops = elp.getExplicitLocatorPath().getHop();
assertEquals(2, hops.size());
- assertEquals("170.187.204.221", String.valueOf(hops.get(0).getAddress().getValue()));
- assertEquals("17.34.51.68", String.valueOf(hops.get(1).getAddress().getValue()));
+ assertEquals("170.187.204.221", hops.get(0).getAddress().stringValue());
+ assertEquals("17.34.51.68", hops.get(1).getAddress().stringValue());
}
@Test
List<Hop> hops = elp.getExplicitLocatorPath().getHop();
assertEquals(2, hops.size());
- assertEquals("170.187.204.221", String.valueOf(hops.get(0).getAddress().getValue()));
+ assertEquals("170.187.204.221", hops.get(0).getAddress().stringValue());
assertEquals(true, hops.get(0).getLrsBits().isLookup().booleanValue());
assertEquals(false, hops.get(0).getLrsBits().isRlocProbe().booleanValue());
assertEquals(true, hops.get(0).getLrsBits().isStrict().booleanValue());
- assertEquals("17.34.51.68", String.valueOf(hops.get(1).getAddress().getValue()));
+ assertEquals("17.34.51.68", hops.get(1).getAddress().stringValue());
assertEquals(false, hops.get(1).getLrsBits().isLookup().booleanValue());
assertEquals(true, hops.get(1).getLrsBits().isRlocProbe().booleanValue());
assertEquals(false, hops.get(1).getLrsBits().isStrict().booleanValue());
@Test
public void serialize__Simple() throws Exception {
- List<Hop> hops = new ArrayList<Hop>();
+ List<Hop> hops = new ArrayList<>();
hops.add(new HopBuilder().setAddress(SimpleAddressBuilder.getDefaultInstance("170.187.204.221")).build());
hops.add(new HopBuilder().setAddress(SimpleAddressBuilder.getDefaultInstance("17.34.51.68")).build());
RlocBuilder rb = new RlocBuilder();
rb.setAddressType(ExplicitLocatorPathLcaf.class);
rb.setVirtualNetworkId(null);
- rb.setAddress((Address)
- new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
- .lisp.address.address.ExplicitLocatorPathBuilder()
- .setExplicitLocatorPath(elpb.build()).build());
+ rb.setAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+ .lisp.address.address.ExplicitLocatorPathBuilder()
+ .setExplicitLocatorPath(elpb.build()).build());
ByteBuffer buf = ByteBuffer.allocate(LispAddressSerializer.getInstance().getAddressSize(rb.build()));
LispAddressSerializer.getInstance().serialize(buf, rb.build());
RlocBuilder rb = new RlocBuilder();
rb.setAddressType(ExplicitLocatorPathLcaf.class);
rb.setVirtualNetworkId(null);
- rb.setAddress((Address)
- new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
- .lisp.address.address.ExplicitLocatorPathBuilder().build());
+ rb.setAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+ .lisp.address.address.ExplicitLocatorPathBuilder().build());
ByteBuffer buf = ByteBuffer.allocate(LispAddressSerializer.getInstance().getAddressSize(rb.build()));
LispAddressSerializer.getInstance().serialize(buf, rb.build());
import static org.junit.Assert.assertEquals;
import java.nio.ByteBuffer;
-
import junitx.framework.ArrayAssert;
-
import org.junit.Test;
import org.opendaylight.lispflowmapping.lisp.serializer.address.LispAddressSerializer;
import org.opendaylight.lispflowmapping.lisp.serializer.exception.LispSerializationException;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.KeyValueAddressLcaf;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SimpleAddress;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.Address;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.KeyValueAddress;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.key.value.address.KeyValueAddressBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid;
assertEquals(KeyValueAddressLcaf.class, address.getAddressType());
KeyValueAddress srcDestAddress = (KeyValueAddress) address.getAddress();
- assertEquals("17.34.51.68", String.valueOf(srcDestAddress.getKeyValueAddress().getKey().getValue()));
- assertEquals("34.51.68.85", String.valueOf(srcDestAddress.getKeyValueAddress().getValue().getValue()));
+ assertEquals("17.34.51.68", srcDestAddress.getKeyValueAddress().getKey().stringValue());
+ assertEquals("34.51.68.85", srcDestAddress.getKeyValueAddress().getValue().stringValue());
}
@Test(expected = LispSerializationException.class)
"00 02 44 33 22 11 88 77 66 55 99 AA BB CC AA BB CC DD"), null); // AFI=2,
// IPv6
- assertEquals("1122:3344:5566:7788:99aa:bbcc:aabb:ccdd", String.valueOf(
- ((KeyValueAddress) srcAddress.getAddress()).getKeyValueAddress().getKey().getValue()));
- assertEquals("4433:2211:8877:6655:99aa:bbcc:aabb:ccdd", String.valueOf(
- ((KeyValueAddress) srcAddress.getAddress()).getKeyValueAddress().getValue().getValue()));
+ assertEquals("1122:3344:5566:7788:99aa:bbcc:aabb:ccdd",
+ ((KeyValueAddress) srcAddress.getAddress()).getKeyValueAddress().getKey().stringValue());
+ assertEquals("4433:2211:8877:6655:99aa:bbcc:aabb:ccdd",
+ ((KeyValueAddress) srcAddress.getAddress()).getKeyValueAddress().getValue().stringValue());
}
@Test
EidBuilder eb = new EidBuilder();
eb.setAddressType(KeyValueAddressLcaf.class);
eb.setVirtualNetworkId(null);
- eb.setAddress((Address)
- new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
- .lisp.address.address.KeyValueAddressBuilder()
- .setKeyValueAddress(addressBuilder.build()).build());
+ eb.setAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+ .lisp.address.address.KeyValueAddressBuilder()
+ .setKeyValueAddress(addressBuilder.build()).build());
ByteBuffer buf = ByteBuffer.allocate(LispAddressSerializer.getInstance().getAddressSize(eb.build()));
LispAddressSerializer.getInstance().serialize(buf, eb.build());
import static org.junit.Assert.assertEquals;
import java.nio.ByteBuffer;
-
import junitx.framework.ArrayAssert;
-
import org.junit.Test;
import org.opendaylight.lispflowmapping.lisp.serializer.address.LispAddressSerializer;
import org.opendaylight.lispflowmapping.lisp.serializer.address.LispAddressSerializerContext;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SimpleAddress;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SourceDestKeyLcaf;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.Address;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.SourceDestKey;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.source.dest.key.SourceDestKeyBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid;
assertEquals((byte) 0x10, MaskUtil.getMaskForAddress(srcDestAddress.getSourceDestKey().getSource()));
assertEquals((byte) 0x18, MaskUtil.getMaskForAddress(srcDestAddress.getSourceDestKey().getDest()));
- assertEquals("17.34.51.68/16", String.valueOf(srcDestAddress.getSourceDestKey().getSource().getValue()));
- assertEquals("34.51.68.85/24", String.valueOf(srcDestAddress.getSourceDestKey().getDest().getValue()));
+ assertEquals("17.34.51.68/16", srcDestAddress.getSourceDestKey().getSource().stringValue());
+ assertEquals("34.51.68.85/24", srcDestAddress.getSourceDestKey().getDest().stringValue());
}
@Test(expected = LispSerializationException.class)
new LispAddressSerializerContext(null));
// IPv6
- assertEquals("1122:3344:5566:7788:99aa:bbcc:aabb:ccdd/120", String.valueOf(
- ((SourceDestKey) srcAddress.getAddress()).getSourceDestKey().getSource().getValue()));
- assertEquals("4433:2211:8877:6655:99aa:bbcc:aabb:ccdd/120", String.valueOf(
- ((SourceDestKey) srcAddress.getAddress()).getSourceDestKey().getDest().getValue()));
+ assertEquals("1122:3344:5566:7788:99aa:bbcc:aabb:ccdd/120",
+ ((SourceDestKey) srcAddress.getAddress()).getSourceDestKey().getSource().stringValue());
+ assertEquals("4433:2211:8877:6655:99aa:bbcc:aabb:ccdd/120",
+ ((SourceDestKey) srcAddress.getAddress()).getSourceDestKey().getDest().stringValue());
}
@Test
EidBuilder eb = new EidBuilder();
eb.setAddressType(SourceDestKeyLcaf.class);
eb.setVirtualNetworkId(null);
- eb.setAddress((Address)
- new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
- .lisp.address.address.SourceDestKeyBuilder()
- .setSourceDestKey(addressBuilder.build()).build());
+ eb.setAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+ .lisp.address.address.SourceDestKeyBuilder()
+ .setSourceDestKey(addressBuilder.build()).build());
ByteBuffer buf = ByteBuffer.allocate(LispAddressSerializer.getInstance().getAddressSize(eb.build()));
LispAddressSerializer.getInstance().serialize(buf, eb.build());
// Determine the IANA code for the subnet IP version
// Default is set to IPv4 for neutron subnets
- final Eid eid = LispAddressUtil.asIpv4PrefixEid(String.valueOf(subnet.getCidr().getValue()));
+ final Eid eid = LispAddressUtil.asIpv4PrefixEid(subnet.getCidr().stringValue());
try {
final OdlMappingserviceService lfmdb = lispNeutronService.getMappingDbService();
// Determine the IANA code for the subnet IP version
// Default is set to IPv4 for neutron subnets
- final Eid eid = LispAddressUtil.asIpv4PrefixEid(String.valueOf(subnet.getCidr().getValue()));
+ final Eid eid = LispAddressUtil.asIpv4PrefixEid(subnet.getCidr().stringValue());
try {
final OdlMappingserviceService lfmdb = lispNeutronService.getMappingDbService();