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

Returns a new instance of Proposal.


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

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

  textdomain "network"
end

Instance Method Details

#ask_user(_param) ⇒ Object


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

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

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

  { "workflow_sequence" => ret }
end

#descriptionObject


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

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


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

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

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

#writeObject


63
64
65
# File 'src/lib/y2remote/clients/proposal.rb', line 63

def write
  remote.write
end