Andrea Campanella | 8ec8484 | 2017-09-13 12:36:19 +0200 | [diff] [blame] | 1 | # |
| 2 | # Autogenerated by Thrift Compiler (0.10.0) |
| 3 | # |
| 4 | # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
| 5 | # |
| 6 | # options string: py |
| 7 | # |
| 8 | |
| 9 | from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException |
| 10 | from thrift.protocol.TProtocol import TProtocolException |
| 11 | import sys |
| 12 | import logging |
| 13 | from .ttypes import * |
| 14 | from thrift.Thrift import TProcessor |
| 15 | from thrift.transport import TTransport |
| 16 | |
| 17 | |
| 18 | class Iface(object): |
| 19 | def pltfm_pm_port_add(self, device, dev_port, ps, fec): |
| 20 | """ |
| 21 | Parameters: |
| 22 | - device |
| 23 | - dev_port |
| 24 | - ps |
| 25 | - fec |
| 26 | """ |
| 27 | pass |
| 28 | |
| 29 | def pltfm_pm_port_del(self, device, dev_port): |
| 30 | """ |
| 31 | Parameters: |
| 32 | - device |
| 33 | - dev_port |
| 34 | """ |
| 35 | pass |
| 36 | |
| 37 | def pltfm_pm_port_enable(self, device, dev_port): |
| 38 | """ |
| 39 | Parameters: |
| 40 | - device |
| 41 | - dev_port |
| 42 | """ |
| 43 | pass |
| 44 | |
| 45 | def pltfm_pm_port_dis(self, device, dev_port): |
| 46 | """ |
| 47 | Parameters: |
| 48 | - device |
| 49 | - dev_port |
| 50 | """ |
| 51 | pass |
| 52 | |
| 53 | def pltfm_pm_switchd_port_cleanup(self, device): |
| 54 | """ |
| 55 | Parameters: |
| 56 | - device |
| 57 | """ |
| 58 | pass |
| 59 | |
| 60 | def pltfm_pm_port_oper_status_get(self, device, dev_port): |
| 61 | """ |
| 62 | Parameters: |
| 63 | - device |
| 64 | - dev_port |
| 65 | """ |
| 66 | pass |
| 67 | |
| 68 | def pltfm_pm_board_type_get(self): |
| 69 | pass |
| 70 | |
| 71 | def pltfm_pm_port_an_set(self, device, dev_port, an_flag): |
| 72 | """ |
| 73 | Parameters: |
| 74 | - device |
| 75 | - dev_port |
| 76 | - an_flag |
| 77 | """ |
| 78 | pass |
| 79 | |
| 80 | def pltfm_pm_serdes_lane_map_set(self, device): |
| 81 | """ |
| 82 | Parameters: |
| 83 | - device |
| 84 | """ |
| 85 | pass |
| 86 | |
| 87 | def pltfm_pm_serdes_init(self, device): |
| 88 | """ |
| 89 | Parameters: |
| 90 | - device |
| 91 | """ |
| 92 | pass |
| 93 | |
| 94 | |
| 95 | class Client(Iface): |
| 96 | def __init__(self, iprot, oprot=None): |
| 97 | self._iprot = self._oprot = iprot |
| 98 | if oprot is not None: |
| 99 | self._oprot = oprot |
| 100 | self._seqid = 0 |
| 101 | |
| 102 | def pltfm_pm_port_add(self, device, dev_port, ps, fec): |
| 103 | """ |
| 104 | Parameters: |
| 105 | - device |
| 106 | - dev_port |
| 107 | - ps |
| 108 | - fec |
| 109 | """ |
| 110 | self.send_pltfm_pm_port_add(device, dev_port, ps, fec) |
| 111 | return self.recv_pltfm_pm_port_add() |
| 112 | |
| 113 | def send_pltfm_pm_port_add(self, device, dev_port, ps, fec): |
| 114 | self._oprot.writeMessageBegin('pltfm_pm_port_add', TMessageType.CALL, self._seqid) |
| 115 | args = pltfm_pm_port_add_args() |
| 116 | args.device = device |
| 117 | args.dev_port = dev_port |
| 118 | args.ps = ps |
| 119 | args.fec = fec |
| 120 | args.write(self._oprot) |
| 121 | self._oprot.writeMessageEnd() |
| 122 | self._oprot.trans.flush() |
| 123 | |
| 124 | def recv_pltfm_pm_port_add(self): |
| 125 | iprot = self._iprot |
| 126 | (fname, mtype, rseqid) = iprot.readMessageBegin() |
| 127 | if mtype == TMessageType.EXCEPTION: |
| 128 | x = TApplicationException() |
| 129 | x.read(iprot) |
| 130 | iprot.readMessageEnd() |
| 131 | raise x |
| 132 | result = pltfm_pm_port_add_result() |
| 133 | result.read(iprot) |
| 134 | iprot.readMessageEnd() |
| 135 | if result.success is not None: |
| 136 | return result.success |
| 137 | if result.ouch is not None: |
| 138 | raise result.ouch |
| 139 | raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_pm_port_add failed: unknown result") |
| 140 | |
| 141 | def pltfm_pm_port_del(self, device, dev_port): |
| 142 | """ |
| 143 | Parameters: |
| 144 | - device |
| 145 | - dev_port |
| 146 | """ |
| 147 | self.send_pltfm_pm_port_del(device, dev_port) |
| 148 | return self.recv_pltfm_pm_port_del() |
| 149 | |
| 150 | def send_pltfm_pm_port_del(self, device, dev_port): |
| 151 | self._oprot.writeMessageBegin('pltfm_pm_port_del', TMessageType.CALL, self._seqid) |
| 152 | args = pltfm_pm_port_del_args() |
| 153 | args.device = device |
| 154 | args.dev_port = dev_port |
| 155 | args.write(self._oprot) |
| 156 | self._oprot.writeMessageEnd() |
| 157 | self._oprot.trans.flush() |
| 158 | |
| 159 | def recv_pltfm_pm_port_del(self): |
| 160 | iprot = self._iprot |
| 161 | (fname, mtype, rseqid) = iprot.readMessageBegin() |
| 162 | if mtype == TMessageType.EXCEPTION: |
| 163 | x = TApplicationException() |
| 164 | x.read(iprot) |
| 165 | iprot.readMessageEnd() |
| 166 | raise x |
| 167 | result = pltfm_pm_port_del_result() |
| 168 | result.read(iprot) |
| 169 | iprot.readMessageEnd() |
| 170 | if result.success is not None: |
| 171 | return result.success |
| 172 | if result.ouch is not None: |
| 173 | raise result.ouch |
| 174 | raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_pm_port_del failed: unknown result") |
| 175 | |
| 176 | def pltfm_pm_port_enable(self, device, dev_port): |
| 177 | """ |
| 178 | Parameters: |
| 179 | - device |
| 180 | - dev_port |
| 181 | """ |
| 182 | self.send_pltfm_pm_port_enable(device, dev_port) |
| 183 | return self.recv_pltfm_pm_port_enable() |
| 184 | |
| 185 | def send_pltfm_pm_port_enable(self, device, dev_port): |
| 186 | self._oprot.writeMessageBegin('pltfm_pm_port_enable', TMessageType.CALL, self._seqid) |
| 187 | args = pltfm_pm_port_enable_args() |
| 188 | args.device = device |
| 189 | args.dev_port = dev_port |
| 190 | args.write(self._oprot) |
| 191 | self._oprot.writeMessageEnd() |
| 192 | self._oprot.trans.flush() |
| 193 | |
| 194 | def recv_pltfm_pm_port_enable(self): |
| 195 | iprot = self._iprot |
| 196 | (fname, mtype, rseqid) = iprot.readMessageBegin() |
| 197 | if mtype == TMessageType.EXCEPTION: |
| 198 | x = TApplicationException() |
| 199 | x.read(iprot) |
| 200 | iprot.readMessageEnd() |
| 201 | raise x |
| 202 | result = pltfm_pm_port_enable_result() |
| 203 | result.read(iprot) |
| 204 | iprot.readMessageEnd() |
| 205 | if result.success is not None: |
| 206 | return result.success |
| 207 | if result.ouch is not None: |
| 208 | raise result.ouch |
| 209 | raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_pm_port_enable failed: unknown result") |
| 210 | |
| 211 | def pltfm_pm_port_dis(self, device, dev_port): |
| 212 | """ |
| 213 | Parameters: |
| 214 | - device |
| 215 | - dev_port |
| 216 | """ |
| 217 | self.send_pltfm_pm_port_dis(device, dev_port) |
| 218 | return self.recv_pltfm_pm_port_dis() |
| 219 | |
| 220 | def send_pltfm_pm_port_dis(self, device, dev_port): |
| 221 | self._oprot.writeMessageBegin('pltfm_pm_port_dis', TMessageType.CALL, self._seqid) |
| 222 | args = pltfm_pm_port_dis_args() |
| 223 | args.device = device |
| 224 | args.dev_port = dev_port |
| 225 | args.write(self._oprot) |
| 226 | self._oprot.writeMessageEnd() |
| 227 | self._oprot.trans.flush() |
| 228 | |
| 229 | def recv_pltfm_pm_port_dis(self): |
| 230 | iprot = self._iprot |
| 231 | (fname, mtype, rseqid) = iprot.readMessageBegin() |
| 232 | if mtype == TMessageType.EXCEPTION: |
| 233 | x = TApplicationException() |
| 234 | x.read(iprot) |
| 235 | iprot.readMessageEnd() |
| 236 | raise x |
| 237 | result = pltfm_pm_port_dis_result() |
| 238 | result.read(iprot) |
| 239 | iprot.readMessageEnd() |
| 240 | if result.success is not None: |
| 241 | return result.success |
| 242 | if result.ouch is not None: |
| 243 | raise result.ouch |
| 244 | raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_pm_port_dis failed: unknown result") |
| 245 | |
| 246 | def pltfm_pm_switchd_port_cleanup(self, device): |
| 247 | """ |
| 248 | Parameters: |
| 249 | - device |
| 250 | """ |
| 251 | self.send_pltfm_pm_switchd_port_cleanup(device) |
| 252 | return self.recv_pltfm_pm_switchd_port_cleanup() |
| 253 | |
| 254 | def send_pltfm_pm_switchd_port_cleanup(self, device): |
| 255 | self._oprot.writeMessageBegin('pltfm_pm_switchd_port_cleanup', TMessageType.CALL, self._seqid) |
| 256 | args = pltfm_pm_switchd_port_cleanup_args() |
| 257 | args.device = device |
| 258 | args.write(self._oprot) |
| 259 | self._oprot.writeMessageEnd() |
| 260 | self._oprot.trans.flush() |
| 261 | |
| 262 | def recv_pltfm_pm_switchd_port_cleanup(self): |
| 263 | iprot = self._iprot |
| 264 | (fname, mtype, rseqid) = iprot.readMessageBegin() |
| 265 | if mtype == TMessageType.EXCEPTION: |
| 266 | x = TApplicationException() |
| 267 | x.read(iprot) |
| 268 | iprot.readMessageEnd() |
| 269 | raise x |
| 270 | result = pltfm_pm_switchd_port_cleanup_result() |
| 271 | result.read(iprot) |
| 272 | iprot.readMessageEnd() |
| 273 | if result.success is not None: |
| 274 | return result.success |
| 275 | if result.ouch is not None: |
| 276 | raise result.ouch |
| 277 | raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_pm_switchd_port_cleanup failed: unknown result") |
| 278 | |
| 279 | def pltfm_pm_port_oper_status_get(self, device, dev_port): |
| 280 | """ |
| 281 | Parameters: |
| 282 | - device |
| 283 | - dev_port |
| 284 | """ |
| 285 | self.send_pltfm_pm_port_oper_status_get(device, dev_port) |
| 286 | return self.recv_pltfm_pm_port_oper_status_get() |
| 287 | |
| 288 | def send_pltfm_pm_port_oper_status_get(self, device, dev_port): |
| 289 | self._oprot.writeMessageBegin('pltfm_pm_port_oper_status_get', TMessageType.CALL, self._seqid) |
| 290 | args = pltfm_pm_port_oper_status_get_args() |
| 291 | args.device = device |
| 292 | args.dev_port = dev_port |
| 293 | args.write(self._oprot) |
| 294 | self._oprot.writeMessageEnd() |
| 295 | self._oprot.trans.flush() |
| 296 | |
| 297 | def recv_pltfm_pm_port_oper_status_get(self): |
| 298 | iprot = self._iprot |
| 299 | (fname, mtype, rseqid) = iprot.readMessageBegin() |
| 300 | if mtype == TMessageType.EXCEPTION: |
| 301 | x = TApplicationException() |
| 302 | x.read(iprot) |
| 303 | iprot.readMessageEnd() |
| 304 | raise x |
| 305 | result = pltfm_pm_port_oper_status_get_result() |
| 306 | result.read(iprot) |
| 307 | iprot.readMessageEnd() |
| 308 | if result.success is not None: |
| 309 | return result.success |
| 310 | if result.ouch is not None: |
| 311 | raise result.ouch |
| 312 | raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_pm_port_oper_status_get failed: unknown result") |
| 313 | |
| 314 | def pltfm_pm_board_type_get(self): |
| 315 | self.send_pltfm_pm_board_type_get() |
| 316 | return self.recv_pltfm_pm_board_type_get() |
| 317 | |
| 318 | def send_pltfm_pm_board_type_get(self): |
| 319 | self._oprot.writeMessageBegin('pltfm_pm_board_type_get', TMessageType.CALL, self._seqid) |
| 320 | args = pltfm_pm_board_type_get_args() |
| 321 | args.write(self._oprot) |
| 322 | self._oprot.writeMessageEnd() |
| 323 | self._oprot.trans.flush() |
| 324 | |
| 325 | def recv_pltfm_pm_board_type_get(self): |
| 326 | iprot = self._iprot |
| 327 | (fname, mtype, rseqid) = iprot.readMessageBegin() |
| 328 | if mtype == TMessageType.EXCEPTION: |
| 329 | x = TApplicationException() |
| 330 | x.read(iprot) |
| 331 | iprot.readMessageEnd() |
| 332 | raise x |
| 333 | result = pltfm_pm_board_type_get_result() |
| 334 | result.read(iprot) |
| 335 | iprot.readMessageEnd() |
| 336 | if result.success is not None: |
| 337 | return result.success |
| 338 | if result.ouch is not None: |
| 339 | raise result.ouch |
| 340 | raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_pm_board_type_get failed: unknown result") |
| 341 | |
| 342 | def pltfm_pm_port_an_set(self, device, dev_port, an_flag): |
| 343 | """ |
| 344 | Parameters: |
| 345 | - device |
| 346 | - dev_port |
| 347 | - an_flag |
| 348 | """ |
| 349 | self.send_pltfm_pm_port_an_set(device, dev_port, an_flag) |
| 350 | return self.recv_pltfm_pm_port_an_set() |
| 351 | |
| 352 | def send_pltfm_pm_port_an_set(self, device, dev_port, an_flag): |
| 353 | self._oprot.writeMessageBegin('pltfm_pm_port_an_set', TMessageType.CALL, self._seqid) |
| 354 | args = pltfm_pm_port_an_set_args() |
| 355 | args.device = device |
| 356 | args.dev_port = dev_port |
| 357 | args.an_flag = an_flag |
| 358 | args.write(self._oprot) |
| 359 | self._oprot.writeMessageEnd() |
| 360 | self._oprot.trans.flush() |
| 361 | |
| 362 | def recv_pltfm_pm_port_an_set(self): |
| 363 | iprot = self._iprot |
| 364 | (fname, mtype, rseqid) = iprot.readMessageBegin() |
| 365 | if mtype == TMessageType.EXCEPTION: |
| 366 | x = TApplicationException() |
| 367 | x.read(iprot) |
| 368 | iprot.readMessageEnd() |
| 369 | raise x |
| 370 | result = pltfm_pm_port_an_set_result() |
| 371 | result.read(iprot) |
| 372 | iprot.readMessageEnd() |
| 373 | if result.success is not None: |
| 374 | return result.success |
| 375 | if result.ouch is not None: |
| 376 | raise result.ouch |
| 377 | raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_pm_port_an_set failed: unknown result") |
| 378 | |
| 379 | def pltfm_pm_serdes_lane_map_set(self, device): |
| 380 | """ |
| 381 | Parameters: |
| 382 | - device |
| 383 | """ |
| 384 | self.send_pltfm_pm_serdes_lane_map_set(device) |
| 385 | return self.recv_pltfm_pm_serdes_lane_map_set() |
| 386 | |
| 387 | def send_pltfm_pm_serdes_lane_map_set(self, device): |
| 388 | self._oprot.writeMessageBegin('pltfm_pm_serdes_lane_map_set', TMessageType.CALL, self._seqid) |
| 389 | args = pltfm_pm_serdes_lane_map_set_args() |
| 390 | args.device = device |
| 391 | args.write(self._oprot) |
| 392 | self._oprot.writeMessageEnd() |
| 393 | self._oprot.trans.flush() |
| 394 | |
| 395 | def recv_pltfm_pm_serdes_lane_map_set(self): |
| 396 | iprot = self._iprot |
| 397 | (fname, mtype, rseqid) = iprot.readMessageBegin() |
| 398 | if mtype == TMessageType.EXCEPTION: |
| 399 | x = TApplicationException() |
| 400 | x.read(iprot) |
| 401 | iprot.readMessageEnd() |
| 402 | raise x |
| 403 | result = pltfm_pm_serdes_lane_map_set_result() |
| 404 | result.read(iprot) |
| 405 | iprot.readMessageEnd() |
| 406 | if result.success is not None: |
| 407 | return result.success |
| 408 | if result.ouch is not None: |
| 409 | raise result.ouch |
| 410 | raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_pm_serdes_lane_map_set failed: unknown result") |
| 411 | |
| 412 | def pltfm_pm_serdes_init(self, device): |
| 413 | """ |
| 414 | Parameters: |
| 415 | - device |
| 416 | """ |
| 417 | self.send_pltfm_pm_serdes_init(device) |
| 418 | return self.recv_pltfm_pm_serdes_init() |
| 419 | |
| 420 | def send_pltfm_pm_serdes_init(self, device): |
| 421 | self._oprot.writeMessageBegin('pltfm_pm_serdes_init', TMessageType.CALL, self._seqid) |
| 422 | args = pltfm_pm_serdes_init_args() |
| 423 | args.device = device |
| 424 | args.write(self._oprot) |
| 425 | self._oprot.writeMessageEnd() |
| 426 | self._oprot.trans.flush() |
| 427 | |
| 428 | def recv_pltfm_pm_serdes_init(self): |
| 429 | iprot = self._iprot |
| 430 | (fname, mtype, rseqid) = iprot.readMessageBegin() |
| 431 | if mtype == TMessageType.EXCEPTION: |
| 432 | x = TApplicationException() |
| 433 | x.read(iprot) |
| 434 | iprot.readMessageEnd() |
| 435 | raise x |
| 436 | result = pltfm_pm_serdes_init_result() |
| 437 | result.read(iprot) |
| 438 | iprot.readMessageEnd() |
| 439 | if result.success is not None: |
| 440 | return result.success |
| 441 | if result.ouch is not None: |
| 442 | raise result.ouch |
| 443 | raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_pm_serdes_init failed: unknown result") |
| 444 | |
| 445 | |
| 446 | class Processor(Iface, TProcessor): |
| 447 | def __init__(self, handler): |
| 448 | self._handler = handler |
| 449 | self._processMap = {} |
| 450 | self._processMap["pltfm_pm_port_add"] = Processor.process_pltfm_pm_port_add |
| 451 | self._processMap["pltfm_pm_port_del"] = Processor.process_pltfm_pm_port_del |
| 452 | self._processMap["pltfm_pm_port_enable"] = Processor.process_pltfm_pm_port_enable |
| 453 | self._processMap["pltfm_pm_port_dis"] = Processor.process_pltfm_pm_port_dis |
| 454 | self._processMap["pltfm_pm_switchd_port_cleanup"] = Processor.process_pltfm_pm_switchd_port_cleanup |
| 455 | self._processMap["pltfm_pm_port_oper_status_get"] = Processor.process_pltfm_pm_port_oper_status_get |
| 456 | self._processMap["pltfm_pm_board_type_get"] = Processor.process_pltfm_pm_board_type_get |
| 457 | self._processMap["pltfm_pm_port_an_set"] = Processor.process_pltfm_pm_port_an_set |
| 458 | self._processMap["pltfm_pm_serdes_lane_map_set"] = Processor.process_pltfm_pm_serdes_lane_map_set |
| 459 | self._processMap["pltfm_pm_serdes_init"] = Processor.process_pltfm_pm_serdes_init |
| 460 | |
| 461 | def process(self, iprot, oprot): |
| 462 | (name, type, seqid) = iprot.readMessageBegin() |
| 463 | if name not in self._processMap: |
| 464 | iprot.skip(TType.STRUCT) |
| 465 | iprot.readMessageEnd() |
| 466 | x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) |
| 467 | oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) |
| 468 | x.write(oprot) |
| 469 | oprot.writeMessageEnd() |
| 470 | oprot.trans.flush() |
| 471 | return |
| 472 | else: |
| 473 | self._processMap[name](self, seqid, iprot, oprot) |
| 474 | return True |
| 475 | |
| 476 | def process_pltfm_pm_port_add(self, seqid, iprot, oprot): |
| 477 | args = pltfm_pm_port_add_args() |
| 478 | args.read(iprot) |
| 479 | iprot.readMessageEnd() |
| 480 | result = pltfm_pm_port_add_result() |
| 481 | try: |
| 482 | result.success = self._handler.pltfm_pm_port_add(args.device, args.dev_port, args.ps, args.fec) |
| 483 | msg_type = TMessageType.REPLY |
| 484 | except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| 485 | raise |
| 486 | except InvalidPltfmPmOperation as ouch: |
| 487 | msg_type = TMessageType.REPLY |
| 488 | result.ouch = ouch |
| 489 | except Exception as ex: |
| 490 | msg_type = TMessageType.EXCEPTION |
| 491 | logging.exception(ex) |
| 492 | result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| 493 | oprot.writeMessageBegin("pltfm_pm_port_add", msg_type, seqid) |
| 494 | result.write(oprot) |
| 495 | oprot.writeMessageEnd() |
| 496 | oprot.trans.flush() |
| 497 | |
| 498 | def process_pltfm_pm_port_del(self, seqid, iprot, oprot): |
| 499 | args = pltfm_pm_port_del_args() |
| 500 | args.read(iprot) |
| 501 | iprot.readMessageEnd() |
| 502 | result = pltfm_pm_port_del_result() |
| 503 | try: |
| 504 | result.success = self._handler.pltfm_pm_port_del(args.device, args.dev_port) |
| 505 | msg_type = TMessageType.REPLY |
| 506 | except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| 507 | raise |
| 508 | except InvalidPltfmPmOperation as ouch: |
| 509 | msg_type = TMessageType.REPLY |
| 510 | result.ouch = ouch |
| 511 | except Exception as ex: |
| 512 | msg_type = TMessageType.EXCEPTION |
| 513 | logging.exception(ex) |
| 514 | result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| 515 | oprot.writeMessageBegin("pltfm_pm_port_del", msg_type, seqid) |
| 516 | result.write(oprot) |
| 517 | oprot.writeMessageEnd() |
| 518 | oprot.trans.flush() |
| 519 | |
| 520 | def process_pltfm_pm_port_enable(self, seqid, iprot, oprot): |
| 521 | args = pltfm_pm_port_enable_args() |
| 522 | args.read(iprot) |
| 523 | iprot.readMessageEnd() |
| 524 | result = pltfm_pm_port_enable_result() |
| 525 | try: |
| 526 | result.success = self._handler.pltfm_pm_port_enable(args.device, args.dev_port) |
| 527 | msg_type = TMessageType.REPLY |
| 528 | except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| 529 | raise |
| 530 | except InvalidPltfmPmOperation as ouch: |
| 531 | msg_type = TMessageType.REPLY |
| 532 | result.ouch = ouch |
| 533 | except Exception as ex: |
| 534 | msg_type = TMessageType.EXCEPTION |
| 535 | logging.exception(ex) |
| 536 | result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| 537 | oprot.writeMessageBegin("pltfm_pm_port_enable", msg_type, seqid) |
| 538 | result.write(oprot) |
| 539 | oprot.writeMessageEnd() |
| 540 | oprot.trans.flush() |
| 541 | |
| 542 | def process_pltfm_pm_port_dis(self, seqid, iprot, oprot): |
| 543 | args = pltfm_pm_port_dis_args() |
| 544 | args.read(iprot) |
| 545 | iprot.readMessageEnd() |
| 546 | result = pltfm_pm_port_dis_result() |
| 547 | try: |
| 548 | result.success = self._handler.pltfm_pm_port_dis(args.device, args.dev_port) |
| 549 | msg_type = TMessageType.REPLY |
| 550 | except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| 551 | raise |
| 552 | except InvalidPltfmPmOperation as ouch: |
| 553 | msg_type = TMessageType.REPLY |
| 554 | result.ouch = ouch |
| 555 | except Exception as ex: |
| 556 | msg_type = TMessageType.EXCEPTION |
| 557 | logging.exception(ex) |
| 558 | result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| 559 | oprot.writeMessageBegin("pltfm_pm_port_dis", msg_type, seqid) |
| 560 | result.write(oprot) |
| 561 | oprot.writeMessageEnd() |
| 562 | oprot.trans.flush() |
| 563 | |
| 564 | def process_pltfm_pm_switchd_port_cleanup(self, seqid, iprot, oprot): |
| 565 | args = pltfm_pm_switchd_port_cleanup_args() |
| 566 | args.read(iprot) |
| 567 | iprot.readMessageEnd() |
| 568 | result = pltfm_pm_switchd_port_cleanup_result() |
| 569 | try: |
| 570 | result.success = self._handler.pltfm_pm_switchd_port_cleanup(args.device) |
| 571 | msg_type = TMessageType.REPLY |
| 572 | except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| 573 | raise |
| 574 | except InvalidPltfmPmOperation as ouch: |
| 575 | msg_type = TMessageType.REPLY |
| 576 | result.ouch = ouch |
| 577 | except Exception as ex: |
| 578 | msg_type = TMessageType.EXCEPTION |
| 579 | logging.exception(ex) |
| 580 | result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| 581 | oprot.writeMessageBegin("pltfm_pm_switchd_port_cleanup", msg_type, seqid) |
| 582 | result.write(oprot) |
| 583 | oprot.writeMessageEnd() |
| 584 | oprot.trans.flush() |
| 585 | |
| 586 | def process_pltfm_pm_port_oper_status_get(self, seqid, iprot, oprot): |
| 587 | args = pltfm_pm_port_oper_status_get_args() |
| 588 | args.read(iprot) |
| 589 | iprot.readMessageEnd() |
| 590 | result = pltfm_pm_port_oper_status_get_result() |
| 591 | try: |
| 592 | result.success = self._handler.pltfm_pm_port_oper_status_get(args.device, args.dev_port) |
| 593 | msg_type = TMessageType.REPLY |
| 594 | except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| 595 | raise |
| 596 | except InvalidPltfmPmOperation as ouch: |
| 597 | msg_type = TMessageType.REPLY |
| 598 | result.ouch = ouch |
| 599 | except Exception as ex: |
| 600 | msg_type = TMessageType.EXCEPTION |
| 601 | logging.exception(ex) |
| 602 | result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| 603 | oprot.writeMessageBegin("pltfm_pm_port_oper_status_get", msg_type, seqid) |
| 604 | result.write(oprot) |
| 605 | oprot.writeMessageEnd() |
| 606 | oprot.trans.flush() |
| 607 | |
| 608 | def process_pltfm_pm_board_type_get(self, seqid, iprot, oprot): |
| 609 | args = pltfm_pm_board_type_get_args() |
| 610 | args.read(iprot) |
| 611 | iprot.readMessageEnd() |
| 612 | result = pltfm_pm_board_type_get_result() |
| 613 | try: |
| 614 | result.success = self._handler.pltfm_pm_board_type_get() |
| 615 | msg_type = TMessageType.REPLY |
| 616 | except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| 617 | raise |
| 618 | except InvalidPltfmPmOperation as ouch: |
| 619 | msg_type = TMessageType.REPLY |
| 620 | result.ouch = ouch |
| 621 | except Exception as ex: |
| 622 | msg_type = TMessageType.EXCEPTION |
| 623 | logging.exception(ex) |
| 624 | result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| 625 | oprot.writeMessageBegin("pltfm_pm_board_type_get", msg_type, seqid) |
| 626 | result.write(oprot) |
| 627 | oprot.writeMessageEnd() |
| 628 | oprot.trans.flush() |
| 629 | |
| 630 | def process_pltfm_pm_port_an_set(self, seqid, iprot, oprot): |
| 631 | args = pltfm_pm_port_an_set_args() |
| 632 | args.read(iprot) |
| 633 | iprot.readMessageEnd() |
| 634 | result = pltfm_pm_port_an_set_result() |
| 635 | try: |
| 636 | result.success = self._handler.pltfm_pm_port_an_set(args.device, args.dev_port, args.an_flag) |
| 637 | msg_type = TMessageType.REPLY |
| 638 | except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| 639 | raise |
| 640 | except InvalidPltfmPmOperation as ouch: |
| 641 | msg_type = TMessageType.REPLY |
| 642 | result.ouch = ouch |
| 643 | except Exception as ex: |
| 644 | msg_type = TMessageType.EXCEPTION |
| 645 | logging.exception(ex) |
| 646 | result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| 647 | oprot.writeMessageBegin("pltfm_pm_port_an_set", msg_type, seqid) |
| 648 | result.write(oprot) |
| 649 | oprot.writeMessageEnd() |
| 650 | oprot.trans.flush() |
| 651 | |
| 652 | def process_pltfm_pm_serdes_lane_map_set(self, seqid, iprot, oprot): |
| 653 | args = pltfm_pm_serdes_lane_map_set_args() |
| 654 | args.read(iprot) |
| 655 | iprot.readMessageEnd() |
| 656 | result = pltfm_pm_serdes_lane_map_set_result() |
| 657 | try: |
| 658 | result.success = self._handler.pltfm_pm_serdes_lane_map_set(args.device) |
| 659 | msg_type = TMessageType.REPLY |
| 660 | except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| 661 | raise |
| 662 | except InvalidPltfmPmOperation as ouch: |
| 663 | msg_type = TMessageType.REPLY |
| 664 | result.ouch = ouch |
| 665 | except Exception as ex: |
| 666 | msg_type = TMessageType.EXCEPTION |
| 667 | logging.exception(ex) |
| 668 | result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| 669 | oprot.writeMessageBegin("pltfm_pm_serdes_lane_map_set", msg_type, seqid) |
| 670 | result.write(oprot) |
| 671 | oprot.writeMessageEnd() |
| 672 | oprot.trans.flush() |
| 673 | |
| 674 | def process_pltfm_pm_serdes_init(self, seqid, iprot, oprot): |
| 675 | args = pltfm_pm_serdes_init_args() |
| 676 | args.read(iprot) |
| 677 | iprot.readMessageEnd() |
| 678 | result = pltfm_pm_serdes_init_result() |
| 679 | try: |
| 680 | result.success = self._handler.pltfm_pm_serdes_init(args.device) |
| 681 | msg_type = TMessageType.REPLY |
| 682 | except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| 683 | raise |
| 684 | except InvalidPltfmPmOperation as ouch: |
| 685 | msg_type = TMessageType.REPLY |
| 686 | result.ouch = ouch |
| 687 | except Exception as ex: |
| 688 | msg_type = TMessageType.EXCEPTION |
| 689 | logging.exception(ex) |
| 690 | result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| 691 | oprot.writeMessageBegin("pltfm_pm_serdes_init", msg_type, seqid) |
| 692 | result.write(oprot) |
| 693 | oprot.writeMessageEnd() |
| 694 | oprot.trans.flush() |
| 695 | |
| 696 | # HELPER FUNCTIONS AND STRUCTURES |
| 697 | |
| 698 | |
| 699 | class pltfm_pm_port_add_args(object): |
| 700 | """ |
| 701 | Attributes: |
| 702 | - device |
| 703 | - dev_port |
| 704 | - ps |
| 705 | - fec |
| 706 | """ |
| 707 | |
| 708 | thrift_spec = ( |
| 709 | None, # 0 |
| 710 | (1, TType.BYTE, 'device', None, None, ), # 1 |
| 711 | (2, TType.I32, 'dev_port', None, None, ), # 2 |
| 712 | (3, TType.I32, 'ps', None, None, ), # 3 |
| 713 | (4, TType.I32, 'fec', None, None, ), # 4 |
| 714 | ) |
| 715 | |
| 716 | def __init__(self, device=None, dev_port=None, ps=None, fec=None,): |
| 717 | self.device = device |
| 718 | self.dev_port = dev_port |
| 719 | self.ps = ps |
| 720 | self.fec = fec |
| 721 | |
| 722 | def read(self, iprot): |
| 723 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| 724 | iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) |
| 725 | return |
| 726 | iprot.readStructBegin() |
| 727 | while True: |
| 728 | (fname, ftype, fid) = iprot.readFieldBegin() |
| 729 | if ftype == TType.STOP: |
| 730 | break |
| 731 | if fid == 1: |
| 732 | if ftype == TType.BYTE: |
| 733 | self.device = iprot.readByte() |
| 734 | else: |
| 735 | iprot.skip(ftype) |
| 736 | elif fid == 2: |
| 737 | if ftype == TType.I32: |
| 738 | self.dev_port = iprot.readI32() |
| 739 | else: |
| 740 | iprot.skip(ftype) |
| 741 | elif fid == 3: |
| 742 | if ftype == TType.I32: |
| 743 | self.ps = iprot.readI32() |
| 744 | else: |
| 745 | iprot.skip(ftype) |
| 746 | elif fid == 4: |
| 747 | if ftype == TType.I32: |
| 748 | self.fec = iprot.readI32() |
| 749 | else: |
| 750 | iprot.skip(ftype) |
| 751 | else: |
| 752 | iprot.skip(ftype) |
| 753 | iprot.readFieldEnd() |
| 754 | iprot.readStructEnd() |
| 755 | |
| 756 | def write(self, oprot): |
| 757 | if oprot._fast_encode is not None and self.thrift_spec is not None: |
| 758 | oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| 759 | return |
| 760 | oprot.writeStructBegin('pltfm_pm_port_add_args') |
| 761 | if self.device is not None: |
| 762 | oprot.writeFieldBegin('device', TType.BYTE, 1) |
| 763 | oprot.writeByte(self.device) |
| 764 | oprot.writeFieldEnd() |
| 765 | if self.dev_port is not None: |
| 766 | oprot.writeFieldBegin('dev_port', TType.I32, 2) |
| 767 | oprot.writeI32(self.dev_port) |
| 768 | oprot.writeFieldEnd() |
| 769 | if self.ps is not None: |
| 770 | oprot.writeFieldBegin('ps', TType.I32, 3) |
| 771 | oprot.writeI32(self.ps) |
| 772 | oprot.writeFieldEnd() |
| 773 | if self.fec is not None: |
| 774 | oprot.writeFieldBegin('fec', TType.I32, 4) |
| 775 | oprot.writeI32(self.fec) |
| 776 | oprot.writeFieldEnd() |
| 777 | oprot.writeFieldStop() |
| 778 | oprot.writeStructEnd() |
| 779 | |
| 780 | def validate(self): |
| 781 | return |
| 782 | |
| 783 | def __repr__(self): |
| 784 | L = ['%s=%r' % (key, value) |
| 785 | for key, value in self.__dict__.items()] |
| 786 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) |
| 787 | |
| 788 | def __eq__(self, other): |
| 789 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ |
| 790 | |
| 791 | def __ne__(self, other): |
| 792 | return not (self == other) |
| 793 | |
| 794 | |
| 795 | class pltfm_pm_port_add_result(object): |
| 796 | """ |
| 797 | Attributes: |
| 798 | - success |
| 799 | - ouch |
| 800 | """ |
| 801 | |
| 802 | thrift_spec = ( |
| 803 | (0, TType.I32, 'success', None, None, ), # 0 |
| 804 | (1, TType.STRUCT, 'ouch', (InvalidPltfmPmOperation, InvalidPltfmPmOperation.thrift_spec), None, ), # 1 |
| 805 | ) |
| 806 | |
| 807 | def __init__(self, success=None, ouch=None,): |
| 808 | self.success = success |
| 809 | self.ouch = ouch |
| 810 | |
| 811 | def read(self, iprot): |
| 812 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| 813 | iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) |
| 814 | return |
| 815 | iprot.readStructBegin() |
| 816 | while True: |
| 817 | (fname, ftype, fid) = iprot.readFieldBegin() |
| 818 | if ftype == TType.STOP: |
| 819 | break |
| 820 | if fid == 0: |
| 821 | if ftype == TType.I32: |
| 822 | self.success = iprot.readI32() |
| 823 | else: |
| 824 | iprot.skip(ftype) |
| 825 | elif fid == 1: |
| 826 | if ftype == TType.STRUCT: |
| 827 | self.ouch = InvalidPltfmPmOperation() |
| 828 | self.ouch.read(iprot) |
| 829 | else: |
| 830 | iprot.skip(ftype) |
| 831 | else: |
| 832 | iprot.skip(ftype) |
| 833 | iprot.readFieldEnd() |
| 834 | iprot.readStructEnd() |
| 835 | |
| 836 | def write(self, oprot): |
| 837 | if oprot._fast_encode is not None and self.thrift_spec is not None: |
| 838 | oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| 839 | return |
| 840 | oprot.writeStructBegin('pltfm_pm_port_add_result') |
| 841 | if self.success is not None: |
| 842 | oprot.writeFieldBegin('success', TType.I32, 0) |
| 843 | oprot.writeI32(self.success) |
| 844 | oprot.writeFieldEnd() |
| 845 | if self.ouch is not None: |
| 846 | oprot.writeFieldBegin('ouch', TType.STRUCT, 1) |
| 847 | self.ouch.write(oprot) |
| 848 | oprot.writeFieldEnd() |
| 849 | oprot.writeFieldStop() |
| 850 | oprot.writeStructEnd() |
| 851 | |
| 852 | def validate(self): |
| 853 | return |
| 854 | |
| 855 | def __repr__(self): |
| 856 | L = ['%s=%r' % (key, value) |
| 857 | for key, value in self.__dict__.items()] |
| 858 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) |
| 859 | |
| 860 | def __eq__(self, other): |
| 861 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ |
| 862 | |
| 863 | def __ne__(self, other): |
| 864 | return not (self == other) |
| 865 | |
| 866 | |
| 867 | class pltfm_pm_port_del_args(object): |
| 868 | """ |
| 869 | Attributes: |
| 870 | - device |
| 871 | - dev_port |
| 872 | """ |
| 873 | |
| 874 | thrift_spec = ( |
| 875 | None, # 0 |
| 876 | (1, TType.BYTE, 'device', None, None, ), # 1 |
| 877 | (2, TType.I32, 'dev_port', None, None, ), # 2 |
| 878 | ) |
| 879 | |
| 880 | def __init__(self, device=None, dev_port=None,): |
| 881 | self.device = device |
| 882 | self.dev_port = dev_port |
| 883 | |
| 884 | def read(self, iprot): |
| 885 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| 886 | iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) |
| 887 | return |
| 888 | iprot.readStructBegin() |
| 889 | while True: |
| 890 | (fname, ftype, fid) = iprot.readFieldBegin() |
| 891 | if ftype == TType.STOP: |
| 892 | break |
| 893 | if fid == 1: |
| 894 | if ftype == TType.BYTE: |
| 895 | self.device = iprot.readByte() |
| 896 | else: |
| 897 | iprot.skip(ftype) |
| 898 | elif fid == 2: |
| 899 | if ftype == TType.I32: |
| 900 | self.dev_port = iprot.readI32() |
| 901 | else: |
| 902 | iprot.skip(ftype) |
| 903 | else: |
| 904 | iprot.skip(ftype) |
| 905 | iprot.readFieldEnd() |
| 906 | iprot.readStructEnd() |
| 907 | |
| 908 | def write(self, oprot): |
| 909 | if oprot._fast_encode is not None and self.thrift_spec is not None: |
| 910 | oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| 911 | return |
| 912 | oprot.writeStructBegin('pltfm_pm_port_del_args') |
| 913 | if self.device is not None: |
| 914 | oprot.writeFieldBegin('device', TType.BYTE, 1) |
| 915 | oprot.writeByte(self.device) |
| 916 | oprot.writeFieldEnd() |
| 917 | if self.dev_port is not None: |
| 918 | oprot.writeFieldBegin('dev_port', TType.I32, 2) |
| 919 | oprot.writeI32(self.dev_port) |
| 920 | oprot.writeFieldEnd() |
| 921 | oprot.writeFieldStop() |
| 922 | oprot.writeStructEnd() |
| 923 | |
| 924 | def validate(self): |
| 925 | return |
| 926 | |
| 927 | def __repr__(self): |
| 928 | L = ['%s=%r' % (key, value) |
| 929 | for key, value in self.__dict__.items()] |
| 930 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) |
| 931 | |
| 932 | def __eq__(self, other): |
| 933 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ |
| 934 | |
| 935 | def __ne__(self, other): |
| 936 | return not (self == other) |
| 937 | |
| 938 | |
| 939 | class pltfm_pm_port_del_result(object): |
| 940 | """ |
| 941 | Attributes: |
| 942 | - success |
| 943 | - ouch |
| 944 | """ |
| 945 | |
| 946 | thrift_spec = ( |
| 947 | (0, TType.I32, 'success', None, None, ), # 0 |
| 948 | (1, TType.STRUCT, 'ouch', (InvalidPltfmPmOperation, InvalidPltfmPmOperation.thrift_spec), None, ), # 1 |
| 949 | ) |
| 950 | |
| 951 | def __init__(self, success=None, ouch=None,): |
| 952 | self.success = success |
| 953 | self.ouch = ouch |
| 954 | |
| 955 | def read(self, iprot): |
| 956 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| 957 | iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) |
| 958 | return |
| 959 | iprot.readStructBegin() |
| 960 | while True: |
| 961 | (fname, ftype, fid) = iprot.readFieldBegin() |
| 962 | if ftype == TType.STOP: |
| 963 | break |
| 964 | if fid == 0: |
| 965 | if ftype == TType.I32: |
| 966 | self.success = iprot.readI32() |
| 967 | else: |
| 968 | iprot.skip(ftype) |
| 969 | elif fid == 1: |
| 970 | if ftype == TType.STRUCT: |
| 971 | self.ouch = InvalidPltfmPmOperation() |
| 972 | self.ouch.read(iprot) |
| 973 | else: |
| 974 | iprot.skip(ftype) |
| 975 | else: |
| 976 | iprot.skip(ftype) |
| 977 | iprot.readFieldEnd() |
| 978 | iprot.readStructEnd() |
| 979 | |
| 980 | def write(self, oprot): |
| 981 | if oprot._fast_encode is not None and self.thrift_spec is not None: |
| 982 | oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| 983 | return |
| 984 | oprot.writeStructBegin('pltfm_pm_port_del_result') |
| 985 | if self.success is not None: |
| 986 | oprot.writeFieldBegin('success', TType.I32, 0) |
| 987 | oprot.writeI32(self.success) |
| 988 | oprot.writeFieldEnd() |
| 989 | if self.ouch is not None: |
| 990 | oprot.writeFieldBegin('ouch', TType.STRUCT, 1) |
| 991 | self.ouch.write(oprot) |
| 992 | oprot.writeFieldEnd() |
| 993 | oprot.writeFieldStop() |
| 994 | oprot.writeStructEnd() |
| 995 | |
| 996 | def validate(self): |
| 997 | return |
| 998 | |
| 999 | def __repr__(self): |
| 1000 | L = ['%s=%r' % (key, value) |
| 1001 | for key, value in self.__dict__.items()] |
| 1002 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) |
| 1003 | |
| 1004 | def __eq__(self, other): |
| 1005 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ |
| 1006 | |
| 1007 | def __ne__(self, other): |
| 1008 | return not (self == other) |
| 1009 | |
| 1010 | |
| 1011 | class pltfm_pm_port_enable_args(object): |
| 1012 | """ |
| 1013 | Attributes: |
| 1014 | - device |
| 1015 | - dev_port |
| 1016 | """ |
| 1017 | |
| 1018 | thrift_spec = ( |
| 1019 | None, # 0 |
| 1020 | (1, TType.BYTE, 'device', None, None, ), # 1 |
| 1021 | (2, TType.I32, 'dev_port', None, None, ), # 2 |
| 1022 | ) |
| 1023 | |
| 1024 | def __init__(self, device=None, dev_port=None,): |
| 1025 | self.device = device |
| 1026 | self.dev_port = dev_port |
| 1027 | |
| 1028 | def read(self, iprot): |
| 1029 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| 1030 | iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) |
| 1031 | return |
| 1032 | iprot.readStructBegin() |
| 1033 | while True: |
| 1034 | (fname, ftype, fid) = iprot.readFieldBegin() |
| 1035 | if ftype == TType.STOP: |
| 1036 | break |
| 1037 | if fid == 1: |
| 1038 | if ftype == TType.BYTE: |
| 1039 | self.device = iprot.readByte() |
| 1040 | else: |
| 1041 | iprot.skip(ftype) |
| 1042 | elif fid == 2: |
| 1043 | if ftype == TType.I32: |
| 1044 | self.dev_port = iprot.readI32() |
| 1045 | else: |
| 1046 | iprot.skip(ftype) |
| 1047 | else: |
| 1048 | iprot.skip(ftype) |
| 1049 | iprot.readFieldEnd() |
| 1050 | iprot.readStructEnd() |
| 1051 | |
| 1052 | def write(self, oprot): |
| 1053 | if oprot._fast_encode is not None and self.thrift_spec is not None: |
| 1054 | oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| 1055 | return |
| 1056 | oprot.writeStructBegin('pltfm_pm_port_enable_args') |
| 1057 | if self.device is not None: |
| 1058 | oprot.writeFieldBegin('device', TType.BYTE, 1) |
| 1059 | oprot.writeByte(self.device) |
| 1060 | oprot.writeFieldEnd() |
| 1061 | if self.dev_port is not None: |
| 1062 | oprot.writeFieldBegin('dev_port', TType.I32, 2) |
| 1063 | oprot.writeI32(self.dev_port) |
| 1064 | oprot.writeFieldEnd() |
| 1065 | oprot.writeFieldStop() |
| 1066 | oprot.writeStructEnd() |
| 1067 | |
| 1068 | def validate(self): |
| 1069 | return |
| 1070 | |
| 1071 | def __repr__(self): |
| 1072 | L = ['%s=%r' % (key, value) |
| 1073 | for key, value in self.__dict__.items()] |
| 1074 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) |
| 1075 | |
| 1076 | def __eq__(self, other): |
| 1077 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ |
| 1078 | |
| 1079 | def __ne__(self, other): |
| 1080 | return not (self == other) |
| 1081 | |
| 1082 | |
| 1083 | class pltfm_pm_port_enable_result(object): |
| 1084 | """ |
| 1085 | Attributes: |
| 1086 | - success |
| 1087 | - ouch |
| 1088 | """ |
| 1089 | |
| 1090 | thrift_spec = ( |
| 1091 | (0, TType.I32, 'success', None, None, ), # 0 |
| 1092 | (1, TType.STRUCT, 'ouch', (InvalidPltfmPmOperation, InvalidPltfmPmOperation.thrift_spec), None, ), # 1 |
| 1093 | ) |
| 1094 | |
| 1095 | def __init__(self, success=None, ouch=None,): |
| 1096 | self.success = success |
| 1097 | self.ouch = ouch |
| 1098 | |
| 1099 | def read(self, iprot): |
| 1100 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| 1101 | iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) |
| 1102 | return |
| 1103 | iprot.readStructBegin() |
| 1104 | while True: |
| 1105 | (fname, ftype, fid) = iprot.readFieldBegin() |
| 1106 | if ftype == TType.STOP: |
| 1107 | break |
| 1108 | if fid == 0: |
| 1109 | if ftype == TType.I32: |
| 1110 | self.success = iprot.readI32() |
| 1111 | else: |
| 1112 | iprot.skip(ftype) |
| 1113 | elif fid == 1: |
| 1114 | if ftype == TType.STRUCT: |
| 1115 | self.ouch = InvalidPltfmPmOperation() |
| 1116 | self.ouch.read(iprot) |
| 1117 | else: |
| 1118 | iprot.skip(ftype) |
| 1119 | else: |
| 1120 | iprot.skip(ftype) |
| 1121 | iprot.readFieldEnd() |
| 1122 | iprot.readStructEnd() |
| 1123 | |
| 1124 | def write(self, oprot): |
| 1125 | if oprot._fast_encode is not None and self.thrift_spec is not None: |
| 1126 | oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| 1127 | return |
| 1128 | oprot.writeStructBegin('pltfm_pm_port_enable_result') |
| 1129 | if self.success is not None: |
| 1130 | oprot.writeFieldBegin('success', TType.I32, 0) |
| 1131 | oprot.writeI32(self.success) |
| 1132 | oprot.writeFieldEnd() |
| 1133 | if self.ouch is not None: |
| 1134 | oprot.writeFieldBegin('ouch', TType.STRUCT, 1) |
| 1135 | self.ouch.write(oprot) |
| 1136 | oprot.writeFieldEnd() |
| 1137 | oprot.writeFieldStop() |
| 1138 | oprot.writeStructEnd() |
| 1139 | |
| 1140 | def validate(self): |
| 1141 | return |
| 1142 | |
| 1143 | def __repr__(self): |
| 1144 | L = ['%s=%r' % (key, value) |
| 1145 | for key, value in self.__dict__.items()] |
| 1146 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) |
| 1147 | |
| 1148 | def __eq__(self, other): |
| 1149 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ |
| 1150 | |
| 1151 | def __ne__(self, other): |
| 1152 | return not (self == other) |
| 1153 | |
| 1154 | |
| 1155 | class pltfm_pm_port_dis_args(object): |
| 1156 | """ |
| 1157 | Attributes: |
| 1158 | - device |
| 1159 | - dev_port |
| 1160 | """ |
| 1161 | |
| 1162 | thrift_spec = ( |
| 1163 | None, # 0 |
| 1164 | (1, TType.BYTE, 'device', None, None, ), # 1 |
| 1165 | (2, TType.I32, 'dev_port', None, None, ), # 2 |
| 1166 | ) |
| 1167 | |
| 1168 | def __init__(self, device=None, dev_port=None,): |
| 1169 | self.device = device |
| 1170 | self.dev_port = dev_port |
| 1171 | |
| 1172 | def read(self, iprot): |
| 1173 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| 1174 | iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) |
| 1175 | return |
| 1176 | iprot.readStructBegin() |
| 1177 | while True: |
| 1178 | (fname, ftype, fid) = iprot.readFieldBegin() |
| 1179 | if ftype == TType.STOP: |
| 1180 | break |
| 1181 | if fid == 1: |
| 1182 | if ftype == TType.BYTE: |
| 1183 | self.device = iprot.readByte() |
| 1184 | else: |
| 1185 | iprot.skip(ftype) |
| 1186 | elif fid == 2: |
| 1187 | if ftype == TType.I32: |
| 1188 | self.dev_port = iprot.readI32() |
| 1189 | else: |
| 1190 | iprot.skip(ftype) |
| 1191 | else: |
| 1192 | iprot.skip(ftype) |
| 1193 | iprot.readFieldEnd() |
| 1194 | iprot.readStructEnd() |
| 1195 | |
| 1196 | def write(self, oprot): |
| 1197 | if oprot._fast_encode is not None and self.thrift_spec is not None: |
| 1198 | oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| 1199 | return |
| 1200 | oprot.writeStructBegin('pltfm_pm_port_dis_args') |
| 1201 | if self.device is not None: |
| 1202 | oprot.writeFieldBegin('device', TType.BYTE, 1) |
| 1203 | oprot.writeByte(self.device) |
| 1204 | oprot.writeFieldEnd() |
| 1205 | if self.dev_port is not None: |
| 1206 | oprot.writeFieldBegin('dev_port', TType.I32, 2) |
| 1207 | oprot.writeI32(self.dev_port) |
| 1208 | oprot.writeFieldEnd() |
| 1209 | oprot.writeFieldStop() |
| 1210 | oprot.writeStructEnd() |
| 1211 | |
| 1212 | def validate(self): |
| 1213 | return |
| 1214 | |
| 1215 | def __repr__(self): |
| 1216 | L = ['%s=%r' % (key, value) |
| 1217 | for key, value in self.__dict__.items()] |
| 1218 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) |
| 1219 | |
| 1220 | def __eq__(self, other): |
| 1221 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ |
| 1222 | |
| 1223 | def __ne__(self, other): |
| 1224 | return not (self == other) |
| 1225 | |
| 1226 | |
| 1227 | class pltfm_pm_port_dis_result(object): |
| 1228 | """ |
| 1229 | Attributes: |
| 1230 | - success |
| 1231 | - ouch |
| 1232 | """ |
| 1233 | |
| 1234 | thrift_spec = ( |
| 1235 | (0, TType.I32, 'success', None, None, ), # 0 |
| 1236 | (1, TType.STRUCT, 'ouch', (InvalidPltfmPmOperation, InvalidPltfmPmOperation.thrift_spec), None, ), # 1 |
| 1237 | ) |
| 1238 | |
| 1239 | def __init__(self, success=None, ouch=None,): |
| 1240 | self.success = success |
| 1241 | self.ouch = ouch |
| 1242 | |
| 1243 | def read(self, iprot): |
| 1244 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| 1245 | iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) |
| 1246 | return |
| 1247 | iprot.readStructBegin() |
| 1248 | while True: |
| 1249 | (fname, ftype, fid) = iprot.readFieldBegin() |
| 1250 | if ftype == TType.STOP: |
| 1251 | break |
| 1252 | if fid == 0: |
| 1253 | if ftype == TType.I32: |
| 1254 | self.success = iprot.readI32() |
| 1255 | else: |
| 1256 | iprot.skip(ftype) |
| 1257 | elif fid == 1: |
| 1258 | if ftype == TType.STRUCT: |
| 1259 | self.ouch = InvalidPltfmPmOperation() |
| 1260 | self.ouch.read(iprot) |
| 1261 | else: |
| 1262 | iprot.skip(ftype) |
| 1263 | else: |
| 1264 | iprot.skip(ftype) |
| 1265 | iprot.readFieldEnd() |
| 1266 | iprot.readStructEnd() |
| 1267 | |
| 1268 | def write(self, oprot): |
| 1269 | if oprot._fast_encode is not None and self.thrift_spec is not None: |
| 1270 | oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| 1271 | return |
| 1272 | oprot.writeStructBegin('pltfm_pm_port_dis_result') |
| 1273 | if self.success is not None: |
| 1274 | oprot.writeFieldBegin('success', TType.I32, 0) |
| 1275 | oprot.writeI32(self.success) |
| 1276 | oprot.writeFieldEnd() |
| 1277 | if self.ouch is not None: |
| 1278 | oprot.writeFieldBegin('ouch', TType.STRUCT, 1) |
| 1279 | self.ouch.write(oprot) |
| 1280 | oprot.writeFieldEnd() |
| 1281 | oprot.writeFieldStop() |
| 1282 | oprot.writeStructEnd() |
| 1283 | |
| 1284 | def validate(self): |
| 1285 | return |
| 1286 | |
| 1287 | def __repr__(self): |
| 1288 | L = ['%s=%r' % (key, value) |
| 1289 | for key, value in self.__dict__.items()] |
| 1290 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) |
| 1291 | |
| 1292 | def __eq__(self, other): |
| 1293 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ |
| 1294 | |
| 1295 | def __ne__(self, other): |
| 1296 | return not (self == other) |
| 1297 | |
| 1298 | |
| 1299 | class pltfm_pm_switchd_port_cleanup_args(object): |
| 1300 | """ |
| 1301 | Attributes: |
| 1302 | - device |
| 1303 | """ |
| 1304 | |
| 1305 | thrift_spec = ( |
| 1306 | None, # 0 |
| 1307 | (1, TType.BYTE, 'device', None, None, ), # 1 |
| 1308 | ) |
| 1309 | |
| 1310 | def __init__(self, device=None,): |
| 1311 | self.device = device |
| 1312 | |
| 1313 | def read(self, iprot): |
| 1314 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| 1315 | iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) |
| 1316 | return |
| 1317 | iprot.readStructBegin() |
| 1318 | while True: |
| 1319 | (fname, ftype, fid) = iprot.readFieldBegin() |
| 1320 | if ftype == TType.STOP: |
| 1321 | break |
| 1322 | if fid == 1: |
| 1323 | if ftype == TType.BYTE: |
| 1324 | self.device = iprot.readByte() |
| 1325 | else: |
| 1326 | iprot.skip(ftype) |
| 1327 | else: |
| 1328 | iprot.skip(ftype) |
| 1329 | iprot.readFieldEnd() |
| 1330 | iprot.readStructEnd() |
| 1331 | |
| 1332 | def write(self, oprot): |
| 1333 | if oprot._fast_encode is not None and self.thrift_spec is not None: |
| 1334 | oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| 1335 | return |
| 1336 | oprot.writeStructBegin('pltfm_pm_switchd_port_cleanup_args') |
| 1337 | if self.device is not None: |
| 1338 | oprot.writeFieldBegin('device', TType.BYTE, 1) |
| 1339 | oprot.writeByte(self.device) |
| 1340 | oprot.writeFieldEnd() |
| 1341 | oprot.writeFieldStop() |
| 1342 | oprot.writeStructEnd() |
| 1343 | |
| 1344 | def validate(self): |
| 1345 | return |
| 1346 | |
| 1347 | def __repr__(self): |
| 1348 | L = ['%s=%r' % (key, value) |
| 1349 | for key, value in self.__dict__.items()] |
| 1350 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) |
| 1351 | |
| 1352 | def __eq__(self, other): |
| 1353 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ |
| 1354 | |
| 1355 | def __ne__(self, other): |
| 1356 | return not (self == other) |
| 1357 | |
| 1358 | |
| 1359 | class pltfm_pm_switchd_port_cleanup_result(object): |
| 1360 | """ |
| 1361 | Attributes: |
| 1362 | - success |
| 1363 | - ouch |
| 1364 | """ |
| 1365 | |
| 1366 | thrift_spec = ( |
| 1367 | (0, TType.I32, 'success', None, None, ), # 0 |
| 1368 | (1, TType.STRUCT, 'ouch', (InvalidPltfmPmOperation, InvalidPltfmPmOperation.thrift_spec), None, ), # 1 |
| 1369 | ) |
| 1370 | |
| 1371 | def __init__(self, success=None, ouch=None,): |
| 1372 | self.success = success |
| 1373 | self.ouch = ouch |
| 1374 | |
| 1375 | def read(self, iprot): |
| 1376 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| 1377 | iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) |
| 1378 | return |
| 1379 | iprot.readStructBegin() |
| 1380 | while True: |
| 1381 | (fname, ftype, fid) = iprot.readFieldBegin() |
| 1382 | if ftype == TType.STOP: |
| 1383 | break |
| 1384 | if fid == 0: |
| 1385 | if ftype == TType.I32: |
| 1386 | self.success = iprot.readI32() |
| 1387 | else: |
| 1388 | iprot.skip(ftype) |
| 1389 | elif fid == 1: |
| 1390 | if ftype == TType.STRUCT: |
| 1391 | self.ouch = InvalidPltfmPmOperation() |
| 1392 | self.ouch.read(iprot) |
| 1393 | else: |
| 1394 | iprot.skip(ftype) |
| 1395 | else: |
| 1396 | iprot.skip(ftype) |
| 1397 | iprot.readFieldEnd() |
| 1398 | iprot.readStructEnd() |
| 1399 | |
| 1400 | def write(self, oprot): |
| 1401 | if oprot._fast_encode is not None and self.thrift_spec is not None: |
| 1402 | oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| 1403 | return |
| 1404 | oprot.writeStructBegin('pltfm_pm_switchd_port_cleanup_result') |
| 1405 | if self.success is not None: |
| 1406 | oprot.writeFieldBegin('success', TType.I32, 0) |
| 1407 | oprot.writeI32(self.success) |
| 1408 | oprot.writeFieldEnd() |
| 1409 | if self.ouch is not None: |
| 1410 | oprot.writeFieldBegin('ouch', TType.STRUCT, 1) |
| 1411 | self.ouch.write(oprot) |
| 1412 | oprot.writeFieldEnd() |
| 1413 | oprot.writeFieldStop() |
| 1414 | oprot.writeStructEnd() |
| 1415 | |
| 1416 | def validate(self): |
| 1417 | return |
| 1418 | |
| 1419 | def __repr__(self): |
| 1420 | L = ['%s=%r' % (key, value) |
| 1421 | for key, value in self.__dict__.items()] |
| 1422 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) |
| 1423 | |
| 1424 | def __eq__(self, other): |
| 1425 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ |
| 1426 | |
| 1427 | def __ne__(self, other): |
| 1428 | return not (self == other) |
| 1429 | |
| 1430 | |
| 1431 | class pltfm_pm_port_oper_status_get_args(object): |
| 1432 | """ |
| 1433 | Attributes: |
| 1434 | - device |
| 1435 | - dev_port |
| 1436 | """ |
| 1437 | |
| 1438 | thrift_spec = ( |
| 1439 | None, # 0 |
| 1440 | (1, TType.BYTE, 'device', None, None, ), # 1 |
| 1441 | (2, TType.I32, 'dev_port', None, None, ), # 2 |
| 1442 | ) |
| 1443 | |
| 1444 | def __init__(self, device=None, dev_port=None,): |
| 1445 | self.device = device |
| 1446 | self.dev_port = dev_port |
| 1447 | |
| 1448 | def read(self, iprot): |
| 1449 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| 1450 | iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) |
| 1451 | return |
| 1452 | iprot.readStructBegin() |
| 1453 | while True: |
| 1454 | (fname, ftype, fid) = iprot.readFieldBegin() |
| 1455 | if ftype == TType.STOP: |
| 1456 | break |
| 1457 | if fid == 1: |
| 1458 | if ftype == TType.BYTE: |
| 1459 | self.device = iprot.readByte() |
| 1460 | else: |
| 1461 | iprot.skip(ftype) |
| 1462 | elif fid == 2: |
| 1463 | if ftype == TType.I32: |
| 1464 | self.dev_port = iprot.readI32() |
| 1465 | else: |
| 1466 | iprot.skip(ftype) |
| 1467 | else: |
| 1468 | iprot.skip(ftype) |
| 1469 | iprot.readFieldEnd() |
| 1470 | iprot.readStructEnd() |
| 1471 | |
| 1472 | def write(self, oprot): |
| 1473 | if oprot._fast_encode is not None and self.thrift_spec is not None: |
| 1474 | oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| 1475 | return |
| 1476 | oprot.writeStructBegin('pltfm_pm_port_oper_status_get_args') |
| 1477 | if self.device is not None: |
| 1478 | oprot.writeFieldBegin('device', TType.BYTE, 1) |
| 1479 | oprot.writeByte(self.device) |
| 1480 | oprot.writeFieldEnd() |
| 1481 | if self.dev_port is not None: |
| 1482 | oprot.writeFieldBegin('dev_port', TType.I32, 2) |
| 1483 | oprot.writeI32(self.dev_port) |
| 1484 | oprot.writeFieldEnd() |
| 1485 | oprot.writeFieldStop() |
| 1486 | oprot.writeStructEnd() |
| 1487 | |
| 1488 | def validate(self): |
| 1489 | return |
| 1490 | |
| 1491 | def __repr__(self): |
| 1492 | L = ['%s=%r' % (key, value) |
| 1493 | for key, value in self.__dict__.items()] |
| 1494 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) |
| 1495 | |
| 1496 | def __eq__(self, other): |
| 1497 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ |
| 1498 | |
| 1499 | def __ne__(self, other): |
| 1500 | return not (self == other) |
| 1501 | |
| 1502 | |
| 1503 | class pltfm_pm_port_oper_status_get_result(object): |
| 1504 | """ |
| 1505 | Attributes: |
| 1506 | - success |
| 1507 | - ouch |
| 1508 | """ |
| 1509 | |
| 1510 | thrift_spec = ( |
| 1511 | (0, TType.I32, 'success', None, None, ), # 0 |
| 1512 | (1, TType.STRUCT, 'ouch', (InvalidPltfmPmOperation, InvalidPltfmPmOperation.thrift_spec), None, ), # 1 |
| 1513 | ) |
| 1514 | |
| 1515 | def __init__(self, success=None, ouch=None,): |
| 1516 | self.success = success |
| 1517 | self.ouch = ouch |
| 1518 | |
| 1519 | def read(self, iprot): |
| 1520 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| 1521 | iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) |
| 1522 | return |
| 1523 | iprot.readStructBegin() |
| 1524 | while True: |
| 1525 | (fname, ftype, fid) = iprot.readFieldBegin() |
| 1526 | if ftype == TType.STOP: |
| 1527 | break |
| 1528 | if fid == 0: |
| 1529 | if ftype == TType.I32: |
| 1530 | self.success = iprot.readI32() |
| 1531 | else: |
| 1532 | iprot.skip(ftype) |
| 1533 | elif fid == 1: |
| 1534 | if ftype == TType.STRUCT: |
| 1535 | self.ouch = InvalidPltfmPmOperation() |
| 1536 | self.ouch.read(iprot) |
| 1537 | else: |
| 1538 | iprot.skip(ftype) |
| 1539 | else: |
| 1540 | iprot.skip(ftype) |
| 1541 | iprot.readFieldEnd() |
| 1542 | iprot.readStructEnd() |
| 1543 | |
| 1544 | def write(self, oprot): |
| 1545 | if oprot._fast_encode is not None and self.thrift_spec is not None: |
| 1546 | oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| 1547 | return |
| 1548 | oprot.writeStructBegin('pltfm_pm_port_oper_status_get_result') |
| 1549 | if self.success is not None: |
| 1550 | oprot.writeFieldBegin('success', TType.I32, 0) |
| 1551 | oprot.writeI32(self.success) |
| 1552 | oprot.writeFieldEnd() |
| 1553 | if self.ouch is not None: |
| 1554 | oprot.writeFieldBegin('ouch', TType.STRUCT, 1) |
| 1555 | self.ouch.write(oprot) |
| 1556 | oprot.writeFieldEnd() |
| 1557 | oprot.writeFieldStop() |
| 1558 | oprot.writeStructEnd() |
| 1559 | |
| 1560 | def validate(self): |
| 1561 | return |
| 1562 | |
| 1563 | def __repr__(self): |
| 1564 | L = ['%s=%r' % (key, value) |
| 1565 | for key, value in self.__dict__.items()] |
| 1566 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) |
| 1567 | |
| 1568 | def __eq__(self, other): |
| 1569 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ |
| 1570 | |
| 1571 | def __ne__(self, other): |
| 1572 | return not (self == other) |
| 1573 | |
| 1574 | |
| 1575 | class pltfm_pm_board_type_get_args(object): |
| 1576 | |
| 1577 | thrift_spec = ( |
| 1578 | ) |
| 1579 | |
| 1580 | def read(self, iprot): |
| 1581 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| 1582 | iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) |
| 1583 | return |
| 1584 | iprot.readStructBegin() |
| 1585 | while True: |
| 1586 | (fname, ftype, fid) = iprot.readFieldBegin() |
| 1587 | if ftype == TType.STOP: |
| 1588 | break |
| 1589 | else: |
| 1590 | iprot.skip(ftype) |
| 1591 | iprot.readFieldEnd() |
| 1592 | iprot.readStructEnd() |
| 1593 | |
| 1594 | def write(self, oprot): |
| 1595 | if oprot._fast_encode is not None and self.thrift_spec is not None: |
| 1596 | oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| 1597 | return |
| 1598 | oprot.writeStructBegin('pltfm_pm_board_type_get_args') |
| 1599 | oprot.writeFieldStop() |
| 1600 | oprot.writeStructEnd() |
| 1601 | |
| 1602 | def validate(self): |
| 1603 | return |
| 1604 | |
| 1605 | def __repr__(self): |
| 1606 | L = ['%s=%r' % (key, value) |
| 1607 | for key, value in self.__dict__.items()] |
| 1608 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) |
| 1609 | |
| 1610 | def __eq__(self, other): |
| 1611 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ |
| 1612 | |
| 1613 | def __ne__(self, other): |
| 1614 | return not (self == other) |
| 1615 | |
| 1616 | |
| 1617 | class pltfm_pm_board_type_get_result(object): |
| 1618 | """ |
| 1619 | Attributes: |
| 1620 | - success |
| 1621 | - ouch |
| 1622 | """ |
| 1623 | |
| 1624 | thrift_spec = ( |
| 1625 | (0, TType.I32, 'success', None, None, ), # 0 |
| 1626 | (1, TType.STRUCT, 'ouch', (InvalidPltfmPmOperation, InvalidPltfmPmOperation.thrift_spec), None, ), # 1 |
| 1627 | ) |
| 1628 | |
| 1629 | def __init__(self, success=None, ouch=None,): |
| 1630 | self.success = success |
| 1631 | self.ouch = ouch |
| 1632 | |
| 1633 | def read(self, iprot): |
| 1634 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| 1635 | iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) |
| 1636 | return |
| 1637 | iprot.readStructBegin() |
| 1638 | while True: |
| 1639 | (fname, ftype, fid) = iprot.readFieldBegin() |
| 1640 | if ftype == TType.STOP: |
| 1641 | break |
| 1642 | if fid == 0: |
| 1643 | if ftype == TType.I32: |
| 1644 | self.success = iprot.readI32() |
| 1645 | else: |
| 1646 | iprot.skip(ftype) |
| 1647 | elif fid == 1: |
| 1648 | if ftype == TType.STRUCT: |
| 1649 | self.ouch = InvalidPltfmPmOperation() |
| 1650 | self.ouch.read(iprot) |
| 1651 | else: |
| 1652 | iprot.skip(ftype) |
| 1653 | else: |
| 1654 | iprot.skip(ftype) |
| 1655 | iprot.readFieldEnd() |
| 1656 | iprot.readStructEnd() |
| 1657 | |
| 1658 | def write(self, oprot): |
| 1659 | if oprot._fast_encode is not None and self.thrift_spec is not None: |
| 1660 | oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| 1661 | return |
| 1662 | oprot.writeStructBegin('pltfm_pm_board_type_get_result') |
| 1663 | if self.success is not None: |
| 1664 | oprot.writeFieldBegin('success', TType.I32, 0) |
| 1665 | oprot.writeI32(self.success) |
| 1666 | oprot.writeFieldEnd() |
| 1667 | if self.ouch is not None: |
| 1668 | oprot.writeFieldBegin('ouch', TType.STRUCT, 1) |
| 1669 | self.ouch.write(oprot) |
| 1670 | oprot.writeFieldEnd() |
| 1671 | oprot.writeFieldStop() |
| 1672 | oprot.writeStructEnd() |
| 1673 | |
| 1674 | def validate(self): |
| 1675 | return |
| 1676 | |
| 1677 | def __repr__(self): |
| 1678 | L = ['%s=%r' % (key, value) |
| 1679 | for key, value in self.__dict__.items()] |
| 1680 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) |
| 1681 | |
| 1682 | def __eq__(self, other): |
| 1683 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ |
| 1684 | |
| 1685 | def __ne__(self, other): |
| 1686 | return not (self == other) |
| 1687 | |
| 1688 | |
| 1689 | class pltfm_pm_port_an_set_args(object): |
| 1690 | """ |
| 1691 | Attributes: |
| 1692 | - device |
| 1693 | - dev_port |
| 1694 | - an_flag |
| 1695 | """ |
| 1696 | |
| 1697 | thrift_spec = ( |
| 1698 | None, # 0 |
| 1699 | (1, TType.BYTE, 'device', None, None, ), # 1 |
| 1700 | (2, TType.I32, 'dev_port', None, None, ), # 2 |
| 1701 | (3, TType.I32, 'an_flag', None, None, ), # 3 |
| 1702 | ) |
| 1703 | |
| 1704 | def __init__(self, device=None, dev_port=None, an_flag=None,): |
| 1705 | self.device = device |
| 1706 | self.dev_port = dev_port |
| 1707 | self.an_flag = an_flag |
| 1708 | |
| 1709 | def read(self, iprot): |
| 1710 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| 1711 | iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) |
| 1712 | return |
| 1713 | iprot.readStructBegin() |
| 1714 | while True: |
| 1715 | (fname, ftype, fid) = iprot.readFieldBegin() |
| 1716 | if ftype == TType.STOP: |
| 1717 | break |
| 1718 | if fid == 1: |
| 1719 | if ftype == TType.BYTE: |
| 1720 | self.device = iprot.readByte() |
| 1721 | else: |
| 1722 | iprot.skip(ftype) |
| 1723 | elif fid == 2: |
| 1724 | if ftype == TType.I32: |
| 1725 | self.dev_port = iprot.readI32() |
| 1726 | else: |
| 1727 | iprot.skip(ftype) |
| 1728 | elif fid == 3: |
| 1729 | if ftype == TType.I32: |
| 1730 | self.an_flag = iprot.readI32() |
| 1731 | else: |
| 1732 | iprot.skip(ftype) |
| 1733 | else: |
| 1734 | iprot.skip(ftype) |
| 1735 | iprot.readFieldEnd() |
| 1736 | iprot.readStructEnd() |
| 1737 | |
| 1738 | def write(self, oprot): |
| 1739 | if oprot._fast_encode is not None and self.thrift_spec is not None: |
| 1740 | oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| 1741 | return |
| 1742 | oprot.writeStructBegin('pltfm_pm_port_an_set_args') |
| 1743 | if self.device is not None: |
| 1744 | oprot.writeFieldBegin('device', TType.BYTE, 1) |
| 1745 | oprot.writeByte(self.device) |
| 1746 | oprot.writeFieldEnd() |
| 1747 | if self.dev_port is not None: |
| 1748 | oprot.writeFieldBegin('dev_port', TType.I32, 2) |
| 1749 | oprot.writeI32(self.dev_port) |
| 1750 | oprot.writeFieldEnd() |
| 1751 | if self.an_flag is not None: |
| 1752 | oprot.writeFieldBegin('an_flag', TType.I32, 3) |
| 1753 | oprot.writeI32(self.an_flag) |
| 1754 | oprot.writeFieldEnd() |
| 1755 | oprot.writeFieldStop() |
| 1756 | oprot.writeStructEnd() |
| 1757 | |
| 1758 | def validate(self): |
| 1759 | return |
| 1760 | |
| 1761 | def __repr__(self): |
| 1762 | L = ['%s=%r' % (key, value) |
| 1763 | for key, value in self.__dict__.items()] |
| 1764 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) |
| 1765 | |
| 1766 | def __eq__(self, other): |
| 1767 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ |
| 1768 | |
| 1769 | def __ne__(self, other): |
| 1770 | return not (self == other) |
| 1771 | |
| 1772 | |
| 1773 | class pltfm_pm_port_an_set_result(object): |
| 1774 | """ |
| 1775 | Attributes: |
| 1776 | - success |
| 1777 | - ouch |
| 1778 | """ |
| 1779 | |
| 1780 | thrift_spec = ( |
| 1781 | (0, TType.I32, 'success', None, None, ), # 0 |
| 1782 | (1, TType.STRUCT, 'ouch', (InvalidPltfmPmOperation, InvalidPltfmPmOperation.thrift_spec), None, ), # 1 |
| 1783 | ) |
| 1784 | |
| 1785 | def __init__(self, success=None, ouch=None,): |
| 1786 | self.success = success |
| 1787 | self.ouch = ouch |
| 1788 | |
| 1789 | def read(self, iprot): |
| 1790 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| 1791 | iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) |
| 1792 | return |
| 1793 | iprot.readStructBegin() |
| 1794 | while True: |
| 1795 | (fname, ftype, fid) = iprot.readFieldBegin() |
| 1796 | if ftype == TType.STOP: |
| 1797 | break |
| 1798 | if fid == 0: |
| 1799 | if ftype == TType.I32: |
| 1800 | self.success = iprot.readI32() |
| 1801 | else: |
| 1802 | iprot.skip(ftype) |
| 1803 | elif fid == 1: |
| 1804 | if ftype == TType.STRUCT: |
| 1805 | self.ouch = InvalidPltfmPmOperation() |
| 1806 | self.ouch.read(iprot) |
| 1807 | else: |
| 1808 | iprot.skip(ftype) |
| 1809 | else: |
| 1810 | iprot.skip(ftype) |
| 1811 | iprot.readFieldEnd() |
| 1812 | iprot.readStructEnd() |
| 1813 | |
| 1814 | def write(self, oprot): |
| 1815 | if oprot._fast_encode is not None and self.thrift_spec is not None: |
| 1816 | oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| 1817 | return |
| 1818 | oprot.writeStructBegin('pltfm_pm_port_an_set_result') |
| 1819 | if self.success is not None: |
| 1820 | oprot.writeFieldBegin('success', TType.I32, 0) |
| 1821 | oprot.writeI32(self.success) |
| 1822 | oprot.writeFieldEnd() |
| 1823 | if self.ouch is not None: |
| 1824 | oprot.writeFieldBegin('ouch', TType.STRUCT, 1) |
| 1825 | self.ouch.write(oprot) |
| 1826 | oprot.writeFieldEnd() |
| 1827 | oprot.writeFieldStop() |
| 1828 | oprot.writeStructEnd() |
| 1829 | |
| 1830 | def validate(self): |
| 1831 | return |
| 1832 | |
| 1833 | def __repr__(self): |
| 1834 | L = ['%s=%r' % (key, value) |
| 1835 | for key, value in self.__dict__.items()] |
| 1836 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) |
| 1837 | |
| 1838 | def __eq__(self, other): |
| 1839 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ |
| 1840 | |
| 1841 | def __ne__(self, other): |
| 1842 | return not (self == other) |
| 1843 | |
| 1844 | |
| 1845 | class pltfm_pm_serdes_lane_map_set_args(object): |
| 1846 | """ |
| 1847 | Attributes: |
| 1848 | - device |
| 1849 | """ |
| 1850 | |
| 1851 | thrift_spec = ( |
| 1852 | None, # 0 |
| 1853 | (1, TType.BYTE, 'device', None, None, ), # 1 |
| 1854 | ) |
| 1855 | |
| 1856 | def __init__(self, device=None,): |
| 1857 | self.device = device |
| 1858 | |
| 1859 | def read(self, iprot): |
| 1860 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| 1861 | iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) |
| 1862 | return |
| 1863 | iprot.readStructBegin() |
| 1864 | while True: |
| 1865 | (fname, ftype, fid) = iprot.readFieldBegin() |
| 1866 | if ftype == TType.STOP: |
| 1867 | break |
| 1868 | if fid == 1: |
| 1869 | if ftype == TType.BYTE: |
| 1870 | self.device = iprot.readByte() |
| 1871 | else: |
| 1872 | iprot.skip(ftype) |
| 1873 | else: |
| 1874 | iprot.skip(ftype) |
| 1875 | iprot.readFieldEnd() |
| 1876 | iprot.readStructEnd() |
| 1877 | |
| 1878 | def write(self, oprot): |
| 1879 | if oprot._fast_encode is not None and self.thrift_spec is not None: |
| 1880 | oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| 1881 | return |
| 1882 | oprot.writeStructBegin('pltfm_pm_serdes_lane_map_set_args') |
| 1883 | if self.device is not None: |
| 1884 | oprot.writeFieldBegin('device', TType.BYTE, 1) |
| 1885 | oprot.writeByte(self.device) |
| 1886 | oprot.writeFieldEnd() |
| 1887 | oprot.writeFieldStop() |
| 1888 | oprot.writeStructEnd() |
| 1889 | |
| 1890 | def validate(self): |
| 1891 | return |
| 1892 | |
| 1893 | def __repr__(self): |
| 1894 | L = ['%s=%r' % (key, value) |
| 1895 | for key, value in self.__dict__.items()] |
| 1896 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) |
| 1897 | |
| 1898 | def __eq__(self, other): |
| 1899 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ |
| 1900 | |
| 1901 | def __ne__(self, other): |
| 1902 | return not (self == other) |
| 1903 | |
| 1904 | |
| 1905 | class pltfm_pm_serdes_lane_map_set_result(object): |
| 1906 | """ |
| 1907 | Attributes: |
| 1908 | - success |
| 1909 | - ouch |
| 1910 | """ |
| 1911 | |
| 1912 | thrift_spec = ( |
| 1913 | (0, TType.I32, 'success', None, None, ), # 0 |
| 1914 | (1, TType.STRUCT, 'ouch', (InvalidPltfmPmOperation, InvalidPltfmPmOperation.thrift_spec), None, ), # 1 |
| 1915 | ) |
| 1916 | |
| 1917 | def __init__(self, success=None, ouch=None,): |
| 1918 | self.success = success |
| 1919 | self.ouch = ouch |
| 1920 | |
| 1921 | def read(self, iprot): |
| 1922 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| 1923 | iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) |
| 1924 | return |
| 1925 | iprot.readStructBegin() |
| 1926 | while True: |
| 1927 | (fname, ftype, fid) = iprot.readFieldBegin() |
| 1928 | if ftype == TType.STOP: |
| 1929 | break |
| 1930 | if fid == 0: |
| 1931 | if ftype == TType.I32: |
| 1932 | self.success = iprot.readI32() |
| 1933 | else: |
| 1934 | iprot.skip(ftype) |
| 1935 | elif fid == 1: |
| 1936 | if ftype == TType.STRUCT: |
| 1937 | self.ouch = InvalidPltfmPmOperation() |
| 1938 | self.ouch.read(iprot) |
| 1939 | else: |
| 1940 | iprot.skip(ftype) |
| 1941 | else: |
| 1942 | iprot.skip(ftype) |
| 1943 | iprot.readFieldEnd() |
| 1944 | iprot.readStructEnd() |
| 1945 | |
| 1946 | def write(self, oprot): |
| 1947 | if oprot._fast_encode is not None and self.thrift_spec is not None: |
| 1948 | oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| 1949 | return |
| 1950 | oprot.writeStructBegin('pltfm_pm_serdes_lane_map_set_result') |
| 1951 | if self.success is not None: |
| 1952 | oprot.writeFieldBegin('success', TType.I32, 0) |
| 1953 | oprot.writeI32(self.success) |
| 1954 | oprot.writeFieldEnd() |
| 1955 | if self.ouch is not None: |
| 1956 | oprot.writeFieldBegin('ouch', TType.STRUCT, 1) |
| 1957 | self.ouch.write(oprot) |
| 1958 | oprot.writeFieldEnd() |
| 1959 | oprot.writeFieldStop() |
| 1960 | oprot.writeStructEnd() |
| 1961 | |
| 1962 | def validate(self): |
| 1963 | return |
| 1964 | |
| 1965 | def __repr__(self): |
| 1966 | L = ['%s=%r' % (key, value) |
| 1967 | for key, value in self.__dict__.items()] |
| 1968 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) |
| 1969 | |
| 1970 | def __eq__(self, other): |
| 1971 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ |
| 1972 | |
| 1973 | def __ne__(self, other): |
| 1974 | return not (self == other) |
| 1975 | |
| 1976 | |
| 1977 | class pltfm_pm_serdes_init_args(object): |
| 1978 | """ |
| 1979 | Attributes: |
| 1980 | - device |
| 1981 | """ |
| 1982 | |
| 1983 | thrift_spec = ( |
| 1984 | None, # 0 |
| 1985 | (1, TType.BYTE, 'device', None, None, ), # 1 |
| 1986 | ) |
| 1987 | |
| 1988 | def __init__(self, device=None,): |
| 1989 | self.device = device |
| 1990 | |
| 1991 | def read(self, iprot): |
| 1992 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| 1993 | iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) |
| 1994 | return |
| 1995 | iprot.readStructBegin() |
| 1996 | while True: |
| 1997 | (fname, ftype, fid) = iprot.readFieldBegin() |
| 1998 | if ftype == TType.STOP: |
| 1999 | break |
| 2000 | if fid == 1: |
| 2001 | if ftype == TType.BYTE: |
| 2002 | self.device = iprot.readByte() |
| 2003 | else: |
| 2004 | iprot.skip(ftype) |
| 2005 | else: |
| 2006 | iprot.skip(ftype) |
| 2007 | iprot.readFieldEnd() |
| 2008 | iprot.readStructEnd() |
| 2009 | |
| 2010 | def write(self, oprot): |
| 2011 | if oprot._fast_encode is not None and self.thrift_spec is not None: |
| 2012 | oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| 2013 | return |
| 2014 | oprot.writeStructBegin('pltfm_pm_serdes_init_args') |
| 2015 | if self.device is not None: |
| 2016 | oprot.writeFieldBegin('device', TType.BYTE, 1) |
| 2017 | oprot.writeByte(self.device) |
| 2018 | oprot.writeFieldEnd() |
| 2019 | oprot.writeFieldStop() |
| 2020 | oprot.writeStructEnd() |
| 2021 | |
| 2022 | def validate(self): |
| 2023 | return |
| 2024 | |
| 2025 | def __repr__(self): |
| 2026 | L = ['%s=%r' % (key, value) |
| 2027 | for key, value in self.__dict__.items()] |
| 2028 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) |
| 2029 | |
| 2030 | def __eq__(self, other): |
| 2031 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ |
| 2032 | |
| 2033 | def __ne__(self, other): |
| 2034 | return not (self == other) |
| 2035 | |
| 2036 | |
| 2037 | class pltfm_pm_serdes_init_result(object): |
| 2038 | """ |
| 2039 | Attributes: |
| 2040 | - success |
| 2041 | - ouch |
| 2042 | """ |
| 2043 | |
| 2044 | thrift_spec = ( |
| 2045 | (0, TType.I32, 'success', None, None, ), # 0 |
| 2046 | (1, TType.STRUCT, 'ouch', (InvalidPltfmPmOperation, InvalidPltfmPmOperation.thrift_spec), None, ), # 1 |
| 2047 | ) |
| 2048 | |
| 2049 | def __init__(self, success=None, ouch=None,): |
| 2050 | self.success = success |
| 2051 | self.ouch = ouch |
| 2052 | |
| 2053 | def read(self, iprot): |
| 2054 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| 2055 | iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) |
| 2056 | return |
| 2057 | iprot.readStructBegin() |
| 2058 | while True: |
| 2059 | (fname, ftype, fid) = iprot.readFieldBegin() |
| 2060 | if ftype == TType.STOP: |
| 2061 | break |
| 2062 | if fid == 0: |
| 2063 | if ftype == TType.I32: |
| 2064 | self.success = iprot.readI32() |
| 2065 | else: |
| 2066 | iprot.skip(ftype) |
| 2067 | elif fid == 1: |
| 2068 | if ftype == TType.STRUCT: |
| 2069 | self.ouch = InvalidPltfmPmOperation() |
| 2070 | self.ouch.read(iprot) |
| 2071 | else: |
| 2072 | iprot.skip(ftype) |
| 2073 | else: |
| 2074 | iprot.skip(ftype) |
| 2075 | iprot.readFieldEnd() |
| 2076 | iprot.readStructEnd() |
| 2077 | |
| 2078 | def write(self, oprot): |
| 2079 | if oprot._fast_encode is not None and self.thrift_spec is not None: |
| 2080 | oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| 2081 | return |
| 2082 | oprot.writeStructBegin('pltfm_pm_serdes_init_result') |
| 2083 | if self.success is not None: |
| 2084 | oprot.writeFieldBegin('success', TType.I32, 0) |
| 2085 | oprot.writeI32(self.success) |
| 2086 | oprot.writeFieldEnd() |
| 2087 | if self.ouch is not None: |
| 2088 | oprot.writeFieldBegin('ouch', TType.STRUCT, 1) |
| 2089 | self.ouch.write(oprot) |
| 2090 | oprot.writeFieldEnd() |
| 2091 | oprot.writeFieldStop() |
| 2092 | oprot.writeStructEnd() |
| 2093 | |
| 2094 | def validate(self): |
| 2095 | return |
| 2096 | |
| 2097 | def __repr__(self): |
| 2098 | L = ['%s=%r' % (key, value) |
| 2099 | for key, value in self.__dict__.items()] |
| 2100 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) |
| 2101 | |
| 2102 | def __eq__(self, other): |
| 2103 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ |
| 2104 | |
| 2105 | def __ne__(self, other): |
| 2106 | return not (self == other) |