Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 1 | module optical-switch { |
| 2 | namespace "http://www.polatis.com/yang/optical-switch"; |
| 3 | prefix opsw; |
| 4 | |
| 5 | import ietf-yang-types { |
| 6 | prefix yang; |
| 7 | } |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 8 | import ietf-inet-types { |
| 9 | prefix inet; |
| 10 | } |
| 11 | |
| 12 | organization "Polatis Limited"; |
| 13 | contact |
| 14 | "Adam Hughes |
| 15 | |
| 16 | Polatis Limited |
| 17 | 332/2 Cambridge Science Park |
| 18 | Cambridge CB4 0WN |
| 19 | United Kingdom |
| 20 | |
| 21 | Phone: +44 (0) 1223 424200 |
| 22 | Email: yang-support@polatis.com"; |
| 23 | |
| 24 | description "Implements the data model for an Optical Circuit Switch"; |
| 25 | |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 26 | revision "2018-03-22" { |
| 27 | description " 1. Added grouped ports container. |
| 28 | 2. Defined a new typedef with 32 printable character length. |
| 29 | 3. Added 'mandatory' form 'egress' leaf in cross-connects container |
| 30 | 4. Removed operational state leaf from aps-notification"; |
| 31 | |
| 32 | } |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 33 | revision "2017-08-04" { |
| 34 | description " 1. Removed the state and config data dependencies. |
| 35 | 2. Added new port configuration containers for better performance. |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 36 | 3. Deprecated old ports/port container |
| 37 | 4. Added RADIUS, NTP, Subswitches, AuditLog and Protocols feature"; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 38 | } |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 39 | revision "2017-02-09" { |
| 40 | description "Added APS container and notifications"; |
| 41 | } |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 42 | revision "2016-04-22" { |
| 43 | description "Added support for peer port configuration"; |
| 44 | } |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 45 | revision "2016-02-17" { |
| 46 | description "1. Added support for Variable Optical Attenuation |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 47 | 2. Defined new portFormat datatype to represent non-zero port Id. |
| 48 | 3. Changed the default values of power-high-alarm from +100 to +25 and |
| 49 | and for power-low-alarm from -100 to -60."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 50 | } |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 51 | revision "2015-09-14" { |
| 52 | description "Initial revision."; |
| 53 | } |
| 54 | |
| 55 | typedef namesFormat { |
| 56 | type string { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 57 | pattern "[ -~]{1,128}"; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 58 | } |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 59 | description "A non-empty string with up to 128 printable ASCII characters."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 60 | } |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 61 | typedef userNamesFormat { |
| 62 | type string { |
| 63 | pattern "[ -~]{1,32}"; |
| 64 | } |
| 65 | description "A non-empty string with up to 32 printable ASCII characters."; |
| 66 | } |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 67 | typedef namesFormatNullable { |
| 68 | type string { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 69 | pattern "[ -~]{0,128}"; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 70 | } |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 71 | description "A string with up to 128 printable ASCII characters."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 72 | } |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 73 | typedef groupNamesFormat { |
| 74 | type string { |
| 75 | pattern "[!-~]*"; |
| 76 | } |
| 77 | description "A string containing printable, non-whitespace ASCII characters."; |
| 78 | } |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 79 | typedef floatFormat2d { |
| 80 | type decimal64 { |
| 81 | fraction-digits 2; |
| 82 | } |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 83 | description "Floating point number, restricted to 2 decimal places."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 84 | } |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 85 | typedef portFormat { |
| 86 | type uint32 { |
| 87 | range "1 .. 65535"; |
| 88 | } |
| 89 | } |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 90 | typedef PortStatus { |
| 91 | type enumeration { |
| 92 | enum PO_ENABLED { value 1; } |
| 93 | enum PO_DISABLED { value 2; } |
| 94 | enum PO_FAILED { value 3; } |
| 95 | } |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 96 | description "PO_ENABLED means that light can pass through the port, shutters are open. |
| 97 | PO_DISABLED indicates the opposite. PO_FAILED is reported when the port cannot be used. |
| 98 | Only used in deprecated containers."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 99 | } |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 100 | typedef apsOperationalState { |
| 101 | type enumeration { |
| 102 | enum ON_WORKING { value 0; } |
| 103 | enum WORKING_FAIL { value 1; } |
| 104 | enum SWITCH_PROT { value 2; } |
| 105 | enum ON_PROTECT { value 3; } |
| 106 | enum PROTECT_FAIL { value 4; } |
| 107 | enum SWITCH_WORK { value 5; } |
| 108 | enum NOT_APPLICABLE { value 6; } |
| 109 | } |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 110 | description "Describes the operational state of a working port in an APS service, |
| 111 | Ports in inactive services are in the NOT_APPLICABLE operational state."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 112 | } |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 113 | typedef apsFlags { |
| 114 | type bits { |
| 115 | bit GLP {position 0;} |
| 116 | bit FTP {position 1;} |
| 117 | bit FTW {position 2;} |
| 118 | bit MTP {position 3;} |
| 119 | bit MTW {position 4;} |
| 120 | bit DNR {position 5;} |
| 121 | } |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 122 | description "Commands which can be applied to APS working ports: |
| 123 | GLP - Global Lockout of Protection |
| 124 | FTP - Force To Protection |
| 125 | FTW - Force To Working |
| 126 | MTP - Manual To Protection |
| 127 | MTW - Manual To Working |
| 128 | DNR - Do Not Revert |
| 129 | Only one of GLP, FTP, FTW, MTP, MTW may be set. |
| 130 | GLP on one port will apply GLP to all the ports in a service."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 131 | } |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 132 | typedef hostFormat { |
| 133 | type string { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 134 | pattern "[ -~]{1,64}"; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 135 | } |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 136 | description "A non-empty string with up to 64 printable ASCII characters."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 137 | } |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 138 | typedef secretFormat { |
| 139 | type string { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 140 | pattern "[a-zA-Z0-9]{1,128}"; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 141 | } |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 142 | description "A non-empty string with up to 128 alphanumeric characters."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 143 | } |
| 144 | |
| 145 | container product-information { |
| 146 | config false; |
| 147 | leaf manufacturer { |
| 148 | type string; |
| 149 | description "Name of the manufacturer"; |
| 150 | } |
| 151 | leaf serial-number { |
| 152 | type string; |
| 153 | description "Unique number given to the product during manufacturing."; |
| 154 | } |
| 155 | leaf model-name { |
| 156 | type string; |
| 157 | description "Describes the product and the features that the product supports."; |
| 158 | } |
| 159 | leaf software-version { |
| 160 | type string; |
| 161 | description "Version of the software that is currently running on the optical switch"; |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | container port-config { |
| 166 | list port { |
| 167 | key port-id; |
| 168 | leaf port-id { |
| 169 | type portFormat; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 170 | description "Unique ID for the port"; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 171 | } |
| 172 | leaf status { |
| 173 | config false; |
| 174 | type enumeration { |
| 175 | enum UNSUPPORTED { value 0; } |
| 176 | enum ENABLED { value 1; } |
| 177 | enum DISABLED { value 2; } |
| 178 | enum FAILED { value 3; } |
| 179 | } |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 180 | description "Status of the port. When 'status' is ENABLED the optical path is clear and the signal |
| 181 | passes through. When 'status' is DISABLED the optical signal is blocked. |
| 182 | When 'status' is UNSUPPORTED the port doesn't have the enable/disable feature. |
| 183 | When 'status' is FAILED the port has failed to report its state correctly. "; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 184 | } |
| 185 | leaf label { |
| 186 | type namesFormatNullable; |
| 187 | default ""; |
| 188 | |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 189 | description "User configurable string to describe the port. The optical switch includes the label in notifications for the port."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 190 | } |
| 191 | leaf peer-port { |
| 192 | type namesFormatNullable; |
| 193 | default ""; |
| 194 | |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 195 | description "User configurable string to describe the remote port on another switch. |
| 196 | This information is set by the management interface to record network topology."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 197 | } |
| 198 | } |
| 199 | } |
| 200 | rpc port-set-state { |
| 201 | input { |
| 202 | leaf-list port-enab { |
| 203 | type portFormat; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 204 | description "List of port-ids to enable."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 205 | } |
| 206 | leaf-list port-disab { |
| 207 | type portFormat; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 208 | description "List of port-ids to disable."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 209 | } |
| 210 | } |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 211 | description "This RPC is used to enable or disable a port. When the port is disabled the |
| 212 | optical signal is blocked. When the port is enabled the optical path is clear and the |
| 213 | signal passes through."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 214 | } |
| 215 | |
| 216 | container opm-power { |
| 217 | config false; |
| 218 | list port { |
| 219 | key port-id; |
| 220 | leaf port-id { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 221 | type portFormat; |
| 222 | description "ID for the port with OPM"; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 223 | } |
| 224 | leaf power { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 225 | type floatFormat2d; |
| 226 | description "Measured optical power, reported in dBm."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 227 | } |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 228 | } |
| 229 | } |
| 230 | container opm-config { |
| 231 | list port { |
| 232 | key port-id; |
| 233 | leaf port-id { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 234 | type portFormat; |
| 235 | description "ID for the port with OPM"; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 236 | } |
| 237 | leaf wavelength { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 238 | type floatFormat2d { |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 239 | range 1260.0..1640.0; |
| 240 | } |
| 241 | default 1550.0; |
| 242 | |
| 243 | description "Wavelength against which the power measurements are calibrated. |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 244 | Specified in nm."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 245 | } |
| 246 | leaf offset { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 247 | type floatFormat2d { |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 248 | range -100.0..100.0; |
| 249 | } |
| 250 | default 0; |
| 251 | |
| 252 | description "Offset for the power measurement; the value is added to power |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 253 | monitor measurements when reporting /opm-power/port/power. |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 254 | Thus, specifying an offset can be used as a means of referencing the power |
| 255 | monitors against external meters. |
| 256 | It should be noted that the offset feature does NOT impact the behaviour |
| 257 | of the alarm or attenuation features: |
| 258 | alarm and attenuation settings always operate relative to the actual |
| 259 | power monitor readings, i.e. without any user-specified offsets. |
| 260 | Specified in dBm."; |
| 261 | } |
| 262 | leaf averaging-time { |
| 263 | type uint32 { |
| 264 | range "1..8"; |
| 265 | } |
| 266 | default 4; |
| 267 | |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 268 | description "The period for which the power average is calculated. Each increment |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 269 | in this value doubles the length of the time for which the OPM power readings are averaged. |
| 270 | Setting the value to 1 results in the shortest averaging period, around 10ms. |
| 271 | Setting the value to 8 results in the longest averaging period, 128 times greater."; |
| 272 | } |
| 273 | } |
| 274 | } |
| 275 | container opm-alarm-config { |
| 276 | list port { |
| 277 | key port-id; |
| 278 | leaf port-id { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 279 | type portFormat; |
| 280 | description "ID for the port with OPM"; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 281 | } |
| 282 | leaf mode { |
| 283 | type enumeration { |
| 284 | enum POWER_ALARM_DISABLED; |
| 285 | enum POWER_ALARM_ENABLED; |
| 286 | } |
| 287 | default POWER_ALARM_DISABLED; |
| 288 | |
| 289 | description "Power alarms or notifications from ports can be individually enabled or disabled. |
| 290 | When enabled, Loss of Signal (LOS) or Signal Degrade notifications are generated when power |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 291 | levels cross the set thresholds. When disabled, notifications are not generated."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 292 | } |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 293 | leaf signal-low-threshold { |
| 294 | type floatFormat2d; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 295 | default -60.0; |
| 296 | |
| 297 | description "The switch will generate loss of service notifications should the power |
| 298 | level go below this threshold. Specified in dBm."; |
| 299 | } |
| 300 | leaf signal-degrade-threshold { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 301 | type floatFormat2d; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 302 | default -60.0; |
| 303 | |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 304 | description "The switch will generate warning (signal degrade) notifications should the |
| 305 | power level go below this threshold. Specified in dBm."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 306 | } |
| 307 | leaf signal-high-threshold { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 308 | type floatFormat2d; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 309 | default 25.0; |
| 310 | |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 311 | description "The switch will generate loss of service notifications should the power |
| 312 | level go above this threshold. Specified in dBm."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 313 | } |
| 314 | leaf alarm-clear-holdoff { |
| 315 | type uint32; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 316 | default 0; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 317 | |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 318 | description "When the signal is restored, this is the minimum time in seconds |
| 319 | for which the optical power level needs to remain above the threshold to clear the alarm."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 320 | } |
| 321 | } |
| 322 | } |
| 323 | |
| 324 | container voa { |
| 325 | list port { |
| 326 | key port-id; |
| 327 | leaf port-id { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 328 | type portFormat; |
| 329 | description "ID for the port with VOA"; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 330 | } |
| 331 | leaf atten-mode { |
| 332 | type enumeration { |
| 333 | enum VOA_MODE_NONE { value 0; } |
| 334 | enum VOA_MODE_RELATIVE { value 1; } |
| 335 | enum VOA_MODE_ABSOLUTE { value 2; } |
| 336 | enum VOA_MODE_CONVERGED { value 3; } |
| 337 | enum VOA_MODE_MAXIMUM { value 4; } |
| 338 | enum VOA_MODE_FIXED { value 5; } |
| 339 | } |
| 340 | default VOA_MODE_NONE; |
| 341 | |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 342 | description "VOA_MODE_NONE: Attenuation on the port is disabled. The light on the port will |
| 343 | have the actual power level. VOA_MODE_ABSOLUTE: The output power of the port will be limited |
| 344 | to the atten-level, and will remain at that level if the input power is sufficient. |
| 345 | VOA_MODE_RELATIVE: The output power will be limited to atten-level above the input power on |
| 346 | the reference port, and will remain at that level if the input power is sufficient. |
| 347 | VOA_MODE_CONVERGED: This is similar in behaviour to |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 348 | ABSOLUTE mode, but once the attenuation converges to the desired level the switch freezes the |
| 349 | VOA control loop. This reduces noise caused by the control loop continually striving to improve |
| 350 | the attenuation. VOA_MODE_MAXIMUM: Port will achieve the maximum attenuation level. In this |
| 351 | case configured attenuation level is not used. VOA_MODE_FIXED: Disables closed loop updating |
| 352 | of the attenuation feature for the specified port. Following issuance of this command, the port |
| 353 | will continue to hold their current attenuation level without any optical feedback. Thus, any |
| 354 | changes in input power levels will no longer be tracked"; |
| 355 | } |
| 356 | leaf atten-level { |
| 357 | when "../atten-mode = 'VOA_MODE_ABSOLUTE' or ../atten-mode = 'VOA_MODE_RELATIVE'" + |
| 358 | "or ../atten-mode = 'VOA_MODE_CONVERGED'"; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 359 | type floatFormat2d; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 360 | default 0; |
| 361 | |
| 362 | description "The attenuated output level configured for this port. Specified in dBm |
| 363 | (or dB for RELATIVE as it is an offset value with respect to reference port)."; |
| 364 | } |
| 365 | leaf reference-port { |
| 366 | when "../atten-mode = 'VOA_MODE_RELATIVE'"; |
| 367 | type uint32; |
| 368 | default 0; |
| 369 | |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 370 | description "Reference ingress port for attenuation (for use with relative attenuation only). |
| 371 | If this port is specified as zero then the connected ingress port is used. For attenuation states |
| 372 | other than RELATIVE this data is ignored. When reading this object, a value of zero is returned |
| 373 | for all modes other than RELATIVE. For relative attenuation, the value returned is the current |
| 374 | reference port in use."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 375 | } |
| 376 | } |
| 377 | } |
| 378 | |
| 379 | container ports { |
| 380 | status "deprecated"; |
| 381 | list port { |
| 382 | key port-id; |
| 383 | leaf port-id { |
| 384 | type portFormat; |
| 385 | description "Unique Id for port"; |
| 386 | } |
| 387 | leaf port-label { |
| 388 | type namesFormatNullable; |
| 389 | description "When set, notifications will include the label."; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 390 | } |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 391 | leaf port-state { |
| 392 | type enumeration { |
| 393 | enum PC_ENABLED { value 1; } |
| 394 | enum PC_DISABLED { value 2; } |
| 395 | } |
| 396 | default PC_ENABLED; |
| 397 | |
| 398 | description "State of a port shutter. When port is enabled, shutter is open and |
| 399 | when port is disabled, shutter is closed."; |
| 400 | } |
| 401 | leaf port-status { |
| 402 | config false; |
| 403 | type PortStatus; |
| 404 | |
| 405 | description "Switch port status. The switch can report FAILED port status when the port fails to |
| 406 | correctly report its state"; |
| 407 | } |
| 408 | leaf peer-port { |
| 409 | type namesFormatNullable; |
| 410 | |
| 411 | description "This leaf describes the remote port on another switch to which this |
| 412 | port is connected physically through the optical fibres. Management interface can |
| 413 | set this parameter to configure the network topology."; |
| 414 | } |
| 415 | container opm { |
| 416 | description "Optical Power Monitor (OPM) measures the optical signal strength in the fibre."; |
| 417 | |
| 418 | leaf lambda { |
| 419 | type floatFormat2d; |
| 420 | default 1550.0; |
| 421 | |
| 422 | description "Wavelength against which the power measurements are calibrated. |
| 423 | Specified in nm."; |
| 424 | } |
| 425 | leaf power-high-alarm { |
| 426 | type floatFormat2d; |
| 427 | default 25.0; |
| 428 | |
| 429 | description "The switch will generate notifications should the power level go beyond this |
| 430 | level. Specified in dBm."; |
| 431 | } |
| 432 | leaf power-low-alarm { |
| 433 | type floatFormat2d; |
| 434 | default -60.0; |
| 435 | |
| 436 | description "The switch will generate notifications should the power level go below this |
| 437 | level. Specified in dBm."; |
| 438 | } |
| 439 | leaf power-high-warning-offset { |
| 440 | type floatFormat2d; |
| 441 | default 0; |
| 442 | |
| 443 | description "The switch will generate (warning) notifications should the power go beyond |
| 444 | the set level. This warning offset is subtracted from power-high-alarm to get the warning threshold. |
| 445 | A zero value means that warnings are disabled. Specified in dBm."; |
| 446 | } |
| 447 | leaf power-low-warning-offset { |
| 448 | type floatFormat2d; |
| 449 | default 0; |
| 450 | |
| 451 | description "The switch can generate (warning) notifications should the power go below |
| 452 | the set level. This warning offset is added into power-low-alarm to get the warning threshold. |
| 453 | A zero value means that warnings are disabled. Specified in dBm."; |
| 454 | } |
| 455 | leaf power-alarm-control { |
| 456 | type enumeration { |
| 457 | enum POWER_ALARM_DISABLED; |
| 458 | enum POWER_ALARM_SINGLE; |
| 459 | enum POWER_ALARM_CONTINUOUS; |
| 460 | } |
| 461 | default POWER_ALARM_DISABLED; |
| 462 | |
| 463 | description "Power alarms or notifications from ports can be individually enabled or disabled. |
| 464 | When power-alarm-control is POWER_ALARM_SINGLE then only one alarm is generated, following |
| 465 | which power-alarm-control reverts to POWER_ALARM_DISABLED. |
| 466 | When power-alarm-control is POWER_ALARM_CONTINUOUS then power alarms are always generated |
| 467 | when power levels exceed the defined power alarm thresholds."; |
| 468 | } |
| 469 | leaf power-alarm-status { |
| 470 | config false; |
| 471 | type enumeration { |
| 472 | enum POWER_ALARM_STATUS_OFF; |
| 473 | enum POWER_ALARM_STATUS_ARMED; |
| 474 | enum POWER_ALARM_STATUS_TRIGGERED; |
| 475 | } |
| 476 | |
| 477 | description "POWER_ALARM_STATUS_OFF - Power alarms are not enabled. |
| 478 | POWER_ALARM_STATUS_ARMED - Alarms can be generated. |
| 479 | POWER_ALARM_STATUS_TRIGGERED - Port has an active alarm. When the alarm |
| 480 | clears, power-alarm-status will change to |
| 481 | one of POWER_ALARM_STATUS_OFF or |
| 482 | POWER_ALARM_STATUS_ARMED depending on the |
| 483 | power-alarm-control mode."; |
| 484 | } |
| 485 | leaf power { |
| 486 | config false; |
| 487 | type floatFormat2d; |
| 488 | |
| 489 | description "Power readings for this port. Specified in dBm."; |
| 490 | } |
| 491 | container voa { |
| 492 | |
| 493 | description "Variable Optical Attenuation (VOA) functionality controls the the optical |
| 494 | power level of light on the port. It allows to set the desired attenuation level |
| 495 | that the port should achieve."; |
| 496 | |
| 497 | leaf attenuation-level { |
| 498 | type floatFormat2d; |
| 499 | default 0; |
| 500 | |
| 501 | description "The attenuated output level configured for this port. Specified in dBm |
| 502 | (or dB for RELATIVE as it is an offset value with respect to reference port)."; |
| 503 | } |
| 504 | leaf attenuation-mode { |
| 505 | type enumeration { |
| 506 | enum VOA_ATTEN_MODE_NONE { value 1; } |
| 507 | enum VOA_ATTEN_MODE_ABSOLUTE { value 2; } |
| 508 | enum VOA_ATTEN_MODE_RELATIVE { value 3; } |
| 509 | enum VOA_ATTEN_MODE_VENDOR { value 128; } |
| 510 | } |
| 511 | default VOA_ATTEN_MODE_NONE; |
| 512 | |
| 513 | description " VOA_ATTEN_MODE_NONE: Attenuation on the port is disabled. The light on the |
| 514 | port will have the actual power level. VOA_ATTEN_MODE_ABSOLUTE: Port will achieve the configured |
| 515 | attentuation level and power of the light on the port will have the absolute level configured. |
| 516 | VOA_ATTEN_MODE_RELATIVE: Port will achieve the attentuation with respect to the power of the light |
| 517 | of the reference port. The actual attenuation achieved depends on the configured level and power |
| 518 | of the light of the reference port. VOA_ATTEN_MODE_VENDOR: This is vendor specific mode."; |
| 519 | } |
| 520 | leaf attenuation-reference-port { |
| 521 | type uint32; |
| 522 | default 0; |
| 523 | |
| 524 | description "Reference port for attenuation (for use with relative attenuation only). If this port |
| 525 | is specified as zero then the default reference port will be used. The default port is the ingress |
| 526 | to which the egress port being attenuated is connected. For attenuation states other than RELATIVE |
| 527 | this data is ignored. When reading this object, a value of zero is returned for all modes other |
| 528 | than RELATIVE. For relative attenuation, the value returned is the current reference port in use."; |
| 529 | } |
| 530 | } |
| 531 | } |
| 532 | } |
| 533 | } |
| 534 | |
| 535 | container cross-connects { |
| 536 | list pair { |
| 537 | key ingress; |
| 538 | leaf ingress { |
| 539 | type portFormat; |
| 540 | description "Input port that makes the connection pair."; |
| 541 | } |
| 542 | leaf egress { |
| 543 | type portFormat; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 544 | mandatory true; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 545 | description "Output port that makes the connection pair."; |
| 546 | } |
| 547 | } |
| 548 | description "List of all cross connections in the system."; |
| 549 | } |
| 550 | |
| 551 | grouping network-interface-group { |
| 552 | leaf ip-address { |
| 553 | type inet:ip-address; |
| 554 | description "IP address of the switch control plane."; |
| 555 | } |
| 556 | leaf gateway { |
| 557 | type inet:ip-address; |
| 558 | description "Gateway address for the switch control plane."; |
| 559 | } |
| 560 | leaf subnet { |
| 561 | type inet:ip-address; |
| 562 | description "Subnet to which the switch control plane belongs."; |
| 563 | } |
| 564 | leaf broadcast { |
| 565 | type inet:ip-address; |
| 566 | description "Broadcast IP address for the switch control plane."; |
| 567 | } |
| 568 | } |
| 569 | |
| 570 | container system-config { |
| 571 | list interface-status { |
| 572 | config false; |
| 573 | key name; |
| 574 | |
| 575 | leaf name { |
| 576 | type string; |
| 577 | description "Unique name of the network interface"; |
| 578 | } |
| 579 | uses network-interface-group; |
| 580 | leaf hw-addr { |
| 581 | type yang:mac-address; |
| 582 | } |
| 583 | description "List of Switch network interface and their current running configuration."; |
| 584 | } |
| 585 | list interface { |
| 586 | key name; |
| 587 | unique ip-address; |
| 588 | |
| 589 | leaf name { |
| 590 | type string; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 591 | description "Network interface identifier (eth0 or eth1)"; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 592 | } |
| 593 | uses network-interface-group; |
| 594 | |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 595 | description "List of Switch network interfaces and their configuration. |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 596 | On system restart, switch will start to use this configuration as their running |
| 597 | configuration."; |
| 598 | } |
| 599 | list user { |
| 600 | key name; |
| 601 | leaf name { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 602 | type userNamesFormat; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 603 | description "The user name string identifying this entry."; |
| 604 | } |
| 605 | leaf type { |
| 606 | type enumeration { |
| 607 | enum RADIUS_USER { value 1; } |
| 608 | enum LOCAL_USER { value 2; } |
| 609 | } |
| 610 | mandatory true; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 611 | description "When set to RADIUS_USER, the user will be authenticated against the radius-servers. |
| 612 | When set to LOCAL_USER, the user will be authenticated locally."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 613 | } |
| 614 | leaf password { |
| 615 | when "../type != 'RADIUS_USER'"; |
| 616 | |
| 617 | type namesFormatNullable; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 618 | description "The password for this entry. May not be set to empty, but will report empty."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 619 | } |
| 620 | list authorized-key { |
| 621 | when "../type != 'RADIUS_USER'"; |
| 622 | |
| 623 | key name; |
| 624 | description "A list of public SSH keys for this user. These keys are allowed for SSH |
| 625 | authentication, as described in RFC 4253."; |
| 626 | reference "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol"; |
| 627 | leaf name { |
| 628 | type string; |
| 629 | description "An arbitrary name for the SSH key."; |
| 630 | } |
| 631 | leaf algorithm { |
| 632 | type string; |
| 633 | mandatory true; |
| 634 | description "The public key algorithm name for this SSH key. Valid values are the |
| 635 | values in the IANA 'Secure Shell (SSH) Protocol Parameters' registry, Public Key |
| 636 | Algorithm Names."; |
| 637 | reference "IANA 'Secure Shell (SSH) Protocol Parameters' registry, Public Key |
| 638 | Algorithm Names"; |
| 639 | } |
| 640 | leaf key-data { |
| 641 | type binary; |
| 642 | mandatory true; |
| 643 | description "The binary public key data for this SSH key, as specified by RFC 4253, |
| 644 | Section 6.6, i.e.: string certificate or public key format identifier byte[n] |
| 645 | key/certificate data."; |
| 646 | reference "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol"; |
| 647 | } |
| 648 | } |
| 649 | description "The list of local users configured on this device. This model is adopted from |
| 650 | System Management yang model. (https://tools.ietf.org/html/rfc7317)"; |
| 651 | } |
| 652 | container activity-log |
| 653 | { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 654 | description "Controls the audit log feature, which allows users in the admin group to |
| 655 | monitor user actions. Actions can be monitored in four major areas (log-filter). |
| 656 | Users in the admin group can change the scope of messages seen by users not in |
| 657 | the admin group (log-access)."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 658 | leaf log-filter { |
| 659 | type bits { |
| 660 | bit SYSTEM {position 0;} |
| 661 | bit USER {position 1;} |
| 662 | bit OXC {position 2;} |
| 663 | bit OPM {position 3;} |
| 664 | } |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 665 | description "Defines which activity log messages are sent. |
| 666 | USER - changes to 'user' container and user sessions; |
| 667 | OXC - changes to 'cross-connect' and 'aps' containers, and 'port-set-state' rpc; |
| 668 | OPM - changes to 'opm-config', 'opm-alarm-config' and 'voa' containers; |
| 669 | SYSTEM - changes to 'system-config' container, except 'users'."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 670 | } |
| 671 | leaf log-access { |
| 672 | type enumeration { |
| 673 | enum NONE { value 0; } |
| 674 | enum SELF { value 1; } |
| 675 | enum ALL { value 2; } |
| 676 | } |
| 677 | default NONE; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 678 | description "Defines whether users not in the admin group will receive activity logs, as defined by 'log-filter'. |
| 679 | NONE prevents users seeing activity logs. |
| 680 | SELF allows users to see activity logs for their own actions. |
| 681 | ALL allows users to see activity logs for all users actions. |
| 682 | Users in the admin group always receive all activity logs."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 683 | } |
| 684 | leaf logging-enabled { |
| 685 | type boolean; |
| 686 | default false; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 687 | description "When set to true, activity logs are generated."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 688 | } |
| 689 | } |
| 690 | container radius-servers |
| 691 | { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 692 | description "The list of RADIUS servers; the order of the list determines the priority of usage. |
| 693 | When a RADIUS server is added to this list, users can be authenticated by the RADIUS server."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 694 | list radius-server { |
| 695 | key "ip-address port"; |
| 696 | |
| 697 | leaf ip-address { |
| 698 | type inet:ip-address; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 699 | description "Address of a RADIUS server."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 700 | } |
| 701 | leaf port { |
| 702 | type uint32; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 703 | description "TCP port of the RADIUS server; defaults to 1812."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 704 | } |
| 705 | leaf secret { |
| 706 | type secretFormat; |
| 707 | mandatory true; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 708 | description "The secret used to authenticate with the RADIUS server."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 709 | } |
| 710 | leaf timeout { |
| 711 | type uint32 { |
| 712 | range "1..30"; |
| 713 | } |
| 714 | default 3; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 715 | description "Time in seconds that the system waits before trying the next RADIUS server in the list."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 716 | } |
| 717 | } |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 718 | } |
| 719 | container ntp-servers |
| 720 | { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 721 | description "The list of NTP servers checked for time synchronization."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 722 | list ntp-server { |
| 723 | key ip-address; |
| 724 | |
| 725 | leaf ip-address { |
| 726 | type inet:ip-address; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 727 | description "Address of a NTP server to use"; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 728 | } |
| 729 | leaf minpoll { |
| 730 | type uint32 { |
| 731 | range "4..6"; |
| 732 | } |
| 733 | default 6; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 734 | description "The minimum polling period. (4=16s, 5=32s, 6=64s)"; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 735 | } |
| 736 | leaf maxpoll { |
| 737 | type uint32 { |
| 738 | range "10..17"; |
| 739 | } |
| 740 | default 10; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 741 | description "The maximum polling period. (10=1024s, 11=2048s ... 17=131072s)"; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 742 | } |
| 743 | leaf version { |
| 744 | type uint32 { |
| 745 | range "1..4"; |
| 746 | } |
| 747 | default 4; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 748 | description "The protocol version of the NTP server."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 749 | } |
| 750 | } |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 751 | } |
| 752 | container remote-syslog |
| 753 | { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 754 | description "The system supports reporting notifications to a remote server |
| 755 | using the syslog protocol, according to RFC 3164. This feature is enabled |
| 756 | by configuring 'rname'."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 757 | leaf rname { |
| 758 | type inet:ipv4-address; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 759 | description "IP Address of remote collector. When configured the feature is enabled."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 760 | } |
| 761 | leaf rport { |
| 762 | type inet:port-number; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 763 | description "UDP port of the remote server. Default port is 514."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 764 | } |
| 765 | leaf facility { |
| 766 | type enumeration { |
| 767 | enum USER { value 8; } |
| 768 | enum LOCAL0 { value 128; } |
| 769 | enum LOCAL1 { value 136; } |
| 770 | enum LOCAL2 { value 144; } |
| 771 | enum LOCAL3 { value 152; } |
| 772 | enum LOCAL4 { value 160; } |
| 773 | enum LOCAL5 { value 168; } |
| 774 | enum LOCAL6 { value 176; } |
| 775 | enum LOCAL7 { value 184; } |
| 776 | } |
| 777 | default USER; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 778 | description "The facility to send messages under. Used at the collector to categorize the messages for storage or forwarding."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 779 | } |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 780 | must "(boolean(rname) = true()) or (boolean(rport) = false())" { error-message "Cannot have port without name"; } |
| 781 | } |
| 782 | container openflow |
| 783 | { |
| 784 | leaf host { |
| 785 | type inet:ipv4-address; |
| 786 | description "IPv4 address of openflow. Use 0.0.0.0 to disable sending. This field will change to inet:host type."; |
| 787 | } |
| 788 | leaf port { |
| 789 | type inet:port-number; |
| 790 | description "Port of openflow. Delete to remove the port."; |
| 791 | } |
| 792 | // must "(boolean(host) = true() and string(host) != '0.0.0.0') or (boolean(port) = false() or port = 0)" { error-message "Cannot have port without a host"; } |
| 793 | description "The connection for openflow. Errors if openflow not supported."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 794 | } |
| 795 | container protocols |
| 796 | { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 797 | description "Defines which protocol interfaces are enabled |
| 798 | or disabled based on the 'enabled' leaf. Changes are applied at the next NIC reboot. |
| 799 | Only one interface for RS232 or USB can be enabled at a time. |
| 800 | A protocol interface may not disable itself."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 801 | list protocol { |
| 802 | key protocol-id; |
| 803 | |
| 804 | leaf protocol-id { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 805 | type uint32; // TODO: change to enum. |
| 806 | description "Defines the protocol internally, and is consistent between switches and releases."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 807 | } |
| 808 | leaf protocol-name { |
| 809 | config false; |
| 810 | type string; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 811 | description "Human readable name of the interface protocol."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 812 | } |
| 813 | leaf protocol-type { |
| 814 | config false; |
| 815 | type string; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 816 | description "Human readable description of the physical interface."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 817 | } |
| 818 | leaf protocol-port { |
| 819 | config false; |
| 820 | type uint32; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 821 | description "TCP or UDP port number, if needed."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 822 | } |
| 823 | leaf enabled { |
| 824 | type boolean; |
| 825 | default true; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 826 | description "When true, this interface will respond to commands."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 827 | } |
| 828 | } |
| 829 | } |
| 830 | |
| 831 | leaf current-datetime { |
| 832 | config false; |
| 833 | type yang:date-and-time; |
| 834 | |
| 835 | description "The current system date and time."; |
| 836 | } |
| 837 | leaf boot-datetime { |
| 838 | config false; |
| 839 | type yang:date-and-time; |
| 840 | |
| 841 | description "The system date and time when the system last restarted."; |
| 842 | } |
| 843 | |
| 844 | leaf alarm-clear-hysteresis { |
| 845 | type decimal64 { |
| 846 | fraction-digits 2; |
| 847 | range "1..5"; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 848 | } |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 849 | |
| 850 | default 1; |
| 851 | |
| 852 | description "Added to 'power-low-alarm' and subtracted from 'power-high-alarm' |
| 853 | to generate alarm clear notifications. Specified in dBm."; |
| 854 | } |
| 855 | |
| 856 | } |
| 857 | |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 858 | |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 859 | // APS config and status |
| 860 | container aps |
| 861 | { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 862 | description "Automatic Protection Switching (APS) provides optical redundancy on the Polatis switch. |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 863 | When the switch detects signal failure on the primary optical path, it automatically switches to an alternative |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 864 | optical path. The switch also provides manual operations to change the optical paths. |
| 865 | APS consists of list of protection services, where each service is a list of working and protection ports."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 866 | list protection-service |
| 867 | { |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 868 | key sname; |
| 869 | leaf sname { |
| 870 | type namesFormat; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 871 | description "Protection Service name."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 872 | } |
| 873 | leaf active |
| 874 | { |
| 875 | config false; |
| 876 | type boolean; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 877 | description "When the Protection Service is active, protection switching will |
| 878 | occur automatically and the 'aps-command' rpc may be used. |
| 879 | Changes to the protection service may only be made when not active (configuring). |
| 880 | Use the 'aps-activate' rpc to change between active and configuring."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 881 | } |
| 882 | list working-port |
| 883 | { |
| 884 | key port-id; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 885 | leaf port-id |
| 886 | { |
| 887 | type portFormat; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 888 | description "ID for the port that carries the payload under normal conditions, and which is protected by APS."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 889 | } |
| 890 | leaf client |
| 891 | { |
| 892 | type uint32; |
| 893 | mandatory true; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 894 | description "ID for the port to which the working or protection port is connected while the service is active."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 895 | } |
| 896 | leaf priority |
| 897 | { |
| 898 | type uint32; |
| 899 | default 0; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 900 | description "Defines an order in which protection is applied to multiple working ports. |
| 901 | When multiple signals have failed, the first available protection port will |
| 902 | be assigned to the failed port with the lowest value for this leaf."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 903 | } |
| 904 | leaf wtr-timeout |
| 905 | { |
| 906 | type uint32; |
| 907 | default 0; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 908 | description "Wait To Restore timeout value. The delay in seconds from the detection |
| 909 | of a valid signal on the working port to switching the client back from protection."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 910 | } |
| 911 | leaf ovs |
| 912 | { |
| 913 | type boolean; |
| 914 | default false; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 915 | description "Override Valid Signal. Set to true to create 1+1 protection service. |
| 916 | When false, switching occurs only when a valid signal is detected on the protection port."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 917 | } |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 918 | leaf protecting-port |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 919 | { |
| 920 | config false; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 921 | type uint32; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 922 | description "ID for the port which is currently protecting the working port. Zero if not protected."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 923 | } |
| 924 | leaf operational-state |
| 925 | { |
| 926 | config false; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 927 | type apsOperationalState; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 928 | description "The current operational state of the protected signal."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 929 | } |
| 930 | leaf user_command |
| 931 | { |
| 932 | config false; |
| 933 | type apsFlags; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 934 | description "APS flags applied to this port."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 935 | } |
| 936 | } |
| 937 | leaf-list protection-port |
| 938 | { |
| 939 | type uint32; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 940 | description "List of IDs for ports to which the client may switch on signal failure |
| 941 | or in response to a user command."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 942 | } |
| 943 | } |
| 944 | } |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 945 | container subswitches { |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 946 | description "The switch can be partitioned into virtual switches. Each has a set of users and ports. |
| 947 | Only those users may configure or cross connect those ports."; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 948 | list subswitch { |
| 949 | key "sname"; |
| 950 | leaf sname { |
| 951 | type string; |
| 952 | description "The sub-switch name"; |
| 953 | } |
| 954 | leaf-list username { |
| 955 | type string; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 956 | description "List of users with permission to control the sub-switch"; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 957 | } |
| 958 | leaf-list port-id { |
| 959 | type uint32; |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 960 | description "List of IDs for ports in the sub-switch"; |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 961 | } |
| 962 | } |
| 963 | } |
Laszlo Papp | bd0779f | 2018-03-28 18:08:51 +0100 | [diff] [blame] | 964 | container groups { |
| 965 | description "Ports can be grouped as a signal entity to perform one-shot configurations. |
| 966 | Two groups are connected if the ports in both groups are connected in the order defined by the user."; |
| 967 | list group { |
| 968 | key group-name; |
| 969 | leaf group-name { |
| 970 | type groupNamesFormat; |
| 971 | } |
| 972 | leaf-list ingress { |
| 973 | type portFormat; |
| 974 | ordered-by user; |
| 975 | description "The ordered list of IDs for input or reconfigurable ports."; |
| 976 | } |
| 977 | leaf-list egress { |
| 978 | type portFormat; |
| 979 | ordered-by user; |
| 980 | description "The ordered list of IDs for output ports."; |
| 981 | } |
| 982 | leaf connected-group { |
| 983 | type groupNamesFormat; |
| 984 | config false; |
| 985 | description "The name of the connected group or empty if the group is not connected"; |
| 986 | } |
| 987 | } |
| 988 | } |
| 989 | rpc set-current-datetime { |
| 990 | description "Set the /system-config/current-datetime leaf to the specified value. |
| 991 | Also changes /system-config/boot-datetime, relative to current-datetime"; |
| 992 | input { |
| 993 | leaf current-datetime { |
| 994 | type yang:date-and-time; |
| 995 | mandatory true; |
| 996 | description "The current system date and time."; |
| 997 | } |
| 998 | } |
| 999 | } |
| 1000 | rpc system-restart { |
| 1001 | description "Request to reboot the Network Interface Card (NIC)."; |
| 1002 | input { |
| 1003 | leaf seconds { |
| 1004 | type uint32; |
| 1005 | default 0; |
| 1006 | |
| 1007 | description "Reboots the interface card after the specified delay in seconds. |
| 1008 | Value of 0 will reboot immediately, and in that case there won't be any response"; |
| 1009 | } |
| 1010 | } |
| 1011 | } |
| 1012 | rpc system-restart-cancel { |
| 1013 | description "Request to cancel the reboot. This has no effect when 'system-restart' was not requested."; |
| 1014 | } |
| 1015 | // APS rpcs and notification |
| 1016 | rpc aps-command { |
| 1017 | description "Applies an APS command to a service, or one or more working ports."; |
| 1018 | input { |
| 1019 | leaf mask { |
| 1020 | type apsFlags; |
| 1021 | mandatory true; |
| 1022 | description "A list of APS flags to be set or cleared. APS flags in this leaf but not in the 'flags' leaf will be cleared."; |
| 1023 | } |
| 1024 | leaf flags { |
| 1025 | type apsFlags; |
| 1026 | mandatory true; |
| 1027 | description "A list of APS flags that will be set on execution of the command. This field should only contain APS flags from the 'mask' leaf."; |
| 1028 | } |
| 1029 | choice parameter |
| 1030 | { |
| 1031 | description "When 'sname' is specified the command applies to all the working ports in the service. Otherwise, the command is applied to the listed ports."; |
| 1032 | mandatory true; |
| 1033 | leaf sname |
| 1034 | { |
| 1035 | type namesFormat; |
| 1036 | } |
| 1037 | list port |
| 1038 | { |
| 1039 | key port-id; |
| 1040 | leaf port-id { |
| 1041 | type portFormat; |
| 1042 | } |
| 1043 | leaf target-port-id |
| 1044 | { |
| 1045 | type uint32; |
| 1046 | default 0; |
| 1047 | description "Used with FTP and MTP, when the user chooses the port |
| 1048 | that should be protecting the working port. Ignored otherwise."; |
| 1049 | } |
| 1050 | } |
| 1051 | } |
| 1052 | } |
| 1053 | } |
| 1054 | rpc aps-activate { |
| 1055 | input { |
| 1056 | leaf sname { |
| 1057 | type namesFormat; |
| 1058 | } |
| 1059 | leaf active { |
| 1060 | type boolean; |
| 1061 | mandatory true; |
| 1062 | } |
| 1063 | } |
| 1064 | description "Used to set a protection service to active or configuring."; |
| 1065 | } |
| 1066 | rpc radius-server-set-position { |
| 1067 | description "Changes the precedence of RADIUS servers. 'ip-address' and 'port' form the key for the list."; |
| 1068 | input { |
| 1069 | leaf ip-address { |
| 1070 | type inet:ip-address; |
| 1071 | mandatory true; |
| 1072 | description "IP address of the RADIUS server."; |
| 1073 | } |
| 1074 | leaf port { |
| 1075 | type portFormat; |
| 1076 | mandatory true; |
| 1077 | description "Port of the RADIUS server."; |
| 1078 | } |
| 1079 | leaf position { |
| 1080 | type int32 { |
| 1081 | range "1..5"; |
| 1082 | } |
| 1083 | mandatory true; |
| 1084 | description "Target precedence. Value 1 has the highest precedence."; |
| 1085 | } |
| 1086 | } |
| 1087 | } |
| 1088 | notification aps-notification { |
| 1089 | leaf notification-details { |
| 1090 | type string; |
| 1091 | description "Message indicating which APS service or ports are affected."; |
| 1092 | } |
| 1093 | description "This is the notification which is sent when APS switching happens."; |
| 1094 | } |
Laszlo Papp | 8b3a5f6 | 2017-10-05 13:32:00 +0100 | [diff] [blame] | 1095 | } |
| 1096 | |