class Fog::HP::LB::Node

Public Instance Methods

destroy() click to toggle source
# File lib/fog/hp/models/lb/node.rb, line 14
def destroy
  requires :id, :load_balancer
  service.delete_load_balancer_node(load_balancer.id, id)
  true
end
ready?() click to toggle source
# File lib/fog/hp/models/lb/node.rb, line 20
def ready?
  self.status == 'ONLINE'
end
save() click to toggle source
# File lib/fog/hp/models/lb/node.rb, line 24
def save
  identity ? update : create
end

Private Instance Methods

create() click to toggle source
# File lib/fog/hp/models/lb/node.rb, line 34
def create
  requires :load_balancer, :address, :port
  options = {}
  options['condition'] = condition if condition
  data = service.create_load_balancer_node(load_balancer.id, address, port, options)
  merge_attributes(data.body['nodes'][0])
  true
end
load_balancer() click to toggle source
# File lib/fog/hp/models/lb/node.rb, line 30
def load_balancer
  collection.load_balancer
end
update() click to toggle source
# File lib/fog/hp/models/lb/node.rb, line 43
def update
  requires :id, :load_balancer, :condition
  service.update_load_balancer_node(load_balancer.id, id, condition)
  true
end