Sha256: b3ff979cfb7af513a3f0e04dd595e3edc17c36ad6ccbfd114dddfdbee2b826ca

Contents?: true

Size: 736 Bytes

Versions: 6

Compression:

Stored size: 736 Bytes

Contents

class StormOnDemand < Fog::Bin
  class << self

    def class_for(key)
      case key
      when :compute
        Fog::Compute::StormOnDemand
      else 
        raise ArgumentError, "Unsupported #{self} service: #{key}"
      end
    end

    def [](service)
      @@connections ||= Hash.new do |hash, key|
        hash[key] = case key
        when :compute
          Fog::Logger.warning("StormOnDemand[:compute] is deprecated, use Compute[:stormondemand] instead")
          Fog::Compute.new(:provider => 'StormOnDemand')
        else
          raise ArgumentError, "Unrecognized service: #{key.inspect}"
        end
      end
      @@connections[service]
    end

    def services
      Fog::StormOnDemand.services
    end

  end
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/fog/lib/fog/bin/stormondemand.rb
brightbox-cli-0.15.0 lib/brightbox-cli/vendor/fog/lib/fog/bin/stormondemand.rb
tag-fog-1.0.1 lib/fog/bin/stormondemand.rb
brightbox-cli-0.14.1 lib/brightbox-cli/vendor/fog/lib/fog/bin/stormondemand.rb
brightbox-cli-0.14.0 lib/brightbox-cli/vendor/fog/lib/fog/bin/stormondemand.rb
fog-1.0.0 lib/fog/bin/stormondemand.rb