Module: Fog::Softlayer::Compute::Shared
- Included in:
- Account::Softlayer::Mock, Account::Softlayer::Real, Compute::Softlayer::Mock, Compute::Softlayer::Real, DNS::Softlayer::Mock, DNS::Softlayer::Real, Product::Mock, Product::Real
- Defined in:
- lib/fog/softlayer/compute/shared.rb
Overview
The Shared module consists of code that was duplicated between the Real and Mock implementations.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options) ⇒ Object
Creates a new instance of the Softlayer Compute service.
Class Method Details
.valid_request?(required, passed) ⇒ Boolean
33 34 35 |
# File 'lib/fog/softlayer/compute/shared.rb', line 33 def self.valid_request?(required, passed) required.all? {|k| passed.key?(k)} end |
Instance Method Details
#initialize(options) ⇒ Object
Creates a new instance of the Softlayer Compute service
27 28 29 30 31 |
# File 'lib/fog/softlayer/compute/shared.rb', line 27 def initialize() @api_url = [:softlayer_api_url] || SL_API_URL @credentials = { :username => [:softlayer_username], :api_key => [:softlayer_api_key] } @default_domain = [:softlayer_default_domain] end |