Sha256: 3066714729cb8b95221cb538a24087f2fb4d97ee8d10ff6300bf99bfbaff0d98

Contents?: true

Size: 899 Bytes

Versions: 10

Compression:

Stored size: 899 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

	      # Only used in create
	      attribute :default

 				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

10 entries across 10 versions & 1 rubygems

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