add dns name

This commit is contained in:
bile0026 2020-11-10 21:32:38 -06:00
parent 8dc40a7534
commit 79f06166da

View File

@ -62,9 +62,12 @@ class NetBoxScanner(object):
logging.info(f'unchanged: {host[0]}/32 "{host[1]}"')
self.stats['unchanged'] += 1
else:
print(host)
print(self.tag)
self.netbox.ipam.ip_addresses.create(
address=host[0],
tags=[self.tag],
dns_name=host[1],
description=host[1]
)
logging.info(f'created: {host[0]}/32 "{host[1]}"')