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, DISABLE_SERVICES = "network--disable".freeze ].freeze
- VIRT_PROPOSAL_LINKS =
[ PROPOSE_BRIDGE = "network--propose-bridge".freeze, PROPOSE_NON_BRIDGE = "network--dont-propose-bridge".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.
42 43 44 45 46 47 48 49 50 |
# File 'src/lib/network/clients/network_proposal.rb', line 42 def initialize Yast.import "UI" Yast.import "Lan" textdomain "installation" settings.refresh_packages settings.apply_defaults end |
Instance Method Details
#ask_user(args) ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'src/lib/network/clients/network_proposal.rb', line 68 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 when "network--disable" disable_services when "network--propose-bridge" propose_bridge(true) when "network--dont-propose-bridge" propose_bridge(false) else launch_network_configuration(args) end { "workflow_sequence" => result } end |
#description ⇒ Object
52 53 54 55 56 57 58 |
# File 'src/lib/network/clients/network_proposal.rb', line 52 def description { "rich_text_title" => _("Network Configuration"), "menu_title" => _("Network Configuration"), "id" => "network" } end |
#make_proposal(_) ⇒ Object
60 61 62 63 64 65 66 |
# File 'src/lib/network/clients/network_proposal.rb', line 60 def make_proposal(_) { "preformatted_proposal" => preformatted_proposal, "label_proposal" => [proposal_summary.one_line_text], "links" => BACKEND_LINKS + VIRT_PROPOSAL_LINKS } end |