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

Autoyast Fixes: Part One #775

Merged
merged 2 commits into from Apr 10, 2019
Merged

Autoyast Fixes: Part One #775

merged 2 commits into from Apr 10, 2019

Conversation

teclator
Copy link
Contributor

@teclator teclator commented Apr 10, 2019

Done:

  • Fixed read of configuration.
  • Write sysconfig when applied in AutoYaST configuration.

Pending / TODO by Part two:

  • Do not break AutoYaST dialog edition in case the config has not been cloned.
  • Export routing section.

@teclator teclator changed the title Autoyast Fixes. [WIP] Autoyast Fixes. Apr 10, 2019
presenter.text
summary = "<ul><li><b>" + _("Routing:") + "</b></li><li>"
summary += presenter.text
summary += "</li></ul>"
Copy link
Member

Choose a reason for hiding this comment

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

this looks really strange. If you need specific summary for autoinst routing, please create a child of RoutingSummary and redefine text there.

Copy link
Contributor Author

@teclator teclator Apr 10, 2019

Choose a reason for hiding this comment

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

I just wanted to check how it looked like in the AutoYaST summary, as it was suggested during the network installation proposal review to remove the extra spaces using sublists.

So yes, maybe introducing a ProposalRoutingSummary could be an option.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Proposal

Copy link
Member

Choose a reason for hiding this comment

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

hmm, this is really big. I think there is ways to compress like having together IP Forwarding or somehow compress it with less details. This way it is a lot of info that has problem to fit and I worry in ncurses it will be even worse.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Although this concretely presentation should be responsibility of Yast::Lan Summary

https://github.com/yast/yast-network/blob/master/src/modules/Lan.rb#L813

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, and get bigger with complex configuration

@@ -43,7 +43,7 @@ def initialize(section)
def config
interfaces = find_interfaces
routing = section.routing ? AutoinstRouting.new(section.routing).config : nil
Y2Network::Config.new(interfaces: interfaces, routing: routing, source: :autoyast)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The source: :sysconfig instead of :autoinst is a workaround we should discuss. The writer used is based on the source, and that is not the case for AutoYaST. That is, the target writer should be decided based on the current network backend and not based on the source from where the config was read. So basically I used :sysconfig to use its writer.

Copy link
Member

Choose a reason for hiding this comment

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

makes sense for me to just have backend value in Config.

@coveralls
Copy link

coveralls commented Apr 10, 2019

Coverage Status

Coverage increased (+0.02%) to 14.692% when pulling 8aa7ef3 on autoyast_fixes into 671756c on network-ng.

@@ -751,7 +751,7 @@ def Import(settings)
settings = {} if settings.nil?

profile = Y2Network::AutoinstProfile::NetworkingSection.new_from_hashes(settings)
config = Y2Network::Config.from(:autoyast, profile)
config = Y2Network::Config.from(:autoinst, profile)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

leftover: we renamed the config_reader to Autoinst

@teclator teclator changed the title [WIP] Autoyast Fixes. Autoyast Fixes: Part One Apr 10, 2019
@teclator teclator merged commit 6363beb into network-ng Apr 10, 2019
@jreidinger jreidinger deleted the autoyast_fixes branch June 5, 2019 07:20
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