Sha256: d58fd8541521da094caf38613f2d671115264f0ed2c78284a87f5b24864c2827
Contents?: true
Size: 1.43 KB
Versions: 1
Compression:
Stored size: 1.43 KB
Contents
module Fog module OracleCloud class Java class Real def scale_a_node(service_name, server_name, options={}) path = "/paas/service/jcs/api/v1.1/instances/#{@identity_domain}/#{service_name}/#{server_name}" body_data = { 'shape' => options[:shape], 'additionalStorage' => options[:additionalStorage], 'ignoreManagedServerHeapError' => options[:ignoreManagedServerHeapError], 'scalingVolume' => options[:scalingVolume] } body_data = body_data.reject {|key, value| value.nil?} response = request( :expects => 202, :method => 'PUT', :path => path, :body => Fog::JSON.encode(body_data) ) response end end class Mock def scale_a_node(service_name, server_name, options={}) response = Excon::Response.new response.status = 202 self.data[:servers][service_name][server_name][:status] = 'Ready' self.data[:servers][service_name][server_name][:shape] = options[:shape] response.body = { "status" => "New", "details" => { "message" => "scaleup.job.submitted", "jobId" => rand(10000).to_s } } 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_a_node.rb |