module example-network-device { yang-version "1"; // namespace namespace "urn:example:network-device"; prefix "nd"; // import some basic types // meta organization "IETF RTG YANG Design Team Collaboration with OpenConfig"; contact "Routing Area YANG Architecture Design Team - "; description "This module describes a model structure for YANG configuration and operational state data models. Its intent is to describe how individual device protocol and feature models fit together and interact."; revision "2017-03-13" { description "IETF Routing YANG Design Team Meta-Model"; reference "TBD"; } // extension statements // identity statements identity oam-protocol-type { description "Base identity for derivation of OAM protocols"; } identity network-service-type { description "Base identity for derivation of network services"; } identity system-management-protocol-type { description "Base identity for derivation of system management protocols"; } identity oam-service-type { description "Base identity for derivation of Operations, Administration, and Maintenance (OAM) services."; } identity control-plane-protocol-type { description "Base identity for derivation of control-plane protocols"; } identity mpls-lsp-type { description "Base identity for derivation of MPLS LSP typs"; } // typedef statements // grouping statements grouping ribs { description "Routing Information Bases (RIBs) supported by a network-instance"; container ribs { description "RIBs supported by a network-instance"; list rib { key "name"; min-elements "1"; description "Each entry represents a RIB identified by the 'name' key. All routes in a RIB must belong to the same address family. For each routing instance, an implementation should provide one system-controlled default RIB for each supported address family."; leaf name { type string; description "The name of the RIB."; } reference "draft-ietf-netmod-routing-cfg"; leaf description { type string; description "Description of the RIB"; } // Note that there is no list of interfaces within container policy { description "Policy specific to RIB"; } } } } // top level device definition statements container ietf-yang-library { description "YANG Module Library as defined in draft-ietf-netconf-yang-library"; } container interfaces { description "Interface list as defined by RFC7223/RFC7224"; } container hardware { description "Hardware / vendor-specific data relevant to the platform. This container is an anchor point for platform-specific configuration and operational state data. It may be further organized into chassis, line cards, ports, etc. It is expected that vendor or platform-specific augmentations would be used to populate this part of the device model"; } container qos { description "QoS features, for example policing, shaping, etc."; } container system-management { description "System management for physical or virtual device."; container system-management-global { description "System management - with reuse of RFC 7317"; } list system-management-protocol { key "type"; leaf type { type identityref { base system-management-protocol-type; } mandatory true; description "Syslog, ssh, TACAC+, SNMP, NETCONF, etc."; } description "List of system management protocol configured for a logical network element."; } } container network-services { description "Container for list of configured network services."; list network-service { key "type"; description "List of network services configured for a network instance."; leaf type { type identityref { base network-service-type; } mandatory true; description "The network service type supported within a network instance, e.g., NTP server, DNS server, DHCP server, etc."; } } } container oam-protocols { description "Container for configured OAM protocols."; list oam-protocol { key "type"; leaf type { type identityref { base oam-protocol-type; } mandatory true; description "The Operations, Administration, and Maintenance (OAM) protocol type, e.g., BFD, TWAMP, CFM, etc."; } description "List of configured OAM protocols."; } } container routing { description "The YANG Data Model for Routing Management revised to be Network Instance / VRF independent. "; // Note that there is no routing or network instance list control-plane-protocol { key "type"; description "List of control plane protocols configured for a network instance."; leaf type { type identityref { base control-plane-protocol-type; } mandatory true; description "The control plane protocol type, e.g., BGP, OSPF IS-IS, etc"; } container policy { description "Protocol specific policy, reusing [RTG-POLICY]"; } } list rib { key "name"; description "Each entry represents a RIB identified by the 'name' key. All routes in a RIB must belong to the same address family. For each routing instance, an implementation should provide one system-controlled default RIB for each supported address family."; leaf name { type string; mandatory true; description "The name of the RIB."; } reference "draft-ietf-netmod-routing-cfg"; leaf description { type string; description "Description of the RIB"; } // Note that there is no list of interfaces within container policy { description "Policy specific to RIB"; } } } container mpls { description "MPLS and TE configuration"; container global { description "Global MPLS configuration"; } list lsps { key "type"; description "List of LSP types."; leaf type { type identityref { base mpls-lsp-type; } mandatory true; description "MPLS and Traffic Engineering protocol LSP types, static, LDP/SR (igp-congruent), RSVP TE (constrained-paths) , etc."; } } } container ieee-dot1Q { description "The YANG Data Model for VLAN bridges as defined by the IEEE"; } container ietf-acl { description "Packet Access Control Lists (ACLs) as specified in draft-ietf-netmod-acl-model"; } container ietf-key-chain { description "Key chains as specified in draft-ietf-rtgwg-yang-key-chain;"; } container logical-network-element { description "This module is used to support multiple logical network elements on a single physical or virtual system."; } container network-instance { description "This module is used to support multiple network instances within a single physical or virtual device. Network instances are commonly know as VRFs (virtual routing and forwarding) and VSIs (virtual switching instances)."; } // rpc statements // notification statements }