Sha256: 16c21a356805d5889a37444ed3ba2964fe5a810ffdb772d329df9e350e8ebbea

Contents?: true

Size: 774 Bytes

Versions: 1

Compression:

Stored size: 774 Bytes

Contents

module Fog
  module OracleCloud
    class Database
      class Real

        def delete_instance(service_name)
          request(
            :method   => 'DELETE',
            :expects  => 202,
            :path     => "/paas/service/dbcs/api/v1.1/instances/#{@identity_domain}/#{service_name}"
          )
        end
      end

      class Mock
        def delete_instance(service_name)
          response = Excon::Response.new
            # remove from memoreeeez.
          self.data[:instances].delete service_name
          response.body = { 
            'service_name' => service_name,
            'status' => 'Terminating' 
          }
          response.status = 202
      
          response
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fog-oraclecloud-0.1.1 lib/fog/oraclecloud/requests/database/delete_instance.rb