Sha256: 233ed8a826e95f74cf4cbb35ec290e25a8c70dab8d8a162ee6612376c3c5593c

Contents?: true

Size: 990 Bytes

Versions: 5

Compression:

Stored size: 990 Bytes

Contents

require 'fog/core/model'

module Fog
  module Compute
  	class OracleCloud
	    class Volume < Fog::Model
	      identity  :name

	      attribute :status
	      attribute :account
	      attribute :writecache
	      attribute :managed
	      attribute :description
	      attribute :tags
        attribute :bootable
        attribute :hypervisor
        attribute :quota
        attribute :uri
        attribute :snapshot
        attribute :status_detail
        attribute :imagelist_entry
        attribute :storage_pool
        attribute :machineimage_name
        attribute :status_timestamp
        attribute :shared
        attribute :imagelist
        attribute :size

 				def save
          #identity ? update : create
          create
        end

				def create
        	requires :name, :size

          data = service.create_volume(name, size)
        end

        def destroy
          requires :name
          service.delete_volume(name)
        end
	    end
	  end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fog-oraclecloud-0.1.17 lib/fog/oraclecloud/models/compute/volume.rb
fog-oraclecloud-0.1.16 lib/fog/oraclecloud/models/compute/volume.rb
fog-oraclecloud-0.1.15 lib/fog/oraclecloud/models/compute/volume.rb
fog-oraclecloud-0.1.14 lib/fog/oraclecloud/models/compute/volume.rb
fog-oraclecloud-0.1.13 lib/fog/oraclecloud/models/compute/volume.rb