module openconfig-network-instance-types { yang-version "1"; // namespace namespace "http://openconfig.net/yang/network-instance-types"; prefix "nit"; import openconfig-extensions { prefix "ocext"; } // meta organization "OpenConfig working group"; contact "OpenConfig working group www.openconfig.net"; description "Types associated with a network instance"; ocext:openconfig-version "0.1.0"; revision "2015-10-18" { description "Initial revision"; reference "0.1.0"; } // identity statements identity network-instance-type { description "A base identity which can be extended to indicate different types of network instance supported by a device."; } identity DEFAULT-INSTANCE { base network-instance-type; description "A special routing instance which acts as the 'default' or 'global' routing instance for a network device."; } identity L3VRF { base network-instance-type; description "A private Layer 3 only routing instance which is formed of one or more RIBs"; } identity L2VSI { base network-instance-type; description "A private Layer 2 only switch instance which is formed of one or more L2 forwarding tables"; } identity L2P2P { base network-instance-type; description "A private Layer 2 only forwarding instance which acts as a point to point connection between two endpoints"; } // rjs note: // this should move to openconfig-types when merged typedef route-distinguisher { type union { // type 0: <2-byte administrator>:<4-byte assigned number> type string { pattern "(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|" + "[1-9]?[1-9]?[0-9][0-9]|[1-9]):" + "(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|" + "[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9])"; } // type 1: :<2-byte assigned number> type string { pattern "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}" + "([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):" + "(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|" + "[1-9]?[1-9]?[0-9][0-9]|[1-9])"; } // type 2: <4-byte as-number>:<2-byte assigned number> type string { pattern "(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|" + "[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9]):" + "(65[0-5][0-3][0-5]|[1-5]{2}[0-9]{3}|" + "[1-9]{0,2}[0-9][0-9]|[1-9])"; } } description "A route distinguisher value"; reference "RFC4364"; } }