Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2013-06-03 16:11:11,365 script(Huawei.VRP.get_lldp_neighbors,hsw01-ors-karaksha,**{}) failed: <type 'exceptions.KeyError'>
- 'interfaceAlias'
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/sa/profiles/Huawei/VRP/get_lldp_neighbors.py (Line: 81)
- Function: parse_neighbor
- 74 for match_data in rx_neigh.finditer(match_n.group("neighbor")):
- 75 n = {"remote_chassis_id_subtype": 4}
- 76 if match_data:
- 77 n["remote_port_subtype"] = {
- 78 "macAddress": 3,
- 79 "interfaceName": 5,
- 80 "local": 7
- 81 ==> }[match_data.group("p_type")]
- 82 if n["remote_port_subtype"] == 3:
- 83 n["remote_port"] = \
- 84 MACAddressParameter().clean(match_data.group("p_id"))
- 85 else:
- 86 n["remote_port"] = match_data.group("p_id")
- 87 n["remote_chassis_id"] = match_data.group("id")
- Variables:
- match_n = <_sre.SRE_Match object at 0x389c4e0>
- text =
- '\n\nNeighbor index : 1\nChassis type :macAddress \nChassis ID :0019-2f65-1917 \nPort ID type :interfaceAlias \nPort ID :VTK PPPoE\nPort description :GigabitEthernet1/0/23\nSystem name :sw1-orsh-mnpz.marnpz.ru\nSystem description :Cisco IOS Software, C3750 Software (C3750-ADVIPSERVICESK9-M), Version 12.2(40)SE, RELEASE SOFTWARE (fc3)\nCopyright (c) 1986-2007 by Cisco Systems, Inc.\nCompiled Fri 24-Aug-07 00:56 by myl\nSystem capabilities supported :bridge router \nSystem capabilities enabled :router \nExpired time :102s\n\n\nPort VLAN ID(PVID) :10\nProtocol identity : \n\nAuto-negotiation supported :Yes \nAuto-negotiation enabled :Yes\nOperMau :speed(100)/duplex(Full)\n\nPower port class :PD \nPSE power supported :No \nPSE power enabled :No \nPSE pairs control ability:No \nPower pairs :Unknown \nPort power classification:Unknown\n\nLink aggregation supported:No \nLink aggregation enabled :No \nAggregation port ID :0 \nMaximum frame Size :0\n\nMED Device information \nDevice class :Network Connectivity\n\nHardwareRev :WS-C3750G-24TS (PowerPC405):M0\nFirmwareRev :NA\nSoftwareRev :12.2(40)SE\nSerialNum :NA\nManufacturer name :Cisco Systems, Inc.\nModel name :WS-C3750G-24TS\nAsset tracking identifier :NA\n\nMedia policy type :Voice \nUnknown Policy :Unknown \nVLAN tagged :No \nMedia policy VlanID :0 \nMedia policy L2 priority :0 \nMedia policy Dscp :0\n\nPower Type :PSE \nPoE PSE power source :Unknown \nPort PSE Priority :Unknown \nPort Available power value:0\n\nLocation format :Civic Address LCI\nLocation information:what(DHCP server) country()\n Ca type Ca value\nEthernet0/0/3 has 0 neighbors\n\nEthernet0/0/4 has 0 neighbors\n\nEthernet0/0/5 has 0 neighbors\n\nEthernet0/0/6 has 0 neighbors\n\nEthernet0/0/7 has 0 neighbors\n\nEthernet0/0/8 has 0 neighbors\n\nEthernet0/0/9 has 0 neighbors\n\nEthernet0/0/10 has 0 neighbors\n\nEthernet0/0/11 has 0 neighbors\n\nEthernet0/0/12 has 0 neighbors\n\nEthernet0/0/13 has 0 neighbors\n\nEthernet0/0/14 has 0 neighbors\n\nEthernet0/0/15 has 0 neighbors\n\nEthernet0/0/16 has 0 neighbors\n\nEthernet0/0/17 has 0 neighbors\n\nEthernet0/0/18 has 0 neighbors\n\nEthernet0/0/19 has 0 neighbors\n\nEthernet0/0/20 has 0 neighbors\n\nEthernet0/0/21 has 0 neighbors\n\nEthernet0/0/22 has 0 neighbors\n\nEthernet0/0/23 has 0 neighbors\n\nEthernet0/0/24 has 0 neighbors\n\nGigabitEthernet0/0/1 has 0 neighbors\n\nGigabitEthernet0/0/2 has 0 neighbors\n\n'
- n = {'remote_chassis_id_subtype': 4}
- rx_neigh = <_sre.SRE_Pattern object at 0x7f30b0013380>
- match_data = <_sre.SRE_Match object at 0x37ed418>
- rx_ngh_line = <_sre.SRE_Pattern object at 0x7f30b0010670>
- ------------------------------------------------------------------------
- File: /opt/noc/sa/profiles/Huawei/VRP/get_lldp_neighbors.py (Line: 58)
- Function: execute_other
- 51 i["neighbors"] += [parse_neighbor(pre)]
- 52 r += [i]
- 53 i = {
- 54 "local_interface": match.group("local_if"),
- 55 "neighbors": []
- 56 }
- 57 if lldp and "neighbors" in i:
- 58 ==> i["neighbors"] += [parse_neighbor(lldp)]
- 59 r += [i]
- 60 return r
- 61
- 62
- 63 def parse_neighbor(text):
- 64 rx_ngh_line = re.compile(
- Variables:
- pre = 'Ethernet0/0/1 has 0 neighbors\n\n'
- lldp =
- '\n\nNeighbor index : 1\nChassis type :macAddress \nChassis ID :0019-2f65-1917 \nPort ID type :interfaceAlias \nPort ID :VTK PPPoE\nPort description :GigabitEthernet1/0/23\nSystem name :sw1-orsh-mnpz.marnpz.ru\nSystem description :Cisco IOS Software, C3750 Software (C3750-ADVIPSERVICESK9-M), Version 12.2(40)SE, RELEASE SOFTWARE (fc3)\nCopyright (c) 1986-2007 by Cisco Systems, Inc.\nCompiled Fri 24-Aug-07 00:56 by myl\nSystem capabilities supported :bridge router \nSystem capabilities enabled :router \nExpired time :102s\n\n\nPort VLAN ID(PVID) :10\nProtocol identity : \n\nAuto-negotiation supported :Yes \nAuto-negotiation enabled :Yes\nOperMau :speed(100)/duplex(Full)\n\nPower port class :PD \nPSE power supported :No \nPSE power enabled :No \nPSE pairs control ability:No \nPower pairs :Unknown \nPort power classification:Unknown\n\nLink aggregation supported:No \nLink aggregation enabled :No \nAggregation port ID :0 \nMaximum frame Size :0\n\nMED Device information \nDevice class :Network Connectivity\n\nHardwareRev :WS-C3750G-24TS (PowerPC405):M0\nFirmwareRev :NA\nSoftwareRev :12.2(40)SE\nSerialNum :NA\nManufacturer name :Cisco Systems, Inc.\nModel name :WS-C3750G-24TS\nAsset tracking identifier :NA\n\nMedia policy type :Voice \nUnknown Policy :Unknown \nVLAN tagged :No \nMedia policy VlanID :0 \nMedia policy L2 priority :0 \nMedia policy Dscp :0\n\nPower Type :PSE \nPoE PSE power source :Unknown \nPort PSE Priority :Unknown \nPort Available power value:0\n\nLocation format :Civic Address LCI\nLocation information:what(DHCP server) country()\n Ca type Ca value\nEthernet0/0/3 has 0 neighbors\n\nEthernet0/0/4 has 0 neighbors\n\nEthernet0/0/5 has 0 neighbors\n\nEthernet0/0/6 has 0 neighbors\n\nEthernet0/0/7 has 0 neighbors\n\nEthernet0/0/8 has 0 neighbors\n\nEthernet0/0/9 has 0 neighbors\n\nEthernet0/0/10 has 0 neighbors\n\nEthernet0/0/11 has 0 neighbors\n\nEthernet0/0/12 has 0 neighbors\n\nEthernet0/0/13 has 0 neighbors\n\nEthernet0/0/14 has 0 neighbors\n\nEthernet0/0/15 has 0 neighbors\n\nEthernet0/0/16 has 0 neighbors\n\nEthernet0/0/17 has 0 neighbors\n\nEthernet0/0/18 has 0 neighbors\n\nEthernet0/0/19 has 0 neighbors\n\nEthernet0/0/20 has 0 neighbors\n\nEthernet0/0/21 has 0 neighbors\n\nEthernet0/0/22 has 0 neighbors\n\nEthernet0/0/23 has 0 neighbors\n\nEthernet0/0/24 has 0 neighbors\n\nGigabitEthernet0/0/1 has 0 neighbors\n\nGigabitEthernet0/0/2 has 0 neighbors\n\n'
- i = {'neighbors': [], 'local_interface': 'Ethernet0/0/2'}
- self = <Script(Thread-9, started 139847214921472)>
- r = []
- match = None
- ------------------------------------------------------------------------
- File: /opt/noc/sa/script/script.py (Line: 512)
- Function: execute
- 505 """
- 506 if self._execute_chain and not self.name.endswith(".get_version"):
- 507 # Get version information
- 508 v = self.scripts.get_version()
- 509 # Find and execute proper handler
- 510 for c, f in self._execute_chain:
- 511 if c(self, v):
- 512 ==> return f(self, **kwargs)
- 513 # Raise error
- 514 raise NotSupportedError()
- 515
- 516 def cli_queue_get(self):
- 517 """
- 518 Request CLI provider's queue
- Variables:
- kwargs = {}
- c = <function <lambda> at 0x37e0b90>
- v =
- {'attributes': {'image': 'V100R005C01SPC100'},
- 'platform': 'S2326TP-EI',
- 'vendor': 'Huawei',
- 'version': '5.70'}
- self = <Script(Thread-9, started 139847214921472)>
- f = <function execute_other at 0x37e0b18>
- ------------------------------------------------------------------------
- File: /opt/noc/sa/script/script.py (Line: 422)
- Function: guarded_run
- 415 return result
- 416 except KeyError:
- 417 self.debug("Not in call cache: %r, %r" % (self.name,
- 418 self.kwargs))
- 419 pass
- 420 # Calling script body
- 421 self._thread_id = thread.get_ident()
- 422 ==> result = self.execute(**self.kwargs)
- 423 # Enforce interface result checking
- 424 for i in self.implements:
- 425 result = i.script_clean_result(self.profile, result)
- 426 # Cache result when required
- 427 if self.cache and self.parent is not None:
- 428 self.debug("Write to call cache: %s, %s, %r" % (self.name,
- Variables:
- i =
- <noc.sa.interfaces.igetlldpneighbors.IGetLLDPNeighbors object at 0x37dead0>
- self = <Script(Thread-9, started 139847214921472)>
- ------------------------------------------------------------------------
- File: /opt/noc/sa/script/script.py (Line: 445)
- Function: run
- 438
- 439 def run(self):
- 440 """Script thread worker method"""
- 441 self.debug("Running")
- 442 result = None
- 443 try:
- 444 with self.cancelable():
- 445 ==> result = self.guarded_run()
- 446 except self.TimeOutError:
- 447 self.error("Timed out")
- 448 self.e_timeout = True
- 449 except CancelledError:
- 450 self.error("Cancelled")
- 451 self.e_cancel = True
- Variables:
- self = <Script(Thread-9, started 139847214921472)>
- r = ["<type 'exceptions.KeyError'>", "'interfaceAlias'"]
- result = None
- v = KeyError('interfaceAlias',)
- tb = <traceback object at 0x3960a28>
- t = <type 'exceptions.KeyError'>
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement