use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.programming.rev181109.SubmitEnsureLspOperationalOutput in project bgpcep by opendaylight.
the class TopologyProgramming method submitEnsureLspOperational.
@Override
public ListenableFuture<RpcResult<SubmitEnsureLspOperationalOutput>> submitEnsureLspOperational(final SubmitEnsureLspOperationalInput input) {
Preconditions.checkArgument(input.getNode() != null);
Preconditions.checkArgument(input.getName() != null);
Preconditions.checkArgument(input.getArguments() != null);
// FIXME: can we validate this early?
// Preconditions.checkArgument(input.getArguments().getOperational() != null);
final SubmitEnsureLspOperationalOutputBuilder b = new SubmitEnsureLspOperationalOutputBuilder();
b.setResult(AbstractInstructionExecutor.schedule(this.scheduler, new AbstractInstructionExecutor(input) {
@Override
protected ListenableFuture<OperationResult> invokeOperation() {
EnsureLspOperationalInputBuilder ensureLspOperationalInputBuilder = new EnsureLspOperationalInputBuilder();
ensureLspOperationalInputBuilder.fieldsFrom(input);
return TopologyProgramming.this.manager.ensureLspOperational(ensureLspOperationalInputBuilder.build());
}
}));
final RpcResult<SubmitEnsureLspOperationalOutput> res = SuccessfulRpcResult.create(b.build());
return Futures.immediateFuture(res);
}
Aggregations