Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [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; } |
| 13 | import onf-traffic-class{ prefix tc; } |
| 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 | description "The typedef for device-group-id"; |
| 38 | } |
| 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"; |
| 63 | } |
| 64 | |
| 65 | list imsis { |
| 66 | // TODO: imsi-range-from cannot be used as a list index |
| 67 | key "imsi-id"; |
| 68 | leaf imsi-id { |
| 69 | type yg:yang-identifier; |
| 70 | description |
| 71 | "Id of this imsi-range"; |
| 72 | } |
| 73 | leaf imsi-range-from { |
| 74 | type uint64; |
| 75 | description |
| 76 | "value of imsi-range-from"; |
| 77 | } |
| 78 | leaf imsi-range-to { |
| 79 | type uint64; |
| 80 | description |
| 81 | "value of imsi-range-to"; |
| 82 | } |
| 83 | leaf display-name { |
| 84 | type string { |
| 85 | length 1..80; |
| 86 | } |
| 87 | description "display name to use in GUI or CLI"; |
| 88 | } |
| 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"; |
| 97 | } |
| 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 | |
| 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; |
| 110 | mandatory true; |
| 111 | description "Per-device MBR uplink data rate in bps"; |
| 112 | } |
| 113 | |
| 114 | leaf downlink { |
| 115 | type at:bitrate; |
| 116 | units bps; |
| 117 | mandatory true; |
| 118 | description "Per-device MBR downlink data rate in bps"; |
| 119 | } |
| 120 | } |
| 121 | leaf traffic-class { |
| 122 | type leafref { |
| 123 | path "/tc:traffic-class/tc:traffic-class/tc:id"; |
| 124 | } |
| 125 | mandatory true; |
| 126 | description |
| 127 | "Link to traffic class"; |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | leaf site { |
| 132 | type leafref { |
| 133 | path "/st:site/st:site/st:id"; |
| 134 | } |
| 135 | mandatory true; |
| 136 | description |
| 137 | "Link to site"; |
| 138 | } |
| 139 | } |
| 140 | } |
| 141 | } |