Class: Y2Network::Autoinst::Config
- Inherits:
-
Object
- Object
- Y2Network::Autoinst::Config
- Defined in:
- src/lib/y2network/autoinst/config.rb
Overview
This class is responsible of storing network settings that are only relevant to the autoinstallation proccess.
Instance Attribute Summary collapse
-
#backend ⇒ Symbol
Backend id.
-
#before_proposal ⇒ Boolean
Controls whether the network configuration should be run before the proposal.
- #ip_check_timeout ⇒ Integer
-
#keep_install_network ⇒ Boolean
Controls whether the configuration done during the installation should be copied to the target system at the end.
-
#managed ⇒ Boolean
Returns whether the network is managed by NM or not.
-
#start_immediately ⇒ Boolean
Controls whether the network should be restarted immediately after write or not.
-
#virt_bridge_proposal ⇒ Boolean
Controls whether a bridge configuration for virtualization network should be proposed or not.
Instance Method Summary collapse
-
#copy_network? ⇒ Boolean
Return whether the network should be copied at the end.
-
#initialize(opts = {}) ⇒ Config
constructor
Constructor.
Constructor Details
#initialize(opts = {}) ⇒ Config
Constructor
52 53 54 55 56 57 58 59 60 61 62 |
# File 'src/lib/y2network/autoinst/config.rb', line 52 def initialize(opts = {}) = opts.reject { |_k, v| v.nil? } @before_proposal = .fetch(:before_proposal, false) @start_immediately = .fetch(:start_immediately, true) @keep_install_network = .fetch(:keep_install_network, true) @ip_check_timeout = .fetch(:ip_check_timeout, -1) @virt_bridge_proposal = .fetch(:virt_bridge_proposal, true) @managed = [:managed] @backend = [:backend] end |
Instance Attribute Details
#backend ⇒ Symbol
Returns backend id.
42 43 44 |
# File 'src/lib/y2network/autoinst/config.rb', line 42 def backend @backend end |
#before_proposal ⇒ Boolean
Returns controls whether the network configuration should be run before the proposal.
27 28 29 |
# File 'src/lib/y2network/autoinst/config.rb', line 27 def before_proposal @before_proposal end |
#ip_check_timeout ⇒ Integer
35 36 37 |
# File 'src/lib/y2network/autoinst/config.rb', line 35 def ip_check_timeout @ip_check_timeout end |
#keep_install_network ⇒ Boolean
Returns controls whether the configuration done during the installation should be copied to the target system at the end.
33 34 35 |
# File 'src/lib/y2network/autoinst/config.rb', line 33 def keep_install_network @keep_install_network end |
#managed ⇒ Boolean
Returns whether the network is managed by NM or not
40 41 42 |
# File 'src/lib/y2network/autoinst/config.rb', line 40 def managed @managed end |
#start_immediately ⇒ Boolean
Returns controls whether the network should be restarted immediately after write or not.
30 31 32 |
# File 'src/lib/y2network/autoinst/config.rb', line 30 def start_immediately @start_immediately end |
#virt_bridge_proposal ⇒ Boolean
Returns controls whether a bridge configuration for virtualization network should be proposed or not.
38 39 40 |
# File 'src/lib/y2network/autoinst/config.rb', line 38 def virt_bridge_proposal @virt_bridge_proposal end |
Instance Method Details
#copy_network? ⇒ Boolean
Return whether the network should be copied at the end
67 68 69 |
# File 'src/lib/y2network/autoinst/config.rb', line 67 def copy_network? keep_install_network || before_proposal end |