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-08-18" { |
| 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 apn-name { |
| 46 | type string { |
| 47 | length 1..32; |
| 48 | } |
| 49 | description "apn name"; |
| 50 | } |
| 51 | |
| 52 | leaf dns-primary { |
| 53 | type inet:ip-address; |
| 54 | description "primary dns server name"; |
| 55 | } |
| 56 | |
| 57 | leaf dns-secondary { |
| 58 | type inet:ip-address; |
| 59 | description "secondary dns server name"; |
| 60 | } |
| 61 | |
| 62 | leaf mtu { |
| 63 | type uint32 { |
| 64 | range 68..65535; |
| 65 | } |
| 66 | units bytes; |
| 67 | default 1460; |
| 68 | description "maximum transmission unit"; |
| 69 | } |
| 70 | |
| 71 | leaf gx-enabled { |
| 72 | type boolean; |
| 73 | default false; |
| 74 | description "enable gx interface"; |
| 75 | } |
| 76 | |
| 77 | leaf description { |
| 78 | type string { |
| 79 | length 1..100; |
| 80 | } |
| 81 | description "description of this profile"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 82 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 83 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 84 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 85 | } |