Class: Fog::Vcloud::Terremark::Ecloud::InternetService
- Defined in:
- lib/fog/vcloud/terremark/ecloud/models/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
#collection, #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
22 23 24 25 26 |
# File 'lib/fog/vcloud/terremark/ecloud/models/internet_service.rb', line 22 def delete requires :href connection.delete_internet_service( href ) end |
#nodes ⇒ Object
37 38 39 |
# File 'lib/fog/vcloud/terremark/ecloud/models/internet_service.rb', line 37 def nodes @nodes ||= Fog::Vcloud::Terremark::Ecloud::Nodes.new( :connection => connection, :href => href + "/nodeServices" ) end |
#save ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/fog/vcloud/terremark/ecloud/models/internet_service.rb', line 28 def save if new_record? result = connection.add_internet_service( collection.href, _compose_service_data ) merge_attributes(result.body) else connection.configure_internet_service( href, _compose_service_data, _compose_ip_data ) end end |