Search in sources :

Example 1 with CancelInstructionOutputBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.programming.rev150720.CancelInstructionOutputBuilder in project bgpcep by opendaylight.

the class ProgrammingServiceImpl method realCancelInstruction.

private synchronized RpcResult<CancelInstructionOutput> realCancelInstruction(final CancelInstructionInput input) {
    final InstructionImpl instruction = this.insns.get(input.getId());
    if (instruction == null) {
        LOG.debug("Instruction {} not present in the graph", input.getId());
        final CancelInstructionOutput out = new CancelInstructionOutputBuilder().setFailure(UnknownInstruction.class).build();
        return SuccessfulRpcResult.create(out);
    }
    return SuccessfulRpcResult.create(new CancelInstructionOutputBuilder().setFailure(instruction.tryCancel(null)).build());
}
Also used : CancelInstructionOutputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.programming.rev150720.CancelInstructionOutputBuilder) UnknownInstruction(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.programming.rev150720.UnknownInstruction) CancelInstructionOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.programming.rev150720.CancelInstructionOutput)

Aggregations

CancelInstructionOutput (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.programming.rev150720.CancelInstructionOutput)1 CancelInstructionOutputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.programming.rev150720.CancelInstructionOutputBuilder)1 UnknownInstruction (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.programming.rev150720.UnknownInstruction)1