START OF TRACEBACK
------------------------------------------------------------------------
File: /opt/noc/sa/profiles/DLink/DxS/get_mac_address_table.py (Line: 59)
Function: execute
52 "dynamic":"D",
53 "static":"S",
54 "deleteontimeout":"D",
55 "del_on_timeout":"D",
56 "deleteonreset":"D",
57 "del_on_reset":"D",
58 "permanent":"S",
59 ==> "self":"S"}[match.group("type").lower()],
60 }]
61 return r
Variables:
vlan = None
self = <Script(script-172.18.243.246-DLink.DxS.get_mac_address_table, initial)>
cmd = 'show fdb'
mac = None
r = [{'mac': '00-22-B0-20-A7-FF', 'type': 'D', 'interfaces': ['26'], 'vlan_id': '1'}, {'mac': '00-22-B0-20-A7-02', 'type': 'D', 'interfaces': ['26'], 'vlan_id': '200'}, {'mac': '1C-BD-B9-5E-7F-C0', 'type': 'S', 'interfaces': ['CPU'], 'vlan_id': '200'}, {'mac': '00-22-B0-20-A7-03', 'type': 'D', 'interfaces': ['26'], 'vlan_id': '300'}, {'mac': '00-25-F2-EC-21-62', 'type': 'D', 'interfaces': ['11'], 'vlan_id': '300'}, {'mac': '1C-7E-E5-E2-67-9D', 'type': 'D', 'interfaces': ['15'], '...}]
interface = None
match = <_sre.SRE_Match object at 0x805302a40>
------------------------------------------------------------------------
File: /opt/noc/sa/script/script.py (Line: 419)
Function: guarded_run
412 return result
413 except KeyError:
414 self.debug("Not in call cache: %r, %r" % (self.name,
415 self.kwargs))
416 pass
417 # Calling script body
418 self._thread_id = thread.get_ident()
419 ==> result = self.execute(**self.kwargs)
420 # Enforce interface result checking
421 for i in self.implements:
422 result = i.script_clean_result(self.profile, result)
423 # Cache result when required
424 if self.cache and self.parent is not None:
425 self.debug("Write to call cache: %s, %s, %r" % (self.name,
Variables:
i = <noc.sa.interfaces.igetmacaddresstable.IGetMACAddressTable object at 0x80502b4d0>
self = <Script(script-172.18.243.246-DLink.DxS.get_mac_address_table, 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.access_profile, parent=self.parent,
81 **kwargs)
82 ==> return s.guarded_run()
83
84
85 class ScriptRegistry(Registry):
86 """Script registry"""
87 name = "ScriptRegistry"
88 subdir = "profiles"
Variables:
s = <Script(script-172.18.243.246-DLink.DxS.get_mac_address_table, initial)>
self = <noc.sa.script.script.ScriptCallProxy object at 0x805689c90>
kwargs = {}
------------------------------------------------------------------------
File: /opt/noc/sa/profiles/DLink/DxS/get_interfaces.py (Line: 174)
Function: execute
167 except self.CLISyntaxError:
168 c = ""
169 for match in self.rx_igmp.finditer(c):
170 igmp += [match.group("ipif")]
171
172 ports = self.profile.get_ports(self)
173 vlans = self.profile.get_vlans(self)
174 ==> fdb = self.scripts.get_mac_address_table()
175
176 interfaces = []
177 for p in ports:
178 ifname = p['port']
179 i = {
180 "name": ifname,
Variables:
lldp = []
ospf_enable = False
c = ''
ctp = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24']
pim = []
i = {'port': '24'}
pim_enable = False
rip_enable = False
lldp_enable = False
rip = []
self = <Script(script-172.18.243.246-DLink.DxS.get_interfaces, started 34447713216)>
ctp_enable = True
udld = []
vlans = [{'untagged_ports': [], 'vlan_type': 'Static', 'vlan_name': 'default', 'vlan_id': 1, 'tagged_ports': []}, {'untagged_ports': [], 'vlan_type': 'Static', 'vlan_name': 'Control', 'vlan_id': 200, 'tagged_ports': ['25', '26']}, {'untagged_ports': ['1', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '2', '20', '21', '22', '23', '3', '4', '5', '6', '7', '8', '9'], 'vlan_type': 'Static', 'vlan_name': 'FTTB', 'vlan_id': 300, 'tagged_ports': ['25', '26']}, {'untagged_ports': [], 'vlan_type': 'Static', 'vlan_name': 'B2B', 'vlan_id': 400, 'tagged_ports': ['25', '26']}, {'untagged_ports': ['24'], 'vlan_type': 'Static', 'vlan_name': 'voip', 'vlan_id': 500, 'tagged_ports': ['25', '26']}, {'untagged_ports': [], 'vlan_type': 'Static', 'vlan_name': 'Black', 'vlan_id': 700, 'tagged_ports': ['25', '26']}]
ospf = []
ports = [{'status': False, 'trap_state': None, 'admin_duplex': None, 'admin_state': True, 'speed': None, 'port': '1', 'desc': '', 'duplex': None, 'admin_speed': 'Auto', 'admin_flowctrl': ...'}]
igmp = []
------------------------------------------------------------------------
File: /opt/noc/sa/script/script.py (Line: 419)
Function: guarded_run
412 return result
413 except KeyError:
414 self.debug("Not in call cache: %r, %r" % (self.name,
415 self.kwargs))
416 pass
417 # Calling script body
418 self._thread_id = thread.get_ident()
419 ==> result = self.execute(**self.kwargs)
420 # Enforce interface result checking
421 for i in self.implements:
422 result = i.script_clean_result(self.profile, result)
423 # Cache result when required
424 if self.cache and self.parent is not None:
425 self.debug("Write to call cache: %s, %s, %r" % (self.name,
Variables:
i = <noc.sa.interfaces.igetinterfaces.IGetInterfaces object at 0x80502bc10>
self = <Script(script-172.18.243.246-DLink.DxS.get_interfaces, started 34447713216)>
------------------------------------------------------------------------
File: /opt/noc/sa/script/script.py (Line: 442)
Function: run
435
436 def run(self):
437 """Script thread worker method"""
438 self.debug("Running")
439 result = None
440 try:
441 with self.cancelable():
442 ==> result = self.guarded_run()
443 except self.TimeOutError:
444 self.error("Timed out")
445 self.e_timeout = True
446 except CancelledError:
447 self.error("Cancelled")
448 self.e_cancel = True
Variables:
self = <Script(script-172.18.243.246-DLink.DxS.get_interfaces, started 34447713216)>
r = ["<type 'exceptions.KeyError'>", "'blockbyaddrbind'"]
result = None
v = KeyError('blockbyaddrbind',)
tb = <traceback object at 0x80515ddd0>
t = <type 'exceptions.KeyError'>
------------------------------------------------------------------------
END OF TRACEBACK