Guest User

Untitled

a guest
May 25th, 2012
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.80 KB | None | 0 0
  1. 2012-05-25 12:46:39,929 SSH: Using gmpy
  2. 2012-05-25 12:46:41,456 Using JSON library: cjson
  3. 2012-05-25 12:46:41,604 Loading PeriodicRegistry
  4. 2012-05-25 12:46:41,671 Loading DownloaderRegistry
  5. 2012-05-25 12:46:41,925 Loading ProfileRegistry
  6. 2012-05-25 12:46:43,863 Loading ScriptRegistry
  7. 2012-05-25 12:46:44,500 Setting up 'select' polling method
  8. 2012-05-25 12:46:44,500 Set up select() poller
  9. 2012-05-25 12:46:44,501 Loading private ssh key from 'etc/ssh/id_rsa'
  10. 2012-05-25 12:46:44,501 Loading public ssh key from 'etc/ssh/id_rsa.pub'
  11. access_profile {
  12. profile: "Huawei.VRP"
  13. scheme: TELNET
  14. address: "10.200.210.10"
  15. user: "admin"
  16. password: "admin"
  17. super_password: "admin"
  18. snmp_ro: "public"
  19. }
  20. script: "Huawei.VRP.get_ip_discovery"
  21.  
  22. 2012-05-25 12:46:44,512 Running socket factory
  23. 2012-05-25 12:46:44,512 Running script thread
  24. 2012-05-25 12:46:44,513 Creating transaction id=2022398150 method=None callback=None
  25. 2012-05-25 12:46:44,515 [script-10.200.210.10-Generic.get_ip_discovery] Running
  26. 2012-05-25 12:46:44,515 [script-10.200.210.10-Generic.get_ip_discovery] Running script: Generic.get_ip_discovery ({})
  27. 2012-05-25 12:46:44,517 [script-10.200.210.10-Huawei.VRP.get_arp] Running script: Huawei.VRP.get_arp ({})
  28. 2012-05-25 12:46:44,518 [script-10.200.210.10-Huawei.VRP.get_version] Running script: Huawei.VRP.get_version ({})
  29. 2012-05-25 12:46:44,519 [script-10.200.210.10-Huawei.VRP.get_version] Not in call cache: 'Huawei.VRP.get_version', {}
  30. 2012-05-25 12:46:44,519 register_socket(<noc.sa.script.snmp.SNMPGetSocket object at 0x99e9ecc>,None)
  31. 2012-05-25 12:46:44,520 [script-10.200.210.10-Huawei.VRP.get_version] 10.200.210.10 SNMP GET 1.3.6.1.2.1.1.1.0
  32. 2012-05-25 12:46:45,513 Tick
  33. 2012-05-25 12:46:45,514 3 TICKS TO EXIT
  34. 2012-05-25 12:46:45,514 [SNMPGetSocket(0x99e9ecc)] Initializing socket
  35. 2012-05-25 12:46:45,680 [script-10.200.210.10-Huawei.VRP.get_version] 10.200.210.10 SNMP GET REPLY: 1.3.6.1.2.1.1.1.0 0x51756964776179205335333030205365726965732045746865726e657420537769746368657320da48756177656920566572736174696c6520526f7574696e6720506c6174666f726d20536f66747761726520da205652502028522920536f6674776172652c2056657273696f6e20352e3330202853353330302056313030523030334330305350433330312920da20436f707972696768742028432920323030382d323030392048756177656920546563686e6f6c6f6769657320436f2e2c204c74642eda
  36. 2012-05-25 12:46:45,682 [script-10.200.210.10-Generic.get_ip_discovery] Unhandled exception
  37. 2012-05-25 12:46:45,688 unregister_socket(<noc.sa.script.snmp.SNMPGetSocket object at 0x99e9ecc>)
  38. 2012-05-25 12:46:45,688 Resetting wait ticks
  39. 2012-05-25 12:46:45,744 [script-10.200.210.10-Generic.get_ip_discovery] Script traceback:
  40. <class 'noc.sa.script.exception.UnexpectedResultError'>
  41.  
  42. START OF TRACEBACK
  43. ------------------------------------------------------------------------
  44. File: /opt/noc/sa/script/script.py (Line: 819)
  45. Function: find_re
  46. 812 """
  47. 813 Find first matching regular expression
  48. 814 or raise Unexpected result error
  49. 815 """
  50. 816 for r in iter:
  51. 817 if r.search(s):
  52. 818 return r
  53. 819 ==> raise self.UnexpectedResultError()
  54. 820
  55. 821 def hex_to_bin(self, s):
  56. 822 """
  57. 823 Convert hexadecimal string to boolean string.
  58. 824 All non-hexadecimal characters are ignored
  59. 825 :param s: Input string
  60. Variables:
  61. s = 'Quidway S5300 Series Ethernet Switches \r\nHuawei Versatile Routing Platform Software \r\n VRP (R) Software, Version 5.30 (S5300 V100R003C00SPC301) \r\n Copyright (C) 2008-2009 Huawei Technologies Co., Ltd.\r\n'
  62. r = <_sre.SRE_Pattern object at 0x95f1f28>
  63. self = <Script(script-10.200.210.10-Huawei.VRP.get_version, initial)>
  64. iter = [<_sre.SRE_Pattern object at 0x95f1060>, <_sre.SRE_Pattern object at 0x95f16e0>, <_sre.SRE_Pattern object at 0x95f1f28>]
  65. ------------------------------------------------------------------------
  66. File: /opt/noc/sa/profiles/Huawei/VRP/get_version.py (Line: 36)
  67. Function: execute
  68. 29 pass
  69. 30 if v == "":
  70. 31 # Trying CLI
  71. 32 try:
  72. 33 v = self.cli("display version", cached=True)
  73. 34 except self.CLISyntaxError:
  74. 35 raise self.NotSupportedError()
  75. 36 ==> rx = self.find_re([rx_ver, rx_ver_snmp, rx_ver_snmp2], v)
  76. 37 for match in rx.finditer(v):
  77. 38 platform = match.group("platform")
  78. 39 # Convert NetEngine to NE
  79. 40 if platform.lower().startswith("netengine "):
  80. 41 n, p = platform.split(" ", 1)
  81. 42 platform = "NE%s" % p.strip().upper()
  82. Variables:
  83. self = <Script(script-10.200.210.10-Huawei.VRP.get_version, initial)>
  84. v = 'Quidway S5300 Series Ethernet Switches \r\nHuawei Versatile Routing Platform Software \r\n VRP (R) Software, Version 5.30 (S5300 V100R003C00SPC301) \r\n Copyright (C) 2008-2009 Huawei Technologies Co., Ltd.\r\n'
  85. ------------------------------------------------------------------------
  86. File: /opt/noc/sa/script/script.py (Line: 414)
  87. Function: guarded_run
  88. 407 return result
  89. 408 except KeyError:
  90. 409 self.debug("Not in call cache: %r, %r" % (self.name,
  91. 410 self.kwargs))
  92. 411 pass
  93. 412 # Calling script body
  94. 413 self._thread_id = thread.get_ident()
  95. 414 ==> result = self.execute(**self.kwargs)
  96. 415 # Enforce interface result checking
  97. 416 for i in self.implements:
  98. 417 result = i.script_clean_result(self.profile, result)
  99. 418 # Cache result when required
  100. 419 if self.cache and self.parent is not None:
  101. 420 self.debug("Write to call cache: %s, %s, %r" % (self.name,
  102. Variables:
  103. i = <noc.sa.interfaces.igetversion.IGetVersion object at 0x95adf2c>
  104. self = <Script(script-10.200.210.10-Huawei.VRP.get_version, initial)>
  105. ------------------------------------------------------------------------
  106. File: /opt/noc/sa/script/script.py (Line: 81)
  107. Function: __call__
  108. 74 self.script = script
  109. 75
  110. 76 def __call__(self, **kwargs):
  111. 77 """Call script"""
  112. 78 s = self.script(self.parent.profile, self.parent.activator,
  113. 79 self.parent.access_profile, parent=self.parent,
  114. 80 **kwargs)
  115. 81 ==> return s.guarded_run()
  116. 82
  117. 83
  118. 84 class ScriptRegistry(Registry):
  119. 85 """Script registry"""
  120. 86 name = "ScriptRegistry"
  121. 87 subdir = "profiles"
  122. Variables:
  123. s = <Script(script-10.200.210.10-Huawei.VRP.get_version, initial)>
  124. self = <noc.sa.script.script.ScriptCallProxy object at 0x99e9bec>
  125. kwargs = {}
  126. ------------------------------------------------------------------------
  127. File: /opt/noc/sa/script/script.py (Line: 498)
  128. Function: execute
  129. 491 def execute(self, **kwargs):
  130. 492 """
  131. 493 Default script behavior:
  132. 494 Pass through _execute_chain and call appropriative handler
  133. 495 """
  134. 496 if self._execute_chain and not self.name.endswith(".get_version"):
  135. 497 # Get version information
  136. 498 ==> v = self.scripts.get_version()
  137. 499 # Find and execute proper handler
  138. 500 for c, f in self._execute_chain:
  139. 501 if c(self, v):
  140. 502 return f(self, **kwargs)
  141. 503 # Raise error
  142. 504 raise NotSupportedError()
  143. Variables:
  144. self = <Script(script-10.200.210.10-Huawei.VRP.get_arp, initial)>
  145. kwargs = {}
  146. ------------------------------------------------------------------------
  147. File: /opt/noc/sa/script/script.py (Line: 414)
  148. Function: guarded_run
  149. 407 return result
  150. 408 except KeyError:
  151. 409 self.debug("Not in call cache: %r, %r" % (self.name,
  152. 410 self.kwargs))
  153. 411 pass
  154. 412 # Calling script body
  155. 413 self._thread_id = thread.get_ident()
  156. 414 ==> result = self.execute(**self.kwargs)
  157. 415 # Enforce interface result checking
  158. 416 for i in self.implements:
  159. 417 result = i.script_clean_result(self.profile, result)
  160. 418 # Cache result when required
  161. 419 if self.cache and self.parent is not None:
  162. 420 self.debug("Write to call cache: %s, %s, %r" % (self.name,
  163. Variables:
  164. i = <noc.sa.interfaces.igetarp.IGetARP object at 0x95adc0c>
  165. self = <Script(script-10.200.210.10-Huawei.VRP.get_arp, initial)>
  166. ------------------------------------------------------------------------
  167. File: /opt/noc/sa/script/script.py (Line: 81)
  168. Function: __call__
  169. 74 self.script = script
  170. 75
  171. 76 def __call__(self, **kwargs):
  172. 77 """Call script"""
  173. 78 s = self.script(self.parent.profile, self.parent.activator,
  174. 79 self.parent.access_profile, parent=self.parent,
  175. 80 **kwargs)
  176. 81 ==> return s.guarded_run()
  177. 82
  178. 83
  179. 84 class ScriptRegistry(Registry):
  180. 85 """Script registry"""
  181. 86 name = "ScriptRegistry"
  182. 87 subdir = "profiles"
  183. Variables:
  184. s = <Script(script-10.200.210.10-Huawei.VRP.get_arp, initial)>
  185. self = <noc.sa.script.script.ScriptCallProxy object at 0x99e9c0c>
  186. kwargs = {'vrf': None}
  187. ------------------------------------------------------------------------
  188. File: /opt/noc/sa/profiles/Generic/get_ip_discovery.py (Line: 67)
  189. Function: execute
  190. 60 ]
  191. 61 # Iterate through VRF
  192. 62 data = []
  193. 63 for v in vrfs:
  194. 64 a = []
  195. 65 vrf = None if v == "default" else v
  196. 66 # Process ARP cache
  197. 67 ==> arp_cache = self.scripts.get_arp(vrf=vrf)
  198. 68 a += [{
  199. 69 "ip": x["ip"],
  200. 70 "afi": "4",
  201. 71 "mac": x["mac"],
  202. 72 "interface": x["interface"]
  203. 73 } for x in arp_cache if "mac" in x and x["mac"]]
  204. Variables:
  205. a = []
  206. self = <Script(script-10.200.210.10-Generic.get_ip_discovery, started -1236272272)>
  207. vrfs = {'default': {'name': 'default', 'addresses': []}}
  208. v = 'default'
  209. data = []
  210. vrf = None
  211. ------------------------------------------------------------------------
  212. File: /opt/noc/sa/script/script.py (Line: 414)
  213. Function: guarded_run
  214. 407 return result
  215. 408 except KeyError:
  216. 409 self.debug("Not in call cache: %r, %r" % (self.name,
  217. 410 self.kwargs))
  218. 411 pass
  219. 412 # Calling script body
  220. 413 self._thread_id = thread.get_ident()
  221. 414 ==> result = self.execute(**self.kwargs)
  222. 415 # Enforce interface result checking
  223. 416 for i in self.implements:
  224. 417 result = i.script_clean_result(self.profile, result)
  225. 418 # Cache result when required
  226. 419 if self.cache and self.parent is not None:
  227. 420 self.debug("Write to call cache: %s, %s, %r" % (self.name,
  228. Variables:
  229. i = <noc.sa.interfaces.igetipdiscovery.IGetIPDiscovery object at 0x961cb8c>
  230. self = <Script(script-10.200.210.10-Generic.get_ip_discovery, started -1236272272)>
  231. ------------------------------------------------------------------------
  232. File: /opt/noc/sa/script/script.py (Line: 437)
  233. Function: run
  234. 430
  235. 431 def run(self):
  236. 432 """Script thread worker method"""
  237. 433 self.debug("Running")
  238. 434 result = None
  239. 435 try:
  240. 436 with self.cancelable():
  241. 437 ==> result = self.guarded_run()
  242. 438 except self.TimeOutError:
  243. 439 self.error("Timed out")
  244. 440 self.e_timeout = True
  245. 441 except CancelledError:
  246. 442 self.error("Cancelled")
  247. 443 self.e_cancel = True
  248. Variables:
  249. self = <Script(script-10.200.210.10-Generic.get_ip_discovery, started -1236272272)>
  250. r = ["<class 'noc.sa.script.exception.UnexpectedResultError'>", '']
  251. result = None
  252. v = UnexpectedResultError()
  253. tb = <traceback object at 0x99f275c>
  254. t = <class 'noc.sa.script.exception.UnexpectedResultError'>
  255. ------------------------------------------------------------------------
  256. END OF TRACEBACK
  257. 2012-05-25 12:46:45,748 [script-10.200.210.10-Generic.get_ip_discovery] Closing
  258. 2012-05-25 12:46:46,690 Tick
  259. 2012-05-25 12:46:46,690 3 TICKS TO EXIT
  260. 2012-05-25 12:46:47,691 Tick
  261. 2012-05-25 12:46:47,692 2 TICKS TO EXIT
  262. 2012-05-25 12:46:48,693 Tick
  263. 2012-05-25 12:46:48,693 1 TICKS TO EXIT
  264. 2012-05-25 12:46:49,694 Tick
  265. 2012-05-25 12:46:49,695 EXIT
  266. 2012-05-25 12:46:49,695 Shutting down the factory
  267. 2012-05-25 12:46:49,695 0 TICKS TO EXIT
Advertisement
Add Comment
Please, Sign In to add comment