Class: ChefMetalCrowbar::Providers::Core
- Inherits:
-
CrowbarDriver
- Object
- ChefMetal::Driver
- CrowbarDriver
- ChefMetalCrowbar::Providers::Core
- Defined in:
- lib/chef_metal_crowbar/providers/core.rb
Constant Summary
Constants inherited from CrowbarDriver
CrowbarDriver::AVAILABLE_DEPLOYMENT, CrowbarDriver::KEY_ATTRIB, CrowbarDriver::RESERVED_DEPLOYMENT, CrowbarDriver::TARGET_NODE_ROLE
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from CrowbarDriver
#allocate_machine, #crowbar_api, from_url, #initialize, #machine_for, #ready_machine
Constructor Details
This class inherits a constructor from ChefMetalCrowbar::CrowbarDriver
Class Method Details
.compute_options_for(provider, id, config) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/chef_metal_crowbar/providers/core.rb', line 26 def self.(provider, id, config) = {} [:provider] = provider new_config = { :driver_options => { :compute_options => }} new_defaults = { :driver_options => { :compute_options => {} }, :machine_options => { :bootstrap_options => {} } } result = Cheffish::MergedConfig.new(new_config, config, new_defaults) [:url] = id if (id && id != '') credential = Crowbar.credentials [:username] ||= credential[:username] [:password] ||= credential[:password] [:url] ||= credential[:url] id = result[:driver_options][:compute_options][:url] [result, id] end |
Instance Method Details
#creator ⇒ Object
22 23 24 |
# File 'lib/chef_metal_crowbar/providers/core.rb', line 22 def creator [:username] end |