Module: Rackspace
- Defined in:
- lib/fog/rackspace/bin.rb
Instance Method Summary collapse
- #[](service) ⇒ Object
- #directories ⇒ Object
- #flavors ⇒ Object
- #images ⇒ Object
- #initialized? ⇒ Boolean
- #servers ⇒ Object
Instance Method Details
#[](service) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/fog/rackspace/bin.rb', line 9 def [](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 |
#directories ⇒ Object
24 25 26 |
# File 'lib/fog/rackspace/bin.rb', line 24 def directories self[:files].directories end |
#flavors ⇒ Object
28 29 30 |
# File 'lib/fog/rackspace/bin.rb', line 28 def flavors self[:servers].flavors end |
#images ⇒ Object
32 33 34 |
# File 'lib/fog/rackspace/bin.rb', line 32 def images self[:servers].images end |
#initialized? ⇒ Boolean
5 6 7 |
# File 'lib/fog/rackspace/bin.rb', line 5 def initialized? true end |
#servers ⇒ Object
36 37 38 |
# File 'lib/fog/rackspace/bin.rb', line 36 def servers self[:servers].servers end |