7 module ietf-l2-topology {
9 namespace "urn:ietf:params:xml:ns:yang:ietf-l2-topology";
16 import ietf-network-topology {
20 import ietf-inet-types {
24 import ietf-yang-types {
29 contact "I-D Editor: jie.dong@huawei.com";
32 "This module defines a basic model for
33 the layer-2 topology of a network";
35 revision "2015-06-23" {
36 description "Initial revision";
37 reference "draft-ietf-i2rs-l2-network-topology-01";
48 description "VLAN ID";
51 typedef trill-nickname {
53 description "TRILL Nickname";
60 description "Base type for flags";
63 typedef l2-network-event-type {
67 description "An L2 node or link or termination-point
72 description "An L2 node or link or termination-point
77 description "An L2 node or link or termination-point
81 description "l2 network event type for notifications";
82 } // l2-topology-event-type
91 "Indicates that the system supports the
97 "Indicates that the system supports the
103 "Indicates that the device supports the
104 provider-backbone-bridging functions";
109 "Indicates that the device supports the
111 reference "RFC 4761, RFC 4762";
116 "Indicates that the device supports the
118 reference "RFC 6325";
123 "Indicates that the device supports the
125 reference "RFC 7348";
131 identity flag-identity {
132 description "Base type for flags";
135 identity encapsulation-type {
137 "Base identity from which specific encapsulation
141 identity eth-encapsulation-type {
142 base encapsulation-type;
144 "Base identity from which specific ethernet
145 encapsulation types are derived.";
150 base eth-encapsulation-type;
152 "native ethernet encapsulation";
156 base eth-encapsulation-type;
158 "vlan encapsulation";
162 base eth-encapsulation-type;
164 "qinq encapsulation";
168 base eth-encapsulation-type;
174 base eth-encapsulation-type;
176 "trill encapsulation";
180 base eth-encapsulation-type;
182 "vpls encapsulation";
186 base eth-encapsulation-type;
188 "vxlan encapsulation";
191 identity frame-relay {
192 base encapsulation-type;
194 "Frame Relay encapsulation";
198 base encapsulation-type;
204 base encapsulation-type;
206 "HDLC encapsulation";
210 base encapsulation-type;
212 "Base identity from which specific ATM
213 encapsulation types are derived.";
218 base encapsulation-type;
220 "Base identity from which specific pw
221 encapsulation types are derived.";
230 grouping l2-network-type {
231 description "Identify the topology type to be L2.";
232 container l2-network {
233 presence "indicates L2 Network";
235 "The presence of the container node indicates
240 grouping l2-network-attributes {
241 description "L2 Topology scope attributes";
242 container l2-network-attributes {
243 description "Containing L2 network attributes";
246 description "Name of the L2 network";
251 description "L2 network flags";
256 grouping l2-node-attributes {
257 description "L2 node attributes";
258 container l2-node-attributes {
259 description "Containing L2 node attributes";
262 description "Node name";
266 description "Node description";
268 leaf-list management-address {
269 type inet:ip-address;
270 description "System management address";
272 leaf management-vid {
275 description "System management VID";
277 leaf-list nick-name {
280 description "Nickname of the RBridge";
284 description "Node operational flags";
287 } // grouping l2-node-attributes
290 grouping l2-link-attributes {
291 description "L2 link attributes";
292 container l2-link-attributes {
293 description "Containing L2 link attributes";
296 description "Link name";
300 description "Link flags";
306 description "Link rate";
311 description "Link delay in microseconds";
316 "List of Shared Risk Link Groups
317 this link belongs to.";
320 } // grouping l2-link-attributes
322 grouping l2-termination-point-attributes {
323 description "L2 termination point attributes";
324 container l2-termination-point-attributes {
325 description "Containing L2 TP attributes";
328 description "Port description";
331 leaf maximum-frame-size {
333 description "Maximum frame size";
336 choice l2-termination-point-type {
338 "Indicates termination-point type
339 specific attributes";
342 type yang:mac-address;
343 description "Interface MAC address";
346 leaf eth-encapsulation {
348 base eth-encapsulation-type;
351 "Encapsulation type of this
358 description "Port VLAN ID";
364 description "Interface configured VLANs";
367 description "VLAN ID";
371 description "VLAN Name";
379 base encapsulation-type;
382 "Encapsulation type of this termination point.";
386 } //choice termination-point-type
393 "the termination point is in forwarding state";
398 "the termination point is in blocking state";
403 "the termination point is in down state";
408 "the termination point is in other state";
412 description "State of the termination point";
415 } // grouping l2-termination-point-attributes
417 /*** grouping of network/node/link/tp leaf-refs ***/
419 grouping network-ref {
421 "Grouping for an absolute reference to a network topology
425 path "/nw:network/nw:network-id";
428 "An absolute reference to a network topology instance.";
434 "Grouping for an absolute reference to a link instance.";
439 +"[nw:network-id = current()/../network-ref]"
440 +"/nt:link/nt:link-id";
443 "An absolute reference to a link instance.";
449 "Grouping for an absolute reference to a node instance.";
454 +"[nw:network-id = current()/../network-ref]"
455 +"/nw:node/nw:node-id";
458 "An absolute reference to a node instance.";
464 "Grouping for an absolute reference to a termination point.";
469 +"[nw:network-id = current()/../network-ref]"
470 +"/nw:node[nw:node-id = current()/../node-ref]"
471 +"/nt:termination-point/nt:tp-id";
474 "Grouping for an absolute reference to a TP.";
482 augment "/nw:network/nw:network-types" {
484 "Introduce new network type for L2 topology";
485 uses l2-network-type;
488 augment "/nw:network" {
489 /* RIFT-Change: when not to be used yet
490 when "nw:network-types/l2-network" {
492 "Augmentation parameters apply only for networks
497 "Configuration parameters for the L2 network
499 uses l2-network-attributes;
502 augment "/nw:network/nw:node" {
503 /* RIFT-Change: when not to be used yet
504 when "../nw:network-types/l2-network" {
506 "Augmentation parameters apply only for networks
511 "Configuration parameters for L2 at the node
513 uses l2-node-attributes;
516 augment "/nw:network/nt:link" {
517 /* RIFT-Change: when not to be used yet
518 when "/nw:network/nw:network-types/l2-network" {
520 "Augmentation parameters apply only for networks
524 description "Augment L2 topology link information";
525 uses l2-link-attributes;
528 augment "/nw:network/nw:node/nt:termination-point" {
529 /* RIFT-Change: when not to be used yet
530 when "/nw:network/nw:network-types/l2-network" {
532 "Augmentation parameters apply only for networks
537 "Augment L2 topology termination point configuration";
538 uses l2-termination-point-attributes;
545 notification l2-node-event {
546 description "Notification event for L2 node";
548 type l2-network-event-type;
549 description "Event type";
552 uses l2-network-type;
553 uses l2-node-attributes;
556 notification l2-link-event {
557 description "Notification event for L2 link";
559 type l2-network-event-type;
560 description "Event type";
563 uses l2-network-type;
564 uses l2-link-attributes;
567 notification l2-termination-point-event {
568 description "Notification event for L2 termination point";
570 type l2-network-event-type;
571 description "Event type";
574 uses l2-network-type;
575 uses l2-termination-point-attributes;
578 } // module l2-topology