Sha256: 21ab9a550784cf5e2654fc710a495cafc6225e95f6ac363d7ca61bf9d1f711e0

Contents?: true

Size: 652 Bytes

Versions: 23

Compression:

Stored size: 652 Bytes

Contents

class Vsphere < Fog::Bin
  class << self
    def class_for(key)
      case key
      when :compute
        Fog::Vsphere::Compute
      else
        raise ArgumentError, "Unrecognized service: #{key}"
      end
    end

    def [](service)
      @@connections ||= Hash.new do |hash, key|
        hash[key] = case key
                    when :compute
                      Fog::Compute.new(provider: 'Vsphere')
                    else
                      raise ArgumentError, "Unrecognized service: #{key.inspect}"
                    end
      end
      @@connections[service]
    end

    def services
      Fog::Vsphere.services
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
fog-vsphere-3.1.1 lib/fog/bin/vsphere.rb
fog-vsphere-3.1.0 lib/fog/bin/vsphere.rb
fog-vsphere-3.0.0 lib/fog/bin/vsphere.rb