-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NAV Api shows no LAG information #1765
Comments
Yes, this hasn't been implemented in the API. I will consider this the official feature request :-) |
The principal NAV model that describes link aggregation is nav/python/nav/models/manage.py Lines 2089 to 2106 in fdecb80
The The A, perhaps simpler, implementation is to introduce a new endpoint which only exposes the information from I'm having trouble deciding between the two - perhaps a design discussion is needed... |
More importantly, there are the $ django-admin shell
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
Type 'copyright', 'credits' or 'license' for more information
IPython 8.4.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from nav.models import manage
In [2]: i = manage.Interface.objects.get(ifname='Trk1', netbox__sysname='teknobyen-3etg-sw2.uninett.no')
In [3]: i.get_bundled_interfaces()
Out[3]: <QuerySet [<Interface: 47 at teknobyen-3etg-sw2.uninett.no>, <Interface: 48 at teknobyen-3etg-sw2.uninett.no>]>
In [4]: _47 = i.get_bundled_interfaces()[0]
In [5]: _47.get_aggregator()
Out[5]: <Interface: Trk1 at teknobyen-3etg-sw2.uninett.no> |
We more or less decided that the quickest win here is to serialize the results of these two method calls as a list of primary key IDs of the related |
I tried to get information per API, which physical ports are part of an logical port, but I couldn´t find a way to get that information from the API.
The text was updated successfully, but these errors were encountered: