Advertisement
Guest User

Untitled

a guest
Jun 3rd, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.93 KB | None | 0 0
  1. 2013-06-03 16:11:11,365 script(Huawei.VRP.get_lldp_neighbors,hsw01-ors-karaksha,**{}) failed: <type 'exceptions.KeyError'>
  2. 'interfaceAlias'
  3. START OF TRACEBACK
  4. ------------------------------------------------------------------------
  5. File: /opt/noc/sa/profiles/Huawei/VRP/get_lldp_neighbors.py (Line: 81)
  6. Function: parse_neighbor
  7. 74 for match_data in rx_neigh.finditer(match_n.group("neighbor")):
  8. 75 n = {"remote_chassis_id_subtype": 4}
  9. 76 if match_data:
  10. 77 n["remote_port_subtype"] = {
  11. 78 "macAddress": 3,
  12. 79 "interfaceName": 5,
  13. 80 "local": 7
  14. 81 ==> }[match_data.group("p_type")]
  15. 82 if n["remote_port_subtype"] == 3:
  16. 83 n["remote_port"] = \
  17. 84 MACAddressParameter().clean(match_data.group("p_id"))
  18. 85 else:
  19. 86 n["remote_port"] = match_data.group("p_id")
  20. 87 n["remote_chassis_id"] = match_data.group("id")
  21. Variables:
  22. match_n = <_sre.SRE_Match object at 0x389c4e0>
  23. text =
  24. '\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'
  25. n = {'remote_chassis_id_subtype': 4}
  26. rx_neigh = <_sre.SRE_Pattern object at 0x7f30b0013380>
  27. match_data = <_sre.SRE_Match object at 0x37ed418>
  28. rx_ngh_line = <_sre.SRE_Pattern object at 0x7f30b0010670>
  29. ------------------------------------------------------------------------
  30. File: /opt/noc/sa/profiles/Huawei/VRP/get_lldp_neighbors.py (Line: 58)
  31. Function: execute_other
  32. 51 i["neighbors"] += [parse_neighbor(pre)]
  33. 52 r += [i]
  34. 53 i = {
  35. 54 "local_interface": match.group("local_if"),
  36. 55 "neighbors": []
  37. 56 }
  38. 57 if lldp and "neighbors" in i:
  39. 58 ==> i["neighbors"] += [parse_neighbor(lldp)]
  40. 59 r += [i]
  41. 60 return r
  42. 61
  43. 62
  44. 63 def parse_neighbor(text):
  45. 64 rx_ngh_line = re.compile(
  46. Variables:
  47. pre = 'Ethernet0/0/1 has 0 neighbors\n\n'
  48. lldp =
  49. '\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'
  50. i = {'neighbors': [], 'local_interface': 'Ethernet0/0/2'}
  51. self = <Script(Thread-9, started 139847214921472)>
  52. r = []
  53. match = None
  54. ------------------------------------------------------------------------
  55. File: /opt/noc/sa/script/script.py (Line: 512)
  56. Function: execute
  57. 505 """
  58. 506 if self._execute_chain and not self.name.endswith(".get_version"):
  59. 507 # Get version information
  60. 508 v = self.scripts.get_version()
  61. 509 # Find and execute proper handler
  62. 510 for c, f in self._execute_chain:
  63. 511 if c(self, v):
  64. 512 ==> return f(self, **kwargs)
  65. 513 # Raise error
  66. 514 raise NotSupportedError()
  67. 515
  68. 516 def cli_queue_get(self):
  69. 517 """
  70. 518 Request CLI provider's queue
  71. Variables:
  72. kwargs = {}
  73. c = <function <lambda> at 0x37e0b90>
  74. v =
  75. {'attributes': {'image': 'V100R005C01SPC100'},
  76. 'platform': 'S2326TP-EI',
  77. 'vendor': 'Huawei',
  78. 'version': '5.70'}
  79. self = <Script(Thread-9, started 139847214921472)>
  80. f = <function execute_other at 0x37e0b18>
  81. ------------------------------------------------------------------------
  82. File: /opt/noc/sa/script/script.py (Line: 422)
  83. Function: guarded_run
  84. 415 return result
  85. 416 except KeyError:
  86. 417 self.debug("Not in call cache: %r, %r" % (self.name,
  87. 418 self.kwargs))
  88. 419 pass
  89. 420 # Calling script body
  90. 421 self._thread_id = thread.get_ident()
  91. 422 ==> result = self.execute(**self.kwargs)
  92. 423 # Enforce interface result checking
  93. 424 for i in self.implements:
  94. 425 result = i.script_clean_result(self.profile, result)
  95. 426 # Cache result when required
  96. 427 if self.cache and self.parent is not None:
  97. 428 self.debug("Write to call cache: %s, %s, %r" % (self.name,
  98. Variables:
  99. i =
  100. <noc.sa.interfaces.igetlldpneighbors.IGetLLDPNeighbors object at 0x37dead0>
  101. self = <Script(Thread-9, started 139847214921472)>
  102. ------------------------------------------------------------------------
  103. File: /opt/noc/sa/script/script.py (Line: 445)
  104. Function: run
  105. 438
  106. 439 def run(self):
  107. 440 """Script thread worker method"""
  108. 441 self.debug("Running")
  109. 442 result = None
  110. 443 try:
  111. 444 with self.cancelable():
  112. 445 ==> result = self.guarded_run()
  113. 446 except self.TimeOutError:
  114. 447 self.error("Timed out")
  115. 448 self.e_timeout = True
  116. 449 except CancelledError:
  117. 450 self.error("Cancelled")
  118. 451 self.e_cancel = True
  119. Variables:
  120. self = <Script(Thread-9, started 139847214921472)>
  121. r = ["<type 'exceptions.KeyError'>", "'interfaceAlias'"]
  122. result = None
  123. v = KeyError('interfaceAlias',)
  124. tb = <traceback object at 0x3960a28>
  125. t = <type 'exceptions.KeyError'>
  126. ------------------------------------------------------------------------
  127. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement