Brian O'Connor | 98c5bec | 2017-08-14 19:23:54 -0700 | [diff] [blame] | 1 | module ietf-network-instance {
|
| 2 |
|
| 3 | yang-version "1";
|
| 4 |
|
| 5 | // namespace
|
| 6 | namespace "urn:ietf:params:xml:ns:yang:ietf-network-instance";
|
| 7 |
|
| 8 | prefix "ni";
|
| 9 |
|
| 10 | // import some basic types
|
| 11 | import ietf-interfaces {
|
| 12 | prefix if;
|
| 13 | }
|
| 14 |
|
| 15 | import ietf-ip {
|
| 16 | prefix ip;
|
| 17 | }
|
| 18 |
|
| 19 | // meta
|
| 20 | organization "IETF Routing Area Working Group (rtgwg)";
|
| 21 |
|
| 22 | contact
|
| 23 | "Routing Area Working Group - <rtgwg@ietf.org>";
|
| 24 |
|
| 25 |
|
| 26 | description
|
| 27 | "This module is used to support multiple network instances
|
| 28 | within a single physical or virtual device. Network
|
| 29 | instances are commonly know as VRFs (virtual routing
|
| 30 | and forwarding) and VSIs (virtual switching instances).";
|
| 31 |
|
| 32 | revision "2016-06-23" {
|
| 33 | description
|
| 34 | "Initial revision.";
|
| 35 | reference "RFC TBD";
|
| 36 | }
|
| 37 |
|
| 38 | // extension statements
|
| 39 |
|
| 40 | feature bind-network-instance-name {
|
| 41 | description
|
| 42 | "Network Instance to which an interface instance is bound";
|
| 43 | }
|
| 44 |
|
| 45 | // identity statements
|
| 46 |
|
| 47 | identity network-instance-type {
|
| 48 | description
|
| 49 | "Base identity from which identities describing
|
| 50 | network instance types are derived.";
|
| 51 | }
|
| 52 |
|
| 53 | identity ipv4-interface-protocol-type {
|
| 54 | description
|
| 55 | "Base identity for derivation of IPv4 interface
|
| 56 | protocols";
|
| 57 | }
|
| 58 |
|
| 59 | identity ipv6-interface-protocol-type {
|
| 60 | description
|
| 61 | "Base identity for derivation of IPv6 interface
|
| 62 | protocols";
|
| 63 | }
|
| 64 |
|
| 65 | // typedef statements
|
| 66 |
|
| 67 | // grouping statements
|
| 68 |
|
| 69 | grouping interface-ip-common {
|
| 70 | description
|
| 71 | "interface-specific configuration for IP interfaces, IPv4 and
|
| 72 | IPv6";
|
| 73 |
|
| 74 | }
|
| 75 |
|
| 76 | grouping ipv4-interface-protocols {
|
| 77 | container ipv4-interface-protocols {
|
| 78 | list ipv4-interface-protocol {
|
| 79 | key "type";
|
| 80 | leaf type {
|
| 81 | type identityref {
|
| 82 | base ipv4-interface-protocol-type;
|
| 83 | }
|
| 84 | mandatory true;
|
| 85 | description
|
| 86 | "ARP, ICMP, VRRP, DHCP Client, etc.";
|
| 87 | }
|
| 88 | description
|
| 89 | "List of IPv4 protocols configured
|
| 90 | on an interface";
|
| 91 | }
|
| 92 | description
|
| 93 | "Container for list of IPv4 protocols configured
|
| 94 | on an interface";
|
| 95 | }
|
| 96 | description
|
| 97 | "Grouping for IPv4 protocols configured on an interface";
|
| 98 | }
|
| 99 |
|
| 100 | grouping ipv6-interface-protocols {
|
| 101 | description
|
| 102 | "Grouping for IPv6 protocols configured on
|
| 103 | an interface.";
|
| 104 | container ipv6-interface-protocols {
|
| 105 | description
|
| 106 | "Container for list of IPv6 protocols configured
|
| 107 | on an interface.";
|
| 108 | list ipv6-interface-protocol {
|
| 109 | key "type";
|
| 110 | description
|
| 111 | "List of IPv6 protocols configured
|
| 112 | on an interface";
|
| 113 | leaf type {
|
| 114 | type identityref {
|
| 115 | base ipv6-interface-protocol-type;
|
| 116 | }
|
| 117 | mandatory true;
|
| 118 | description
|
| 119 | "ND, ICMPv6, VRRP, DHCPv6 Client, etc.";
|
| 120 | }
|
| 121 | }
|
| 122 | }
|
| 123 | }
|
| 124 |
|
| 125 | grouping network-instance-policy {
|
| 126 | description
|
| 127 | "Network instance policies such as route
|
| 128 | distinguisher, route targets, VPLS ID and neighbor,
|
| 129 | Ethernet ID, etc. ";
|
| 130 | reference
|
| 131 | "RFC 4364 - BGP/MPLS Virtual Private Networks (VPNs)
|
| 132 | RFC 6074 - Provisioning, Auto-Discovery, and Signaling
|
| 133 | in Layer 2 Virtual Private Networks (L2VPNs)
|
| 134 | RFC 7432 - BGP MPLS-Based Ethernet VPN";
|
| 135 | container network-instance-policy {
|
| 136 | description "Network Instance Policy -- details TBD";
|
| 137 | }
|
| 138 | }
|
| 139 |
|
| 140 | // top level device definition statements
|
| 141 | container devices {
|
| 142 | list device {
|
| 143 | key deviceid;
|
| 144 | leaf deviceid {
|
| 145 | type string;
|
| 146 | }
|
| 147 | container network-instances {
|
| 148 | description "Network instances each of which have
|
| 149 | and protocol instantiations. For layer 3,
|
| 150 | this consistent with the routing-instance
|
| 151 | definition in ietf-routing";
|
| 152 | reference "draft-ietf-netmod-routing-cfg";
|
| 153 | list network-instance {
|
| 154 | key name;
|
| 155 | description "List of network-instances";
|
| 156 | leaf name {
|
| 157 | type string;
|
| 158 | description "device scoped
|
| 159 | identifier for the network
|
| 160 | instance";
|
| 161 | }
|
| 162 | leaf type {
|
| 163 | type identityref {
|
| 164 | base network-instance-type;
|
| 165 | }
|
| 166 | description
|
| 167 | "The network instance type -- details TBD
|
| 168 | Likely types include core, L3-VRF, VPLS,
|
| 169 | L2-cross-connect, L2-VSI, etc.";
|
| 170 | }
|
| 171 | leaf enabled {
|
| 172 | type boolean;
|
| 173 | default "true";
|
| 174 | description
|
| 175 | "Flag indicating whether or not the network
|
| 176 | instance is enabled.";
|
| 177 | }
|
| 178 | leaf description {
|
| 179 | type string;
|
| 180 | description
|
| 181 | "Description of the network instance
|
| 182 | and its intended purpose";
|
| 183 | }
|
| 184 | uses network-instance-policy;
|
| 185 | // leaf root {
|
| 186 | // type schema-mount;
|
| 187 | // description "Root for models supported per
|
| 188 | // network instance";
|
| 189 | // }
|
| 190 | }
|
| 191 | }
|
| 192 | }
|
| 193 | }
|
| 194 |
|
| 195 | // augment statements
|
| 196 | augment "/if:devices/if:device/if:interfaces/if:interface" {
|
| 197 | description
|
| 198 | "Add a node for the identification of the logical network
|
| 199 | instance (which is within the interface's identified logical
|
| 200 | network element) associated with the IP information
|
| 201 | configured on an interface";
|
| 202 |
|
| 203 | leaf bind-network-instance-name {
|
| 204 | type string;
|
| 205 | description
|
| 206 | "Network Instance to which an interface is bound";
|
| 207 | }
|
| 208 | }
|
| 209 |
|
| 210 | augment "/if:devices/if:device/if:interfaces/if:interface/ip:ipv4" {
|
| 211 | description
|
| 212 | "Add a node for the identification of the logical
|
| 213 | network instance (which is within the interface's
|
| 214 | identified physical or virtual device) associated with
|
| 215 | the IP information configured on an interface";
|
| 216 |
|
| 217 | leaf bind-network-instance-name {
|
| 218 | type string;
|
| 219 | description
|
| 220 | "Network Instance to which IPv4 interface is bound";
|
| 221 |
|
| 222 | }
|
| 223 | }
|
| 224 |
|
| 225 | augment "/if:devices/if:device/if:interfaces/if:interface/ip:ipv6" {
|
| 226 | description
|
| 227 | "Add a node for the identification of the logical
|
| 228 | network instance (which is within the interface's
|
| 229 | identified physical or virtual device) associated with
|
| 230 | the IP information configured on an interface";
|
| 231 |
|
| 232 | leaf bind-network-instance-name {
|
| 233 | type string;
|
| 234 | description
|
| 235 | "Network Instance to which IPv6 interface is bound";
|
| 236 |
|
| 237 | }
|
| 238 | }
|
| 239 | // rpc statements
|
| 240 | // notification statements
|
| 241 | } |