Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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:
- ===[ show lldp remote_ports mode normal ]===============================
- 'Command: 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 Enti
- ties 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\nPor
- t 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 Entiti
- es 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 Ent
- ries count : 0\n VLAN Name Entries count : 0\n Protocol ID Entries count : 0\n MAC/PHY Configuration/Status : (None)\n Powe
- r 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 Chassi
- 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
- 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
- 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'
- ========================================================================
- 2013-01-23 16:13:38,284 [script-172.16.24.45-DLink.DxS.get_lldp_neighbors] Unhandled exception
- 2013-01-23 16:13:38,287 [script-172.16.24.45-DLink.DxS.get_lldp_neighbors] Script traceback:
- <type 'exceptions.KeyError'>
- 'remote_port_subtype'
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/sa/profiles/DLink/DxS/get_lldp_neighbors.py (Line: 158)
- Function: execute
- 151 >>> DES-3526/3550 Series
- 152 1/2
- 153 >>> DES-3028/3052 Series
- 154 RMON Port 2 on Unit 1
- 155 >>> Other switches
- 156 2
- 157 '''
- 158 ==> if n["remote_port_subtype"] == 7 \
- 159 and n["remote_port"].lower().startswith("rmon port"):
- 160 match = self.rx_remote_port_id2.search(n["remote_port"])
- 161 if not match:
- 162 # Debug string
- 163 print "\n\n\n\n\nInvalid remote_port_id\n\n\n\n\n"
- 164 continue
- Variables:
- remote_port_subtype = 'MACADDRESS'
- i = {'neighbors': [], 'local_interface': '26'}
- 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'
- n = {'remote_port': '5C-D9-98-CC-06-51', 'remote_chassis_id': '5C-D9-98-CC-06-20', 'remote_chassis_id_subtype': 4}
- 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'
- 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'}]
- 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'
- caps = 0
- port_id = '26'
- self = <Script(script-172.16.24.45-DLink.DxS.get_lldp_neighbors, started 140145729754880)>
- match = <_sre.SRE_Match object at 0x49a1608>
- remote_chassis_id_subtype = 'MACADDRESS'
- ------------------------------------------------------------------------
- ------------------------------------------------------------------------
- File: /opt/noc/sa/script/script.py (Line: 419)
- Function: guarded_run
- 412 return result
- 413 except KeyError:
- 414 self.debug("Not in call cache: %r, %r" % (self.name,
- 415 self.kwargs))
- 416 pass
- 417 # Calling script body
- 418 self._thread_id = thread.get_ident()
- 419 ==> result = self.execute(**self.kwargs)
- 420 # Enforce interface result checking
- 421 for i in self.implements:
- 422 result = i.script_clean_result(self.profile, result)
- 423 # Cache result when required
- 424 if self.cache and self.parent is not None:
- 425 self.debug("Write to call cache: %s, %s, %r" % (self.name,
- Variables:
- i = <noc.sa.interfaces.igetlldpneighbors.IGetLLDPNeighbors object at 0x42b1250>
- self = <Script(script-172.16.24.45-DLink.DxS.get_lldp_neighbors, started 140145729754880)>
- ------------------------------------------------------------------------
- File: /opt/noc/sa/script/script.py (Line: 442)
- Function: run
- 435
- 436 def run(self):
- 437 """Script thread worker method"""
- 438 self.debug("Running")
- 439 result = None
- 440 try:
- 441 with self.cancelable():
- 442 ==> result = self.guarded_run()
- 443 except self.TimeOutError:
- 444 self.error("Timed out")
- 445 self.e_timeout = True
- 446 except CancelledError:
- 447 self.error("Cancelled")
- 448 self.e_cancel = True
- Variables:
- self = <Script(script-172.16.24.45-DLink.DxS.get_lldp_neighbors, started 140145729754880)>
- r = ["<type 'exceptions.KeyError'>", "'remote_port_subtype'"]
- result = None
- v = KeyError('remote_port_subtype',)
- tb = <traceback object at 0x4aec3f8>
- t = <type 'exceptions.KeyError'>
- ------------------------------------------------------------------------
- END OF TRACEBACK
- 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