-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add non-filtered interfaces to the API response (LP: #2052834) #241
Conversation
landscape/lib/tests/test_network.py
Outdated
continue | ||
print("result is: ", result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this print from the tests
snap-http
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll want to make sure this submodule is up-to-date prior to the merge
Thank you for the review @srunde3! I added the docstring and removed the print statement, it was a debug remnant. Let me know if anything else needs changing. |
Manual testing looks good:
Note that these additional interfaces might not appear in the UI still since I believe that data comes from the HardwareInfo plugin. The UI is getting updated anyways, so this could be a moot point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you for your contribution!
Thank you for the review and for merging the patch! Yes you are correct these interfaces still do no show up in the UI, my goal was for them to show up in the API requests. |
Currently not all interfaces show up in the API response (interfaces with no IP address, in the down state, etc...).
This patch makes any interface that is not filtered out and has a valid MAC address show up in the API response. All previously included interfaces will still show up as expected.
Mainly interfaces in the down state as well as interfaces in the up state but with no IP address assigned to them will now show up in the API response as long as they have a MAC address.
The IP address, broadcast address and net-mask for these interfaces will be set to
0.0.0.0
.