Sha256: 52ec103bc8356cf0be126ae6392fe75d1ba13c79732f319e10b789cec4b25f9d

Contents?: true

Size: 1014 Bytes

Versions: 47

Compression:

Stored size: 1014 Bytes

Contents

module Slicehost

  def self.[](service)
    @@connections ||= Hash.new do |hash, key|
      credentials = Fog.credentials.reject do |k, v|
        ![:slicehost_password].include?(k)
      end
      hash[key] = case key
      when :slices
        Fog::Slicehost.new(credentials)
      end
    end
    @@connections[service]
  end

  module Formats

    BACKUP = {
      'date'      => String,
      'id'        => Integer,
      'name'      => String,
      'slice-id'  => Integer
    }

    FLAVOR = {
      'id'    => Integer,
      'name'  => String,
      'price' => Integer,
      'ram'   => Integer
    }

    IMAGE = {
      'id'    => Integer,
      'name'  => String
    }

    SLICE = {
      'addresses'     => [String],
      'bw-in'         => Float,
      'bw-out'        => Float,
      'flavor-id'     => Integer,
      'id'            => Integer,
      'image-id'      => Integer,
      'name'          => String,
      'progress'      => Integer,
      'status'        => String
    }

  end

end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
fog-0.1.5 tests/slicehost/helper.rb
fog-0.1.4 tests/slicehost/helper.rb
fog-0.1.3 tests/slicehost/helper.rb
fog-0.1.2 tests/slicehost/helper.rb
fog-0.1.1 tests/slicehost/helper.rb
fog-0.1.0 tests/slicehost/helper.rb
fog-0.0.100 tests/slicehost/helper.rb
fog-0.0.99 tests/slicehost/helper.rb
fog-0.0.98 tests/slicehost/helper.rb
fog-0.0.97 tests/slicehost/helper.rb
fog-0.0.96 tests/slicehost/helper.rb
fog-0.0.95 tests/slicehost/helper.rb
fog-0.0.94 tests/slicehost/helper.rb
fog-0.0.93 tests/slicehost/helper.rb
fog-0.0.92 tests/slicehost/helper.rb
fog-0.0.91 tests/slicehost/helper.rb
fog-0.0.90 tests/slicehost/helper.rb
fog-0.0.89 tests/slicehost/helper.rb
fog-0.0.88 tests/slicehost/helper.rb
fog-0.0.87 tests/slicehost/helper.rb