Skip to content
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

network-ng: drop fake interface #939

Merged
merged 7 commits into from Sep 3, 2019

Conversation

imobachgs
Copy link
Contributor

@imobachgs imobachgs commented Sep 3, 2019

This method improves Y2Network::Hwinfo API adding a #netcards method and implementing memoization. It does not have any performance impact because, at this time, the hardware info is stored in LanItems anyway.

Additionally, the hardware info is passed to PhysicalInterface through its constructor. It solves a problem where, although we had the hardware info for unnamed interfaces, the PhysicalInterface was unable to find it because of the missing name.

@coveralls
Copy link

coveralls commented Sep 3, 2019

Coverage Status

Coverage increased (+0.07%) to 66.074% when pulling 3bd003e on network-ng-drop_fake_interface into 174d81c on network-ng.

#
# @return [Boolean]
def present?
!!type
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is type really so deterministic? I though that type could be part of udev rule, not? What about dev_name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say that the type is always there (but perhaps there is a better candidate) and, from udev, we are only able to infer the bus ID and the MAC. On the other hand, we want to avoid the dev_name because it might be missing (s390) and that's the main problem we try to address.

@imobachgs imobachgs marked this pull request as ready for review September 3, 2019 09:06
@imobachgs imobachgs merged commit d2b4ba4 into network-ng Sep 3, 2019
@imobachgs imobachgs deleted the network-ng-drop_fake_interface branch September 4, 2019 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants