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 | |
| 14 | organization "Open Networking Foundation."; |
| 15 | contact "Scott Baker"; |
| 16 | description "To generate JSON from this use command |
| 17 | pyang -f jtoxx test1.yang | python3 -m json.tool > test1.json |
| 18 | Copied from YangUIComponents project"; |
| 19 | |
| 20 | revision "2020-08-18" { |
| 21 | description "An Aether Subscriber"; |
| 22 | reference "RFC 6087"; |
| 23 | } |
| 24 | |
| 25 | // User Equipment ID (UEID), Basically an IMSI range |
| 26 | // examples: |
| 27 | // 123456789??????? ... wildcard at the end |
| 28 | // 123456???0123455 ... wildcard in the middle |
| 29 | // 1234567890000000-123456789000005 ... range |
| 30 | typedef ueid { |
| 31 | type string { |
| 32 | length 1..31; |
| 33 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 34 | description "The typedef for ueid"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 35 | } |
| 36 | |
| 37 | typedef mcc { |
| 38 | type uint32 { |
| 39 | range 0..999; |
| 40 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 41 | description "The typedef for mcc"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | typedef mnc { |
| 45 | type uint32 { |
| 46 | range 0..999; |
| 47 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 48 | description "The typedef for mnc"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 49 | } |
| 50 | |
| 51 | typedef tac { |
| 52 | type uint32 { |
| 53 | range 0..99999999; |
| 54 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 55 | description "The typedef for tac"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 56 | } |
| 57 | |
| 58 | container subscriber { |
| 59 | description "The top level container"; |
| 60 | |
| 61 | list ue { |
| 62 | key "ueid"; |
| 63 | description |
| 64 | "List of subscriber devices"; |
| 65 | |
| 66 | leaf ueid { |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 67 | type ueid; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 68 | description "identifier for this subscriber, may or may not be an IMSI"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 69 | } |
| 70 | |
| 71 | container serving-plmn { |
| 72 | leaf mcc { |
| 73 | type mcc; |
| 74 | description "mobile country code"; |
| 75 | } |
| 76 | leaf mnc { |
| 77 | type mnc; |
| 78 | description "mobile network code"; |
| 79 | } |
| 80 | leaf tac { |
| 81 | type tac; |
| 82 | description "type allocation code"; |
| 83 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 84 | description "The contaiber for serving-plmn"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 85 | } |
| 86 | |
| 87 | leaf requested-apn { |
| 88 | type string { |
| 89 | length 1..31; |
| 90 | } |
| 91 | description "requested access point name"; |
| 92 | } |
| 93 | |
| 94 | leaf priority { |
| 95 | type uint32 { |
| 96 | range 0..1000; |
| 97 | } |
| 98 | default 0; |
| 99 | description |
| 100 | "Priority for this subscriber range"; |
| 101 | } |
| 102 | |
| 103 | leaf enabled { |
| 104 | type boolean; |
| 105 | default false; |
| 106 | description |
| 107 | "Enable or disable this ue"; |
| 108 | } |
| 109 | |
| 110 | container profiles { |
| 111 | leaf apn-profile { |
| 112 | type leafref { |
| 113 | path "/apn:apn-profile/apn:apn-profile/apn:id"; |
| 114 | } |
| 115 | description |
| 116 | "Link to apn profile"; |
| 117 | } |
| 118 | leaf up-profile { |
| 119 | type leafref { |
| 120 | path "/up:up-profile/up:up-profile/up:id"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 121 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 122 | description |
| 123 | "Link to user plane profile"; |
| 124 | } |
| 125 | leaf qos-profile { |
| 126 | type leafref { |
| 127 | path "/qos:qos-profile/qos:qos-profile/qos:id"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 128 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 129 | description |
| 130 | "Link to qos profile"; |
| 131 | } |
| 132 | list access-profile { |
| 133 | key "access-profile"; |
| 134 | leaf access-profile { |
| 135 | type leafref { |
| 136 | path "/ap:access-profile/ap:access-profile/ap:id"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 137 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 138 | // type ap:access-profile-id; |
| 139 | description |
| 140 | "Link to access profile"; |
| 141 | } |
| 142 | leaf allowed { |
| 143 | type boolean; |
| 144 | default true; |
| 145 | description |
| 146 | "Allow or disallow this ue to use this access profile"; |
| 147 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 148 | description "The list for access-profile"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 149 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 150 | description "The container for profiles"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 151 | } |
| 152 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 153 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 154 | } |