Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 1 | // SPDX-FileCopyrightText: 2021 Open Networking Foundation |
| 2 | // |
Sean Condon | 160ec1d | 2022-02-08 12:58:25 +0000 | [diff] [blame] | 3 | // SPDX-License-Identifier: Apache-2.0 |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 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 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 30 | description "The typedef for ip-domain-id"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | container ip-domain { |
| 34 | description "The top level container"; |
| 35 | |
| 36 | list ip-domain { |
| 37 | key "id"; |
| 38 | description |
| 39 | "List of ip domains"; |
| 40 | |
| 41 | leaf id { |
| 42 | type ip-domain-id; |
| 43 | description "ID for this ip domain."; |
| 44 | } |
| 45 | |
| 46 | leaf display-name { |
| 47 | type string { |
| 48 | length 1..80; |
| 49 | } |
| 50 | description "display name to use in GUI or CLI"; |
| 51 | } |
| 52 | |
| 53 | leaf dnn { |
| 54 | type at:dnn; |
Scott Baker | cf7cb66 | 2021-11-18 14:25:50 -0800 | [diff] [blame] | 55 | mandatory true; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 56 | description "DNN/APN"; |
Scott Baker | cf7cb66 | 2021-11-18 14:25:50 -0800 | [diff] [blame] | 57 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 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 | // Note: Cannot use a subnet as a list key. Dropped support from a |
| 70 | // list of subnets to a single subnet. Revisit in the future. |
| 71 | leaf subnet { |
| 72 | type inet:ipv4-prefix; |
| 73 | mandatory true; |
| 74 | description "subnet to allocate ip addresses from"; |
| 75 | } |
| 76 | |
| 77 | leaf admin-status { |
| 78 | type at:admin-status; |
| 79 | description "administrative status"; |
| 80 | } |
| 81 | |
| 82 | leaf mtu { |
| 83 | type at:mtu; |
| 84 | description "maximum transmission unit"; |
Scott Baker | cf7cb66 | 2021-11-18 14:25:50 -0800 | [diff] [blame] | 85 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 86 | |
| 87 | leaf description { |
| 88 | type at:description; |
| 89 | description "description of this ip domain"; |
| 90 | } |
| 91 | |
| 92 | // Ip-Domain is always owned by an Enterprise, because it contains |
| 93 | // IP addresses relative to that Enterprise. |
| 94 | leaf enterprise { |
| 95 | type leafref { |
| 96 | path "/ent:enterprise/ent:enterprise/ent:id"; |
| 97 | } |
| 98 | mandatory true; |
| 99 | description |
| 100 | "Link to enterprise that owns this IP-Domain"; |
Scott Baker | cf7cb66 | 2021-11-18 14:25:50 -0800 | [diff] [blame] | 101 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 102 | } |
Scott Baker | cf7cb66 | 2021-11-18 14:25:50 -0800 | [diff] [blame] | 103 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 104 | } |