Sha256: 9160d169132363093082ed74c4e504c5cf9a6fbc3fa5d218e514c7ada0bdd7bb
Contents?: true
Size: 996 Bytes
Versions: 4
Compression:
Stored size: 996 Bytes
Contents
require File.expand_path("../backup_internet_service", __FILE__) module Fog module Compute class Ecloud class BackupInternetServices < Fog::Ecloud::Collection identity :href model Fog::Compute::Ecloud::BackupInternetService def all data = service.get_backup_internet_services(href).body load(data) end def get(uri) if data = service.get_backup_internet_service(uri) new(data.body) end rescue ServiceError => e raise e unless e.status_code == 404 nil end def from_data(data) new(data) end def create(options) options[:uri] = href + "/action/createBackupInternetService" options[:enabled] ||= true data = service.backup_internet_service_create(options) new(data) end def internet_service_id href.scan(/\d+/)[0] end end end end end
Version data entries
4 entries across 2 versions & 2 rubygems