Advertisement
Guest User

Untitled

a guest
Jan 14th, 2013
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.20 KB | None | 0 0
  1. START OF TRACEBACK
  2. ------------------------------------------------------------------------
  3. File: /opt/noc/sa/script/script.py (Line: 935)
  4. Function: re_search
  5. 928 Returns match object.
  6. 929 rx can be string or compiled regular expression
  7. 930 """
  8. 931 if isinstance(rx, basestring):
  9. 932 rx = re.compile(rx, flags)
  10. 933 match = rx.search(s)
  11. 934 if match is None:
  12. 935 ==> raise self.UnexpectedResultError()
  13. 936 return match
  14. 937
  15. 938 def re_match(self, rx, s, flags=0):
  16. 939 """
  17. 940 Match s against regular expression rx using re.match
  18. 941 Raise UnexpectedResultError if regular expression is not matched.
  19. Variables:
  20. rx = <_sre.SRE_Pattern object at 0x2194930>
  21. s = '\n LLDP Remote Devices Information Detail\n\n\n'
  22. flags = 0
  23. self = <Script(script-10.12.70.5-EdgeCore.ES.get_lldp_neighbors, started 140283957638912)>
  24. match = None
  25. ------------------------------------------------------------------------
  26. File: /opt/noc/sa/profiles/EdgeCore/ES/get_lldp_neighbors.py (Line: 55)
  27. Function: execute_35
  28. 48 "local_interface": match.group("local_if"),
  29. 49 "neighbors": [],
  30. 50 }]
  31. 51 for i in ifs:
  32. 52 if i["local_interface"] in local_port_ids:
  33. 53 i["local_interface_id"] = local_port_ids[i["local_interface"]]
  34. 54 v = self.cli("show lldp info remote detail %s" % i["local_interface"])
  35. 55 ==> match = self.re_search(self.rx_detail, v)
  36. 56 n = {"remote_chassis_id_subtype": 4}
  37. 57 if match:
  38. 58 n["remote_port_subtype"] = {"MAC Address": 3, "Interface name": 5, "Inerface alias": 5, "Local": 7}[match.group("p_type")]
  39. 59 if n["remote_port_subtype"] == 3:
  40. 60 remote_port = MACAddressParameter().clean(match.group("p_id"))
  41. 61 else:
  42. Variables:
  43. ifs = [{'neighbors': [], 'local_interface': 'Eth 1/25', 'local_interface_id': '00:12:CF:EC:91:A2'}, {'neighbors': [], 'local_interface': 'Eth
  44. 1/26'}]
  45. i = {'neighbors': [], 'local_interface': 'Eth 1/25', 'local_interface_id': '00:12:CF:EC:91:A2'}
  46. self = <Script(script-10.12.70.5-EdgeCore.ES.get_lldp_neighbors, started 140283957638912)>
  47. local_port_ids = {'Eth 1/25': '00:12:CF:EC:91:A2', 'Eth 1/24': '00:12:CF:EC:91:A1', 'Eth 1/27': '00:12:CF:EC:91:A4', 'Eth 1/26': '00:12:CF:EC:91:A3', 'E
  48. th 1/21': '00:12:CF:EC:91:9E', 'Eth 1/20': '00:12:CF:EC:91:9D', 'Eth 1/23': '00:12:CF:EC:91:A0', 'Eth 1/22': '00:12:CF:EC:91:9F', 'Eth 1/28': '00:12:CF:EC:91:
  49. A5', 'Eth 1/8': '00:12:CF:EC:91:91', 'Eth 1/9': '00:12:CF:EC:91:92', 'Eth 1/2': '00:12:CF:EC:91:8B', 'Eth 1/3': '00:12:CF:EC:91:8C', 'Eth 1/1': '00:12:CF:EC:9
  50. 1:8A', 'Eth 1/6': '00:12:CF:EC:91:8F', 'Eth 1/7': '00:12:CF:EC:91:90', 'Eth 1/4': '00:12:CF:EC:91:8D', 'Eth 1/5': '00:12:CF:EC:91:8E', 'Eth 1/18': '00:12:CF:E
  51. C:91:9B', 'Eth 1/19': '00:12:CF:EC:91:9C', 'Eth 1/14': '00:12:CF:EC:91:97', 'Eth 1/15': '00:12:CF:EC:91:98', 'Eth 1/16': '00:12:CF:EC:91:99', 'Eth 1/17': '00:
  52. 12:CF:EC:91:9A', 'Eth 1/10': '00:12:CF:EC:91:93', 'Eth 1/11': '00:12:CF:EC:91:94', 'Eth 1/12': '00:12:CF:EC:91:95', 'Eth 1/13': '00:12:CF:EC:91:96'}
  53. local_id = '00-12-CF-EC-91-A5'
  54. v = '\n LLDP Remote Devices Information Detail\n\n\n'
  55. r = []
  56. port = '1/28'
  57. match = <_sre.SRE_Match object at 0x259aae0>
  58.  
  59. ------------------------------------------------------------------------
  60. File: /opt/noc/sa/script/script.py (Line: 505)
  61. Function: execute
  62. 498 """
  63. 499 if self._execute_chain and not self.name.endswith(".get_version"):
  64. 500 # Get version information
  65. 501 v = self.scripts.get_version()
  66. 502 # Find and execute proper handler
  67. 503 for c, f in self._execute_chain:
  68. 504 if c(self, v):
  69. 505 ==> return f(self, **kwargs)
  70. 506 # Raise error
  71. 507 raise NotSupportedError()
  72. 508
  73. 509 def cli_queue_get(self):
  74. 510 """
  75. 511 Request CLI provider's queue
  76. Variables:
  77. kwargs = {}
  78. c = <function <lambda> at 0x212b1b8>
  79. v = {'platform': 'ES3528M', 'version': '1.4.8.8', 'vendor': 'EdgeCore', 'attributes': {'HW version': 'R01', 'Serial Number': '944002900'}}
  80. self = <Script(script-10.12.70.5-EdgeCore.ES.get_lldp_neighbors, started 140283957638912)>
  81. f = <function execute_35 at 0x212b140>
  82. ------------------------------------------------------------------------
  83. File: /opt/noc/sa/script/script.py (Line: 417)
  84. Function: guarded_run
  85. 410 return result
  86. 411 except KeyError:
  87. 412 self.debug("Not in call cache: %r, %r" % (self.name,
  88. 413 self.kwargs))
  89. 414 pass
  90. 415 # Calling script body
  91. 416 self._thread_id = thread.get_ident()
  92. 417 ==> result = self.execute(**self.kwargs)
  93. 418 # Enforce interface result checking
  94. 419 for i in self.implements:
  95. 420 result = i.script_clean_result(self.profile, result)
  96. 421 # Cache result when required
  97. 422 if self.cache and self.parent is not None:
  98. 423 self.debug("Write to call cache: %s, %s, %r" % (self.name,
  99. Variables:
  100. i = <noc.sa.interfaces.igetlldpneighbors.IGetLLDPNeighbors object at 0x2125910>
  101. self = <Script(script-10.12.70.5-EdgeCore.ES.get_lldp_neighbors, started 140283957638912)>
  102. ------------------------------------------------------------------------
  103. File: /opt/noc/sa/script/script.py (Line: 440)
  104. Function: run
  105. 433
  106. 434 def run(self):
  107. 435 """Script thread worker method"""
  108. 436 self.debug("Running")
  109. 437 result = None
  110. 438 try:
  111. 439 with self.cancelable():
  112. 440 ==> result = self.guarded_run()
  113. 441 except self.TimeOutError:
  114. 442 self.error("Timed out")
  115. 443 self.e_timeout = True
  116. 444 except CancelledError:
  117. 445 self.error("Cancelled")
  118. 446 self.e_cancel = True
  119. Variables:
  120. self = <Script(script-10.12.70.5-EdgeCore.ES.get_lldp_neighbors, started 140283957638912)>
  121. r = ["<class 'noc.sa.script.exception.UnexpectedResultError'>", '']
  122. result = None
  123. v = UnexpectedResultError()
  124. tb = <traceback object at 0x7f965801b0e0>
  125. t = <class 'noc.sa.script.exception.UnexpectedResultError'>
  126. ------------------------------------------------------------------------
  127. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement