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