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 aether-subscriber { |
| 6 | namespace "http://opennetworking.org/aether/subscriber"; |
| 7 | prefix sub; |
| 8 | |
| 9 | import apn-profile{ prefix apn; } |
| 10 | import qos-profile{ prefix qos; } |
| 11 | import up-profile{ prefix up; } |
| 12 | import access-profile{ prefix ap; } |
| 13 | import security-profile{ prefix sec; } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 14 | import enterprise{ prefix ent; } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 15 | import ietf-yang-types{ prefix ietf; } |
| 16 | |
| 17 | organization "Open Networking Foundation."; |
| 18 | contact "Scott Baker"; |
| 19 | description "To generate JSON from this use command |
| 20 | pyang -f jtoxx test1.yang | python3 -m json.tool > test1.json |
| 21 | Copied from YangUIComponents project"; |
| 22 | |
| 23 | revision "2020-10-22" { |
| 24 | description "An Aether Subscriber"; |
| 25 | reference "RFC 6087"; |
| 26 | } |
| 27 | |
| 28 | typedef mcc { |
| 29 | type uint32 { |
| 30 | range 0..999; |
| 31 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 32 | description "The typedef for mmc"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | typedef mnc { |
| 36 | type uint32 { |
| 37 | range 0..999; |
| 38 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 39 | description "The typedef for mnc"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 40 | } |
| 41 | |
| 42 | typedef tac { |
| 43 | type uint32 { |
| 44 | range 0..99999999; |
| 45 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 46 | description "The typedef for tac"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 47 | } |
| 48 | |
| 49 | container subscriber { |
| 50 | description "The top level container"; |
| 51 | |
| 52 | list ue { |
| 53 | key "id"; |
| 54 | description |
| 55 | "List of subscriber devices"; |
| 56 | |
| 57 | leaf id { |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 58 | type ietf:uuid; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 59 | description "identifier for this subscriber, typically a UUID"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 60 | } |
| 61 | |
| 62 | leaf display-name { |
| 63 | type string { |
| 64 | length 1..80; |
| 65 | } |
| 66 | description "display name to use in GUI or CLI"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 67 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 68 | |
| 69 | choice imsi { |
| 70 | case wildcard { |
| 71 | leaf imsi-wildcard { |
| 72 | type string { |
| 73 | length 1..15; |
| 74 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 75 | description "The typedef for imsi-wildcard"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 76 | } |
| 77 | } |
| 78 | case range { |
| 79 | leaf imsi-range-from { |
| 80 | type uint64; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 81 | description "The typedef for imsi-range-from"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 82 | } |
| 83 | leaf imsi-range-to { |
| 84 | type uint64; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 85 | description "The typedef for imsi-range-to"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 86 | } |
| 87 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 88 | description "The choice for imsi"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 89 | } |
| 90 | |
| 91 | container serving-plmn { |
| 92 | leaf mcc { |
| 93 | type mcc; |
| 94 | description "mobile country code"; |
| 95 | } |
| 96 | leaf mnc { |
| 97 | type mnc; |
| 98 | description "mobile network code"; |
| 99 | } |
| 100 | leaf tac { |
| 101 | type tac; |
| 102 | description "type allocation code"; |
| 103 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 104 | description "The container for serving-plmn"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 105 | } |
| 106 | |
| 107 | leaf requested-apn { |
| 108 | type string { |
| 109 | length 0..31; |
| 110 | } |
| 111 | description "requested access point name"; |
| 112 | } |
| 113 | |
| 114 | leaf priority { |
| 115 | type uint32 { |
| 116 | range 0..1000; |
| 117 | } |
| 118 | default 0; |
| 119 | description |
| 120 | "Priority for this subscriber range"; |
| 121 | } |
| 122 | |
| 123 | leaf enabled { |
| 124 | type boolean; |
| 125 | default false; |
| 126 | description |
| 127 | "Enable or disable this ue"; |
| 128 | } |
| 129 | |
| 130 | leaf enterprise { |
| 131 | type leafref { |
| 132 | path "/ent:enterprise/ent:enterprise/ent:id"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 133 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 134 | description |
| 135 | "Link to enterprise that owns this UE range"; |
| 136 | } |
| 137 | |
| 138 | container profiles { |
| 139 | leaf apn-profile { |
| 140 | type leafref { |
| 141 | path "/apn:apn-profile/apn:apn-profile/apn:id"; |
| 142 | } |
| 143 | description |
| 144 | "Link to apn profile"; |
| 145 | } |
| 146 | leaf up-profile { |
| 147 | type leafref { |
| 148 | path "/up:up-profile/up:up-profile/up:id"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 149 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 150 | description |
| 151 | "Link to user plane profile"; |
| 152 | } |
| 153 | leaf qos-profile { |
| 154 | type leafref { |
| 155 | path "/qos:qos-profile/qos:qos-profile/qos:id"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 156 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 157 | description |
| 158 | "Link to qos profile"; |
| 159 | } |
| 160 | list access-profile { |
| 161 | key "access-profile"; |
| 162 | leaf access-profile { |
| 163 | type leafref { |
| 164 | path "/ap:access-profile/ap:access-profile/ap:id"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 165 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 166 | description |
| 167 | "Link to access profile"; |
| 168 | } |
| 169 | leaf allowed { |
| 170 | type boolean; |
| 171 | default true; |
| 172 | description |
| 173 | "Allow or disallow this ue to use this access profile"; |
| 174 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 175 | description "The list for access-profile"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 176 | } |
| 177 | leaf security-profile { |
| 178 | type leafref { |
| 179 | path "/sec:security-profile/sec:security-profile/sec:id"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 180 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 181 | description |
| 182 | "Link to security profile"; |
| 183 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 184 | description "The container for profiles"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 185 | } |
| 186 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 187 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 188 | } |