Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2012-05-25 12:46:39,929 SSH: Using gmpy
- 2012-05-25 12:46:41,456 Using JSON library: cjson
- 2012-05-25 12:46:41,604 Loading PeriodicRegistry
- 2012-05-25 12:46:41,671 Loading DownloaderRegistry
- 2012-05-25 12:46:41,925 Loading ProfileRegistry
- 2012-05-25 12:46:43,863 Loading ScriptRegistry
- 2012-05-25 12:46:44,500 Setting up 'select' polling method
- 2012-05-25 12:46:44,500 Set up select() poller
- 2012-05-25 12:46:44,501 Loading private ssh key from 'etc/ssh/id_rsa'
- 2012-05-25 12:46:44,501 Loading public ssh key from 'etc/ssh/id_rsa.pub'
- access_profile {
- profile: "Huawei.VRP"
- scheme: TELNET
- address: "10.200.210.10"
- user: "admin"
- password: "admin"
- super_password: "admin"
- snmp_ro: "public"
- }
- script: "Huawei.VRP.get_ip_discovery"
- 2012-05-25 12:46:44,512 Running socket factory
- 2012-05-25 12:46:44,512 Running script thread
- 2012-05-25 12:46:44,513 Creating transaction id=2022398150 method=None callback=None
- 2012-05-25 12:46:44,515 [script-10.200.210.10-Generic.get_ip_discovery] Running
- 2012-05-25 12:46:44,515 [script-10.200.210.10-Generic.get_ip_discovery] Running script: Generic.get_ip_discovery ({})
- 2012-05-25 12:46:44,517 [script-10.200.210.10-Huawei.VRP.get_arp] Running script: Huawei.VRP.get_arp ({})
- 2012-05-25 12:46:44,518 [script-10.200.210.10-Huawei.VRP.get_version] Running script: Huawei.VRP.get_version ({})
- 2012-05-25 12:46:44,519 [script-10.200.210.10-Huawei.VRP.get_version] Not in call cache: 'Huawei.VRP.get_version', {}
- 2012-05-25 12:46:44,519 register_socket(<noc.sa.script.snmp.SNMPGetSocket object at 0x99e9ecc>,None)
- 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
- 2012-05-25 12:46:45,513 Tick
- 2012-05-25 12:46:45,514 3 TICKS TO EXIT
- 2012-05-25 12:46:45,514 [SNMPGetSocket(0x99e9ecc)] Initializing socket
- 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
- 2012-05-25 12:46:45,682 [script-10.200.210.10-Generic.get_ip_discovery] Unhandled exception
- 2012-05-25 12:46:45,688 unregister_socket(<noc.sa.script.snmp.SNMPGetSocket object at 0x99e9ecc>)
- 2012-05-25 12:46:45,688 Resetting wait ticks
- 2012-05-25 12:46:45,744 [script-10.200.210.10-Generic.get_ip_discovery] Script traceback:
- <class 'noc.sa.script.exception.UnexpectedResultError'>
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/sa/script/script.py (Line: 819)
- Function: find_re
- 812 """
- 813 Find first matching regular expression
- 814 or raise Unexpected result error
- 815 """
- 816 for r in iter:
- 817 if r.search(s):
- 818 return r
- 819 ==> raise self.UnexpectedResultError()
- 820
- 821 def hex_to_bin(self, s):
- 822 """
- 823 Convert hexadecimal string to boolean string.
- 824 All non-hexadecimal characters are ignored
- 825 :param s: Input string
- Variables:
- 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'
- r = <_sre.SRE_Pattern object at 0x95f1f28>
- self = <Script(script-10.200.210.10-Huawei.VRP.get_version, initial)>
- iter = [<_sre.SRE_Pattern object at 0x95f1060>, <_sre.SRE_Pattern object at 0x95f16e0>, <_sre.SRE_Pattern object at 0x95f1f28>]
- ------------------------------------------------------------------------
- File: /opt/noc/sa/profiles/Huawei/VRP/get_version.py (Line: 36)
- Function: execute
- 29 pass
- 30 if v == "":
- 31 # Trying CLI
- 32 try:
- 33 v = self.cli("display version", cached=True)
- 34 except self.CLISyntaxError:
- 35 raise self.NotSupportedError()
- 36 ==> rx = self.find_re([rx_ver, rx_ver_snmp, rx_ver_snmp2], v)
- 37 for match in rx.finditer(v):
- 38 platform = match.group("platform")
- 39 # Convert NetEngine to NE
- 40 if platform.lower().startswith("netengine "):
- 41 n, p = platform.split(" ", 1)
- 42 platform = "NE%s" % p.strip().upper()
- Variables:
- self = <Script(script-10.200.210.10-Huawei.VRP.get_version, initial)>
- 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'
- ------------------------------------------------------------------------
- File: /opt/noc/sa/script/script.py (Line: 414)
- Function: guarded_run
- 407 return result
- 408 except KeyError:
- 409 self.debug("Not in call cache: %r, %r" % (self.name,
- 410 self.kwargs))
- 411 pass
- 412 # Calling script body
- 413 self._thread_id = thread.get_ident()
- 414 ==> result = self.execute(**self.kwargs)
- 415 # Enforce interface result checking
- 416 for i in self.implements:
- 417 result = i.script_clean_result(self.profile, result)
- 418 # Cache result when required
- 419 if self.cache and self.parent is not None:
- 420 self.debug("Write to call cache: %s, %s, %r" % (self.name,
- Variables:
- i = <noc.sa.interfaces.igetversion.IGetVersion object at 0x95adf2c>
- self = <Script(script-10.200.210.10-Huawei.VRP.get_version, initial)>
- ------------------------------------------------------------------------
- File: /opt/noc/sa/script/script.py (Line: 81)
- Function: __call__
- 74 self.script = script
- 75
- 76 def __call__(self, **kwargs):
- 77 """Call script"""
- 78 s = self.script(self.parent.profile, self.parent.activator,
- 79 self.parent.access_profile, parent=self.parent,
- 80 **kwargs)
- 81 ==> return s.guarded_run()
- 82
- 83
- 84 class ScriptRegistry(Registry):
- 85 """Script registry"""
- 86 name = "ScriptRegistry"
- 87 subdir = "profiles"
- Variables:
- s = <Script(script-10.200.210.10-Huawei.VRP.get_version, initial)>
- self = <noc.sa.script.script.ScriptCallProxy object at 0x99e9bec>
- kwargs = {}
- ------------------------------------------------------------------------
- File: /opt/noc/sa/script/script.py (Line: 498)
- Function: execute
- 491 def execute(self, **kwargs):
- 492 """
- 493 Default script behavior:
- 494 Pass through _execute_chain and call appropriative handler
- 495 """
- 496 if self._execute_chain and not self.name.endswith(".get_version"):
- 497 # Get version information
- 498 ==> v = self.scripts.get_version()
- 499 # Find and execute proper handler
- 500 for c, f in self._execute_chain:
- 501 if c(self, v):
- 502 return f(self, **kwargs)
- 503 # Raise error
- 504 raise NotSupportedError()
- Variables:
- self = <Script(script-10.200.210.10-Huawei.VRP.get_arp, initial)>
- kwargs = {}
- ------------------------------------------------------------------------
- File: /opt/noc/sa/script/script.py (Line: 414)
- Function: guarded_run
- 407 return result
- 408 except KeyError:
- 409 self.debug("Not in call cache: %r, %r" % (self.name,
- 410 self.kwargs))
- 411 pass
- 412 # Calling script body
- 413 self._thread_id = thread.get_ident()
- 414 ==> result = self.execute(**self.kwargs)
- 415 # Enforce interface result checking
- 416 for i in self.implements:
- 417 result = i.script_clean_result(self.profile, result)
- 418 # Cache result when required
- 419 if self.cache and self.parent is not None:
- 420 self.debug("Write to call cache: %s, %s, %r" % (self.name,
- Variables:
- i = <noc.sa.interfaces.igetarp.IGetARP object at 0x95adc0c>
- self = <Script(script-10.200.210.10-Huawei.VRP.get_arp, initial)>
- ------------------------------------------------------------------------
- File: /opt/noc/sa/script/script.py (Line: 81)
- Function: __call__
- 74 self.script = script
- 75
- 76 def __call__(self, **kwargs):
- 77 """Call script"""
- 78 s = self.script(self.parent.profile, self.parent.activator,
- 79 self.parent.access_profile, parent=self.parent,
- 80 **kwargs)
- 81 ==> return s.guarded_run()
- 82
- 83
- 84 class ScriptRegistry(Registry):
- 85 """Script registry"""
- 86 name = "ScriptRegistry"
- 87 subdir = "profiles"
- Variables:
- s = <Script(script-10.200.210.10-Huawei.VRP.get_arp, initial)>
- self = <noc.sa.script.script.ScriptCallProxy object at 0x99e9c0c>
- kwargs = {'vrf': None}
- ------------------------------------------------------------------------
- File: /opt/noc/sa/profiles/Generic/get_ip_discovery.py (Line: 67)
- Function: execute
- 60 ]
- 61 # Iterate through VRF
- 62 data = []
- 63 for v in vrfs:
- 64 a = []
- 65 vrf = None if v == "default" else v
- 66 # Process ARP cache
- 67 ==> arp_cache = self.scripts.get_arp(vrf=vrf)
- 68 a += [{
- 69 "ip": x["ip"],
- 70 "afi": "4",
- 71 "mac": x["mac"],
- 72 "interface": x["interface"]
- 73 } for x in arp_cache if "mac" in x and x["mac"]]
- Variables:
- a = []
- self = <Script(script-10.200.210.10-Generic.get_ip_discovery, started -1236272272)>
- vrfs = {'default': {'name': 'default', 'addresses': []}}
- v = 'default'
- data = []
- vrf = None
- ------------------------------------------------------------------------
- File: /opt/noc/sa/script/script.py (Line: 414)
- Function: guarded_run
- 407 return result
- 408 except KeyError:
- 409 self.debug("Not in call cache: %r, %r" % (self.name,
- 410 self.kwargs))
- 411 pass
- 412 # Calling script body
- 413 self._thread_id = thread.get_ident()
- 414 ==> result = self.execute(**self.kwargs)
- 415 # Enforce interface result checking
- 416 for i in self.implements:
- 417 result = i.script_clean_result(self.profile, result)
- 418 # Cache result when required
- 419 if self.cache and self.parent is not None:
- 420 self.debug("Write to call cache: %s, %s, %r" % (self.name,
- Variables:
- i = <noc.sa.interfaces.igetipdiscovery.IGetIPDiscovery object at 0x961cb8c>
- self = <Script(script-10.200.210.10-Generic.get_ip_discovery, started -1236272272)>
- ------------------------------------------------------------------------
- File: /opt/noc/sa/script/script.py (Line: 437)
- Function: run
- 430
- 431 def run(self):
- 432 """Script thread worker method"""
- 433 self.debug("Running")
- 434 result = None
- 435 try:
- 436 with self.cancelable():
- 437 ==> result = self.guarded_run()
- 438 except self.TimeOutError:
- 439 self.error("Timed out")
- 440 self.e_timeout = True
- 441 except CancelledError:
- 442 self.error("Cancelled")
- 443 self.e_cancel = True
- Variables:
- self = <Script(script-10.200.210.10-Generic.get_ip_discovery, started -1236272272)>
- r = ["<class 'noc.sa.script.exception.UnexpectedResultError'>", '']
- result = None
- v = UnexpectedResultError()
- tb = <traceback object at 0x99f275c>
- t = <class 'noc.sa.script.exception.UnexpectedResultError'>
- ------------------------------------------------------------------------
- END OF TRACEBACK
- 2012-05-25 12:46:45,748 [script-10.200.210.10-Generic.get_ip_discovery] Closing
- 2012-05-25 12:46:46,690 Tick
- 2012-05-25 12:46:46,690 3 TICKS TO EXIT
- 2012-05-25 12:46:47,691 Tick
- 2012-05-25 12:46:47,692 2 TICKS TO EXIT
- 2012-05-25 12:46:48,693 Tick
- 2012-05-25 12:46:48,693 1 TICKS TO EXIT
- 2012-05-25 12:46:49,694 Tick
- 2012-05-25 12:46:49,695 EXIT
- 2012-05-25 12:46:49,695 Shutting down the factory
- 2012-05-25 12:46:49,695 0 TICKS TO EXIT
Advertisement
Add Comment
Please, Sign In to add comment