Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2013
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.96 KB | None | 0 0
  1. 2013-01-23 16:13:38,282 [script-172.16.24.45-DLink.DxS.get_lldp_neighbors] cli(show lldp remote_ports mode normal) returns:
  2. ===[ show lldp remote_ports mode normal ]===============================
  3. 'Command: show lldp remote_ports mode normal\n\nPort ID : 1 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 2 \n-------------
  4. --------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 3 \n---------------------------------------------------------------------------\nRemote Enti
  5. ties count : 0 \n (NONE)\n\nPort ID : 4 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 5 \n------------------------------
  6. ---------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 6 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n
  7. (NONE)\n\nPort ID : 7 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 8 \n-----------------------------------------------
  8. ----------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 9 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPor
  9. t ID : 10 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 11 \n--------------------------------------------------------------
  10. -------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 12 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 13 \n--
  11. -------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 14 \n---------------------------------------------------------------------------\
  12. nRemote Entities count : 0 \n (NONE)\n\nPort ID : 15 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 16 \n----------------
  13. -----------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 17 \n---------------------------------------------------------------------------\nRemote Entiti
  14. es count : 0 \n (NONE)\n\nPort ID : 18 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 19 \n------------------------------
  15. ---------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 20 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \
  16. n (NONE)\n\nPort ID : 21 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 22 \n--------------------------------------------
  17. -------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 23 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\
  18. nPort ID : 24 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 25 \n----------------------------------------------------------
  19. -----------------\nRemote Entities count : 1 \nEntity 1 \n Chassis Id Subtype : MACADDRESS \n Chassis Id : 00-1B-11-21-63-44\n Port Id Subtype
  20. : LOCAL \n Port ID : 1/26\n Port Description : \n System Name : \n System
  21. Description : \n System Capabilities : \n Management Address count : 0\n Port PVID : 0\n PPVID Ent
  22. ries count : 0\n VLAN Name Entries count : 0\n Protocol ID Entries count : 0\n MAC/PHY Configuration/Status : (None)\n Powe
  23. r Via MDI : (None)\n Link Aggregation : (None)\n Maximum Frame Size : 0\n Unknown TLVs count : 0
  24. \n\nPort ID : 26 \n---------------------------------------------------------------------------\nRemote Entities count : 1 \nEntity 1 \n Chassis Id Subtype : MACADDRESS \n Chassi
  25. s Id : 5C-D9-98-CC-06-20\n Port Id Subtype : MACADDRESS \n Port ID : 5C-D9-98-CC-06-51\n Port Descriptio
  26. n : D-Link DES-3552 R3.00.B020 Port 49 on Unit 1 \n System Name : 24.44\n System Description : Fast Ethernet Switch\n
  27. System Capabilities : Repeater, Bridge, \n Management Address count : 0\n Port PVID : 1\n PPVID Entries count
  28. : 0\n VLAN Name Entries count : 2\n Protocol ID Entries count : 0\n MAC/PHY Configuration/Status : (See detail)\n Power Via MDI
  29. : (None)\n Link Aggregation : (See detail)\n Maximum Frame Size : 9216\n Unknown TLVs count : 0\n\n\n'
  30. ========================================================================
  31. 2013-01-23 16:13:38,284 [script-172.16.24.45-DLink.DxS.get_lldp_neighbors] Unhandled exception
  32. 2013-01-23 16:13:38,287 [script-172.16.24.45-DLink.DxS.get_lldp_neighbors] Script traceback:
  33. <type 'exceptions.KeyError'>
  34. 'remote_port_subtype'
  35. START OF TRACEBACK
  36. ------------------------------------------------------------------------
  37. File: /opt/noc/sa/profiles/DLink/DxS/get_lldp_neighbors.py (Line: 158)
  38. Function: execute
  39. 151 >>> DES-3526/3550 Series
  40. 152 1/2
  41. 153 >>> DES-3028/3052 Series
  42. 154 RMON Port 2 on Unit 1
  43. 155 >>> Other switches
  44. 156 2
  45. 157 '''
  46. 158 ==> if n["remote_port_subtype"] == 7 \
  47. 159 and n["remote_port"].lower().startswith("rmon port"):
  48. 160 match = self.rx_remote_port_id2.search(n["remote_port"])
  49. 161 if not match:
  50. 162 # Debug string
  51. 163 print "\n\n\n\n\nInvalid remote_port_id\n\n\n\n\n"
  52. 164 continue
  53. Variables:
  54. remote_port_subtype = 'MACADDRESS'
  55. i = {'neighbors': [], 'local_interface': '26'}
  56. s1 = ' \n Chassis Id Subtype : MACADDRESS \n Chassis Id : 5C-D9-98-CC-06-20\n Port Id Subtype : MACADDRESS \n Port ID : 5C-D9-98-CC-06-51\n Port Description : D-Link DES-3552 R3.00.B020 Port 49 on Unit 1 \n System Name : 24.44\n System Description : Fast Ethernet Switch\n System Capabilities : Repeater, Bridge, \n Management Address count : 0\n Port PVID : 1\n PPVID Entries count : 0\n VLAN Name Entries count : 2\n Protocol ID Entries count : 0\n MAC/PHY Configuration/Status : (See detail)\n Power Via MDI : (None)\n Link Aggregation : (See detail)\n Maximum Frame Size : 9216\n Unknown TLVs count : 0\n\n\n'
  57. n = {'remote_port': '5C-D9-98-CC-06-51', 'remote_chassis_id': '5C-D9-98-CC-06-20', 'remote_chassis_id_subtype': 4}
  58. s = '26 \n---------------------------------------------------------------------------\nRemote Entities count : 1 \nEntity 1 \n Chassis Id Subtype : MACADDRESS \n Chassis Id : 5C-D9-98-CC-06-20\n Port Id Subtype : MACADDRESS \n Port ID : 5C-D9-98-CC-06-51\n Port Description : D-Link DES-3552 R3.00.B020 Port 49 on Unit 1 \n System Name : 24.44\n System Description : Fast Ethernet Switch\n System Capabilities : Repeater, Bridge, \n Management Address count : 0\n Port PVID : 1\n PPVID Entries count : 0\n VLAN Name Entries count : 2\n Protocol ID Entries count : 0\n MAC/PHY Configuration/Status : (See detail)\n Power Via MDI : (None)\n Link Aggregation : (See detail)\n Maximum Frame Size : 9216\n Unknown TLVs count : 0\n\n\n'
  59. r = [{'neighbors': [{'remote_port_subtype': 7, 'remote_capabilities': 0, 'remote_port': '26', 'remote_chassis_id': '00-1B-11-21-63-44', 'remote_chassis_id_subtype': 4}], 'local_interface': '25'}]
  60. v = '\nCommand: show lldp remote_ports mode normal\n\nPort ID : 1 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 2 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 3 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 4 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 5 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 6 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 7 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 8 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 9 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 10 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 11 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 12 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 13 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 14 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 15 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 16 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 17 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 18 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 19 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 20 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 21 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 22 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 23 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 24 \n---------------------------------------------------------------------------\nRemote Entities count : 0 \n (NONE)\n\nPort ID : 25 \n---------------------------------------------------------------------------\nRemote Entities count : 1 \nEntity 1 \n Chassis Id Subtype : MACADDRESS \n Chassis Id : 00-1B-11-21-63-44\n Port Id Subtype : LOCAL \n Port ID : 1/26\n Port Description : \n System Name : \n System Description : \n System Capabilities : \n Management Address count : 0\n Port PVID : 0\n PPVID Entries count : 0\n VLAN Name Entries count : 0\n Protocol ID Entries count : 0\n MAC/PHY Configuration/Status : (None)\n Power Via MDI : (None)\n Link Aggregation : (None)\n Maximum Frame Size : 0\n Unknown TLVs count : 0\n\nPort ID : 26 \n---------------------------------------------------------------------------\nRemote Entities count : 1 \nEntity 1 \n Chassis Id Subtype : MACADDRESS \n Chassis Id : 5C-D9-98-CC-06-20\n Port Id Subtype : MACADDRESS \n Port ID : 5C-D9-98-CC-06-51\n Port Description : D-Link DES-3552 R3.00.B020 Port 49 on Unit 1 \n System Name : 24.44\n System Description : Fast Ethernet Switch\n System Capabilities : Repeater, Bridge, \n Management Address count : 0\n Port PVID : 1\n PPVID Entries count : 0\n VLAN Name Entries count : 2\n Protocol ID Entries count : 0\n MAC/PHY Configuration/Status : (See detail)\n Power Via MDI : (None)\n Link Aggregation : (See detail)\n Maximum Frame Size : 9216\n Unknown TLVs count : 0\n\n\n'
  61. caps = 0
  62. port_id = '26'
  63. self = <Script(script-172.16.24.45-DLink.DxS.get_lldp_neighbors, started 140145729754880)>
  64. match = <_sre.SRE_Match object at 0x49a1608>
  65. remote_chassis_id_subtype = 'MACADDRESS'
  66. ------------------------------------------------------------------------
  67. ------------------------------------------------------------------------
  68. File: /opt/noc/sa/script/script.py (Line: 419)
  69. Function: guarded_run
  70. 412 return result
  71. 413 except KeyError:
  72. 414 self.debug("Not in call cache: %r, %r" % (self.name,
  73. 415 self.kwargs))
  74. 416 pass
  75. 417 # Calling script body
  76. 418 self._thread_id = thread.get_ident()
  77. 419 ==> result = self.execute(**self.kwargs)
  78. 420 # Enforce interface result checking
  79. 421 for i in self.implements:
  80. 422 result = i.script_clean_result(self.profile, result)
  81. 423 # Cache result when required
  82. 424 if self.cache and self.parent is not None:
  83. 425 self.debug("Write to call cache: %s, %s, %r" % (self.name,
  84. Variables:
  85. i = <noc.sa.interfaces.igetlldpneighbors.IGetLLDPNeighbors object at 0x42b1250>
  86. self = <Script(script-172.16.24.45-DLink.DxS.get_lldp_neighbors, started 140145729754880)>
  87. ------------------------------------------------------------------------
  88. File: /opt/noc/sa/script/script.py (Line: 442)
  89. Function: run
  90. 435
  91. 436 def run(self):
  92. 437 """Script thread worker method"""
  93. 438 self.debug("Running")
  94. 439 result = None
  95. 440 try:
  96. 441 with self.cancelable():
  97. 442 ==> result = self.guarded_run()
  98. 443 except self.TimeOutError:
  99. 444 self.error("Timed out")
  100. 445 self.e_timeout = True
  101. 446 except CancelledError:
  102. 447 self.error("Cancelled")
  103. 448 self.e_cancel = True
  104. Variables:
  105. self = <Script(script-172.16.24.45-DLink.DxS.get_lldp_neighbors, started 140145729754880)>
  106. r = ["<type 'exceptions.KeyError'>", "'remote_port_subtype'"]
  107. result = None
  108. v = KeyError('remote_port_subtype',)
  109. tb = <traceback object at 0x4aec3f8>
  110. t = <type 'exceptions.KeyError'>
  111. ------------------------------------------------------------------------
  112. END OF TRACEBACK
  113. 2013-01-23 16:13:38,293 [script-172.16.24.45-DLink.DxS.get_lldp_neighbors] Closing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement