use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev200120.AddLspInputBuilder in project bgpcep by opendaylight.
the class Stateful07TopologySessionListenerTest method createAddLspInput.
private AddLspInput createAddLspInput() {
final ArgumentsBuilder argsBuilder = new ArgumentsBuilder();
final Ipv4CaseBuilder ipv4Builder = new Ipv4CaseBuilder();
ipv4Builder.setIpv4(new Ipv4Builder().setSourceIpv4Address(new Ipv4Address(this.testAddress)).setDestinationIpv4Address(new Ipv4Address(this.testAddress)).build());
argsBuilder.setEndpointsObj(new EndpointsObjBuilder().setAddressFamily(ipv4Builder.build()).build());
argsBuilder.setEro(createEroWithIpPrefixes(Lists.newArrayList(this.eroIpPrefix)));
argsBuilder.addAugmentation(Arguments2.class, new Arguments2Builder().setLsp(new LspBuilder().setDelegate(true).setAdministrative(true).build()).build());
return new AddLspInputBuilder().setName(this.tunnelName).setArguments(argsBuilder.build()).setNetworkTopologyRef(new NetworkTopologyRef(TOPO_IID)).setNode(this.nodeId).build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev200120.AddLspInputBuilder in project bgpcep by opendaylight.
the class CreateTunnelInstructionExecutor method createAddLspInput.
private AddLspInput createAddLspInput(final ReadOnlyTransaction transaction) {
final InstanceIdentifier<Topology> tii = TopologyProgrammingUtil.topologyForInput(this.p2pTunnelInput);
final TpReader dr = new TpReader(transaction, tii, this.p2pTunnelInput.getDestination());
final TerminationPoint dp = requireNonNull(dr.getTp());
final TpReader sr = new TpReader(transaction, tii, this.p2pTunnelInput.getSource());
final TerminationPoint sp = requireNonNull(sr.getTp());
final Node sn = requireNonNull(sr.getNode());
final AddLspInputBuilder ab = new AddLspInputBuilder();
ab.setNode(requireNonNull(TunelProgrammingUtil.supportingNode(sn)));
ab.setName(this.p2pTunnelInput.getSymbolicPathName());
checkLinkIsnotExistent(tii, ab, transaction);
ab.setArguments(buildArguments(sp, dp));
return ab.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev200120.AddLspInputBuilder in project bgpcep by opendaylight.
the class CreateTunnelInstructionExecutor method createAddLspInput.
private AddLspInput createAddLspInput(final ReadTransaction transaction) {
final InstanceIdentifier<Topology> tii = TopologyProgrammingUtil.topologyForInput(this.p2pTunnelInput);
final TpReader dr = new TpReader(transaction, tii, this.p2pTunnelInput.getDestination());
final TerminationPoint dp = requireNonNull(dr.getTp());
final TpReader sr = new TpReader(transaction, tii, this.p2pTunnelInput.getSource());
final TerminationPoint sp = requireNonNull(sr.getTp());
final Node sn = requireNonNull(sr.getNode());
final AddLspInputBuilder ab = new AddLspInputBuilder();
ab.setNode(requireNonNull(TunelProgrammingUtil.supportingNode(sn)));
ab.setName(this.p2pTunnelInput.getSymbolicPathName());
checkLinkIsnotExistent(tii, ab, transaction);
ab.setArguments(buildArguments(sp, dp));
return ab.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev200120.AddLspInputBuilder 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