Class: Y2Network::Sequences::Interface
- Inherits:
-
Object
- Object
- Y2Network::Sequences::Interface
- Includes:
- Yast::I18n, Yast::Logger
- Defined in:
- src/lib/y2network/sequences/interface.rb
Overview
The responsibility of this class is to drive workflow for sequence of dialogs.
In this case, allowed operations for interface are, 'add' for adding a new interface, 'edit' for editing an existing device / interface or 'init_s390' for s390 initialization which needs specific activation before using it.
TODO: use UI::Sequence, but it needs also another object dialogs e.g for wifi
Instance Method Summary collapse
-
#add(default: nil) ⇒ Object
Starts sequence for adding new interface and configuring it.
-
#edit(builder) ⇒ Object
Starts sequence for editing configuration of interface.
-
#init_s390(builder) ⇒ Object
Starts sequence for activating s390 device and configuring it.
-
#initialize ⇒ Interface
constructor
A new instance of Interface.
Constructor Details
Instance Method Details
#add(default: nil) ⇒ Object
Starts sequence for adding new interface and configuring it
40 41 42 43 44 45 46 47 48 49 |
# File 'src/lib/y2network/sequences/interface.rb', line 40 def add(default: nil) res = Y2Network::Dialogs::AddInterface.run(default: default) return unless res sym = edit(res) log.info "result of following edit #{sym.inspect}" sym = add(default: res.type) if sym == :back sym end |
#edit(builder) ⇒ Object
Starts sequence for editing configuration of interface
52 53 54 |
# File 'src/lib/y2network/sequences/interface.rb', line 52 def edit(builder) NetworkCardSequence("edit", builder: builder) end |
#init_s390(builder) ⇒ Object
Starts sequence for activating s390 device and configuring it
57 58 59 |
# File 'src/lib/y2network/sequences/interface.rb', line 57 def init_s390(builder) NetworkCardSequence("init_s390", builder: builder) end |