module_bay_count=0 for device created through custom script/nbshell #19442
Unanswered
Tina8S
asked this question in
Help Wanted!
Replies: 2 comments
-
@Tina8S I'm converting this to a discussion, it sounds like you are having a coding issue with the script and it would get more feedback as a discussion. |
Beta Was this translation helpful? Give feedback.
0 replies
-
That's fine, thank you. I would appreciate any help, really. It's been driving my crazy for a couple of weeks now. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Deployment Type
NetBox Cloud
NetBox Version
v4.2.3
Python Version
3.10
Steps to Reproduce
When creating a device based on a device template with module bays the device shows up as having module_bay_count=0 within the script (At this point the GUI shows module bay tab, though). After saving the device (device.save()) within the script (i.e. after adding primary ipv4 address) the module_bay_count is saved as "0" and even the GUI does no longer show the tab for the module bays. A reverse search for module bays belonging to the device still lists the module bays, though.
Code to reproduce via nbshell:
Expected Behavior
The module_bay_count should be set to the number of module bays that belong to the device
Observed Behavior
module_bay_count is set to 0 instead and (after saving device within script) no tab for module bays shows up in GUI
Beta Was this translation helpful? Give feedback.
All reactions