Sha256: 43de6a4e63bbf12e5c2c66261ebec1d79628e451a34eb7d78ddde4e866db2f57

Contents?: true

Size: 840 Bytes

Versions: 2

Compression:

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

2 entries across 2 versions & 1 rubygems

Version Path
fog-oraclecloud-0.1.12 lib/fog/oraclecloud/models/compute/image_list.rb
fog-oraclecloud-0.1.11 lib/fog/oraclecloud/models/compute/image_list.rb