// SPDX-FileCopyrightText: 2021 Open Networking Foundation
//
// SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0

module onf-device-group {
  namespace "http://opennetworking.org/aether/device-group";
  prefix dg;

  import ietf-yang-types{ prefix yg; }
  import onf-aether-types { prefix at; }
  import onf-ip-domain{ prefix ipd; }
  import onf-site{ prefix st; }
  import onf-traffic-class{ prefix tc; }

  organization "Open Networking Foundation.";
  contact "Scott Baker";
  description 
    "An aether device group represents a list of device IMSIS.
     This list is expressed as a set of ranges,
         [(from_imsi, to_imsi),
          (from_imsi, to_imsi),
          ...].
     Each device group belongs to a site and has associated
     with it an ip-profile that determines the IP address
     and DNS settings that apply to devices within the
     group";

  revision "2021-06-02" {
    description "An Aether Device Group";
    reference "RFC 6087";
  }

  typedef device-group-id {
        type yg:yang-identifier {
            length 1..32;
        }
  }  

  container device-group {
    description "The top level container";

    list device-group {
      key "id";
      description
        "List of device groups";

      leaf id {
        type device-group-id;
        description "ID for this device group.";
      }

      leaf description {
        type at:description;
        description "description of this device group";
      }

      leaf display-name {
        type string {
            length 1..80;
        }
        description "display name to use in GUI or CLI";
      }      
      
      list imsis {
        // TODO: imsi-range-from cannot be used as a list index
        key "name";
        leaf name {
          type string;
        }
        leaf imsi-range-from {
          type uint64;
        }
        leaf imsi-range-to {
          type uint64;
        }
        description
          "List of imsi ranges that comprise this group. It's acceptable for
           a range to degenerate to being a singleton";
      }

      leaf ip-domain {
        type leafref {
          path "/ipd:ip-domain/ipd:ip-domain/ipd:id";
        }
        description
          "Link to ip-domain settings that determine the pool of IP addresses,
           as well as the domain resolver settings to use";
      }

      container device {
        description "Per-device QOS Settings";
        container mbr {
          description "Maximum bitrate";
          leaf uplink {
            type at:bitrate;
            units bps;
            description "Per-device mbr uplink data rate in mbps";
          }

          leaf downlink {
            type at:bitrate;
            units bps;
            description "Per-device mbr downlink data rate in mbps";
          }
        }
        leaf traffic-class {
          type leafref {
            path "/tc:traffic-class/tc:traffic-class/tc:id";
          }
          description
            "Link to traffic class";
        }
      }

      leaf site {
        type leafref {
          path "/st:site/st:site/st:id";
        }
        mandatory true;
        description
          "Link to site";
      }
    }
  }
}
