extras is a list not a dict
@@ -741,14 +741,14 @@ class Monitor(object):
(ep.state, int(time.time())))
extra_machines = []
for device in extras:
- if extras[device]['valid']:
- extra_machine = {'mac': extras[device]['source_mac'], 'segment': 'NO DATA',
+ if device['valid']:
+ extra_machine = {'mac': device['source_mac'], 'segment': 'NO DATA',
'port': 'NO DATA', 'tenant': 'NO DATA', 'active': 0, 'name': None}
- if ':' in extras[device]['source_ip']:
- extra_machine['ipv6'] = extras[device]['source_ip']
+ if ':' in device['source_ip']:
+ extra_machine['ipv6'] = device['source_ip']
extra_machine['ipv4'] = 0
else:
- extra_machine['ipv4'] = extras[device]['source_ip']
+ extra_machine['ipv4'] = device['source_ip']
extra_machine['ipv6'] = 0
extra_machines.append(extra_machine)
self.s.find_new_machines(extra_machines)
