-
Dear all, I'm currently trying to figure out how to fix issue #6312. The issue is this: from v2.11.1 to v2.11.2 there was a commit 9a58823 to fix a problem with assigning interfaces of virtual chassis members to a LAG. This fix introduced a new parameter "if_master" to https://github.com/netbox-community/netbox/blob/develop/netbox/dcim/models/devices.py. If you have a VC "myname" with two members "myname/1" and "myname/2" (none of which is a master!), the web UI correctly shows the interfaces of just the device that you're currently viewing in the UI (as expected), however, querying the API via GET Please note that I'm not a coder and I'm a novice regarding NetBox code so please be patient with me. :) From what I understand it all boils down to how the function "vc_interfaces()" in netbox/dcim/models/devices.py is called. The default for the newly introduced variable "if_master" is "False": netbox/netbox/dcim/models/devices.py Line 869 in 67945f2 The following code in "vc_interfaces()" adds a filter that shows all interfaces of all VC members when called if the condition in the if-clause is met: netbox/netbox/dcim/models/devices.py Lines 877 to 878 in 67945f2 This used to only be the case if the device queried was master of the VC it's part of ( Line 1408 in 9a58823 (Please correct my if this assumption is wrong.) However, since an API call yields more than the interfaces seen in the web UI, I suspect that whatever part of the code calls Sorry for the lengthy post. This issue is quite critical for us because we use VCs extensively and currently our Ansible playbooks which use the API query to get information from NetBox are broken. Any help is therefore highly appreciated. Thanks! Cheers, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This issue was resolved in v2.11.3. Thanks to @jeremystretch for fixing it. |
Beta Was this translation helpful? Give feedback.
This issue was resolved in v2.11.3. Thanks to @jeremystretch for fixing it.