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
Use InterfaceType everywhere #888
Conversation
1c8a6a0
to
06127e7
Compare
def type | ||
:eth | ||
"eth" |
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.
why is type a string here?
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.
well, reason is that in this case it can be also read from file, so I use value that can be specified in file as INTERFACETYPE . Or do you think it is bad approach?
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.
slightly misleading in the context of this pr, but makes sense in this case ;-)
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.
well, I need to change it as there is now basically only two representation short_name as string and InterfaceType as class. So no symbols anymore.
@@ -101,9 +102,8 @@ | |||
subject.Read | |||
subject.current = 0 | |||
|
|||
builder = Y2Network::InterfaceConfigBuilder.new | |||
builder = Y2Network::InterfaceConfigBuilder.for("eth") |
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.
well I know that InterfaceConfigBuilder::for
handles even strings, I'm just curious if using string here was an intention.
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.
well, I start on same places using builder = Y2Network::InterfaceConfigBuilder.for(Y2Network::InterfaceType::ETHERNET)
but it is incredible long with all that scoping.
06127e7
to
432a8be
Compare
fine with me |
No description provided.