-
Notifications
You must be signed in to change notification settings - Fork 120
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
ENT-5099: Collect network facts using 'ip' #3284
Conversation
Coverage (computed on Fedora latest) •
|
4efcb6d
to
e777c9f
Compare
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.
Hi! Thanks for this, in general it seems solid work; I'll do a thorough review in the upcoming days.
In the meanwhile, I have few small notes, some inline and some global:
- I'd suggest using
for the multi-line doc comments, ie the first line in a different line of
""" text """
"""
- in the
_list
facts, the item must be separated by ", " and not only by a space; see the existing code:
subscription-manager/src/rhsmlib/facts/hwprobe.py
Lines 847 to 849 in 2d980dc
list_key = key + "_list" netinfdict[key] = values[0] netinfdict[list_key] = ", ".join(values)
655d2df
to
4086f1d
Compare
4086f1d
to
04d6849
Compare
* BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2215974 * Card ID: ENT-5099 Implementation of new code for network collection using 'iproute' instead of 'python-ethtool'. - Bonding can be created quite easily in VM (provided it has two virtual interfaces): nmcli connection add type bond ifname bond0 con-name bond0 nmcli connection add type ethernet ifname enp1s0 master bond0 \ con-name bond0-1 nmcli connection add type ethernet ifname enp2s0 master bond0 \ con-name bond0-2 nmcli connection up bond0 nmcli connection up bond0-1 nmcli connection up bond0-2 - Tunnels can be enabled by running ifconfig sit0 up - Loopback usually is called 'lo', but it is just a name and we should not rely on it. It can be renamed by calling ip link set down lo ip link set lo name lpbck ip link set up lpbck - Network interfaces may not only be ASCII. They can even be emojis such as watermelon: ip link set eth0 name 🍉 or even multi-byte complex emojis using joiners (which you can create in Python by printing "\N{ADULT}\N{ZERO WIDTH JOINER}\N{ROCKET}"): ip link set eth0 name 🧑🚀
04d6849
to
4c81d7c
Compare
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, thanks!
There are still some remnants from the previous ethtool dependency: https://github.com/candlepin/subscription-manager/blob/main/setup.py#L232 |
Hi @yselkowitz, thanks for catching that! Should be fixed by #3295. |
Implementation of new code for network collection using
iproute
instead ofpython-ethtool