Class: Yast::SshImportProposalClient
- Inherits:
-
Installation::ProposalClient
- Object
- Installation::ProposalClient
- Yast::SshImportProposalClient
- Includes:
- I18n, Logger
- Defined in:
- src/lib/installation/clients/ssh_import_proposal.rb
Overview
Proposal client for SSH keys import
Instance Method Summary collapse
- #ask_user(param) ⇒ Object protected
- #description ⇒ Object protected
- #importer ⇒ Object protected
-
#initialize ⇒ SshImportProposalClient
constructor
A new instance of SshImportProposalClient.
- #make_proposal(attrs) ⇒ Object protected
- #preformatted_proposal ⇒ Object protected
Constructor Details
#initialize ⇒ SshImportProposalClient
Returns a new instance of SshImportProposalClient.
11 12 13 14 15 |
# File 'src/lib/installation/clients/ssh_import_proposal.rb', line 11 def initialize super Yast.import "UI" textdomain "installation" end |
Instance Method Details
#ask_user(param) ⇒ Object (protected)
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'src/lib/installation/clients/ssh_import_proposal.rb', line 47 def ask_user(param) args = { "enable_back" => true, "enable_next" => param.fetch("has_next", false), "going_back" => true } log.info "Asking user which SSH keys to import" begin Yast::Wizard.OpenAcceptDialog result = WFM.CallFunction("inst_ssh_import", [args]) ensure Yast::Wizard.CloseDialog end log.info "Returning from ssh_import ask_user with #{result}" { "workflow_sequence" => result } end |
#description ⇒ Object (protected)
19 20 21 22 23 24 25 26 27 |
# File 'src/lib/installation/clients/ssh_import_proposal.rb', line 19 def description { # proposal part - bootloader label "rich_text_title" => _("Import SSH Host Keys and Configuration"), # menubutton entry "menu_title" => _("&Import SSH Host Keys and Configuration"), "id" => "ssh_import" } end |
#importer ⇒ Object (protected)
37 38 39 |
# File 'src/lib/installation/clients/ssh_import_proposal.rb', line 37 def importer ::Installation::SshImporter.instance end |
#make_proposal(attrs) ⇒ Object (protected)
29 30 31 32 33 34 35 |
# File 'src/lib/installation/clients/ssh_import_proposal.rb', line 29 def make_proposal(attrs) importer.reset if attrs["force_reset"] { "preformatted_proposal" => preformatted_proposal, "links" => ["ssh_import"] } end |
#preformatted_proposal ⇒ Object (protected)
41 42 43 44 45 |
# File 'src/lib/installation/clients/ssh_import_proposal.rb', line 41 def preformatted_proposal ::Installation::SshImporterPresenter.new( ::Installation::SshImporter.instance ).summary end |