Class: Fog::Terremark::Shared::InternetServices

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/terremark/models/shared/internetservices.rb

Instance Method Summary collapse

Instance Method Details

#allObject



22
23
24
25
# File 'lib/fog/terremark/models/shared/internetservices.rb', line 22

def all
  data = service.get_internet_services(vdc_id).body["InternetServices"]
  load(data)
end

#get(service_id) ⇒ Object



27
28
29
30
31
# File 'lib/fog/terremark/models/shared/internetservices.rb', line 27

def get(service_id)
  data = service.get_internet_services(vdc_id)
  internet_service = services.body["InternetServices"].select {|item| item["Id"] == service_id}
  new(internetservice)
end

#vdc_idObject



33
34
35
# File 'lib/fog/terremark/models/shared/internetservices.rb', line 33

def vdc_id
  @vdc_id ||= service.default_vdc_id
end