Sha256: 997f82f7b55a961e6de5d9ae136f4b4e273a99ae09095f9e7011ff602031d524

Contents?: true

Size: 906 Bytes

Versions: 5

Compression:

Stored size: 906 Bytes

Contents

module Fog
  module OracleCloud
    class Java
      class Real

      	def scale_in_a_cluster(service_name, server_name)

          path = "/paas/service/jcs/api/v1.1/instances/#{@identity_domain}/#{service_name}/servers/#{server_name}"

 		  response = request(
            :expects  => 202,
            :method   => 'DELETE',
            :path     => path
          )
          response
        end
      end

      class Mock
        def scale_in_a_cluster(service_name, server_name)
      	  response = Excon::Response.new

          response.status = 202
          response.body = {
            "status" => "New", 
            "details" => {
              "message" => "JAAS-SCALING-044: Scaling in Job (ID: 20) server name [ExampleI_server_4] submitted for service [ExampleInstance]", 
              "jobId" => "20"
            }
          }
          response
      	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/java/scale_in_a_cluster.rb
fog-oraclecloud-0.1.16 lib/fog/oraclecloud/requests/java/scale_in_a_cluster.rb
fog-oraclecloud-0.1.15 lib/fog/oraclecloud/requests/java/scale_in_a_cluster.rb
fog-oraclecloud-0.1.14 lib/fog/oraclecloud/requests/java/scale_in_a_cluster.rb
fog-oraclecloud-0.1.13 lib/fog/oraclecloud/requests/java/scale_in_a_cluster.rb