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 ! We are implementing Netbox and we want to develop scripts for our use cases. Testings script from GUIs is not super convenient so we want to be able to test trough CLI.
I created beforehand a manufacturer ("some-manu") and a device type ("some-device"), The script works in GUI.
Trying to run the script with this command, but it fails:
(venv-py3) root@netbox-server:/xxxxx/netbox/current/netbox# ./manage.py runscript --data '{"site_name": "some-city", "switch_count": 10, "manufacturer": "some-manu","switch_model": "some-switch"}' testscript.NewBranchScript
[2023-02-09 19:44:32,868][ERROR] - Data is not valid:
Data is not valid:
[2023-02-09 19:44:32,868][ERROR] - switch_model: Select a valid choice. That choice is not one of the available choices.
switch_model: Select a valid choice. That choice is not one of the available choices.
[2023-02-09 19:44:32,868][ERROR] - manufacturer: Select a valid choice. That choice is not one of the available choices.
manufacturer: Select a valid choice. That choice is not one of the available choices.
Tried to play with --user and --loglevel without help. When I look for objects with the nbshell , I can see that my objects exists
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hello ! We are implementing Netbox and we want to develop scripts for our use cases. Testings script from GUIs is not super convenient so we want to be able to test trough CLI.
I am not able to run the Example script from documentation (https://docs.netbox.dev/en/stable/customization/custom-scripts/#example) with the
./manage.py runscript
commandI created beforehand a manufacturer ("some-manu") and a device type ("some-device"), The script works in GUI.
Trying to run the script with this command, but it fails:
Tried to play with
--user
and--loglevel
without help. When I look for objects with thenbshell
, I can see that my objects existsI can't find much info on how to use this tool on the documentation. What I am doing wrong ? Any help would be greatly appreciated.
BTW, I run Netbox v3.4.3 on a ubuntu 20 VM.
Thanks !
Beta Was this translation helpful? Give feedback.
All reactions