Sha256: 1c6134f565949c34b86c18879b7c887f2007e6a26e05ad677849d99eb897462f
Contents?: true
Size: 1.33 KB
Versions: 7
Compression:
Stored size: 1.33 KB
Contents
# fog:OpenStack:https://identifyhost:portNumber/v2.0 class Chef module Provisioning module FogDriver module Providers class OpenStack < FogDriver::Driver Driver.register_provider_class('OpenStack', FogDriver::Providers::OpenStack) def creator compute_options[:openstack_username] end def self.compute_options_for(provider, id, config) new_compute_options = {} new_compute_options[:provider] = provider new_config = { :driver_options => { :compute_options => new_compute_options }} new_defaults = { :driver_options => { :compute_options => {} }, :machine_options => { :bootstrap_options => {} } } result = Cheffish::MergedConfig.new(new_config, config, new_defaults) new_compute_options[:openstack_auth_url] = id if (id && id != '') credential = Fog.credentials new_compute_options[:openstack_username] ||= credential[:openstack_username] new_compute_options[:openstack_api_key] ||= credential[:openstack_api_key] new_compute_options[:openstack_auth_url] ||= credential[:openstack_auth_url] new_compute_options[:openstack_tenant] ||= credential[:openstack_tenant] id = result[:driver_options][:compute_options][:openstack_auth_url] [result, id] end end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems