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"; |
Scott Baker | ebb99ae | 2021-11-01 15:34:51 -0700 | [diff] [blame] | 17 | description |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 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 | } |
Scott Baker | ebb99ae | 2021-11-01 15:34:51 -0700 | [diff] [blame] | 37 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 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"; |
Scott Baker | ebb99ae | 2021-11-01 15:34:51 -0700 | [diff] [blame] | 62 | } |
| 63 | |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 64 | list imsis { |
| 65 | // TODO: imsi-range-from cannot be used as a list index |
Scott Baker | c4b3e27 | 2021-11-01 17:13:48 -0700 | [diff] [blame] | 66 | key "imsi-id"; |
| 67 | leaf imsi-id { |
Scott Baker | ebb99ae | 2021-11-01 15:34:51 -0700 | [diff] [blame] | 68 | type yg:yang-identifier; |
| 69 | description |
| 70 | "Id of this imsi-range"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 71 | } |
| 72 | leaf imsi-range-from { |
| 73 | type uint64; |
| 74 | } |
| 75 | leaf imsi-range-to { |
| 76 | type uint64; |
| 77 | } |
Scott Baker | ebb99ae | 2021-11-01 15:34:51 -0700 | [diff] [blame] | 78 | leaf display-name { |
| 79 | type string { |
| 80 | length 1..80; |
| 81 | } |
| 82 | description "display name to use in GUI or CLI"; |
| 83 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 84 | description |
| 85 | "List of imsi ranges that comprise this group. It's acceptable for |
| 86 | a range to degenerate to being a singleton"; |
| 87 | } |
| 88 | |
| 89 | leaf ip-domain { |
| 90 | type leafref { |
| 91 | path "/ipd:ip-domain/ipd:ip-domain/ipd:id"; |
Scott Baker | cd27641 | 2021-10-13 14:31:24 -0700 | [diff] [blame] | 92 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 93 | description |
| 94 | "Link to ip-domain settings that determine the pool of IP addresses, |
| 95 | as well as the domain resolver settings to use"; |
| 96 | } |
| 97 | |
Scott Baker | cd27641 | 2021-10-13 14:31:24 -0700 | [diff] [blame] | 98 | container device { |
| 99 | description "Per-device QOS Settings"; |
| 100 | container mbr { |
| 101 | description "Maximum bitrate"; |
| 102 | leaf uplink { |
| 103 | type at:bitrate; |
| 104 | units bps; |
Scott Baker | 3f1cb27 | 2021-10-26 14:28:05 -0700 | [diff] [blame] | 105 | description "Per-device MBR uplink data rate in bps"; |
Scott Baker | 36c9614 | 2021-10-19 14:13:30 -0700 | [diff] [blame] | 106 | mandatory true; |
Scott Baker | cd27641 | 2021-10-13 14:31:24 -0700 | [diff] [blame] | 107 | } |
| 108 | |
| 109 | leaf downlink { |
| 110 | type at:bitrate; |
| 111 | units bps; |
Scott Baker | 3f1cb27 | 2021-10-26 14:28:05 -0700 | [diff] [blame] | 112 | description "Per-device MBR downlink data rate in bps"; |
Scott Baker | 36c9614 | 2021-10-19 14:13:30 -0700 | [diff] [blame] | 113 | mandatory true; |
Scott Baker | cd27641 | 2021-10-13 14:31:24 -0700 | [diff] [blame] | 114 | } |
| 115 | } |
Scott Baker | 988705a | 2021-10-13 17:24:49 -0700 | [diff] [blame] | 116 | leaf traffic-class { |
| 117 | type leafref { |
| 118 | path "/tc:traffic-class/tc:traffic-class/tc:id"; |
| 119 | } |
| 120 | description |
| 121 | "Link to traffic class"; |
Scott Baker | 36c9614 | 2021-10-19 14:13:30 -0700 | [diff] [blame] | 122 | mandatory true; |
Scott Baker | 988705a | 2021-10-13 17:24:49 -0700 | [diff] [blame] | 123 | } |
Scott Baker | cd27641 | 2021-10-13 14:31:24 -0700 | [diff] [blame] | 124 | } |
| 125 | |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 126 | leaf site { |
| 127 | type leafref { |
| 128 | path "/st:site/st:site/st:id"; |
| 129 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 130 | description |
| 131 | "Link to site"; |
Scott Baker | 36c9614 | 2021-10-19 14:13:30 -0700 | [diff] [blame] | 132 | mandatory true; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 133 | } |
| 134 | } |
Scott Baker | 988705a | 2021-10-13 17:24:49 -0700 | [diff] [blame] | 135 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 136 | } |