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 onf-ip-domain { |
| 6 | namespace "http://opennetworking.org/aether/ip-domain"; |
| 7 | prefix ipd; |
| 8 | |
| 9 | import ietf-inet-types { prefix inet; } |
| 10 | import ietf-yang-types{ prefix yg; } |
| 11 | import onf-aether-types { prefix at; } |
| 12 | import onf-enterprise{ prefix ent; } |
| 13 | |
| 14 | organization "Open Networking Foundation."; |
| 15 | contact "Scott Baker"; |
| 16 | description |
| 17 | "An Aether IP-Domain. This is a list of available subnets |
| 18 | that may be assigned to UEs, as well as DNS servers and other |
| 19 | metadata"; |
| 20 | |
| 21 | revision "2021-06-02" { |
| 22 | description "An Aether IP and Domain Specification"; |
| 23 | reference "RFC 6087"; |
| 24 | } |
| 25 | |
| 26 | typedef ip-domain-id { |
| 27 | type yg:yang-identifier { |
| 28 | length 1..32; |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | container ip-domain { |
| 33 | description "The top level container"; |
| 34 | |
| 35 | list ip-domain { |
| 36 | key "id"; |
| 37 | description |
| 38 | "List of ip domains"; |
| 39 | |
| 40 | leaf id { |
| 41 | type ip-domain-id; |
| 42 | description "ID for this ip domain."; |
| 43 | } |
| 44 | |
| 45 | leaf display-name { |
| 46 | type string { |
| 47 | length 1..80; |
| 48 | } |
| 49 | description "display name to use in GUI or CLI"; |
| 50 | } |
| 51 | |
| 52 | leaf dnn { |
| 53 | type at:dnn; |
Scott Baker | cf7cb66 | 2021-11-18 14:25:50 -0800 | [diff] [blame] | 54 | mandatory true; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 55 | description "DNN/APN"; |
Scott Baker | cf7cb66 | 2021-11-18 14:25:50 -0800 | [diff] [blame] | 56 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 57 | |
| 58 | leaf dns-primary { |
| 59 | type inet:ip-address; |
| 60 | description "primary dns server name"; |
| 61 | } |
| 62 | |
| 63 | leaf dns-secondary { |
| 64 | type inet:ip-address; |
| 65 | description "secondary dns server name"; |
| 66 | } |
| 67 | |
| 68 | // Note: Cannot use a subnet as a list key. Dropped support from a |
| 69 | // list of subnets to a single subnet. Revisit in the future. |
| 70 | leaf subnet { |
| 71 | type inet:ipv4-prefix; |
| 72 | mandatory true; |
| 73 | description "subnet to allocate ip addresses from"; |
| 74 | } |
| 75 | |
| 76 | leaf admin-status { |
| 77 | type at:admin-status; |
| 78 | description "administrative status"; |
| 79 | } |
| 80 | |
| 81 | leaf mtu { |
| 82 | type at:mtu; |
| 83 | description "maximum transmission unit"; |
Scott Baker | cf7cb66 | 2021-11-18 14:25:50 -0800 | [diff] [blame] | 84 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 85 | |
| 86 | leaf description { |
| 87 | type at:description; |
| 88 | description "description of this ip domain"; |
| 89 | } |
| 90 | |
| 91 | // Ip-Domain is always owned by an Enterprise, because it contains |
| 92 | // IP addresses relative to that Enterprise. |
| 93 | leaf enterprise { |
| 94 | type leafref { |
| 95 | path "/ent:enterprise/ent:enterprise/ent:id"; |
| 96 | } |
| 97 | mandatory true; |
| 98 | description |
| 99 | "Link to enterprise that owns this IP-Domain"; |
Scott Baker | cf7cb66 | 2021-11-18 14:25:50 -0800 | [diff] [blame] | 100 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 101 | } |
Scott Baker | cf7cb66 | 2021-11-18 14:25:50 -0800 | [diff] [blame] | 102 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 103 | } |