Class: Fog::OpenStack::Volume::VolumeType
- Inherits:
-
Model
- Object
- Model
- Model
- Fog::OpenStack::Volume::VolumeType
show all
- Defined in:
- lib/fog/openstack/volume/models/volume_type.rb
Instance Attribute Summary
Attributes inherited from Model
#project
Instance Method Summary
collapse
Methods inherited from Model
#initialize, #save
Instance Method Details
#create ⇒ Object
9
10
11
12
13
14
15
16
|
# File 'lib/fog/openstack/volume/models/volume_type.rb', line 9
def create
requires :name
response = service.create_volume_type(attributes)
merge_attributes(response.body['volume_type'])
self
end
|
#destroy ⇒ Object
27
28
29
30
31
|
# File 'lib/fog/openstack/volume/models/volume_type.rb', line 27
def destroy
requires :id
service.delete_volume_type(id)
true
end
|
#update ⇒ Object
18
19
20
21
22
23
24
25
|
# File 'lib/fog/openstack/volume/models/volume_type.rb', line 18
def update
requires :id
response = service.update_volume_type(id, attributes)
merge_attributes(response.body['volume_type'])
self
end
|