pynetbox importing modules and adopt_compnents #18028
Unanswered
wannagofast83
asked this question in
Help Wanted!
Replies: 1 comment 4 replies
-
I've just run into the same problem. I poked around a bit in the code, and it looks like component adoption is in the code handling form submission from the UI, rather than the underlying data model. So it might not be possible to do through the REST API. |
Beta Was this translation helpful? Give feedback.
4 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.
Uh oh!
There was an error while loading. Please reload this page.
-
I have tried a number of ways to get a script to import modules and then adopt components and it fails every time because there is already a interface with that name on the device.
nb.dcim.modules.create( device = nb_device.id, module_bay = nb_device_module_bay.id, module_type = nb_module_type.id, status = "active", serial = _module_serial, #"asset_tag": "", #"description": "", #"comments": "", replicate_components = False, adopt_components= True, #"tags": "", #"id": "", )
OR
nb_device.adopt_components = True
Anyone have any advice?
Beta Was this translation helpful? Give feedback.
All reactions