Class: Y2Remote::Clients::Proposal

Inherits:
Installation::ProposalClient
  • Object
show all
Includes:
Yast::I18n, Yast::Logger
Defined in:
src/lib/y2remote/clients/proposal.rb

Instance Method Summary collapse

Constructor Details

#initializeProposal


33
34
35
36
37
38
# File 'src/lib/y2remote/clients/proposal.rb', line 33

def initialize
  Yast.import "UI"
  Yast.import "Wizard"

  textdomain "network"
end

Instance Method Details

#ask_user(_param) ⇒ Object


57
58
59
60
61
62
63
# File 'src/lib/y2remote/clients/proposal.rb', line 57

def ask_user(_param)
  ret = Y2Remote::Dialogs::Remote.new.run

  log.debug("result=#{ret}")

  { "workflow_sequence" => ret }
end

#descriptionObject


40
41
42
43
44
45
46
47
48
# File 'src/lib/y2remote/clients/proposal.rb', line 40

def description
  {
    # RichText label
    "rich_text_title" => _("VNC Remote Administration"),
    # Menu label
    "menu_title"      => _("VNC &Remote Administration"),
    "id"              => "admin_stuff"
  }
end

#make_proposal(attrs) ⇒ Object

create a textual proposal


51
52
53
54
55
# File 'src/lib/y2remote/clients/proposal.rb', line 51

def make_proposal(attrs)
  attrs["force_reset"] ? remote.reset! : remote.propose!

  { "raw_proposal" => [remote.summary] }
end

#writeObject


65
66
67
# File 'src/lib/y2remote/clients/proposal.rb', line 65

def write
  remote.write
end