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