You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[<pynautobot.models.ipam.IpAddresses ('10.0.10.0/31') at 0x1059d0290>,
<pynautobot.models.ipam.IpAddresses ('10.0.10.1/31') at 0x1046ba9d0>]
pynautobot.core.query.RequestError: The request failed with code 400 Bad Request: [{'status': ['This field is required.']}, {'status': ['This field is required.']}]
The text was updated successfully, but these errors were encountered:
# Import pynautobotimportpynautobot# Connect to the Nautobot SDKnb=pynautobot.api(url="https://demo.nautobot.com", token="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
prefix=nb.ipam.prefixes.get(prefix="10.0.192.0/18")
I tried to stuff the status required into the data of the create() endpoint, but that failed, generating the following error:
(Pdb) prefix.available_ips.create(data={"status": "Active"})
*** pynautobot.core.query.RequestError: The request failed with code 500 Internal Server Error: {'error': 'duplicate key value violates unique constraint "ipam_ipaddress_parent_id_host_89330d7e_uniq"\nDETAIL: Key (parent_id, host)=(85449467-4eae-4df0-a4df-eab7fdab4ed9, \\x0a00c001) already exists.\n', 'exception': 'IntegrityError', 'nautobot_version': '2.2.4', 'python_version': '3.11.9'}
Environment
pynautobot: 1.5.2
nautobot: 1.6.21
client-side python: 3.11.8
Details
Using the example in the pynautobot docs as a starting point:
Code:
Execution result:
The text was updated successfully, but these errors were encountered: