Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2014-09-15 15:55:56,654 [Generic.get_ip_discovery(bb-77-1, 195.98.32.87)] Script traceback:
- <type 'exceptions.KeyError'>
- 'DELETE'
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/sa/profiles/Cisco/IOSXR/get_ipv6_neighbor.py (Line: 41)
- Function: execute
- 34
- 35 def execute(self, vrf=None):
- 36 # Get states
- 37 cmd = "show ipv6 neighbors"
- 38 r = self.cli(cmd, list_re=self.rx_line)
- 39 # Remap states
- 40 for n in r:
- 41 ==> n["state"] = self.s_map[n["state"].upper()]
- 42 return r
- Variables:
- cmd = 'show ipv6 neighbors'
- self = <Script(Thread-4, initial)>
- r =
- [{'interface': 'BE1',
- 'ip': 'fe80::12f3:11ff:fe0e:3b1b',
- 'mac': '10f3.110e.3b1b',
- 'state': 'reachable'},
- {'interface': 'BV832',
- 'ip': '2a03:8700:1:1::2',
- 'mac': '10f3.110e.3b1d',
- 'state': 'reachable'},
- {'interface': 'BV832',
- 'ip': '2a03:8700:1:1::99',
- 'mac': '001f.c6b3.3c6c',
- 'state': 'reachable'},
- {'interface': 'BV832',
- 'ip': 'fe80::20f:feff:fef1:cbb2',
- 'mac': '000f.fef1.cbb2',
- 'state': 'delay'},
- {'interface': 'BV832',
- 'ip': 'fe80::21e:58ff:feaa:89ce',
- 'mac': '001e.58aa.89ce',
- 'state': 'reachable'},
- {'interface': 'BV832',
- 'ip': 'fe80::21f:c6ff:feb3:3c6c',
- 'mac': '001f.c6b3.3c6c',
- 'state': 'reachable'},
- {'interface': 'BV832',
- 'ip': 'fe80::12f3:11ff:fe0e:3b1d',
- 'mac': '10f3.110e.3b1d',
- 'state': 'reachable'},
- {'interface': 'BE10',
- 'ip': '2a03:8700:0:1000::102',
- 'mac': '4055.3945.46fa',
- 'state': 'reachable'},
- {'interface': 'BE10',
- 'ip': 'fe80::4255:39ff:fe45:46fa',
- 'mac': '4055.3945.46fa',
- 'state': 'reachable'},
- {'interface': 'BE12',
- 'ip': '2a03:8700:0:1000::f2',
- 'mac': '10f3.1112.1a41',
- 'state': 'reachable'},
- {'interface': 'BE12',
- 'ip': 'fe80::12f3:11ff:fe12:1a41',
- 'mac': '10f3.1112.1a41',
- 'state': 'reachable'},
- {'interface': 'BE9',
- 'ip': '2a03:8700:0:1000::161',
- 'mac': '588d.0913.4800',
- 'state': 'reachable'},
- {'interface': 'BE9',
- 'ip': 'fe80::5a8d:9ff:fe13:4800',
- 'mac': '588d.0913.4800',
- 'state': 'reachable'},
- {'interface': 'BV830',
- 'ip': '2a03:8700:1:2::2',
- 'mac': '10f3.110e.3b1d',
- 'state': 'reachable'},
- {'interface': 'BV830',
- 'ip': '2a03:8700:1:2::200',
- 'mac': 'b499.bab3.9942',
- 'state': 'reachable'},
- {'interface': 'BV830',
- 'ip': 'fe80::12f3:11ff:fe0e:3b1d',
- 'mac': '10f3.110e.3b1d',
- 'state': 'reachable'},
- {'interface': 'BV830',
- 'ip': 'fe80::b699:baff:feb3:9942',
- 'mac': 'b499.bab3.9942',
- 'state': 'reachable'},
- {'interface': 'Te0/0/1/1',
- 'ip': '2a03:8700:0:1000::11',
- 'mac': 'a80c.0d2c.a4fb',
- 'state': 'reachable'},
- {'interface': 'Te0/0/1/1',
- 'ip': 'fe80::aa0c:dff:fe2c:a4fb',
- 'mac': 'a80c.0d2c.a4fb',
- 'state': 'reachable'},
- {'interface': 'Te0/0/1/2',
- 'ip': '2a03:8700:0:1000::192',
- 'mac': 'e4c7.2244.7578',
- 'state': 'reachable'},
- {'interface': 'Te0/0/1/2',
- 'ip': 'fe80::e6c7:22ff:fe44:7578',
- 'mac': 'e4c7.2244.7578',
- 'state': 'reachable'},
- {'interface': 'Te0/0/1/3',
- 'ip': 'fe80::214:1cff:fe15:5080',
- 'mac': '0014.1c15.5080',
- 'state': 'reachable'},
- {'interface': 'Te0/0/0/3',
- 'ip': '2a03:8700:0:1000::152',
- 'mac': '0011.93d5.33c0',
- 'state': 'DELETE'},
- {'interface': 'Te0/0/0/3',
- 'ip': 'fe80::211:93ff:fed5:33c0',
- 'mac': '0011.93d5.33c0',
- 'state': 'DELETE'},
- {'interface': 'Te0/2/0/3',
- 'ip': '2a03:8700:0:1000::32',
- 'mac': '588d.09bf.6a40',
- 'state': 'REACH'},
- {'interface': 'Te0/2/0/3',
- 'ip': 'fe80::5a8d:9ff:febf:6a40',
- 'mac': '588d.09bf.6a40',
- 'state': 'REACH'}]
- vrf = None
- n =
- {'interface': 'Te0/0/0/3',
- 'ip': '2a03:8700:0:1000::152',
- 'mac': '0011.93d5.33c0',
- 'state': 'DELETE'}
- ------------------------------------------------------------------------
- File: /opt/noc/sa/script/script.py (Line: 423)
- Function: guarded_run
- 416 return result
- 417 except KeyError:
- 418 self.debug("Not in call cache: %r, %r" % (self.name,
- 419 self.kwargs))
- 420 pass
- 421 # Calling script body
- 422 self._thread_id = thread.get_ident()
- 423 ==> result = self.execute(**self.kwargs)
- 424 # Enforce interface result checking
- 425 for i in self.implements:
- 426 result = i.script_clean_result(self.profile, result)
- 427 # Cache result when required
- 428 if self.cache and self.parent is not None:
- 429 self.debug("Write to call cache: %s, %s, %r" % (self.name,
- Variables:
- i =
- <noc.sa.interfaces.igetipv6neighbor.IGetIPv6Neighbor object at 0x80cdb2290>
- self = <Script(Thread-4, initial)>
- ------------------------------------------------------------------------
- File: /opt/noc/sa/script/script.py (Line: 82)
- Function: __call__
- 75 self.script = script
- 76
- 77 def __call__(self, **kwargs):
- 78 """Call script"""
- 79 s = self.script(self.parent.profile, self.parent.activator,
- 80 self.parent.object_name, self.parent.access_profile,
- 81 parent=self.parent, **kwargs)
- 82 ==> return s.guarded_run()
- 83
- 84
- 85 class ScriptRegistry(Registry):
- 86 """Script registry"""
- 87 name = "ScriptRegistry"
- 88 subdir = "profiles"
- Variables:
- s = <Script(Thread-4, initial)>
- self = <noc.sa.script.script.ScriptCallProxy object at 0x80e252850>
- kwargs = {}
- ------------------------------------------------------------------------
- File: /opt/noc/sa/profiles/Generic/get_ip_discovery.py (Line: 50)
- Function: execute
- 43 }
- 44 if "rd" in v:
- 45 vrf["rd"] = v["rd"]
- 46 vrfs[v["name"]] = vrf
- 47 # Get IPv6 neighbors (global?)
- 48 if self.scripts.has_script("get_ipv6_neighbor"):
- 49 try:
- 50 ==> r = self.scripts.get_ipv6_neighbor()
- 51 except self.CLISyntaxError:
- 52 r = []
- 53 if r:
- 54 vrfs["default"]["addresses"] += [{
- 55 "ip": x["ip"],
- 56 "afi": "6",
- Variables:
- self = <Script(Thread-2, started 34601584640)>
- vrfs =
- {'**nVSatellite': {'addresses': [], 'name': '**nVSatellite'},
- 'avangard': {'addresses': [], 'name': 'avangard', 'rd': '8371:25'},
- 'bca': {'addresses': [], 'name': 'bca', 'rd': '8371:3'},
- 'default': {'addresses': [], 'name': 'default'},
- 'euroset': {'addresses': [], 'name': 'euroset', 'rd': '8371:30'},
- 'globex': {'addresses': [], 'name': 'globex', 'rd': '8371:35'},
- 'iptv_unicast': {'addresses': [], 'name': 'iptv_unicast', 'rd': '8371:4'},
- 'meridian': {'addresses': [], 'name': 'meridian', 'rd': '8371:19'},
- 'ptu': {'addresses': [], 'name': 'ptu', 'rd': '8371:31'},
- 'raiff': {'addresses': [], 'name': 'raiff', 'rd': '8371:17'},
- 'shpd': {'addresses': [], 'name': 'shpd', 'rd': '8371:23'},
- 'sj': {'addresses': [], 'name': 'sj', 'rd': '8371:9'},
- 'softswitch': {'addresses': [], 'name': 'softswitch', 'rd': '8371:34'},
- 'sov': {'addresses': [], 'name': 'sov', 'rd': '8371:21'},
- 'sovintel-wifi-sorm': {'addresses': [],
- 'name': 'sovintel-wifi-sorm',
- 'rd': '8371:11'},
- 'tam': {'addresses': [], 'name': 'tam', 'rd': '8371:8'},
- 'test': {'addresses': [], 'name': 'test', 'rd': '8371:2'},
- 'uralsib': {'addresses': [], 'name': 'uralsib', 'rd': '8371:20'}}
- r =
- [{'interfaces': ['nV0'],
- 'name': '**nVSatellite',
- 'status': True,
- 'type': 'VRF'},
- {'interfaces': [],
- 'name': 'avangard',
- 'rd': '8371:25',
- 'status': True,
- 'type': 'VRF'},
- {'interfaces': ['BV1',
- 'BV5011',
- 'Lo30',
- 'BV11',
- 'BV5012',
- 'BV5020',
- 'BV5021',
- 'BV829',
- 'BV851',
- 'BV10010',
- 'BV1027',
- 'BV1500',
- 'BV1087',
- 'BV1092',
- 'BV1094',
- 'BV1080',
- 'BV796',
- 'BV1230',
- 'BV854',
- 'BV1335'],
- 'name': 'bca',
- 'rd': '8371:3',
- 'status': True,
- 'type': 'VRF'},
- {'interfaces': ['BV5045'],
- 'name': 'euroset',
- 'rd': '8371:30',
- 'status': True,
- 'type': 'VRF'},
- {'interfaces': ['BV5050'],
- 'name': 'globex',
- 'rd': '8371:35',
- 'status': True,
- 'type': 'VRF'},
- {'interfaces': ['BV841', 'Bu2.643'],
- 'name': 'iptv_unicast',
- 'rd': '8371:4',
- 'status': True,
- 'type': 'VRF'},
- {'interfaces': ['BV13'],
- 'name': 'meridian',
- 'rd': '8371:19',
- 'status': True,
- 'type': 'VRF'},
- {'interfaces': ['BV5026', 'BV5030'],
- 'name': 'ptu',
- 'rd': '8371:31',
- 'status': True,
- 'type': 'VRF'},
- {'interfaces': ['BV5032', 'BV5051'],
- 'name': 'raiff',
- 'rd': '8371:17',
- 'status': True,
- 'type': 'VRF'},
- {'interfaces': ['Te0/1/1/2',
- 'Gi0/1/0/3',
- 'Lo10',
- 'BV5',
- 'BV10',
- 'BV5001',
- 'BV5008',
- 'BV12',
- 'BV840',
- 'BV1301',
- 'BV1303',
- 'BV1305',
- 'BV1307',
- 'BV1309',
- 'BV1311',
- 'BV1313',
- 'BV1315',
- 'BV1317',
- 'Te0/2/0/1.918',
- 'BV150',
- 'BV1075',
- 'BV1077',
- 'BV1078',
- 'BV1076',
- 'BV843',
- 'BV1339'],
- 'name': 'shpd',
- 'rd': '8371:23',
- 'status': True,
- 'type': 'VRF'},
- {'interfaces': ['BV5048'],
- 'name': 'sj',
- 'rd': '8371:9',
- 'status': True,
- 'type': 'VRF'},
- {'interfaces': ['Gi0/1/0/0',
- 'Lo20',
- 'BV5031',
- 'BV813',
- 'BV10818',
- 'BV574',
- 'BV1334'],
- 'name': 'softswitch',
- 'rd': '8371:34',
- 'status': True,
- 'type': 'VRF'},
- {'interfaces': ['BV5037'],
- 'name': 'sov',
- 'rd': '8371:21',
- 'status': True,
- 'type': 'VRF'},
- {'interfaces': ['BV1229', 'BV1231', 'BV1232'],
- 'name': 'sovintel-wifi-sorm',
- 'rd': '8371:11',
- 'status': True,
- 'type': 'VRF'},
- {'interfaces': ['BV10872'],
- 'name': 'tam',
- 'rd': '8371:8',
- 'status': True,
- 'type': 'VRF'},
- {'interfaces': ['BV152'],
- 'name': 'test',
- 'rd': '8371:2',
- 'status': True,
- 'type': 'VRF'},
- {'interfaces': ['BV5049', 'BV1340'],
- 'name': 'uralsib',
- 'rd': '8371:20',
- 'status': True,
- 'type': 'VRF'}]
- vrf = {'rd': '8371:20', 'name': 'uralsib', 'addresses': []}
- v =
- {'interfaces': ['BV5049', 'BV1340'],
- 'name': 'uralsib',
- 'rd': '8371:20',
- 'status': True,
- 'type': 'VRF'}
- ------------------------------------------------------------------------
- File: /opt/noc/sa/script/script.py (Line: 423)
- Function: guarded_run
- 416 return result
- 417 except KeyError:
- 418 self.debug("Not in call cache: %r, %r" % (self.name,
- 419 self.kwargs))
- 420 pass
- 421 # Calling script body
- 422 self._thread_id = thread.get_ident()
- 423 ==> result = self.execute(**self.kwargs)
- 424 # Enforce interface result checking
- 425 for i in self.implements:
- 426 result = i.script_clean_result(self.profile, result)
- 427 # Cache result when required
- 428 if self.cache and self.parent is not None:
- 429 self.debug("Write to call cache: %s, %s, %r" % (self.name,
- Variables:
- i =
- <noc.sa.interfaces.igetipdiscovery.IGetIPDiscovery object at 0x80cd48650>
- self = <Script(Thread-2, started 34601584640)>
- ------------------------------------------------------------------------
- File: /opt/noc/sa/script/script.py (Line: 446)
- Function: run
- 439
- 440 def run(self):
- 441 """Script thread worker method"""
- 442 self.debug("Running")
- 443 result = None
- 444 try:
- 445 with self.cancelable():
- 446 ==> result = self.guarded_run()
- 447 except self.TimeOutError:
- 448 self.error("Timed out")
- 449 self.e_timeout = True
- 450 except CancelledError:
- 451 self.error("Cancelled")
- 452 self.e_cancel = True
- Variables:
- self = <Script(Thread-2, started 34601584640)>
- r = ["<type 'exceptions.KeyError'>", "'DELETE'"]
- result = None
- v = KeyError('DELETE',)
- tb = <traceback object at 0x80e29d3f8>
- t = <type 'exceptions.KeyError'>
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement