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 device-group { |
| 6 | namespace "http://opennetworking.org/aether/device-group"; |
| 7 | prefix dg; |
| 8 | |
| 9 | import aether-types { prefix at; } |
| 10 | import ip-domain{ prefix ipd; } |
| 11 | import site{ prefix st; } |
| 12 | import ietf-yang-types{ prefix yg; } |
| 13 | |
| 14 | organization "Open Networking Foundation."; |
| 15 | contact "Scott Baker"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame^] | 16 | description |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 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 | |
| 27 | revision "2021-06-02" { |
| 28 | description "An Aether Device Group"; |
| 29 | reference "RFC 6087"; |
| 30 | } |
| 31 | |
| 32 | typedef device-group-id { |
| 33 | type yg:yang-identifier { |
| 34 | length 1..32; |
| 35 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame^] | 36 | description "The typedef for device-group-id"; |
| 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"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [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 |
| 66 | key "name"; |
| 67 | leaf name { |
| 68 | type string; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame^] | 69 | description "The leaf for imsi name"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 70 | } |
| 71 | leaf imsi-range-from { |
| 72 | type uint64; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame^] | 73 | description "The leaf for imsi-range-from"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 74 | } |
| 75 | leaf imsi-range-to { |
| 76 | type uint64; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame^] | 77 | description "The leaf for imsi-range-to"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 78 | } |
| 79 | description |
| 80 | "List of imsi ranges that comprise this group. It's acceptable for |
| 81 | a range to degenerate to being a singleton"; |
| 82 | } |
| 83 | |
| 84 | leaf ip-domain { |
| 85 | type leafref { |
| 86 | path "/ipd:ip-domain/ipd:ip-domain/ipd:id"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame^] | 87 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 88 | description |
| 89 | "Link to ip-domain settings that determine the pool of IP addresses, |
| 90 | as well as the domain resolver settings to use"; |
| 91 | } |
| 92 | |
| 93 | leaf site { |
| 94 | type leafref { |
| 95 | path "/st:site/st:site/st:id"; |
| 96 | } |
| 97 | mandatory true; |
| 98 | description |
| 99 | "Link to site"; |
| 100 | } |
| 101 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame^] | 102 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 103 | } |