builder.setOrigin(INC);
return;
default:
- return;
}
}
@Override
public void serializeMessage(final Notification msg, final ByteBuf buffer) {
// no action needed, it's a mock for parsing, not serializing
- return;
}
@Override
for (final Tables table : tables) {
if (table.getAfi().equals(tableType.getAfi()) && table.getSafi().equals(tableType.getSafi())) {
found = true;
- assertEquals(Boolean.valueOf(true), table.getAttributes().isUptodate());
+ assertEquals(Boolean.TRUE, table.getAttributes().isUptodate());
}
}
assertTrue(found);
Mockito.doReturn(Route.class).when(support).routesListClass();
Mockito.doReturn(DataObject.class).when(support).routesContainerClass();
Mockito.doReturn(DataObject.class).when(support).routesCaseClass();
- return Collections.singletonList((AutoCloseable) context.registerRIBSupport(Ipv4AddressFamily.class,
+ return Collections.singletonList(context.registerRIBSupport(Ipv4AddressFamily.class,
UnicastSubsequentAddressFamily.class, support));
}
}
}
private void scheduleFailTimer() {
- this.failTimer = this.channel.eventLoop().schedule((Runnable) () -> {
+ this.failTimer = this.channel.eventLoop().schedule(() -> {
switch (AbstractPCEPSessionNegotiator.this.state) {
case FINISHED:
case IDLE:
package org.opendaylight.bgpcep.pcep.topology.provider;
import com.google.common.base.Function;
-import com.google.common.collect.Lists;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import java.util.Collections;
public static OperationResults createFailed(final List<Errors> errors) {
final List<Errors> e = errors != null ? errors : Collections.emptyList();
- return new OperationResults(FailureType.Failed, Lists.transform(e, CONVERT_ERRORS));
+ return new OperationResults(FailureType.Failed, e.stream().map(CONVERT_ERRORS).collect(Collectors.toList()));
}
public static OperationResults createUnsent(final PCEPErrors error) {
final List<Errors> e = error != null ? Collections.singletonList(getErrorFor(error))
: Collections.emptyList();
- return new OperationResults(FailureType.Unsent, e.stream().map(CONVERT_ERRORS::apply)
+ return new OperationResults(FailureType.Unsent, e.stream().map(CONVERT_ERRORS)
.collect(Collectors.toList()));
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lspa.object.LspaBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev171025.AddLspInput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev171025.AddLspInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev171025.AddLspOutput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev171025.NetworkTopologyPcepService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev171025.OperationResult;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev171025.add.lsp.args.Arguments;
AddLspInput addLspInput = createAddLspInput(transaction);
return Futures.transform(
- (ListenableFuture<RpcResult<AddLspOutput>>) this.topologyService.addLsp(addLspInput),
+ this.topologyService.addLsp(addLspInput),
RpcResult::getResult, MoreExecutors.directExecutor());
}
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev171025.NetworkTopologyPcepService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev171025.OperationResult;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev171025.RemoveLspInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev171025.RemoveLspOutput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.tunnel.pcep.programming.rev131030.PcepDestroyTunnelInput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.tunnel.pcep.rev130820.Link1;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology;
private final NetworkTopologyPcepService topologyService;
DestroyTunnelInstructionExecutor(final PcepDestroyTunnelInput pcepDestroyTunnelInput, final DataBroker dataProvider,
- final NetworkTopologyPcepService topologyService) {
+ final NetworkTopologyPcepService topologyService) {
super(pcepDestroyTunnelInput);
this.pcepDestroyTunnelInput = pcepDestroyTunnelInput;
this.dataProvider = dataProvider;
ab.setName(link.augmentation(Link1.class).getSymbolicPathName());
ab.setNode(node.getSupportingNode().get(0).key().getNodeRef());
return Futures.transform(
- (ListenableFuture<RpcResult<RemoveLspOutput>>) this.topologyService.removeLsp(ab.build()),
- RpcResult::getResult, MoreExecutors.directExecutor());
+ this.topologyService.removeLsp(ab.build()),
+ RpcResult::getResult, MoreExecutors.directExecutor());
}
}
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev171025.OperationResult;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev171025.UpdateLspInput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev171025.UpdateLspInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev171025.UpdateLspOutput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.tunnel.pcep.programming.rev131030.PcepUpdateTunnelInput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.tunnel.pcep.rev130820.Link1;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology;
return TunelProgrammingUtil.RESULT;
}
return Futures.transform(
- (ListenableFuture<RpcResult<UpdateLspOutput>>) this.topologyService
+ this.topologyService
.updateLsp(buildUpdateInput(link, node)),
RpcResult::getResult, MoreExecutors.directExecutor());
}