use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.InstanceIdType 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.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.InstanceIdType 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();
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.InstanceIdType in project lispflowmapping by opendaylight.
the class LispAddressUtil method toEid.
public static Eid toEid(Ipv6AddressBinary address, InstanceIdType vni) {
EidBuilder builder = new EidBuilder();
builder.setAddressType(Ipv6BinaryAfi.class);
builder.setVirtualNetworkId(vni);
builder.setAddress((Address) new Ipv6BinaryBuilder().setIpv6Binary(address).build());
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.InstanceIdType in project lispflowmapping by opendaylight.
the class LispAddressUtil method toEid.
public static Eid toEid(Ipv6Prefix prefix, InstanceIdType vni) {
EidBuilder builder = new EidBuilder();
builder.setAddressType(Ipv6PrefixAfi.class);
builder.setVirtualNetworkId(vni);
builder.setAddress((Address) new Ipv6PrefixBuilder().setIpv6Prefix(prefix).build());
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.InstanceIdType in project lispflowmapping by opendaylight.
the class LispAddressUtil method asServicePathEid.
public static Eid asServicePathEid(long vni, long servicePathId, short serviceIndex) {
EidBuilder eb = new EidBuilder();
eb.setAddressType(ServicePathLcaf.class);
if (vni >= 0) {
eb.setVirtualNetworkId(new InstanceIdType(vni));
}
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.service.path.ServicePathBuilder spb = new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.service.path.ServicePathBuilder();
spb.setServicePathId(new ServicePathIdType(servicePathId));
spb.setServiceIndex(serviceIndex);
return eb.setAddress(addressFromServicePath(spb.build())).build();
}
Aggregations