Class: Fog::Vcloud::Terremark::Ecloud::BackupInternetService
- Defined in:
- lib/fog/vcloud/terremark/ecloud/models/backup_internet_service.rb
Instance Attribute Summary
Attributes inherited from Model
Attributes inherited from Model
Instance Method Summary collapse
Methods inherited from Model
Methods inherited from Model
#initialize, #inspect, #reload, #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
#delete ⇒ Object
20 21 22 23 24 |
# File 'lib/fog/vcloud/terremark/ecloud/models/backup_internet_service.rb', line 20 def delete requires :href connection.delete_internet_service( href ) end |
#monitor=(new_monitor = {}) ⇒ Object
26 27 28 29 30 |
# File 'lib/fog/vcloud/terremark/ecloud/models/backup_internet_service.rb', line 26 def monitor=(new_monitor = {}) if new_monitor.nil? || new_monitor.empty? attributes[:monitor] = nil end end |
#nodes ⇒ Object
41 42 43 |
# File 'lib/fog/vcloud/terremark/ecloud/models/backup_internet_service.rb', line 41 def nodes @nodes ||= Fog::Vcloud::Terremark::Ecloud::Nodes.new( :connection => connection, :href => href + "/nodeServices" ) end |
#save ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/fog/vcloud/terremark/ecloud/models/backup_internet_service.rb', line 32 def save if new_record? result = connection.add_backup_internet_service( collection.href, _compose_service_data ) merge_attributes(result.body) else connection.configure_backup_internet_service( href, _compose_service_data ) end end |