class Fog::Compute::Terremark::NodeService

Attributes

size[W]
type[W]

Public Instance Methods

destroy() click to toggle source
# File lib/fog/compute/terremark/models/nodeservice.rb, line 14
def destroy
  service.delete_node_service(self.Id)
end
save() click to toggle source
# File lib/fog/compute/terremark/models/nodeservice.rb, line 18
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

Private Instance Methods

href=(new_href) click to toggle source
# File lib/fog/compute/terremark/models/nodeservice.rb, line 38
def href=(new_href)
  self.id = new_href.split('/').last.to_i
end