mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
39 lines
617 B
Ruby
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
|