Sha256: f8a239affbe7a846c5220f290b96fc41029bb134d596957d36cc0bdc36a0eeb9

Contents?: true

Size: 1.05 KB

Versions: 5

Compression:

Stored size: 1.05 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

5 entries across 5 versions & 1 rubygems

Version Path
fog-oraclecloud-0.1.17 lib/fog/oraclecloud/requests/java/scale_out_a_cluster.rb
fog-oraclecloud-0.1.16 lib/fog/oraclecloud/requests/java/scale_out_a_cluster.rb
fog-oraclecloud-0.1.15 lib/fog/oraclecloud/requests/java/scale_out_a_cluster.rb
fog-oraclecloud-0.1.14 lib/fog/oraclecloud/requests/java/scale_out_a_cluster.rb
fog-oraclecloud-0.1.13 lib/fog/oraclecloud/requests/java/scale_out_a_cluster.rb