Sha256: 441c49de323de834af867133385672a964323e2a3b2123cda481d139ef50ce40

Contents?: true

Size: 639 Bytes

Versions: 7

Compression:

Stored size: 639 Bytes

Contents

require 'fog/openstack/models/volume/volume'


module Fog
  module Volume
    class OpenStack
      class V2
        class Volume < Fog::Volume::OpenStack::Volume
          identity :id

          superclass.attributes.each{|attrib| attribute attrib}
          attribute :name
          attribute :description
          attribute :tenant_id, :aliases => 'os-vol-tenant-attr:tenant_id'

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

        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
fog-openstack-0.1.5 lib/fog/openstack/models/volume_v2/volume.rb
fog-openstack-0.1.4 lib/fog/openstack/models/volume_v2/volume.rb
fog-openstack-0.1.3 lib/fog/openstack/models/volume_v2/volume.rb
fog-openstack-0.1.2 lib/fog/openstack/models/volume_v2/volume.rb
fog-openstack-0.1.1 lib/fog/openstack/models/volume_v2/volume.rb
fog-openstack-0.1.0 lib/fog/openstack/models/volume_v2/volume.rb
fog-1.37.0 lib/fog/openstack/models/volume_v2/volume.rb