Guest User

Untitled

a guest
Nov 24th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.71 KB | None | 0 0
  1. 2011-05-30 23:42:46,022 script(Cisco.IOS.get_version,csw03-,**{}) failed: <type 'exceptions.AttributeError'>
  2. 'Script' object has no attribute 'is_cache'
  3. START OF TRACEBACK
  4. ------------------------------------------------------------------------
  5. File: /opt/noc/sa/script/snmp.py (Line: 55)
  6. Function: get
  7. 48 if self.script.activator.to_save_output:
  8. 49 self.script.activator.save_snmp_get(oid,None)
  9. 50 raise self.TimeOutError()
  10. 51 finally:
  11. 52 s.close()
  12. 53 if self.to_save_output:
  13. 54 self.script.activator.save_snmp_get(oid,r)
  14. 55 ==> if cached or self.script.root.is_cache:
  15. 56 cache[cc] = r
  16. 57 return r
  17. 58
  18. 59 ##
  19. 60 ## getnext generator.
  20. 61 ## USAGE:
  21. Variables:
  22. oid = '1.3.6.1.2.1.1.1.0'
  23. cc = 'GET:1.3.6.1.2.1.1.1.0'
  24. community_suffix = None
  25. self = <noc.sa.script.snmp.SNMPProvider object at 0xa984cac>
  26. cache = {}
  27. cached = False
  28. s = <noc.sa.script.snmp.SNMPGetSocket object at 0xa984eac>
  29. r = 'Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(35)SE5, RELEASE SOFTWARE (fc1)\r\nCopyright (c) 1986-2007 by Cisco Systems, Inc.\r\nCompiled Thu 19-Jul-07 20:06 by nachen'
  30. ------------------------------------------------------------------------
  31. File: /opt/noc/sa/profiles/Cisco/IOS/get_version.py (Line: 22)
  32. Function: execute
  33. 15 class Script(noc.sa.script.Script):
  34. 16 name="Cisco.IOS.get_version"
  35. 17 cache=True
  36. 18 implements=[IGetVersion]
  37. 19 def execute(self):
  38. 20 if self.snmp and self.access_profile.snmp_ro:
  39. 21 try:
  40. 22 ==> v=self.snmp.get("1.3.6.1.2.1.1.1.0") # sysDescr.0
  41. 23 match=rx_snmp_ver.search(v)
  42. 24 return {
  43. 25 "vendor" : "Cisco",
  44. 26 "platform" : match.group("platform"),
  45. 27 "version" : match.group("version"),
  46. 28 "attributes" : {
  47. Variables:
  48. self = <Script(script--Cisco.IOS.get_version, started -1731347600)>
  49. ------------------------------------------------------------------------
  50. File: /opt/noc/sa/script/script.py (Line: 509)
  51. Function: guarded_run
  52. 502 self.debug("Script returns with cached result: %s"%result)
  53. 503 return result
  54. 504 except KeyError:
  55. 505 self.debug("Not in call cache: %s, %s"%(self.name, self.kwargs))
  56. 506 pass
  57. 507 # Calling script body
  58. 508 self._thread_id=thread.get_ident()
  59. 509 ==> result=self.execute(**self.kwargs)
  60. 510 # Enforce interface result checking
  61. 511 for i in self.implements:
  62. 512 result=i.script_clean_result(self.profile, result)
  63. 513 # Cache result when required
  64. 514 if self.cache and self.parent is not None:
  65. 515 self.debug("Write to call cache: %s, %s, %s"%(self.name, self.kwargs,result))
  66. Variables:
  67. i = <noc.sa.interfaces.igetversion.IGetVersion object at 0x9f6494c>
  68. self = <Script(script--Cisco.IOS.get_version, started -1731347600)>
  69. ------------------------------------------------------------------------
  70. File: /opt/noc/sa/script/script.py (Line: 534)
  71. Function: run
  72. 527 ## Script thread worker method
  73. 528 ##
  74. 529 def run(self):
  75. 530 self.debug("Running")
  76. 531 result=None
  77. 532 try:
  78. 533 with self.cancelable():
  79. 534 ==> result=self.guarded_run()
  80. 535 except TimeOutError:
  81. 536 self.error("Timed out")
  82. 537 self.e_timeout=True
  83. 538 except CancelledError:
  84. 539 self.error("Cancelled")
  85. 540 self.e_cancel=True
  86. Variables:
  87. self = <Script(script--Cisco.IOS.get_version, started -1731347600)>
  88. r = ["<type 'exceptions.AttributeError'>", "'Script' object has no attribute 'is_cache'"]
  89. result = None
  90. v = AttributeError("'Script' object has no attribute 'is_cache'",)
  91. tb = <traceback object at 0x9b5ed74>
  92. t = <type 'exceptions.AttributeError'>
  93. ------------------------------------------------------------------------
  94. END OF TRACEBACK
  95.  
  96. ==> /var/log/noc/noc-scheduler.log <==
Add Comment
Please, Sign In to add comment