use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.endpoints.address.family.ipv4._case.Ipv4Builder in project lispflowmapping by opendaylight.
the class LispAddressUtil method toRloc.
public static Rloc toRloc(Ipv4Address address) {
RlocBuilder builder = new RlocBuilder();
builder.setAddressType(Ipv4Afi.class);
builder.setVirtualNetworkId(null);
builder.setAddress((Address) new Ipv4Builder().setIpv4(address).build());
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.endpoints.address.family.ipv4._case.Ipv4Builder in project lispflowmapping by opendaylight.
the class Ipv4Serializer method deserializeEidData.
@Override
protected Eid deserializeEidData(ByteBuffer buffer, LispAddressSerializerContext ctx) {
EidBuilder eb = new EidBuilder();
eb.setAddressType(Ipv4Afi.class);
eb.setVirtualNetworkId(getVni(ctx));
eb.setAddress(new Ipv4Builder().setIpv4(deserializeData(buffer)).build());
return eb.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.endpoints.address.family.ipv4._case.Ipv4Builder in project lispflowmapping by opendaylight.
the class Ipv4Serializer method deserializeRlocData.
@Override
protected Rloc deserializeRlocData(ByteBuffer buffer) {
RlocBuilder rb = new RlocBuilder();
rb.setAddressType(Ipv4Afi.class);
rb.setVirtualNetworkId(null);
rb.setAddress(new Ipv4Builder().setIpv4(deserializeData(buffer)).build());
return rb.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.endpoints.address.family.ipv4._case.Ipv4Builder in project lispflowmapping by opendaylight.
the class LispAddressUtil method toEid.
public static Eid toEid(Ipv4Address address, InstanceIdType vni) {
EidBuilder builder = new EidBuilder();
builder.setAddressType(Ipv4Afi.class);
builder.setVirtualNetworkId(vni);
builder.setAddress((Address) new Ipv4Builder().setIpv4(address).build());
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.endpoints.address.family.ipv4._case.Ipv4Builder in project bgpcep by opendaylight.
the class PCEPTopologySessionListenerTest method createAddLspInput.
private AddLspInput createAddLspInput() {
final ArgumentsBuilder argsBuilder = new ArgumentsBuilder();
final Ipv4CaseBuilder ipv4Builder = new Ipv4CaseBuilder();
ipv4Builder.setIpv4(new Ipv4Builder().setSourceIpv4Address(new Ipv4AddressNoZone(testAddress)).setDestinationIpv4Address(new Ipv4AddressNoZone(testAddress)).build());
argsBuilder.setEndpointsObj(new EndpointsObjBuilder().setAddressFamily(ipv4Builder.build()).build());
argsBuilder.setEro(createEroWithIpPrefixes(Lists.newArrayList(eroIpPrefix)));
argsBuilder.addAugmentation(new Arguments2Builder().setLsp(new LspBuilder().setDelegate(TRUE).setAdministrative(TRUE).build()).build());
return new AddLspInputBuilder().setName(tunnelName).setArguments(argsBuilder.build()).setNetworkTopologyRef(new NetworkTopologyRef(TOPO_IID)).setNode(nodeId).build();
}
Aggregations