All Superinterfaces:
org.opendaylight.yangtools.yang.binding.DataRoot

@Generated("mdsal-binding-generator") public interface ProgrammingData extends org.opendaylight.yangtools.yang.binding.DataRoot
This module contains the basic programming model. From the architecture perspective, the programming model is used to drive the state of the controller and, by extension, its underlying network from one state to another, usually through some interim states. The core concept of this model is that of an instruction. An instruction is always an atomic, undivisible amount of work, resulting in a well-defined state transition. More complex state transitions always broken up to a set of such instructions. As a general rule, instructions should be designed such that their implementations can guarantee them either happening completely or not happening at all. Instruction scheduling is by explicit dependencies, where an instruction may only be a candidate for execution if all of its dependencies have completed successfully. If there are multiple candidate instructions, the scheduler is free to decide on the order execution, it may even execute them in parallel. If two instructions become candidates and cannot be executed in parallel, the scheduler should execute in the order in which they have been submitted. The programming model does not rely on rollback capability being present in the network. Instead it recognizes that this failure results in a new state, which needs to be picked up by the entity driving the change and a new set of state transitions needs to be devised. Technology-specific modules should rely on this assumption and should not attempt complex recovery schemes, which could result in more indeterminism being introduced in the state. The final assumption of the model is that each instruction has a specific deadline by which it needs to complete. The is that the entity driving the state has to make some progress and not be stuck indefinitely on one transition. Furthermore the model assumes the realization that there is a failure in making progress in the scheduler, such that the instruction stream can be predictably cut without introducing new race windows in the recovery path. A summary of the model is the following: the scheduler operates on a directed acyclic graph of instructions which places limits on which interim states may be visited while the system transitions from a state measured at a point in time into the intended state. The graph may be expanded to include new nodes, allowing for futher submissions in a manner consistent with optimistic prediction of future state. Copyright (c)2013 Cisco Systems, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html

This class represents the following YANG schema fragment defined in module programming

 module programming {
   yang-version 1;
   namespace urn:opendaylight:params:xml:ns:yang:programming;
   prefix pgm;
   import ietf-inet-types {
     prefix inet;
     revision-date 2013-07-15;
   }
   revision 2015-07-20 {
   }
   revision 2013-09-30 {
   }
   typedef nanotime {
     type uint64;
     units nanoseconds;
   }
   typedef instruction-id {
     type inet:uri;
   }
   typedef instruction-status {
     type enumeration {
       enum queued {
       }
       enum scheduled {
       }
       enum executing {
       }
       enum cancelled {
       }
       enum failed {
       }
       enum successful {
       }
       enum unknown {
       }
     }
   }
   grouping instruction-queue {
     leaf instruction-queue-id {
       type string;
     }
     list instruction {
       config false;
       leaf id {
         type instruction-id;
       }
       key id;
       leaf status {
         type instruction-status;
       }
       leaf deadline {
         type nanotime;
       }
     }
   }
   identity cancel-failure {
   }
   identity unknown-instruction {
     base cancel-failure;
   }
   identity uncancellable-instruction {
     base cancel-failure;
   }
   rpc cancel-instruction {
     input input {
       leaf id {
         type instruction-id;
       }
     }
     output output {
       leaf failure {
         type identityref {
           base cancel-failure;
         }
       }
     }
   }
   rpc clean-instructions {
     input input {
       leaf-list id {
         type instruction-id;
         min-elements 1;
       }
     }
     output output {
       leaf-list unflushed {
         type instruction-id;
       }
     }
   }
   identity submit-failure {
   }
   identity duplicate-instruction-id {
     base submit-failure;
   }
   identity too-many-instructions {
     base submit-failure;
   }
   identity unknown-precondition-id {
     base submit-failure;
   }
   identity dead-on-arrival {
     base submit-failure;
   }
   grouping submit-instruction-input {
     leaf id {
       type instruction-id;
     }
     leaf deadline {
       type nanotime;
     }
     leaf-list preconditions {
       type instruction-id;
     }
   }
   grouping submit-instruction-output {
     choice result {
       case failure-case {
         container failure {
           leaf type {
             type identityref {
               base submit-failure;
             }
           }
           leaf-list failed-preconditions {
             when "../type = dead-on-arrival";
             type instruction-id;
           }
         }
       }
     }
   }
   list instructions-queue {
     key instruction-queue-id;
     uses instruction-queue;
   }
   notification instruction-status-changed {
     leaf id {
       type instruction-id;
     }
     leaf status {
       type instruction-status;
     }
     container details {
       leaf-list unmet-dependencies {
         when "../../status = cancelled";
         type instruction-id;
       }
     }
   }
 }
 
  • Method Details

    • getInstructionsQueue

      @Nullable Map<InstructionsQueueKey,InstructionsQueue> getInstructionsQueue()
      Return instructionsQueue, or null if it is not present.
      Returns:
      Map<InstructionsQueueKey, InstructionsQueue> instructionsQueue, or null if it is not present.
    • nonnullInstructionsQueue

      default @NonNull Map<InstructionsQueueKey,InstructionsQueue> nonnullInstructionsQueue()
      Return instructionsQueue, or an empty list if it is not present.
      Returns:
      Map<InstructionsQueueKey, InstructionsQueue> instructionsQueue, or an empty list if it is not present.