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