Sha256: 13c1a8c76fb9be7d7f43deeae6fe625d5a2b621ec196b976eed402908b8f1d32

Contents?: true

Size: 1.09 KB

Versions: 1

Compression:

Stored size: 1.09 KB

Contents

module Fog
  module OracleCloud
    class Java
      class Real

      	def scale_out_a_cluster(service_name, cluster_name, create_cluster_if_missing)

          path = "/paas/service/jcs/api/v1.1/instances/#{@identity_domain}/#{service_name}/servers/#{cluster_name}"
          if create_cluster_if_missing then
            path = "#{path}?createClusterIfMissing=true"
          end

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

      class Mock
        def scale_out_a_cluster(service_name, cluster_name, create_cluster_if_missing)
      		response = Excon::Response.new

          response.status = 202
          response.body = {
            "status" => "New", 
            "details" => {
              "message" => "JASS-SCALING-037: Scale out Job (ID: 17) for service [ExampleInstance] in cluster [ExampleI_cluster] submitted", 
              "jobId" => "17"
            }
          }
          response
      	end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fog-oraclecloud-0.1.12 lib/fog/oraclecloud/requests/java/scale_out_a_cluster.rb