Sha256: 8ed4ab869b841d967accf8dbe5098f7dd6e8c28b8a9dac3ee5fbdf2bab49cc3f

Contents?: true

Size: 1.1 KB

Versions: 10

Compression:

Stored size: 1.1 KB

Contents

module OpenStack
  module Volume
    class Volume

    attr_reader :id
    attr_reader :display_name
    attr_reader :display_description
    attr_reader :size
    attr_reader :volume_type
    attr_reader :metadata
    attr_reader :availability_zone
    attr_reader :snapshot_id
    attr_reader :attachments
    attr_reader :created_at
    attr_reader :status

    def initialize(volume_info)
      @id  = volume_info["id"]
      @display_name  = volume_info["display_name"] || volume_info["displayName"]
      @display_description  = volume_info["display_description"] || volume_info["displayDescription"]
      @size  = volume_info["size"]
      @volume_type  = volume_info["volume_type"] || volume_info["volumeType"]
      @metadata  = volume_info["metadata"]
      @availability_zone  = volume_info["availability_zone"] || volume_info["availabilityZone"]
      @snapshot_id  = volume_info["snapshot_id"] || volume_info["snapshotId"]
      @attachments  = volume_info["attachments"]
      @created_at  = volume_info["created_at"] || volume_info["createdAt"]
      @status = volume_info["status"]
    end

    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
openstack-3.3.1 lib/openstack/volume/volume.rb
openstack-3.3.0 lib/openstack/volume/volume.rb
openstack-3.2.0 lib/openstack/volume/volume.rb
openstack-3.1.1 lib/openstack/volume/volume.rb
openstack-3.1.0 lib/openstack/volume/volume.rb
openstack-3.0.0 lib/openstack/volume/volume.rb
openstack-2.2.0 lib/openstack/volume/volume.rb
openstack-2.0.2 lib/openstack/volume/volume.rb
openstack-1.1.2 lib/openstack/volume/volume.rb
openstack-1.1.1 lib/openstack/volume/volume.rb