Class: Fog::OpenStack::Network::Subnet
- Inherits:
-
Model
- Object
- Model
- Model
- Fog::OpenStack::Network::Subnet
show all
- Defined in:
- lib/fog/openstack/network/models/subnet.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
26
27
|
# File 'lib/fog/openstack/network/models/subnet.rb', line 20
def create
requires :network_id, :cidr, :ip_version
merge_attributes(service.create_subnet(network_id,
cidr,
ip_version,
attributes).body['subnet'])
self
end
|
#destroy ⇒ Object
36
37
38
39
40
|
# File 'lib/fog/openstack/network/models/subnet.rb', line 36
def destroy
requires :id
service.delete_subnet(id)
true
end
|
#update ⇒ Object
29
30
31
32
33
34
|
# File 'lib/fog/openstack/network/models/subnet.rb', line 29
def update
requires :id
merge_attributes(service.update_subnet(id,
attributes).body['subnet'])
self
end
|