use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.EidBuilder in project lispflowmapping by opendaylight.
the class SourceDestKeyHelperTest method getDstBinaryTest_sourceDestKey.
/**
* Tests {@link SourceDestKeyHelper#getDstBinary} method with SourceDestKey address type.
*/
@Test
public void getDstBinaryTest_sourceDestKey() {
final Eid expectedResult = new EidBuilder().setAddress(IPV4_DEST_PREFIX_BINARY).setVirtualNetworkId(INSTANCE_ID).setAddressType(Ipv4PrefixBinaryAfi.class).build();
assertEquals(expectedResult, SourceDestKeyHelper.getDstBinary(EID_SOURCE_DEST_KEY));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.EidBuilder in project lispflowmapping by opendaylight.
the class SourceDestKeyHelperTest method getSrcBinaryTest_sourceDestKey.
/**
* Tests {@link SourceDestKeyHelper#getSrcBinary} method with SourceDestKey address type.
*/
@Test
public void getSrcBinaryTest_sourceDestKey() {
final Eid expectedResult = new EidBuilder().setAddress(IPV4_SOURCE_PREFIX_BINARY).setVirtualNetworkId(INSTANCE_ID).setAddressType(Ipv4PrefixBinaryAfi.class).build();
assertEquals(expectedResult, SourceDestKeyHelper.getSrcBinary(EID_SOURCE_DEST_KEY));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.EidBuilder in project lispflowmapping by opendaylight.
the class SourceDestKeyHelperTest method getSrcTest_sourceDestKey.
/**
* Tests {@link SourceDestKeyHelper#getSrc} method with SourceDestKey address type.
*/
@Test
public void getSrcTest_sourceDestKey() {
final Eid expectedResult = new EidBuilder().setAddress(new Ipv4PrefixBuilder().setIpv4Prefix(IPV4_PREFIX_SOURCE).build()).setVirtualNetworkId(INSTANCE_ID).setAddressType(Ipv4PrefixAfi.class).build();
assertEquals(expectedResult, SourceDestKeyHelper.getSrc(EID_SOURCE_DEST_KEY));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.EidBuilder in project lispflowmapping by opendaylight.
the class LispAddressUtil method toEid.
public static Eid toEid(MacAddress mac, InstanceIdType vni) {
EidBuilder builder = new EidBuilder();
builder.setAddressType(MacAfi.class);
builder.setVirtualNetworkId(vni);
builder.setAddress((Address) new MacBuilder().setMac(mac).build());
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.EidBuilder in project lispflowmapping by opendaylight.
the class LispAddressUtil method toEid.
public static Eid toEid(Ipv4PrefixBinary prefix, InstanceIdType vni) {
EidBuilder builder = new EidBuilder();
builder.setAddressType(Ipv4PrefixBinaryAfi.class);
builder.setVirtualNetworkId(vni);
builder.setAddress((Address) prefix);
return builder.build();
}
Aggregations