Sha256: 70c2612769a556c568b78ba92d62d63e698055107699ba921b1d2213a1fe58e4

Contents?: true

Size: 933 Bytes

Versions: 12

Compression:

Stored size: 933 Bytes

Contents

module Fog
  module Compute
    class OracleCloud
      class Real
      	def update_image (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

12 entries across 12 versions & 1 rubygems

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