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