Class: Fog::Network::OpenStack::Network
Instance Attribute Summary
#project
Instance Method Summary
collapse
#initialize, #save
Instance Method Details
#create ⇒ Object
24
25
26
27
|
# File 'lib/fog/openstack/models/network/network.rb', line 24
def create
merge_attributes(service.create_network(self.attributes).body['network'])
self
end
|
#destroy ⇒ Object
35
36
37
38
39
|
# File 'lib/fog/openstack/models/network/network.rb', line 35
def destroy
requires :id
service.delete_network(self.id)
true
end
|
#subnets ⇒ Object
20
21
22
|
# File 'lib/fog/openstack/models/network/network.rb', line 20
def subnets
service.subnets.select {|s| s.network_id == self.id }
end
|
#update ⇒ Object
29
30
31
32
33
|
# File 'lib/fog/openstack/models/network/network.rb', line 29
def update
requires :id
merge_attributes(service.update_network(self.id, self.attributes).body['network'])
self
end
|