Class: OOB
- Inherits:
-
Object
- Object
- OOB
- Defined in:
- lib/setup_oob/oob.rb
Overview
A simple class to do the magic to build the right classes and call the right methods.
Instance Method Summary collapse
- #converge! ⇒ Object
- #converged? ⇒ Boolean
-
#initialize(config) ⇒ OOB
constructor
A new instance of OOB.
- #logger ⇒ Object
- #user ⇒ Object
Constructor Details
#initialize(config) ⇒ OOB
Returns a new instance of OOB.
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/setup_oob/oob.rb', line 26 def initialize(config) @host = config[:host] || 'localhost' @user = config[:user] || user @password = config[:password] @level = config[:level] @desired_hostname = config[:desired_hn] || build_hostname logger.debug("Desired hostname set to #{@desired_hostname}") @network_mode = config[:network_mode] @network_src = config[:network_src] @key = config[:key] @type = config[:type] end |
Instance Method Details
#converge! ⇒ Object
55 56 57 |
# File 'lib/setup_oob/oob.rb', line 55 def converge! do_work(true) end |
#converged? ⇒ Boolean
51 52 53 |
# File 'lib/setup_oob/oob.rb', line 51 def converged? do_work end |
#logger ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/setup_oob/oob.rb', line 39 def logger @logger ||= begin logger = Logger.new($stdout) logger.level = @level logger end end |
#user ⇒ Object
47 48 49 |
# File 'lib/setup_oob/oob.rb', line 47 def user 'ADMIN' end |