Class: Fog::OpenStack::Network::Port
- Inherits:
-
Model
- Object
- Model
- Model
- Fog::OpenStack::Network::Port
show all
- Defined in:
- lib/fog/openstack/network/models/port.rb
Instance Attribute Summary
Attributes inherited from Model
#project
Instance Method Summary
collapse
Methods inherited from Model
#initialize, #save
Instance Method Details
#create ⇒ Object
20
21
22
23
24
25
|
# File 'lib/fog/openstack/network/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/openstack/network/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/openstack/network/models/port.rb', line 27
def update
requires :id, :network_id
merge_attributes(service.update_port(id,
attributes).body['port'])
self
end
|