Class: Fog::Network::OpenStack::Port
Instance Attribute Summary
#project
Instance Method Summary
collapse
#initialize, #save
Instance Method Details
#create ⇒ Object
20
21
22
23
24
25
|
# File 'lib/fog/network/openstack/models/port.rb', line 20
def create
requires :network_id
merge_attributes(service.create_port(network_id,
attributes).body['port'])
self
end
|
#destroy ⇒ Object
34
35
36
37
38
|
# File 'lib/fog/network/openstack/models/port.rb', line 34
def destroy
requires :id
service.delete_port(id)
true
end
|
#update ⇒ Object
27
28
29
30
31
32
|
# File 'lib/fog/network/openstack/models/port.rb', line 27
def update
requires :id, :network_id
merge_attributes(service.update_port(id,
attributes).body['port'])
self
end
|