Class: Yast::NetworkProposal
- Inherits:
-
Installation::ProposalClient
- Object
- Installation::ProposalClient
- Yast::NetworkProposal
- Includes:
- I18n, Logger
- Defined in:
- src/lib/network/clients/network_proposal.rb
Overview
Proposal client for Network configuration
Constant Summary collapse
- BACKEND_LINKS =
[ SWITCH_TO_WICKED = "network--switch-to-wicked".freeze, SWITCH_TO_NETWORK_MANAGER = "network--switch-to-nm".freeze ].freeze
Instance Method Summary collapse
- #ask_user(args) ⇒ Object
- #description ⇒ Object
-
#initialize ⇒ NetworkProposal
constructor
A new instance of NetworkProposal.
- #make_proposal(_) ⇒ Object
Constructor Details
#initialize ⇒ NetworkProposal
Returns a new instance of NetworkProposal.
35 36 37 38 39 40 41 42 43 |
# File 'src/lib/network/clients/network_proposal.rb', line 35 def initialize Yast.import "UI" Yast.import "Lan" Yast.import "LanItems" textdomain "installation" settings.refresh_packages end |
Instance Method Details
#ask_user(args) ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'src/lib/network/clients/network_proposal.rb', line 61 def ask_user(args) result = case args["chosen_id"] when "network--switch-to-wicked" switch_to_wicked when "network--switch-to-nm" switch_to_network_manager else launch_network_configuration(args) end { "workflow_sequence" => result } end |
#description ⇒ Object
45 46 47 48 49 50 51 |
# File 'src/lib/network/clients/network_proposal.rb', line 45 def description { "rich_text_title" => _("Network Configuration"), "menu_title" => _("Network Configuration"), "id" => "network" } end |
#make_proposal(_) ⇒ Object
53 54 55 56 57 58 59 |
# File 'src/lib/network/clients/network_proposal.rb', line 53 def make_proposal(_) { "preformatted_proposal" => preformatted_proposal, "label_proposal" => [Yast::LanItems.summary("one_line")], "links" => BACKEND_LINKS } end |