Class: Fog::Vcloud::Terremark::Ecloud::Ip

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/vcloud/terremark/ecloud/models/ip.rb

Instance Attribute Summary

Attributes inherited from Model

#loaded

Attributes inherited from Model

#collection, #connection

Instance Method Summary collapse

Methods inherited from Model

#load_unless_loaded!

Methods inherited from Model

#initialize, #inspect, #to_json, #wait_for

Methods included from Attributes::ClassMethods

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

Methods included from Attributes::InstanceMethods

#_dump, #attributes, #identity, #identity=, #merge_attributes, #new_record?, #requires

Constructor Details

This class inherits a constructor from Fog::Model

Instance Method Details

#reloadObject



29
30
31
32
33
# File 'lib/fog/vcloud/terremark/ecloud/models/ip.rb', line 29

def reload
  super
  @changed = false
  self
end

#rnat=(new_rnat) ⇒ Object



17
18
19
20
# File 'lib/fog/vcloud/terremark/ecloud/models/ip.rb', line 17

def rnat=(new_rnat)
  attributes[:rnat] = new_rnat
  @changed = true
end

#saveObject



22
23
24
25
26
27
# File 'lib/fog/vcloud/terremark/ecloud/models/ip.rb', line 22

def save
  if @changed
    connection.configure_network_ip( href, _compose_network_ip_data )
  end
  true
end