Class: Fog::Compute::Ecloud::BackupInternetService

Inherits:
Ecloud::Model show all
Defined in:
lib/fog/ecloud/models/compute/backup_internet_service.rb

Instance Attribute Summary

Attributes inherited from Ecloud::Model

#loaded

Attributes inherited from Model

#collection, #service

Instance Method Summary collapse

Methods inherited from Ecloud::Model

#load_unless_loaded!, #reload

Methods inherited from Model

#initialize, #inspect, #reload, #symbolize_keys, #to_json, #wait_for

Methods included from Attributes::ClassMethods

#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes

Methods included from Fog::Core::DeprecatedConnectionAccessors

#connection, #connection=, #prepare_service_value

Methods included from Attributes::InstanceMethods

#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #persisted?, #requires, #requires_one

Constructor Details

This class inherits a constructor from Fog::Model

Instance Method Details

#deleteObject



34
35
36
37
# File 'lib/fog/ecloud/models/compute/backup_internet_service.rb', line 34

def delete
  data = service.backup_internet_service_delete(href).body
  task = Fog::Compute::Ecloud::Tasks.new(:service => service, :href => data[:href])[0]
end

#edit(options) ⇒ Object



28
29
30
31
32
# File 'lib/fog/ecloud/models/compute/backup_internet_service.rb', line 28

def edit(options)
  options[:uri] = href
  data = service.backup_internet_service_edit(options).body
  object = collection.from_data(data)
end

#idObject



39
40
41
# File 'lib/fog/ecloud/models/compute/backup_internet_service.rb', line 39

def id
  href.scan(/\d+/)[0]
end

#internet_servicesObject



20
21
22
# File 'lib/fog/ecloud/models/compute/backup_internet_service.rb', line 20

def internet_services
  @internet_services = Fog::Compute::Ecloud::InternetServices.new(:service => service, :href => href)
end

#node_servicesObject



24
25
26
# File 'lib/fog/ecloud/models/compute/backup_internet_service.rb', line 24

def node_services
  @node_services = Fog::Compute::Ecloud::NodeServices.new(:service => service, :href => href)
end

#tasksObject



16
17
18
# File 'lib/fog/ecloud/models/compute/backup_internet_service.rb', line 16

def tasks
  @tasks = Fog::Compute::Ecloud::Tasks.new(:service => service, :href => href)
end