Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 1 | // SPDX-FileCopyrightText: 2021 Open Networking Foundation |
| 2 | // |
| 3 | // SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| 4 | |
| 5 | module onf-device-group { |
| 6 | namespace "http://opennetworking.org/aether/device-group"; |
| 7 | prefix dg; |
| 8 | |
| 9 | import ietf-yang-types{ prefix yg; } |
| 10 | import onf-aether-types { prefix at; } |
| 11 | import onf-ip-domain{ prefix ipd; } |
| 12 | import onf-site{ prefix st; } |
Scott Baker | 988705a | 2021-10-13 17:24:49 -0700 | [diff] [blame] | 13 | import onf-traffic-class{ prefix tc; } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 14 | |
| 15 | organization "Open Networking Foundation."; |
| 16 | contact "Scott Baker"; |
| 17 | description |
| 18 | "An aether device group represents a list of device IMSIS. |
| 19 | This list is expressed as a set of ranges, |
| 20 | [(from_imsi, to_imsi), |
| 21 | (from_imsi, to_imsi), |
| 22 | ...]. |
| 23 | Each device group belongs to a site and has associated |
| 24 | with it an ip-profile that determines the IP address |
| 25 | and DNS settings that apply to devices within the |
| 26 | group"; |
| 27 | |
| 28 | revision "2021-06-02" { |
| 29 | description "An Aether Device Group"; |
| 30 | reference "RFC 6087"; |
| 31 | } |
| 32 | |
| 33 | typedef device-group-id { |
| 34 | type yg:yang-identifier { |
| 35 | length 1..32; |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | container device-group { |
| 40 | description "The top level container"; |
| 41 | |
| 42 | list device-group { |
| 43 | key "id"; |
| 44 | description |
| 45 | "List of device groups"; |
| 46 | |
| 47 | leaf id { |
| 48 | type device-group-id; |
| 49 | description "ID for this device group."; |
| 50 | } |
| 51 | |
| 52 | leaf description { |
| 53 | type at:description; |
| 54 | description "description of this device group"; |
| 55 | } |
| 56 | |
| 57 | leaf display-name { |
| 58 | type string { |
| 59 | length 1..80; |
| 60 | } |
| 61 | description "display name to use in GUI or CLI"; |
| 62 | } |
| 63 | |
| 64 | list imsis { |
| 65 | // TODO: imsi-range-from cannot be used as a list index |
| 66 | key "name"; |
| 67 | leaf name { |
| 68 | type string; |
| 69 | } |
| 70 | leaf imsi-range-from { |
| 71 | type uint64; |
| 72 | } |
| 73 | leaf imsi-range-to { |
| 74 | type uint64; |
| 75 | } |
| 76 | description |
| 77 | "List of imsi ranges that comprise this group. It's acceptable for |
| 78 | a range to degenerate to being a singleton"; |
| 79 | } |
| 80 | |
| 81 | leaf ip-domain { |
| 82 | type leafref { |
| 83 | path "/ipd:ip-domain/ipd:ip-domain/ipd:id"; |
Scott Baker | cd27641 | 2021-10-13 14:31:24 -0700 | [diff] [blame] | 84 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 85 | description |
| 86 | "Link to ip-domain settings that determine the pool of IP addresses, |
| 87 | as well as the domain resolver settings to use"; |
| 88 | } |
| 89 | |
Scott Baker | cd27641 | 2021-10-13 14:31:24 -0700 | [diff] [blame] | 90 | container device { |
| 91 | description "Per-device QOS Settings"; |
| 92 | container mbr { |
| 93 | description "Maximum bitrate"; |
| 94 | leaf uplink { |
| 95 | type at:bitrate; |
| 96 | units bps; |
Scott Baker | 3f1cb27 | 2021-10-26 14:28:05 -0700 | [diff] [blame] | 97 | description "Per-device MBR uplink data rate in bps"; |
Scott Baker | 36c9614 | 2021-10-19 14:13:30 -0700 | [diff] [blame] | 98 | mandatory true; |
Scott Baker | cd27641 | 2021-10-13 14:31:24 -0700 | [diff] [blame] | 99 | } |
| 100 | |
| 101 | leaf downlink { |
| 102 | type at:bitrate; |
| 103 | units bps; |
Scott Baker | 3f1cb27 | 2021-10-26 14:28:05 -0700 | [diff] [blame] | 104 | description "Per-device MBR downlink data rate in bps"; |
Scott Baker | 36c9614 | 2021-10-19 14:13:30 -0700 | [diff] [blame] | 105 | mandatory true; |
Scott Baker | cd27641 | 2021-10-13 14:31:24 -0700 | [diff] [blame] | 106 | } |
| 107 | } |
Scott Baker | 988705a | 2021-10-13 17:24:49 -0700 | [diff] [blame] | 108 | leaf traffic-class { |
| 109 | type leafref { |
| 110 | path "/tc:traffic-class/tc:traffic-class/tc:id"; |
| 111 | } |
| 112 | description |
| 113 | "Link to traffic class"; |
Scott Baker | 36c9614 | 2021-10-19 14:13:30 -0700 | [diff] [blame] | 114 | mandatory true; |
Scott Baker | 988705a | 2021-10-13 17:24:49 -0700 | [diff] [blame] | 115 | } |
Scott Baker | cd27641 | 2021-10-13 14:31:24 -0700 | [diff] [blame] | 116 | } |
| 117 | |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 118 | leaf site { |
| 119 | type leafref { |
| 120 | path "/st:site/st:site/st:id"; |
| 121 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 122 | description |
| 123 | "Link to site"; |
Scott Baker | 36c9614 | 2021-10-19 14:13:30 -0700 | [diff] [blame] | 124 | mandatory true; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 125 | } |
| 126 | } |
Scott Baker | 988705a | 2021-10-13 17:24:49 -0700 | [diff] [blame] | 127 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 128 | } |