Class: Fog::Network::OpenStack::LbVip

Inherits:
OpenStack::Model show all
Defined in:
lib/fog/openstack/models/network/lb_vip.rb

Instance Attribute Summary

Attributes inherited from OpenStack::Model

#project

Instance Method Summary collapse

Methods inherited from OpenStack::Model

#initialize, #save

Constructor Details

This class inherits a constructor from Fog::OpenStack::Model

Instance Method Details

#createObject



23
24
25
26
27
28
29
30
31
# File 'lib/fog/openstack/models/network/lb_vip.rb', line 23

def create
  requires :subnet_id, :pool_id, :protocol, :protocol_port
  merge_attributes(service.create_lb_vip(self.subnet_id,
                                         self.pool_id,
                                         self.protocol,
                                         self.protocol_port,
                                         self.attributes).body['vip'])
  self
end

#destroyObject



40
41
42
43
44
# File 'lib/fog/openstack/models/network/lb_vip.rb', line 40

def destroy
  requires :id
  service.delete_lb_vip(self.id)
  true
end

#updateObject



33
34
35
36
37
38
# File 'lib/fog/openstack/models/network/lb_vip.rb', line 33

def update
  requires :id, :subnet_id, :pool_id, :protocol, :protocol_port
  merge_attributes(service.update_lb_vip(self.id,
                                         self.attributes).body['vip'])
  self
end