Sha256: 3ffbddedbcfc267e07509a450f07956771e7e6ca6abdec08db7702bf2b194578

Contents?: true

Size: 911 Bytes

Versions: 5

Compression:

Stored size: 911 Bytes

Contents

module Fog
  module Compute
    class OracleCloud
      class Real
      	def update_image_list (name, options={})
          # Just in case it's already set
          name.sub! "/Compute-#{@identity_domain}/#{@username}/", ''
          body_data     = {
            'name'             		=> "/Compute-#{@identity_domain}/#{@username}/#{name}",
            'description'					=> options[:description],
            'default'					   	=> options[:default]
          }
          body_data = body_data.reject {|key, value| value.nil?}
          request(
            :method   => 'PUT',
            :expects  => 200,
            :path     => "/imagelist/Compute-#{@identity_domain}/#{@username}/#{name}",
            :body     => Fog::JSON.encode(body_data),
            :headers  => {
              'Content-Type' => 'application/oracle-compute-v3+json'
            }
          )
      	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/requests/compute/update_image_list.rb
fog-oraclecloud-0.1.16 lib/fog/oraclecloud/requests/compute/update_image_list.rb
fog-oraclecloud-0.1.15 lib/fog/oraclecloud/requests/compute/update_image_list.rb
fog-oraclecloud-0.1.14 lib/fog/oraclecloud/requests/compute/update_image_list.rb
fog-oraclecloud-0.1.13 lib/fog/oraclecloud/requests/compute/update_image_list.rb