use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.address.Address in project lispflowmapping by opendaylight.
the class LispAddressUtil method convertToBinary.
private static Ipv6PrefixBinary convertToBinary(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.Ipv6Prefix prefix) {
Ipv6PrefixBinaryBuilder pb = new Ipv6PrefixBinaryBuilder();
byte[] address = InetAddresses.forString(MaskUtil.getAddressStringForIpv6Prefix(prefix)).getAddress();
pb.setIpv6AddressBinary(new Ipv6AddressBinary(address));
pb.setIpv6MaskLength(MaskUtil.getMaskForAddress(prefix));
return pb.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.address.Address in project lispflowmapping by opendaylight.
the class LispAddressUtil method toEid.
public static Eid toEid(Ipv6Address address, InstanceIdType vni) {
EidBuilder builder = new EidBuilder();
builder.setAddressType(Ipv6Afi.class);
builder.setVirtualNetworkId(vni);
builder.setAddress((Address) new Ipv6Builder().setIpv6(address).build());
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.address.Address in project lispflowmapping by opendaylight.
the class LispAddressUtil method asKeyValueAddressEid.
public static Eid asKeyValueAddressEid(SimpleAddress key, SimpleAddress value) {
KeyValueAddressBuilder kvab = new KeyValueAddressBuilder();
kvab.setKey(key);
kvab.setValue(value);
KeyValueAddress address = new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.KeyValueAddressBuilder().setKeyValueAddress(kvab.build()).build();
EidBuilder builder = new EidBuilder();
builder.setAddressType(KeyValueAddressLcaf.class);
builder.setVirtualNetworkId(null);
builder.setAddress((Address) address);
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.address.Address in project lispflowmapping by opendaylight.
the class LispAddressUtil method toEid.
public static Eid toEid(Ipv4AddressBinary address, InstanceIdType vni) {
EidBuilder builder = new EidBuilder();
builder.setAddressType(Ipv4BinaryAfi.class);
builder.setVirtualNetworkId(vni);
builder.setAddress((Address) new Ipv4BinaryBuilder().setIpv4Binary(address).build());
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.address.Address in project lispflowmapping by opendaylight.
the class LispAddressUtil method convertToBinary.
private static Ipv4PrefixBinary convertToBinary(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.Ipv4Prefix prefix) {
Ipv4PrefixBinaryBuilder pb = new Ipv4PrefixBinaryBuilder();
byte[] address = InetAddresses.forString(MaskUtil.getAddressStringForIpv4Prefix(prefix)).getAddress();
pb.setIpv4AddressBinary(new Ipv4AddressBinary(address));
pb.setIpv4MaskLength(MaskUtil.getMaskForAddress(prefix));
return pb.build();
}
Aggregations