class Fog::OpenStack::Network::FloatingIp
Public Class Methods
new(attributes)
click to toggle source
Calls superclass method
Fog::OpenStack::Model::new
# File lib/fog/openstack/network/models/floating_ip.rb, line 16 def initialize(attributes) @connection = attributes[:connection] super end
Public Instance Methods
associate(port_id, fixed_ip_address = nil)
click to toggle source
# File lib/fog/openstack/network/models/floating_ip.rb, line 39 def associate(port_id, fixed_ip_address = nil) requires :id merge_attributes(service.associate_floating_ip( id, port_id, options(fixed_ip_address) ).body['floatingip']) end
create()
click to toggle source
# File lib/fog/openstack/network/models/floating_ip.rb, line 21 def create requires :floating_network_id merge_attributes(service.create_floating_ip(floating_network_id, attributes).body['floatingip']) self end
destroy()
click to toggle source
# File lib/fog/openstack/network/models/floating_ip.rb, line 33 def destroy requires :id service.delete_floating_ip(id) true end
disassociate(fixed_ip_address = nil)
click to toggle source
# File lib/fog/openstack/network/models/floating_ip.rb, line 48 def disassociate(fixed_ip_address = nil) requires :id merge_attributes(service.disassociate_floating_ip( id, options(fixed_ip_address) ).body['floatingip']) end
update()
click to toggle source
# File lib/fog/openstack/network/models/floating_ip.rb, line 29 def update self end
Private Instance Methods
options(fixed_ip_address)
click to toggle source
# File lib/fog/openstack/network/models/floating_ip.rb, line 58 def options(fixed_ip_address) fixed_ip_address ? {'fixed_ip_address' => fixed_ip_address} : {} end