module ietf-network-bridge-scheduler-state {
  namespace
    "urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler-state";
  prefix sched-state;

  import ietf-interfaces {
    prefix if;
  }
  import ietf-network-bridge-scheduler {
    prefix sched;
  }

  organization
    "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
  contact
    "WG Web:   <http://tools.ietf.org/wg/netmod/>
     WG List:  <mailto:netmod@ietf.org>

     Editor:   Vladimir Vassilev

               <mailto:vladimir@lightside-instruments.com>";
  description
    "This module contains /if:interfaces-state/if:interface
     augmentation which mirrors the 'scheduler' container
     as the one part of the 'ietf-network-bridge-scheduler'
     but contains only read-only state data.  The data model is
     not needed when the underlying implementation infrastructure
     supports the Network Management Datastore Architecture (NMDA).

     Copyright (c) 2020 IETF Trust and the persons identified as
     authors of the code. All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject
     to the license terms contained in, the Simplified BSD
     License set forth in Section 4.c of the IETF Trust's
     Legal Provisions Relating to IETF Documents
     (http://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX; see
     the RFC itself for full legal notices.";

  revision 2021-02-17 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: Network Bridge";
  }

  augment "/if:interfaces-state/if:interface" {
    description
      "Augments the interface model with scheduler specific data.";
    container scheduler {
      description
        "Each egress capable interface has scheduler. The scheduler
         is a tree of interconnected gate controllers.";
      container gate-controllers {
        description
          "Contains the list of gate controllers.";
        list gate-controller {
          key "id type";
          description
            "The gate controller model can be augmented by
             external modules defining custom gate controller
             types.";
          leaf id {
            type string;
            description

              "Gate controller identifier.";
          }
          leaf type {
            type identityref {
              base sched:gate-controller;
            }
            mandatory true;
            description
              "Gate controller type.";
          }
          container inputs {
            description
              "Contains the list of inputs.";
            list input {
              key "class index";
              description
                "Double key list. There can be multiple
                 instances of each input class.";
              leaf class {
                type identityref {
                  base sched:gate-controller-input;
                }
                description
                  "Input class.";
              }
              leaf index {
                type uint32;
                description
                  "Index of the input instance of the corresponding
                   input class.";
              }
              uses sched:gate-controller-queue-state;
            }
          }
          container input-classes {
            description
              "Contains the list of input-classes.";
            list input-class {
              key "class";
              description
                "Contains the list of input-classes.";
              leaf class {
                type identityref {
                  base sched:gate-controller-input;
                }
                description
                  "Input class.";
              }

              uses sched:gate-controller-queue-state;
            }
          }
        }
      }
    }
  }
}
