module example-ietf-interfaces-ethernet-like { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:" + "example-ietf-interfaces-ethernet-like"; prefix ethlike; import ietf-interfaces { prefix if; } import ietf-yang-types { prefix yang; } import iana-if-property-type { prefix ianaifp; } organization "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; contact "WG Web: WG List: WG Chair: Lou Berger WG Chair: Kent Watsen Editor: Robert Wilton "; description "Example for when statements using interface properties."; revision 2017-06-27 { description "Examples of using when statements with interface properties"; reference "Internet draft: draft-ietf-netmod-intf-ext-yang-04"; } /* * Configuration parameters for Ethernet-like interfaces. */ augment "/if:interfaces/if:interface" { when "derived-from(if:type, 'ianaifp:ethernet-like')" { description "Applies to all interfaces that derive from the Ethernet-like interface property."; } description "Augment the interface model with configuration parameters for all Ethernet-like interfaces"; container ethernet-like { description "Contains configuration parameters for interfaces that use Ethernet framing and expose an Ethernet MAC layer."; leaf mac-address { type yang:mac-address; description "The configured MAC address of the interface."; } } } /* * Operational state for Ethernet-like interfaces. */ augment "/if:interfaces-state/if:interface" { when "derived-from(if:type, 'ianaifp:ethernet-like')" { description "Applies to all interfaces that derive from the Ethernet-like interface property."; } description "Augments the interface model with operational state parameters for all Ethernet-like interfaces."; container ethernet-like { description "Contains operational state parameters for interfaces that use Ethernet framing and expose an Ethernet MAC layer."; leaf mac-address { type yang:mac-address; description "The operational MAC address of the interface, if applicable"; } leaf bia-mac-address { type yang:mac-address; description "The 'burnt-in' MAC address. I.e the default MAC address assigned to the interface if none is explicitly configured."; } container statistics { description "Packet statistics that apply to all Ethernet-like interfaces"; leaf in-drop-unknown-dest-mac-pkts { type yang:counter64; units frames; description ""; } } } } }