Class: Fog::Terremark::Shared::NodeService

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/terremark/models/shared/nodeservice.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



16
17
18
# File 'lib/fog/terremark/models/shared/nodeservice.rb', line 16

def destroy
  service.delete_node_service(self.Id)
end

#saveObject



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/fog/terremark/models/shared/nodeservice.rb', line 20

def save
 requires :Name, :Port, :InternetServiceId
    data = service.add_node_service(
        service_id = self.InternetServiceId,
        ip = self.IpAddress,
        name = self.Name,
        port = self.Port,
        options = {"Enabled" => 'true',
                   "Description" => self.Name,
        }

    )
    merge_attributes(data.body)
    true
end