Class: Rundock::Builder::BackendBuilder
- Defined in:
- lib/rundock/builder/backend_builder.rb
Constant Summary
Constants inherited from Base
Rundock::Builder::Base::BuilderNotImplementedError
Instance Attribute Summary collapse
-
#parsed_options ⇒ Object
Returns the value of attribute parsed_options.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(options, nodename, node_info) ⇒ BackendBuilder
constructor
A new instance of BackendBuilder.
Constructor Details
#initialize(options, nodename, node_info) ⇒ BackendBuilder
Returns a new instance of BackendBuilder.
6 7 8 9 10 |
# File 'lib/rundock/builder/backend_builder.rb', line 6 def initialize(, nodename, node_info) super() @nodename = nodename @node_info = node_info end |
Instance Attribute Details
#parsed_options ⇒ Object
Returns the value of attribute parsed_options.
4 5 6 |
# File 'lib/rundock/builder/backend_builder.rb', line 4 def @parsed_options end |
Instance Method Details
#build ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rundock/builder/backend_builder.rb', line 12 def build @parsed_options = backend_type = parse_backend_type @parsed_options.merge!(@options) # update ssh options for node from node_info @parsed_options.merge!(@node_info[@nodename.to_sym][:ssh_opts]) # delete trash ssh_options(node[host::ssh_options]) @node_info[@nodename.to_sym].delete(:ssh_opts) # add any attributes for host from node_info @parsed_options.merge!(@node_info[@nodename.to_sym]) Backend.create(backend_type, @parsed_options) end |