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; |
| 97 | description "Per-device mbr uplink data rate in mbps"; |
| 98 | } |
| 99 | |
| 100 | leaf downlink { |
| 101 | type at:bitrate; |
| 102 | units bps; |
| 103 | description "Per-device mbr downlink data rate in mbps"; |
| 104 | } |
| 105 | } |
Scott Baker | 988705a | 2021-10-13 17:24:49 -0700 | [diff] [blame] | 106 | leaf traffic-class { |
| 107 | type leafref { |
| 108 | path "/tc:traffic-class/tc:traffic-class/tc:id"; |
| 109 | } |
| 110 | description |
| 111 | "Link to traffic class"; |
| 112 | } |
Scott Baker | cd27641 | 2021-10-13 14:31:24 -0700 | [diff] [blame] | 113 | } |
| 114 | |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 115 | leaf site { |
| 116 | type leafref { |
| 117 | path "/st:site/st:site/st:id"; |
| 118 | } |
| 119 | mandatory true; |
| 120 | description |
| 121 | "Link to site"; |
| 122 | } |
| 123 | } |
Scott Baker | 988705a | 2021-10-13 17:24:49 -0700 | [diff] [blame] | 124 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 125 | } |