Class: Fog::Compute::Terremark::Servers
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::Terremark::Servers
- Defined in:
- lib/fog/compute/terremark/models/servers.rb
Instance Method Summary collapse
Instance Method Details
#all ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/fog/compute/terremark/models/servers.rb', line 7 def all data = [] service.get_vdc(vdc_id).body["ResourceEntities"].select do |entity| data << service.servers.get(entity["href"].split("/").last) end data end |
#get(server_id) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/fog/compute/terremark/models/servers.rb', line 15 def get(server_id) if server_id new(service.get_vapp(server_id).body) else nil end end |
#vdc_id ⇒ Object
23 24 25 |
# File 'lib/fog/compute/terremark/models/servers.rb', line 23 def vdc_id @vdc_id ||= service.default_vdc_id end |