Sha256: c18a6c58a75e994589f3f9e8762e5d871d74b56e38e01e45011b4296dac9373e

Contents?: true

Size: 801 Bytes

Versions: 5

Compression:

Stored size: 801 Bytes

Contents

require 'fog/core/model'

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

	      attribute :uri
	      attribute :default
	      attribute :description
	      attribute :entries

 				def save
          #identity ? update : create
          create
        end

        def create
        	requires :name, :description
          
          data = service.create_image_list(name, description,
                                            :default => default)
        end

        def update
        	requires :name

        	data = service.update_image_list(name, :description=>description, :default=>default)
        end

        def delete
        	requires :name
        	service.delete_image_list(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/image_list.rb
fog-oraclecloud-0.1.16 lib/fog/oraclecloud/models/compute/image_list.rb
fog-oraclecloud-0.1.15 lib/fog/oraclecloud/models/compute/image_list.rb
fog-oraclecloud-0.1.14 lib/fog/oraclecloud/models/compute/image_list.rb
fog-oraclecloud-0.1.13 lib/fog/oraclecloud/models/compute/image_list.rb