d4ab55deb9c62d5970171d102e55cf57fbee80e6
[unimgr.git] / api / src / main / yang / mef-topology.yang
1 module mef-topology {\r
2   namespace "http://metroethernetforum.org/ns/yang/mef-topology";\r
3   prefix mef-topology;\r
4   import mef-types {\r
5     prefix mef-types;\r
6   }\r
7   organization "Metro Ethernet Forum";\r
8   contact\r
9     "Web URL: http://metroethernetforum.org/ \\\r
10      E-mail:  mibs@metroethernetforum.org \\\r
11      Postal:  Metro Ethernet Forum \\\r
12               6033 W. Century Boulevard, Suite 1107 \\\r
13               Los Angeles, CA 90045 \\\r
14               U.S.A. \\\r
15      Phone:   +1 310-642-2800 \\\r
16      Fax:     +1 310-642-2808";\r
17   description\r
18     "This module models the NMS level view of the network devices,\r
19      their physical interfaces, and the network topology.\r
20      When the NMS discovers a network device,it is to pull the\r
21      device configuration and operational status as expected for\r
22      an NMS. Once the NMS has a network device's configuration,\r
23      it creates the /mef-topology/devices/device{} entry and\r
24      populates the list of physical interfaces. The Peers entries\r
25      are populated as configuration to reflect physical cabling\r
26      interconnections.Hints could be detected from LLDP Neighbor\r
27      information[802.1AB].\r
28       \r
29      Reference Overview:\r
30      A number of base documents have been used to create\r
31      the MEF Topology YANG Module. The following are the\r
32      abbreviations for the baseline documents:\r
33      [RFC 6991] refers to IETF RFC 6991 'Common YANG Data Types',\r
34      2013-07-15 \r
35      [RFC 6643] refers to IETF RFC 6643 'Translation of Structure\r
36      of Management Information\r
37      Version 2 (SMIv2) MIB Modules to YANG Modules', 2011-11-25 \r
38      [802.1AB] refers to 'Station and Media Access Control\r
39      Connectivity Discovery', IEEE 802.1AB-2009, September 2009\r
40      [802.1q] refers to IEEE 802.1Q-2011 'IEEE Standard for Local\r
41      and metropolitan area networks --Media Access Control (MAC)\r
42      Bridges and Virtual Bridged Local Area Networks, August 2011\r
43      [802-2001] refers to 'IEEE Standard for Local and Metropolitan\r
44      Area Networks: Overview and Architecture', IEEE 802-2001,\r
45      February 2002\r
46      [MEF10.3] refers to MEF 10.3\r
47      'Ethernet Services Attributes Phase 3', October 2013\r
48      [MEF6.2] refers to MEF 6.2\r
49      'EVC Ethernet Services Defintions Phase 3', August 2014\r
50      [MEF40] refers to MEF 40\r
51      'UNI and EVC Definition of Managed Objects', April 2013\r
52      [MEF45] refers to MEF 45 'Multi-CEN L2CP', August 2014\r
53      [MEF7.2] refers to MEF 7.2\r
54      'Carrier Ethernet Management Information Model', April 2013\r
55      [MEF7.3] refers to MEF 7.3\r
56      'Carrier Ethernet Management Information Model',\r
57      Working Draft #1 2015\r
58      [RFC 2737] refers to IETF RFC 2737 'Entity MIB (Version 2)',\r
59      December 1999\r
60      [RFC 2863] refers to IETF RFC 2863 'The Interfaces Group MIB',\r
61      June 2000\r
62      [RFC 3419] refers to IETF RFC 3419\r
63      'Textual Conventions for Transport Addresses', December 2002\r
64      [Y.1731] refers to ITU-T Y.1731\r
65      'OAM functions and mechanisms for Ethernet based networks',\r
66      July 2011\r
67      [Q.840.1] refers to ITU-T Q.840.1\r
68      'Requirements and analysis for NMS-EMS management interface\r
69      of Ethernet over Transport and Metro Ethernet\r
70      Network(EoT/MEN)' March 2007";\r
71   revision 2015-05-26 {\r
72     description\r
73       "Formal Project Review Draft 1.";\r
74     reference "EVC Ethernet Services Definitions YANG Modules " +\r
75             "(MEF XX), TBD";\r
76   }    \r
77       \r
78   container mef-topology {\r
79     description\r
80       "MEF Topology";\r
81     container devices {\r
82       description\r
83         "Network Devices in the CEN.";\r
84       list device {\r
85         key "dev-id";\r
86         description\r
87           "Network Device List.";\r
88         container interfaces {\r
89           description\r
90             "Physical Ports/Interfaces associated with this " +\r
91             "Network Device.";\r
92           list interface {\r
93             key "phy";\r
94             description\r
95               "External Interface for the Network Device.";\r
96             leaf phy {\r
97               type mef-types:identifier45;\r
98               description\r
99                 "The Phy Name for the Physical Port.";\r
100             }\r
101             leaf ieee8023-phy {\r
102               type identityref {\r
103                 base mef-types:ieee-8023-interface-type;\r
104               }\r
105               description\r
106                 "The Physical Layer for each physical link " +\r
107                 "implementing the UNI MUST be one of the PHYs " +\r
108                 "listed in IEEE Std 802.3–2012 but excluding " +\r
109                 "1000BASE-PX-D and 1000BASE-PX-U.";\r
110               reference "[MEF10.3] Section 9.2 [R60].";\r
111             }\r
112           }\r
113         }\r
114         leaf role {\r
115           type mef-types:device-role;\r
116           default "ce";\r
117           description\r
118             "The role of this device in the network.";\r
119         }\r
120         leaf dev-id {\r
121           type mef-types:identifier45;\r
122           description\r
123             "Device Identifier.";\r
124         }\r
125       }\r
126     }\r
127     container connections {\r
128       description\r
129         "Physical Network Connections";      \r
130       list connection {\r
131         key "name";\r
132         leaf name {\r
133           type mef-types:identifier45;\r
134         }\r
135         container endpoint-1 {\r
136           description\r
137             "End Point 1";\r
138           leaf device {\r
139             type leafref {\r
140                 path "../../../../devices/device/dev-id";\r
141             }\r
142             description\r
143               "Hostname or IP Address for the End Point's Device.";\r
144           }\r
145           leaf interface {\r
146             type leafref {\r
147               path "../../../../devices/device[dev-id = current()/../device]/interfaces/interface/phy";\r
148             }\r
149             description\r
150               "The Phy Name for the End Point's Physical Port.";\r
151           }\r
152         }\r
153         container endpoint-2 {\r
154           description\r
155             "End Point 2";\r
156           leaf device {\r
157             type leafref {\r
158               path "../../../../devices/device/dev-id";\r
159             }\r
160             description\r
161               "Hostname or IP Address for the End Point's Device.";\r
162           }\r
163           leaf interface {\r
164             type leafref {\r
165               path "../../../../devices/device[dev-id = current()/../device]/interfaces/interface/phy";\r
166             }\r
167             description\r
168               "The Phy Name for the End Point's Physical Port.";\r
169           }\r
170         }\r
171       }\r
172     }\r
173   }\r
174 }