Sha256: 30651c899f8cff39176697fbf2a2dbb32b959d5c2ebe2f5c2ef357dfe51505c0

Contents?: true

Size: 781 Bytes

Versions: 15

Compression:

Stored size: 781 Bytes

Contents

class Ey::Core::Client
  class Real
    def update_cluster(params={})
      id = params.delete("id")
      request(
        :method => :put,
        :path   => "/clusters/#{id}",
        :body   => params,
      )
    end
  end

  class Mock
    def update_cluster(params={})
      identity = resource_identity(params)
      cluster  = find(:clusters, identity)

      update_params = Cistern::Hash.slice(params["cluster"], "release_label", "configuration")

      # core api doesn't actually do this yet
      if config = update_params.delete("configuration")
        update_params["configuration"] = normalize_hash(config)
      end

      cluster.merge!(update_params)

      response(
        :body => { "cluster" => cluster },
        :status => 200
      )
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ey-pro-cli-0.0.17 lib/vendor/core/ey-core/requests/update_cluster.rb
ey-pro-cli-0.0.16 lib/vendor/core/ey-core/requests/update_cluster.rb
ey-pro-cli-0.0.15 lib/vendor/core/ey-core/requests/update_cluster.rb
ey-pro-cli-0.0.14 lib/vendor/core/ey-core/requests/update_cluster.rb
ey-pro-cli-0.0.13 lib/vendor/core/ey-core/requests/update_cluster.rb
ey-pro-cli-0.0.12 lib/vendor/core/ey-core/requests/update_cluster.rb
ey-pro-cli-0.0.11 lib/vendor/core/ey-core/requests/update_cluster.rb
ey-pro-cli-0.0.10 lib/vendor/core/ey-core/requests/update_cluster.rb
ey-pro-cli-0.0.9 lib/vendor/core/ey-core/requests/update_cluster.rb
ey-pro-cli-0.0.8 lib/vendor/core/ey-core/requests/update_cluster.rb
ey-pro-cli-0.0.7 lib/vendor/core/ey-core/requests/update_cluster.rb
ey-pro-cli-0.0.6 lib/vendor/core/ey-core/requests/update_cluster.rb
ey-pro-cli-0.0.5 lib/vendor/core/ey-core/requests/update_cluster.rb
ey-pro-cli-0.0.4 lib/vendor/core/ey-core/requests/update_cluster.rb
ey-pro-cli-0.0.3 lib/vendor/core/ey-core/requests/update_cluster.rb