1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/rackspace/helper.rb
2010-05-31 11:05:14 -05:00

39 lines
617 B
Ruby

module Rackspace
def self.[](service)
@@connections ||= Hash.new do |hash, key|
credentials = Fog.credentials.reject do |k, v|
![:rackspace_api_key, :rackspace_username].include?(k)
end
hash[key] = case key
when :files
Fog::Rackspace::Files.new(credentials)
when :servers
Fog::Rackspace::Servers.new(credentials)
end
end
@@connections[service]
end
module Files
module Formats
end
end
module Servers
module Formats
SUMMARY = {
'id' => Integer,
'name' => String
}
end
end
end