Class: Yao::Resources::FloatingIP
Instance Attribute Summary
#service
Class Method Summary
collapse
Instance Method Summary
collapse
included, #project
included, #port
Methods inherited from Base
#[], #[]=, add_instantiation_name_list, #destroy, friendly_attributes, #id, #initialize, instantiation?, map_attribute_to_attribute, map_attribute_to_resource, map_attribute_to_resources, map_attributes_to_time, #to_hash, #update
#admin=, #api_version, #api_version=, #as_member, #client, #create, #destroy, extended, #find_by_name, #get, #get!, #list, #resources_path, #resources_path=, #return_single_on_querying, #return_single_on_querying=, #update
Class Method Details
42
43
44
|
# File 'lib/yao/resources/floating_ip.rb', line 42
def associate_port(id, port_id)
update(id, port_id: port_id)
end
|
48
49
50
|
# File 'lib/yao/resources/floating_ip.rb', line 48
def disassociate_port(id)
update(id, port_id: nil)
end
|
Instance Method Details
28
29
30
|
# File 'lib/yao/resources/floating_ip.rb', line 28
def associate_port(port)
self.class.associate_port(id, port.id)
end
|
33
34
35
|
# File 'lib/yao/resources/floating_ip.rb', line 33
def disassociate_port
self.class.disassociate_port(id)
end
|
22
23
24
|
# File 'lib/yao/resources/floating_ip.rb', line 22
def router
@router ||= Yao::Router.get(router_id)
end
|