Tomáš Pecka | 7acf392 | 2021-08-10 11:16:57 +0200 | [diff] [blame] | 1 | module czechlight-lldp { |
| 2 | yang-version 1.1; |
| 3 | namespace |
| 4 | "http://czechlight.cesnet.cz/yang/czechlight-lldp"; |
| 5 | |
| 6 | prefix "cla-lldp"; |
| 7 | |
| 8 | import iana-afn-safi { |
| 9 | prefix ianaaf; |
| 10 | revision-date 2013-07-04; |
| 11 | } |
| 12 | import ietf-inet-types { |
| 13 | prefix inet; |
| 14 | revision-date 2013-07-15; |
| 15 | } |
| 16 | |
| 17 | organization "CESNET"; |
| 18 | contact "photonic@cesnet.cz"; |
| 19 | description |
| 20 | "Model for listing neighbours discovered via LLDP protocol. |
| 21 | Based on OpenROADM's org-openroadm-lldp@2020-05-29 model."; |
| 22 | |
| 23 | revision 2020-11-04 { |
| 24 | description "Allow multiple neighbor entries on in interface."; |
| 25 | } |
| 26 | revision 2020-08-25 { |
| 27 | description "Initial release"; |
| 28 | } |
| 29 | |
| 30 | typedef capabilities { |
| 31 | type bits { |
| 32 | bit other { |
| 33 | position 0; |
| 34 | description |
| 35 | "This bit indicates that the system has capabilities |
| 36 | other than those listed below."; |
| 37 | } |
| 38 | bit repeater { |
| 39 | position 1; |
| 40 | description |
| 41 | "This bit indicates that the system has repeater |
| 42 | capability."; |
| 43 | } |
| 44 | bit bridge { |
| 45 | position 2; |
| 46 | description |
| 47 | "This bit indicates that the system has bridge |
| 48 | capability."; |
| 49 | } |
| 50 | bit wlan-access-point { |
| 51 | position 3; |
| 52 | description |
| 53 | "This bit indicates that the system has |
| 54 | WLAN access point capability."; |
| 55 | } |
| 56 | bit router { |
| 57 | position 4; |
| 58 | description |
| 59 | "This bit indicates that the system has router |
| 60 | capability."; |
| 61 | } |
| 62 | bit telephone { |
| 63 | position 5; |
| 64 | description |
| 65 | "This bit indicates that the system has telephone |
| 66 | capability."; |
| 67 | } |
| 68 | bit docsis-cable-device { |
| 69 | position 6; |
| 70 | description |
| 71 | "This bit indicates that the system has |
| 72 | DOCSIS Cable Device capability (IETF RFC 4639 & 2670)."; |
| 73 | } |
| 74 | bit station-only { |
| 75 | position 7; |
| 76 | description |
| 77 | "This bit indicates that the system has only |
| 78 | station capability and nothing else."; |
| 79 | } |
| 80 | bit cvlan-component { |
| 81 | position 8; |
| 82 | description |
| 83 | "This bit indicates that the system has |
| 84 | C-VLAN component functionality."; |
| 85 | } |
| 86 | bit svlan-component { |
| 87 | position 9; |
| 88 | description |
| 89 | "This bit indicates that the system has |
| 90 | S-VLAN component functionality."; |
| 91 | } |
| 92 | bit two-port-mac-relay { |
| 93 | position 10; |
| 94 | description |
| 95 | "This bit indicates that the system has |
| 96 | Two-port MAC Relay (TPMR) functionality."; |
| 97 | } |
| 98 | } |
| 99 | description |
| 100 | "This describes system capabilities."; |
| 101 | reference |
| 102 | "IEEE Std 802.1AB-2016: 8.5.8.1"; |
| 103 | |
| 104 | } |
| 105 | |
| 106 | typedef chassisSubtype { |
| 107 | type enumeration { |
| 108 | enum reserved { |
| 109 | value 0; |
| 110 | description |
| 111 | "reserved"; |
| 112 | } |
| 113 | enum chassiscomponent { |
| 114 | value 1; |
| 115 | description |
| 116 | "Chassis component (EntPhysicalAlias IETF RFC 4133)"; |
| 117 | } |
| 118 | enum ifalias { |
| 119 | value 2; |
| 120 | description |
| 121 | "Interface Alias (IfAlias - IETF RFC 2863) "; |
| 122 | } |
| 123 | enum portcomponent { |
| 124 | value 3; |
| 125 | description |
| 126 | "Port component (EntPhysicalAlias IETF RFC 4133)"; |
| 127 | } |
| 128 | enum macaddress { |
| 129 | value 4; |
| 130 | description |
| 131 | "MAC address (IEEE Std 802) "; |
| 132 | } |
| 133 | enum networkaddress { |
| 134 | value 5; |
| 135 | description |
| 136 | "Network Address"; |
| 137 | } |
| 138 | enum ifname { |
| 139 | value 6; |
| 140 | description |
| 141 | "Interface Name (ifName - IETF RFC 2863)"; |
| 142 | } |
| 143 | enum local { |
| 144 | value 7; |
| 145 | description |
| 146 | "Locally assigned"; |
| 147 | } |
| 148 | } |
| 149 | } |
| 150 | typedef portSubtype { |
| 151 | type enumeration { |
| 152 | enum other { |
| 153 | value 0; |
| 154 | description |
| 155 | "reserved"; |
| 156 | } |
| 157 | enum ifalias { |
| 158 | value 1; |
| 159 | description |
| 160 | "Interface Alias (IfAlias - IETF RFC 2863) "; |
| 161 | } |
| 162 | enum portcomponent { |
| 163 | value 2; |
| 164 | description |
| 165 | "Port component (EntPhysicalAlias IETF RFC 4133)"; |
| 166 | } |
| 167 | enum macaddress { |
| 168 | value 3; |
| 169 | description |
| 170 | "MAC address (IEEE Std 802) "; |
| 171 | } |
| 172 | enum networkaddress { |
| 173 | value 4; |
| 174 | description |
| 175 | "Network Address"; |
| 176 | } |
| 177 | enum ifname { |
| 178 | value 5; |
| 179 | description |
| 180 | "Interface Name (ifName - IETF RFC 2863)"; |
| 181 | } |
| 182 | enum agentcircuitid { |
| 183 | value 6; |
| 184 | description |
| 185 | "Agent Circuit Id (IETF RFC 3046)"; |
| 186 | } |
| 187 | enum local { |
| 188 | value 7; |
| 189 | description |
| 190 | "Locally assigned"; |
| 191 | } |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | container nbr-list { |
| 196 | config false; |
| 197 | description |
| 198 | "LLDP Operational data - Neighbour List information"; |
| 199 | |
| 200 | list neighbors { |
| 201 | leaf ifName { |
| 202 | type string; |
| 203 | description |
| 204 | "Ethernet interface name where LLDP runs"; |
| 205 | } |
| 206 | leaf remoteSysName { |
| 207 | type string; |
| 208 | description |
| 209 | "remote neighbour system name"; |
| 210 | } |
| 211 | leaf remoteMgmtAddressSubType { |
| 212 | type ianaaf:address-family; |
| 213 | description |
| 214 | "remote neighbour Management Address Subtype Enumeration"; |
| 215 | } |
| 216 | leaf remoteMgmtAddress { |
| 217 | type inet:ip-address; |
| 218 | description |
| 219 | "remote neighbour management address"; |
| 220 | } |
| 221 | leaf remotePortIdSubType { |
| 222 | type cla-lldp:portSubtype; |
| 223 | description |
| 224 | "remote neighbour Port ID Subtype Enumeration"; |
| 225 | } |
| 226 | leaf remotePortId { |
| 227 | type string; |
| 228 | description |
| 229 | "remote neighbour port Id"; |
| 230 | } |
| 231 | leaf remoteChassisIdSubType { |
| 232 | type cla-lldp:chassisSubtype; |
| 233 | description |
| 234 | "Chassis ID Subtype Enumeration"; |
| 235 | } |
| 236 | leaf remoteChassisId { |
| 237 | type string; |
| 238 | description |
| 239 | "remote neighbour Chassis Id"; |
| 240 | } |
| 241 | leaf systemCapabilitiesSupported { |
| 242 | type cla-lldp:capabilities; |
| 243 | description |
| 244 | "The bitmap value used to identify which system capabilities |
| 245 | are supported on the local system."; |
| 246 | reference |
| 247 | "IEEE Std 802.1AB-2016: 8.5.8.1"; |
| 248 | } |
| 249 | |
| 250 | leaf systemCapabilitiesEnabled { |
| 251 | type cla-lldp:capabilities; |
| 252 | description |
| 253 | "The bitmap value used to identify which system capabilities |
| 254 | are enabled on the local system."; |
| 255 | reference |
| 256 | "IEEE Std 802.1AB-2016: 8.5.8.2"; |
| 257 | } |
| 258 | } |
| 259 | } |
| 260 | } |