Class: Fog::Network::OpenStack::SubnetPool

Inherits:
OpenStack::Model show all
Defined in:
lib/fog/network/openstack/models/subnet_pool.rb

Instance Attribute Summary

Attributes inherited from OpenStack::Model

#project

Instance Method Summary collapse

Methods inherited from OpenStack::Model

#initialize, #save

Constructor Details

This class inherits a constructor from Fog::OpenStack::Model

Instance Method Details

#createObject



24
25
26
27
28
29
30
# File 'lib/fog/network/openstack/models/subnet_pool.rb', line 24

def create
  requires :name, :prefixes
  merge_attributes(service.create_subnet_pool(name,
                                              prefixes,
                                              attributes).body['subnetpool'])
  self
end

#destroyObject



39
40
41
42
43
# File 'lib/fog/network/openstack/models/subnet_pool.rb', line 39

def destroy
  requires :id
  service.delete_subnet_pool(id)
  true
end

#updateObject



32
33
34
35
36
37
# File 'lib/fog/network/openstack/models/subnet_pool.rb', line 32

def update
  requires :id
  merge_attributes(service.update_subnet_pool(id,
                                              attributes).body['subnetpool'])
  self
end