mirror of
https://github.com/lopes/netbox-scanner.git
synced 2025-07-04 04:24:36 +02:00
adjust IP address creation. removed tags, dns_name
This commit is contained in:
parent
7a7e8b6baa
commit
c4e16efd4d
@ -7,7 +7,7 @@ from pynetbox import api
|
||||
class NetBoxScanner(object):
|
||||
|
||||
def __init__(self, address, token, ssl_verify, tag, cleanup):
|
||||
if (ssl_verify == 'No'):
|
||||
if (ssl_verify == 'no'):
|
||||
session = requests.Session()
|
||||
session.verify = False
|
||||
self.netbox = api(address, token)
|
||||
@ -66,8 +66,8 @@ class NetBoxScanner(object):
|
||||
print(self.tag)
|
||||
self.netbox.ipam.ip_addresses.create(
|
||||
address=host[0],
|
||||
tags=[self.tag],
|
||||
dns_name=host[1],
|
||||
# tags=[self.tag],
|
||||
# dns_name=host[1],
|
||||
description=host[1]
|
||||
)
|
||||
logging.info(f'created: {host[0]}/32 "{host[1]}"')
|
||||
|
Loading…
x
Reference in New Issue
Block a user