Thomas Vachuska | 8ca75a2 | 2017-08-24 16:12:59 -0700 | [diff] [blame] | 1 | submodule openconfig-network-instance-l2 { |
| 2 | |
| 3 | belongs-to openconfig-network-instance { |
| 4 | prefix "oc-netinst"; |
| 5 | } |
| 6 | |
| 7 | |
| 8 | // import some basic types |
| 9 | import openconfig-extensions { prefix "oc-ext"; } |
| 10 | import openconfig-interfaces { prefix "oc-if"; } |
| 11 | import ietf-yang-types { prefix "yang"; } |
| 12 | |
| 13 | // meta |
| 14 | organization "OpenConfig working group"; |
| 15 | |
| 16 | contact |
| 17 | "OpenConfig working group |
| 18 | www.openconfig.net"; |
| 19 | |
| 20 | description |
| 21 | "This module contains groupings which specifically relate to |
| 22 | Layer 2 network instance configuration and operational state |
| 23 | parameters."; |
| 24 | |
| 25 | oc-ext:openconfig-version "0.8.0"; |
| 26 | |
| 27 | revision "2017-02-28" { |
| 28 | description |
| 29 | "Add OSPFv2 to network instance"; |
| 30 | reference "0.8.0"; |
| 31 | } |
| 32 | |
| 33 | revision "2017-01-26" { |
| 34 | description |
| 35 | "Add policy forwarding to network instance"; |
| 36 | reference "0.7.0"; |
| 37 | } |
| 38 | |
| 39 | revision "2017-01-13" { |
| 40 | description |
| 41 | "Add AFT to the network instance"; |
| 42 | reference "0.6.0"; |
| 43 | } |
| 44 | |
| 45 | revision "2016-12-15" { |
| 46 | description |
| 47 | "Add segment routing to network instance"; |
| 48 | reference "0.5.0"; |
| 49 | } |
| 50 | |
| 51 | revision "2016-11-10" { |
| 52 | description |
| 53 | "Update model to include IS-IS."; |
| 54 | reference "0.4.1"; |
| 55 | } |
| 56 | |
| 57 | revision "2016-10-12" { |
| 58 | description |
| 59 | "Update table connections"; |
| 60 | reference "0.4.0"; |
| 61 | } |
| 62 | |
| 63 | revision "2016-09-28" { |
| 64 | description |
| 65 | "Change L2 instance to submodule; add MAC table"; |
| 66 | reference "0.3.0"; |
| 67 | } |
| 68 | |
| 69 | revision "2016-08-11" { |
| 70 | description |
| 71 | "Resolve repeated container names in routing protocols"; |
| 72 | reference "0.2.3"; |
| 73 | } |
| 74 | |
| 75 | revision "2016-07-08" { |
| 76 | description |
| 77 | "Updated with refactored routing protocol models"; |
| 78 | reference "0.2.1"; |
| 79 | } |
| 80 | |
| 81 | revision "2016-03-29" { |
| 82 | description |
| 83 | "Initial revision"; |
| 84 | reference "0.2.0"; |
| 85 | } |
| 86 | |
| 87 | revision "2015-11-20" { |
| 88 | description |
| 89 | "Initial revision"; |
| 90 | reference "0.1.0"; |
| 91 | } |
| 92 | |
| 93 | grouping l2ni-instance { |
| 94 | description |
| 95 | "Configuration and operational state parameters relating |
| 96 | to a Layer 2 network instance"; |
| 97 | |
| 98 | container fdb { |
| 99 | description |
| 100 | "Operational state and configuration parameters relating to |
| 101 | the forwarding database of the network instance"; |
| 102 | |
| 103 | container config { |
| 104 | description |
| 105 | "Configuration parameters relating to the FDB"; |
| 106 | uses l2ni-fdb-mac-config; |
| 107 | } |
| 108 | container state { |
| 109 | config false; |
| 110 | description |
| 111 | "Operational state parameters relating to the FDB"; |
| 112 | uses l2ni-fdb-mac-config; |
| 113 | } |
| 114 | |
| 115 | uses l2ni-mac-table-top; |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | grouping l2ni-instance-common-config { |
| 120 | description |
| 121 | "Common configuration options which are specific to Layer 2 |
| 122 | network instances"; |
| 123 | |
| 124 | leaf mtu { |
| 125 | type uint16; |
| 126 | description |
| 127 | "The maximum frame size which should be supported for this |
| 128 | instance for Layer 2 frames"; |
| 129 | } |
| 130 | |
| 131 | } |
| 132 | |
| 133 | grouping l2ni-fdb-mac-config { |
| 134 | description |
| 135 | "Parameters relating to FDB behaviour relating to MAC |
| 136 | addresses"; |
| 137 | |
| 138 | leaf mac-learning { |
| 139 | type boolean; |
| 140 | description |
| 141 | "When this leaf is set to true, MAC learning is enabled for |
| 142 | the network instance, such that MAC addresses are learned |
| 143 | from ingress frames and added to the FDB."; |
| 144 | } |
| 145 | |
| 146 | leaf mac-aging-time { |
| 147 | // Cisco supports one aging time for local and remote, but |
| 148 | // can specify this time is absolute or against inactivity. |
| 149 | // ALU SROS supports different aging times for local and remote |
| 150 | // but does not allow absolute/inactivity specification. |
| 151 | // JNPR supports only a single aging time, and no specification |
| 152 | // of whether inactivity/absolute is used. |
| 153 | // It is easy to augment new options in here for local remote |
| 154 | // and an extra leaf to allow specification of the type of aging |
| 155 | // so this is left as a single value. |
| 156 | type uint16; |
| 157 | units seconds; |
| 158 | description |
| 159 | "The number of seconds of inactivity after which the entry |
| 160 | in the local FDB is timed out."; |
| 161 | } |
| 162 | |
| 163 | leaf maximum-entries { |
| 164 | type uint16; |
| 165 | description |
| 166 | "The maximum number of MAC address entries that should be |
| 167 | accepted into the FDB"; |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | grouping l2ni-encapsulation-config { |
| 172 | description |
| 173 | "Encapsulation related configuration parameters for a L2 |
| 174 | network instance"; |
| 175 | |
| 176 | leaf control-word { |
| 177 | type boolean; |
| 178 | description |
| 179 | "Whether the control-word should be used for the network |
| 180 | instance"; |
| 181 | reference "RFC3985"; |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | grouping l2ni-mac-table-config { |
| 186 | description |
| 187 | "Configuration data for MAC table entries"; |
| 188 | |
| 189 | leaf mac-address { |
| 190 | type yang:mac-address; |
| 191 | description |
| 192 | "MAC address for the dynamic or static MAC table |
| 193 | entry"; |
| 194 | } |
| 195 | |
| 196 | leaf vlan { |
| 197 | //TODO(aashaikh): Consider whether this should just reflect the |
| 198 | //VLAN id or be a union type to also support displaying/setting |
| 199 | //the VLAN by name (i.e., global VLAN configured in the VLAN |
| 200 | // model). |
| 201 | type leafref { |
| 202 | path "../../../../../../vlans/vlan/config/vlan-id"; |
| 203 | } |
| 204 | description |
| 205 | "VLAN from which this MAC address was received"; |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | grouping l2ni-mac-table-state { |
| 210 | description |
| 211 | "Operational state data for MAC table entries"; |
| 212 | |
| 213 | leaf age { |
| 214 | type uint64; |
| 215 | units seconds; |
| 216 | description |
| 217 | "The time in seconds since the MAC address has been in the |
| 218 | table"; |
| 219 | } |
| 220 | |
| 221 | leaf entry-type { |
| 222 | type enumeration { |
| 223 | enum STATIC { |
| 224 | description |
| 225 | "Statically programmed MAC table entry"; |
| 226 | } |
| 227 | enum DYNAMIC { |
| 228 | description |
| 229 | "Dynamically learned MAC table entry"; |
| 230 | } |
| 231 | } |
| 232 | description |
| 233 | "Indicates whether the entry was statically configured, or |
| 234 | dynamically learned."; |
| 235 | } |
| 236 | |
| 237 | } |
| 238 | |
| 239 | grouping l2ni-mac-table-top { |
| 240 | description |
| 241 | "Top-level grouping for MAC table list"; |
| 242 | |
| 243 | |
| 244 | container mac-table { |
| 245 | description |
| 246 | "Table of learned or statically configured MAC addresses and |
| 247 | corresponding VLANs in the bridge domain"; |
| 248 | |
| 249 | container entries { |
| 250 | description |
| 251 | "Enclosing container for list of MAC table entries"; |
| 252 | |
| 253 | list entry { |
| 254 | key "mac-address"; |
| 255 | description |
| 256 | "List of learned MAC addresses"; |
| 257 | |
| 258 | leaf mac-address { |
| 259 | type leafref { |
| 260 | path "../config/mac-address"; |
| 261 | } |
| 262 | description |
| 263 | "Reference to mac-address list key"; |
| 264 | } |
| 265 | |
| 266 | container config { |
| 267 | description |
| 268 | "Configuration data for MAC table entries"; |
| 269 | |
| 270 | uses l2ni-mac-table-config; |
| 271 | } |
| 272 | |
| 273 | container state { |
| 274 | |
| 275 | config false; |
| 276 | |
| 277 | description |
| 278 | "Operational state data for MAC table entries"; |
| 279 | |
| 280 | uses l2ni-mac-table-config; |
| 281 | uses l2ni-mac-table-state; |
| 282 | } |
| 283 | |
| 284 | container interface { |
| 285 | description |
| 286 | "Reference to the base and/or subinterface for the |
| 287 | MAC table entry"; |
| 288 | |
| 289 | uses oc-if:interface-ref; |
| 290 | } |
| 291 | } |
| 292 | } |
| 293 | } |
| 294 | } |
| 295 | } |