Skip to content

Commit

Permalink
Fix attribute when adding new device
Browse files Browse the repository at this point in the history
  • Loading branch information
liorf committed Mar 14, 2017
1 parent 3315ee4 commit 861e4e5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nsot_sync/drivers/device_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,9 @@ def scan(self, ip):
# TODO - Add more attributes here
if not device:
self.logger.info('%s - Not exist in IPAM', ip)
attributes = {'address': ip, 'last_reachable': str(st)}
attributes = {'address': ip, 'last_reachable': str(st), 'device_type': device_type}
device = {'hostname': str(hostname),
'attributes': attributes,
'device_type': device_type}
'attributes': attributes}
else:
self.logger.info('%s - Exist in IPAM', ip)
device['attributes']['device_type'] = device_type
Expand Down

0 comments on commit 861e4e5

Please sign in to comment.