Sha256: 273afe0f21ddb5ddf53c83fc8267ad0aa7b1a89ed5e595dd647e8930ba6a0332

Contents?: true

Size: 689 Bytes

Versions: 15

Compression:

Stored size: 689 Bytes

Contents

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

  class Mock
    def destroy_cluster(id)
      request_id = self.uuid

      self.data[:requests][request_id] = {
        "id"          => request_id,
        "finished_at" => nil,
        "successful"  => "true",
        "started_at"  => Time.now,
        "resource"    => [:clusters, id, self.data[:clusters][id].merge("deleted_at" => Time.now)],
        "type"        => "deprovision_cluster",
      }

      response(
        :body   => {"request" => {id: request_id}},
        :status => 201,
      )
    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/destroy_cluster.rb
ey-pro-cli-0.0.16 lib/vendor/core/ey-core/requests/destroy_cluster.rb
ey-pro-cli-0.0.15 lib/vendor/core/ey-core/requests/destroy_cluster.rb
ey-pro-cli-0.0.14 lib/vendor/core/ey-core/requests/destroy_cluster.rb
ey-pro-cli-0.0.13 lib/vendor/core/ey-core/requests/destroy_cluster.rb
ey-pro-cli-0.0.12 lib/vendor/core/ey-core/requests/destroy_cluster.rb
ey-pro-cli-0.0.11 lib/vendor/core/ey-core/requests/destroy_cluster.rb
ey-pro-cli-0.0.10 lib/vendor/core/ey-core/requests/destroy_cluster.rb
ey-pro-cli-0.0.9 lib/vendor/core/ey-core/requests/destroy_cluster.rb
ey-pro-cli-0.0.8 lib/vendor/core/ey-core/requests/destroy_cluster.rb
ey-pro-cli-0.0.7 lib/vendor/core/ey-core/requests/destroy_cluster.rb
ey-pro-cli-0.0.6 lib/vendor/core/ey-core/requests/destroy_cluster.rb
ey-pro-cli-0.0.5 lib/vendor/core/ey-core/requests/destroy_cluster.rb
ey-pro-cli-0.0.4 lib/vendor/core/ey-core/requests/destroy_cluster.rb
ey-pro-cli-0.0.3 lib/vendor/core/ey-core/requests/destroy_cluster.rb