Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2011-05-30 23:42:46,022 script(Cisco.IOS.get_version,csw03-,**{}) failed: <type 'exceptions.AttributeError'>
- 'Script' object has no attribute 'is_cache'
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/sa/script/snmp.py (Line: 55)
- Function: get
- 48 if self.script.activator.to_save_output:
- 49 self.script.activator.save_snmp_get(oid,None)
- 50 raise self.TimeOutError()
- 51 finally:
- 52 s.close()
- 53 if self.to_save_output:
- 54 self.script.activator.save_snmp_get(oid,r)
- 55 ==> if cached or self.script.root.is_cache:
- 56 cache[cc] = r
- 57 return r
- 58
- 59 ##
- 60 ## getnext generator.
- 61 ## USAGE:
- Variables:
- oid = '1.3.6.1.2.1.1.1.0'
- cc = 'GET:1.3.6.1.2.1.1.1.0'
- community_suffix = None
- self = <noc.sa.script.snmp.SNMPProvider object at 0xa984cac>
- cache = {}
- cached = False
- s = <noc.sa.script.snmp.SNMPGetSocket object at 0xa984eac>
- 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'
- ------------------------------------------------------------------------
- File: /opt/noc/sa/profiles/Cisco/IOS/get_version.py (Line: 22)
- Function: execute
- 15 class Script(noc.sa.script.Script):
- 16 name="Cisco.IOS.get_version"
- 17 cache=True
- 18 implements=[IGetVersion]
- 19 def execute(self):
- 20 if self.snmp and self.access_profile.snmp_ro:
- 21 try:
- 22 ==> v=self.snmp.get("1.3.6.1.2.1.1.1.0") # sysDescr.0
- 23 match=rx_snmp_ver.search(v)
- 24 return {
- 25 "vendor" : "Cisco",
- 26 "platform" : match.group("platform"),
- 27 "version" : match.group("version"),
- 28 "attributes" : {
- Variables:
- self = <Script(script--Cisco.IOS.get_version, started -1731347600)>
- ------------------------------------------------------------------------
- File: /opt/noc/sa/script/script.py (Line: 509)
- Function: guarded_run
- 502 self.debug("Script returns with cached result: %s"%result)
- 503 return result
- 504 except KeyError:
- 505 self.debug("Not in call cache: %s, %s"%(self.name, self.kwargs))
- 506 pass
- 507 # Calling script body
- 508 self._thread_id=thread.get_ident()
- 509 ==> result=self.execute(**self.kwargs)
- 510 # Enforce interface result checking
- 511 for i in self.implements:
- 512 result=i.script_clean_result(self.profile, result)
- 513 # Cache result when required
- 514 if self.cache and self.parent is not None:
- 515 self.debug("Write to call cache: %s, %s, %s"%(self.name, self.kwargs,result))
- Variables:
- i = <noc.sa.interfaces.igetversion.IGetVersion object at 0x9f6494c>
- self = <Script(script--Cisco.IOS.get_version, started -1731347600)>
- ------------------------------------------------------------------------
- File: /opt/noc/sa/script/script.py (Line: 534)
- Function: run
- 527 ## Script thread worker method
- 528 ##
- 529 def run(self):
- 530 self.debug("Running")
- 531 result=None
- 532 try:
- 533 with self.cancelable():
- 534 ==> result=self.guarded_run()
- 535 except TimeOutError:
- 536 self.error("Timed out")
- 537 self.e_timeout=True
- 538 except CancelledError:
- 539 self.error("Cancelled")
- 540 self.e_cancel=True
- Variables:
- self = <Script(script--Cisco.IOS.get_version, started -1731347600)>
- r = ["<type 'exceptions.AttributeError'>", "'Script' object has no attribute 'is_cache'"]
- result = None
- v = AttributeError("'Script' object has no attribute 'is_cache'",)
- tb = <traceback object at 0x9b5ed74>
- t = <type 'exceptions.AttributeError'>
- ------------------------------------------------------------------------
- END OF TRACEBACK
- ==> /var/log/noc/noc-scheduler.log <==
Add Comment
Please, Sign In to add comment