Search in sources :

Example 1 with SubmitAddLspOutputBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.programming.rev171025.SubmitAddLspOutputBuilder in project bgpcep by opendaylight.

the class TopologyProgramming method submitAddLsp.

@Override
public ListenableFuture<RpcResult<SubmitAddLspOutput>> submitAddLsp(final SubmitAddLspInput input) {
    Preconditions.checkArgument(input.getNode() != null);
    Preconditions.checkArgument(input.getName() != null);
    final SubmitAddLspOutputBuilder b = new SubmitAddLspOutputBuilder();
    b.setResult(AbstractInstructionExecutor.schedule(this.scheduler, new AbstractInstructionExecutor(input) {

        @Override
        protected ListenableFuture<OperationResult> invokeOperation() {
            return TopologyProgramming.this.manager.addLsp(input);
        }
    }));
    final RpcResult<SubmitAddLspOutput> res = SuccessfulRpcResult.create(b.build());
    return Futures.immediateFuture(res);
}
Also used : SubmitAddLspOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.programming.rev171025.SubmitAddLspOutput) SubmitAddLspOutputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.programming.rev171025.SubmitAddLspOutputBuilder) OperationResult(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev171025.OperationResult) AbstractInstructionExecutor(org.opendaylight.bgpcep.pcep.topology.spi.AbstractInstructionExecutor)

Aggregations

AbstractInstructionExecutor (org.opendaylight.bgpcep.pcep.topology.spi.AbstractInstructionExecutor)1 SubmitAddLspOutput (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.programming.rev171025.SubmitAddLspOutput)1 SubmitAddLspOutputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.programming.rev171025.SubmitAddLspOutputBuilder)1 OperationResult (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev171025.OperationResult)1