Sha256: ed463aa31210377702c4854c7528b12816c05fbe4c63889295137e15b1e1580b

Contents?: true

Size: 1.21 KB

Versions: 60

Compression:

Stored size: 1.21 KB

Contents

#
# Author:: Matt Eldridge (<matt.eldridge@us.ibm.com>)
# © Copyright IBM Corporation 2014.
#
# LICENSE: MIT (http://opensource.org/licenses/MIT)
#

module Fog
  module Softlayer
    module Compute

      # The Shared module consists of code that was duplicated between the Real
      # and Mock implementations.
      #
      module Shared

        # 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
        #
        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

        def self.valid_request?(required, passed)
          required.all? {|k| passed.key?(k)}
        end

      end
    end
  end
end

Version data entries

60 entries across 58 versions & 3 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-softlayer-1.1.4/lib/fog/softlayer/compute/shared.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-softlayer-1.1.4/lib/fog/softlayer/compute/shared.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-softlayer-1.1.4/lib/fog/softlayer/compute/shared.rb
fog-softlayer-1.1.4 lib/fog/softlayer/compute/shared.rb
fog-softlayer-1.1.3 lib/fog/softlayer/compute/shared.rb
fog-softlayer-1.1.2 lib/fog/softlayer/compute/shared.rb
fog-softlayer-1.1.1 lib/fog/softlayer/compute/shared.rb
fog-softlayer-1.1.0 lib/fog/softlayer/compute/shared.rb
fog-softlayer-1.0.3 lib/fog/softlayer/compute/shared.rb
fog-softlayer-1.0.2 lib/fog/softlayer/compute/shared.rb
fog-softlayer-1.0.1 lib/fog/softlayer/compute/shared.rb
fog-softlayer-1.0.0 lib/fog/softlayer/compute/shared.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-softlayer-0.4.7/lib/fog/softlayer/compute/shared.rb
fog-softlayer-0.4.7 lib/fog/softlayer/compute/shared.rb
fog-softlayer-0.4.6 lib/fog/softlayer/compute/shared.rb
fog-softlayer-0.4.5 lib/fog/softlayer/compute/shared.rb
fog-softlayer-0.4.4 lib/fog/softlayer/compute/shared.rb
fog-softlayer-0.4.3 lib/fog/softlayer/compute/shared.rb
fog-softlayer-0.4.2 lib/fog/softlayer/compute/shared.rb
fog-softlayer-0.4.2.pre lib/fog/softlayer/compute/shared.rb