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"; } import ietf-interfaces { prefix "if"; } import ietf-pseudowires { prefix "pw"; } organization "ietf"; contact "ietf"; description "ethernet segment"; revision "2018-02-20" { description " - Change the type of attachment circuit to " + " if:interface-ref " + ""; reference ""; } revision "2017-10-21" { description " - Updated ethernet segment's AC/PW members to " + " accommodate more than one AC or more than one " + " PW " + " - Added the new preference based DF election " + " method " + " - Referenced pseudowires in the new " + " ietf-pseudowires.yang model " + " - Moved model to NMDA style specified in " + " draft-dsdt-nmda-guidelines-01.txt " + ""; reference ""; } revision "2017-03-08" { description " - Updated to use BGP parameters from " + " ietf-routing-types.yang instead of from " + " ietf-evpn.yang " + " - Updated ethernet segment's AC/PW members to " + " accommodate more than one AC or more than one " + " PW " + " - Added the new preference based DF election " + " method " + ""; 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"; } typedef df-election-method-type { type enumeration { enum default { value 0; description "The default DF election method"; } enum highest-random-weight { value 1; description "The highest random weight (HRW) method"; reference "draft-mohanty-bess-evpn-df-election"; } enum preference { value 2; description "The preference based method"; reference "draft-rabadan-bess-evpn-pref-df"; } } description "The DF election method 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"; } leaf service-type { type string; config false; description "service-type"; } leaf status { type status-type; config false; description "Ethernet segment status"; } choice ac-or-pw { description "ac-or-pw"; case ac { leaf-list ac { type if:interface-ref; description "Name of attachment circuit"; } } case pw { leaf-list pw { type pw:pseudowire-ref; description "Reference to a pseudowire"; } } } leaf interface-status { type status-type; config false; description "interface status"; } 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"; leaf df-election-method { type df-election-method-type; description "The DF election method"; } leaf preference { when "../df-election-method = 'preference'" { description "The preference value is only applicable " + "to the preference based method"; } type uint16; description "The DF preference"; } leaf revertive { when "../df-election-method = 'preference'" { description "The revertive value is only applicable " + "to the preference method"; } type boolean; default true; description "The 'preempt' or 'revertive' behavior"; } 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"; } leaf esi-label { type string; config false; description "esi-label"; } list member { config false; leaf ip-address { type inet:ip-address; description "ip-address"; } description "member of the ethernet segment"; } list df { config false; 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"; } } }