ietf-schedule.yang 1.7 KB
   module ietf-schedule {
     yang-version 1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-schedule";
     // replace with IANA namespace when assigned

     prefix "sch";

     import ietf-yang-types {
       prefix "yang";
     }

     organization "TBD";
     contact "TBD";
     description
       "The model allows time scheduling parameters to be specified.";

     revision "2016-03-01" {
       description "Initial revision";
       reference "TBD";
     }

     /*
      * Groupings
      */

     grouping schedules {
       description
         "A list of schedules defining when a particular
          configuration takes effect.";
       container schedules {
         description
           "Container of a schedule list defining when a particular
            configuration takes effect.";
         list schedule {
           key "schedule-id";
           description "A list of schedule elements.";

           leaf schedule-id {
             type uint32;
             description "Identifies the schedule element.";
           }
           leaf start {
             type yang:date-and-time;
             description "Start time.";
           }
           leaf schedule-duration {
             type string {
               pattern
                 'P(\d+Y)?(\d+M)?(\d+W)?(\d+D)?T(\d+H)?(\d+M)?(\d+S)?';
             }
             description "Schedule duration in ISO 8601 format.";
           }
           leaf repeat-interval {
             type string {
               pattern
                 'R\d*/P(\d+Y)?(\d+M)?(\d+W)?(\d+D)?T(\d+H)?(\d+M)?'
                 + '(\d+S)?';
             }
             description "Repeat interval in ISO 8601 format.";
           }
         }
       }
     } // schedules
   }