Class: Fog::Volume::OpenStack::V2::Volume

Inherits:
Fog::Volume::OpenStack::Volume show all
Defined in:
lib/fog/openstack/models/volume_v2/volume.rb

Instance Attribute Summary

Attributes inherited from OpenStack::Model

#project

Instance Method Summary collapse

Methods inherited from Fog::Volume::OpenStack::Volume

#destroy, #extend, #ready?

Methods inherited from OpenStack::Model

#create, #destroy, #initialize, #update

Constructor Details

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

Instance Method Details

#saveObject



16
17
18
19
20
21
# File 'lib/fog/openstack/models/volume_v2/volume.rb', line 16

def save
  requires :name, :size
  data = service.create_volume(name, description, size, attributes)
  merge_attributes(data.body['volume'])
  true
end