Sha256: 75857c06737a8bdc11b60e36ab3f7b073ea3362a8b76613df36fa6c0c06976e4

Contents?: true

Size: 1.12 KB

Versions: 13

Compression:

Stored size: 1.12 KB

Contents

require File.join(File.dirname(__FILE__), 'credentials')

module Fog
  class << self

    def services
      services = []
      [::AWS, ::Local, ::Rackspace, ::Slicehost, ::Terremark, ::Vcloud].each do |service|
        if service.initialized?
          services << service
        end
      end
      services
    end

    def directories
      directories = {}
      services.each do |service|
        if service.respond_to?(:directories)
          directories[service] = service.directories
        end
      end
      directories
    end

    def flavors
      flavors = {}
      services.each do |service|
        if service.respond_to?(:flavors)
          flavors[service] = service.flavors
        end
      end
      flavors
    end

    def images
      images = {}
      services.each do |service|
        if service.respond_to?(:images)
          images[service] = service.images
        end
      end
      images
    end

    def servers
      servers = {}
      services.each do |service|
        if service.respond_to?(:servers)
          servers[service] = service.servers
        end
      end
      servers
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fog-0.1.5 lib/fog/bin.rb
fog-0.1.4 lib/fog/bin.rb
fog-0.1.3 lib/fog/bin.rb
fog-0.1.2 lib/fog/bin.rb
fog-0.1.1 lib/fog/bin.rb
fog-0.1.0 lib/fog/bin.rb
fog-0.0.100 lib/fog/bin.rb
fog-0.0.99 lib/fog/bin.rb
fog-0.0.98 lib/fog/bin.rb
fog-0.0.97 lib/fog/bin.rb
fog-0.0.96 lib/fog/bin.rb
fog-0.0.95 lib/fog/bin.rb
fog-0.0.94 lib/fog/bin.rb