module Fog::Softlayer::Compute::Shared
The Shared
module consists of code that was duplicated between the Real and Mock implementations.
Public Class Methods
new(options)
click to toggle source
Creates a new instance of the Softlayer
Compute
service
@param [Hash] options @option options [String] :softlayer_api_url
Override the default (or configured) API endpoint
@option options [String] :softlayer_username
Email or user identifier for user based authentication
@option options [String] :softlayer_api_key
Password for user based authentication
# File lib/fog/softlayer/compute/shared.rb, line 27 def initialize(options) @api_url = options[:softlayer_api_url] || SL_API_URL @credentials = { :username => options[:softlayer_username], :api_key => options[:softlayer_api_key] } @default_domain = options[:softlayer_default_domain] end
valid_request?(required, passed)
click to toggle source
# File lib/fog/softlayer/compute/shared.rb, line 33 def self.valid_request?(required, passed) required.all? {|k| passed.key?(k)} end