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
Hello everyone
We use Netbox in a professional environment via the pynetbox API in order to instantiate part of our equipment automatically from our database.
Until now, the machines taken out of our database were placed in 'inventory' in netbox:
def inventory(list_db:list, list_netbox:list):
""" Changes the status of netbox devices to 'Inventory' when they are no longer in active status in the database
args:
database dictionary list
List of netbox machine names
return : func_log
"""
list_name_db = [dico['machine_name'] for dico in list_db]
for machine in list_netbox:
update_data = ""
try:
if machine.name not in list_name_db:
machine.status = 'inventory'
machine.save()
except pynetbox.RequestError as e:
update_data = e.error
log = func_log(machine,update_data)
return log
For some time the logs have returned the following message: {"status":["inventory is not a valid choice."]}
python 3.11.5.64bits
pynetbox 7.2.0
netbox 3.6.1
os windows
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone
We use Netbox in a professional environment via the pynetbox API in order to instantiate part of our equipment automatically from our database.
Until now, the machines taken out of our database were placed in 'inventory' in netbox:
For some time the logs have returned the following message:
{"status":["inventory is not a valid choice."]}
python 3.11.5.64bits
pynetbox 7.2.0
netbox 3.6.1
os windows
Thanks for your help
Beta Was this translation helpful? Give feedback.
All reactions