Sha256: f7687c7291160603bcfe5091235890bd20ae9b89c93d1e5cc24566b7069272ce

Contents?: true

Size: 771 Bytes

Versions: 4

Compression:

Stored size: 771 Bytes

Contents

require 'yao/resources/volume_action'

module Yao::Resources
  class Volume < Base
    include ProjectAssociationable

    friendly_attributes :attachments, :availability_zone, :bootable, :descriptions, :encrypted, :metadata, :multiattach, :name, :replication_status, :size, :snapshot_id, :status, :user_id, :volume_type
    alias :type :volume_type

    map_attribute_to_attribute 'os-vol-host-attr:host' => :host
    map_attribute_to_attribute 'os-vol-tenant-attr:tenant_id' => :tenant_id

    self.service        = "volumev3"
    self.resource_name  = "volume"
    self.resources_name = "volumes"
    self.resources_detail_available = true

    def status=(s)
      self.class.set_status(self.id, s)
      self['status'] = s
    end

    extend VolumeAction
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
yao-0.19.0 lib/yao/resources/volume.rb
yao-0.18.0 lib/yao/resources/volume.rb
yao-0.17.0 lib/yao/resources/volume.rb
yao-0.16.0 lib/yao/resources/volume.rb