Sha256: 289e950ba67b528ffca2d3e1840cd7d029cb22fbb1c6ec6cb1fbfd085858bf0b
Contents?: true
Size: 1.09 KB
Versions: 13
Compression:
Stored size: 1.09 KB
Contents
require 'fog/vcloud/terremark/ecloud/models/backup_internet_service' module Fog class Vcloud module Terremark class Ecloud class BackupInternetServices < Fog::Vcloud::Collection model Fog::Vcloud::Terremark::Ecloud::BackupInternetService attribute :href, :aliases => :Href def all check_href! :message => "the Internet Services for the Vdc you want to enumerate" if data = connection.get_internet_services(href).body[:InternetService].find_all {|i| i[:IsBackupService] == "true" } load(data) end end # Optimize later, no need to get_internet_services again? def get(uri) internet_services = connection.get_internet_services(href).body[:InternetService] internet_services = [ internet_services ] if internet_services.is_a?(Hash) if data = internet_services.detect { |service| service[:Href] == uri } new(data) end rescue Fog::Errors::NotFound nil end end end end end end
Version data entries
13 entries across 13 versions & 2 rubygems