netbox-agent icon indicating copy to clipboard operation
netbox-agent copied to clipboard

the script cannot create an ip address

Open orlov88 opened this issue 2 years ago • 1 comments

Describe the bug the script crashes at the stage of creating an ip address

Traceback (most recent call last): File "/usr/local/bin/netbox_agent", line 8, in sys.exit(main()) File "/usr/local/lib/python3.9/dist-packages/netbox_agent/cli.py", line 44, in main return run(config) File "/usr/local/lib/python3.9/dist-packages/netbox_agent/cli.py", line 39, in run server.netbox_create_or_update(config) File "/usr/local/lib/python3.9/dist-packages/netbox_agent/server.py", line 292, in netbox_create_or_update self.network.create_or_update_netbox_network_cards() File "/usr/local/lib/python3.9/dist-packages/netbox_agent/network.py", line 444, in create_or_update_netbox_network_cards self.create_or_update_netbox_ip_on_interface(ip, interface) File "/usr/local/lib/python3.9/dist-packages/netbox_agent/network.py", line 316, in create_or_update_netbox_ip_on_interface netbox_ip = nb.ipam.ip_addresses.create( File "/usr/local/lib/python3.9/dist-packages/pynetbox/core/endpoint.py", line 278, in create req = Request( File "/usr/local/lib/python3.9/dist-packages/pynetbox/core/query.py", line 383, in post return self._make_call(verb="post", data=data) File "/usr/local/lib/python3.9/dist-packages/pynetbox/core/query.py", line 274, in _make_call raise RequestError(req) pynetbox.core.query.RequestError: The request failed with code 400 Bad Request: {'status': ['1 is not a valid choice.']}

Expected behavior the interface is being created, but the ip address is not.

Configuration file netbox: url: 'https://test' token: test network: ignore_interfaces: "(dummy.|docker.)" ignore_ips: (127.0.0..) datacenter_location: driver: "cmd:echo test" regex: "(.)"

Environment:

  • OS: [e.g. Debian 11]
  • Netbox agent version [e.g. master, v0.6.1]
  • Netbox 3.2.6

orlov88 avatar Sep 16 '22 14:09 orlov88

is this not a duplicate of #191

KivraChristoffer avatar Sep 19 '22 05:09 KivraChristoffer

duplicate of https://github.com/Solvik/netbox-agent/issues/191 (thx @KivraChristoffer )

cyrinux avatar Nov 30 '22 10:11 cyrinux