Sha256: 6b83f8896a57a2f2d97994f02280ecec93d2c8895b6c569a4c96195a936db4f4

Contents?: true

Size: 1.01 KB

Versions: 12

Compression:

Stored size: 1.01 KB

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

12 entries across 12 versions & 1 rubygems

Version Path
fog-oraclecloud-0.1.12 lib/fog/oraclecloud/models/compute/volume.rb
fog-oraclecloud-0.1.11 lib/fog/oraclecloud/models/compute/volume.rb
fog-oraclecloud-0.1.10 lib/fog/oraclecloud/models/compute/volume.rb
fog-oraclecloud-0.1.9 lib/fog/oraclecloud/models/compute/volume.rb
fog-oraclecloud-0.1.8 lib/fog/oraclecloud/models/compute/volume.rb
fog-oraclecloud-0.1.7 lib/fog/oraclecloud/models/compute/volume.rb
fog-oraclecloud-0.1.6 lib/fog/oraclecloud/models/compute/volume.rb
fog-oraclecloud-0.1.5 lib/fog/oraclecloud/models/compute/volume.rb
fog-oraclecloud-0.1.4 lib/fog/oraclecloud/models/compute/volume.rb
fog-oraclecloud-0.1.3 lib/fog/oraclecloud/models/compute/volume.rb
fog-oraclecloud-0.1.2 lib/fog/oraclecloud/models/compute/volume.rb
fog-oraclecloud-0.1.1 lib/fog/oraclecloud/models/compute/volume.rb