module ietf-ethernet-segment { namespace "urn:ietf:params:xml:ns:yang:ietf-ethernet-segment"; prefix "es"; import ietf-yang-types { prefix "yang"; } import ietf-inet-types { prefix "inet"; } import ietf-routing-types { prefix "rt-types"; } organization "ietf"; contact "ietf"; description "ethernet segment"; revision "2017-03-13" { description " - Updated to use BGP parameters from " + " ietf-routing-types.yang instead of from " + " ietf-evpn.yang " + ""; reference ""; } revision "2016-07-08" { description " - Added the configuration option to enable or " + " disable per-EVI/EAD route " + " - Added PBB parameter backbone-src-mac " + " - Added operational state branch, initially " + " to match the configuration branch" + ""; reference ""; } revision "2016-06-23" { description "WG document adoption"; reference ""; } revision "2015-10-15" { description "Initial revision"; reference ""; } /* Features */ feature ethernet-segment-bgp-params { description "Ethernet segment's BGP parameters"; } feature ethernet-segment-pbb-params { description "Ethernet segment's PBB parameters"; } /* Typedefs */ typedef status-type { type enumeration { enum up { description "Status is up"; } enum down { description "Status is down"; } } description "status type"; } /* EVPN Ethernet Segment YANG Model */ container ethernet-segments { description "ethernet-segment"; list ethernet-segment { key "name"; leaf name { type string; description "Name of the ethernet segment"; } choice ac-or-pw { description "ac-or-pw"; case ac { leaf ac { type string; description "Eventual reference to standard " + "attachment circuit definition"; } } case pw { leaf pw { type string; description "Eventual reference to standard " + "pseudowire definition"; } } } leaf ethernet-segment-identifier { type uint32; description "Ethernet segment identifier (esi)"; } choice active-mode { mandatory true; description "Choice of active mode"; case single-active { leaf single-active-mode { type empty; description "single-active-mode"; } } case all-active { leaf all-active-mode { type empty; description "all-active-mode"; } } } container pbb-parameters { if-feature ethernet-segment-pbb-params; description "PBB configuration"; leaf backbone-src-mac { type yang:mac-address; description "backbone-src-mac, only if this is a PBB"; } } container bgp-parameters { description "BGP parameters"; container common { description "BGP parameters common to all pseudowires"; list rd-rt { if-feature ethernet-segment-bgp-params; key "route-distinguisher"; leaf route-distinguisher { type rt-types:route-distinguisher; description "Route distinguisher"; } uses rt-types:vpn-route-targets; description "A list of route distinguishers and " + "corresponding VPN route targets"; } } } container df-election { description "df-election"; choice df-election-method { description "Choice of df election method"; case highest-random-weight { leaf hrw { type boolean; description "Enable (TRUE) or disable (FALSE) " + "highest random weight"; } } } leaf election-wait-time { type uint32; description "election-wait-time"; } } leaf ead-evi-route { type boolean; default false; description "Enable (true) or disable (false) ead-evi-route"; } description "An ethernet segment"; } } container ethernet-segments-state { config false; description "Ethernet segmet operational state"; list ethernet-segment-state { key "name"; leaf name { type string; description "Name of the ethernet segment"; } leaf service-type { type string; description "service-type"; } leaf status { type status-type; description "Ethernet segment status"; } choice ac-or-pw { description "ac-or-pw"; case ac { leaf ac { type string; description "Name of attachment circuit"; } } case pw { leaf pw { type string; description "Name of pseudowire"; } } } leaf interface-status { type status-type; description "interface status"; } leaf ethernet-segment-identifier { type uint32; description "Ethernet segment identifier (esi)"; } leaf active-mode { type string; description "Single-active-mode/all-active-mode"; } container pbb-parameters { if-feature "ethernet-segment-pbb-params"; description "PBB configuration"; leaf backbone-src-mac { type yang:mac-address; description "backbone-src-mac, only if this is a PBB"; } } container bgp-parameters { description "BGP parameters"; container common { description "BGP parameters common to all pseudowires"; list rd-rt { if-feature ethernet-segment-bgp-params; key "route-distinguisher"; leaf route-distinguisher { type rt-types:route-distinguisher; description "Route distinguisher"; } uses rt-types:vpn-route-targets; description "A list of route distinghishers and " + "corresponding route targets"; } } } container df-election { description "df-election"; leaf hrw-enabled { type boolean; description "hrw-enabled is enabled (TRUE) " + "or disabled (FALSE)"; } leaf election-wait-time { type uint32; description "election-wait-time"; } } leaf ead-evi-route-enabled { type boolean; description "ead-evi-route is enabled (TRUE) " + "or disabled (FALSE)"; } leaf esi-label { type string; description "esi-label"; } list member { leaf ip-address { type inet:ip-address; description "ip-address"; } description "member of the ethernet segment"; } list df { leaf service-identifier { type uint32; description "service-identifier"; } leaf vlan { type uint32; description "vlan"; } leaf ip-address { type inet:ip-address; description "ip-address"; } description "df of an evpn instance's vlan"; } description "An ethernet segment"; } } }