Class: Fog::Network::OpenStack::FloatingIp
- Inherits:
-
OpenStack::Model
- Object
- Model
- OpenStack::Model
- Fog::Network::OpenStack::FloatingIp
- Defined in:
- lib/fog/openstack/models/network/floating_ip.rb
Instance Attribute Summary
Attributes inherited from OpenStack::Model
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
-
#initialize(attributes) ⇒ FloatingIp
constructor
A new instance of FloatingIp.
- #update ⇒ Object
Methods inherited from OpenStack::Model
Constructor Details
#initialize(attributes) ⇒ FloatingIp
Returns a new instance of FloatingIp.
15 16 17 18 |
# File 'lib/fog/openstack/models/network/floating_ip.rb', line 15 def initialize(attributes) @connection = attributes[:connection] super end |
Instance Method Details
#create ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/fog/openstack/models/network/floating_ip.rb', line 20 def create requires :floating_network_id merge_attributes(service.create_floating_ip(self.floating_network_id, self.attributes).body['floatingip']) self end |
#destroy ⇒ Object
32 33 34 35 36 |
# File 'lib/fog/openstack/models/network/floating_ip.rb', line 32 def destroy requires :id service.delete_floating_ip(self.id) true end |
#update ⇒ Object
28 29 30 |
# File 'lib/fog/openstack/models/network/floating_ip.rb', line 28 def update self end |