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 apn-profile { |
| 6 | namespace "http://opennetworking.org/aether/apn-profile"; |
| 7 | prefix pro; |
| 8 | |
| 9 | import ietf-inet-types { prefix inet; } |
| 10 | |
| 11 | organization "Open Networking Foundation."; |
| 12 | contact "Scott Baker"; |
| 13 | description "To generate JSON from this use command |
| 14 | pyang -f jtoxx test1.yang | python3 -m json.tool > test1.json |
| 15 | Copied from YangUIComponents project"; |
| 16 | |
| 17 | revision "2020-10-22" { |
| 18 | description "An Aether APN Profile"; |
| 19 | reference "RFC 6087"; |
| 20 | } |
| 21 | |
| 22 | // TODO: Think more on whether this should be a UUID or |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 23 | // simply a unique name. If it's a UUID, could fix the |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 24 | // string length. |
| 25 | typedef apn-profile-id { |
| 26 | type string { |
| 27 | length 1..32; |
| 28 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 29 | description "The typedef for apn-profile-id"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | container apn-profile { |
| 33 | description "The top level container"; |
| 34 | |
| 35 | list apn-profile { |
| 36 | key "id"; |
| 37 | description |
| 38 | "List of apn profiles"; |
| 39 | |
| 40 | leaf id { |
| 41 | type apn-profile-id; |
| 42 | description "ID for this apn profile."; |
| 43 | } |
| 44 | |
| 45 | leaf display-name { |
| 46 | type string { |
| 47 | length 1..80; |
| 48 | } |
| 49 | description "display name to use in GUI or CLI"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 50 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 51 | |
| 52 | leaf apn-name { |
| 53 | type string { |
| 54 | length 1..32; |
| 55 | } |
| 56 | description "apn name"; |
| 57 | } |
| 58 | |
| 59 | leaf dns-primary { |
| 60 | type inet:ip-address; |
| 61 | description "primary dns server name"; |
| 62 | } |
| 63 | |
| 64 | leaf dns-secondary { |
| 65 | type inet:ip-address; |
| 66 | description "secondary dns server name"; |
| 67 | } |
| 68 | |
| 69 | leaf mtu { |
| 70 | type uint32 { |
| 71 | range 68..65535; |
| 72 | } |
| 73 | units bytes; |
| 74 | default 1460; |
| 75 | description "maximum transmission unit"; |
| 76 | } |
| 77 | |
| 78 | leaf gx-enabled { |
| 79 | type boolean; |
| 80 | default false; |
| 81 | description "enable gx interface"; |
| 82 | } |
| 83 | |
| 84 | leaf description { |
| 85 | type string { |
| 86 | length 1..100; |
| 87 | } |
| 88 | description "description of this profile"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 89 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 90 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 91 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 92 | } |