Sha256: dcf19e159b1458f0463e869c7eb180aa31155c91d9d9c076b2c9b7575251e4a2

Contents?: true

Size: 893 Bytes

Versions: 18

Compression:

Stored size: 893 Bytes

Contents

class Ey::Core::Client
  class Real
    def reconcile_server(params={})
      id  = params["id"]
      url = params["url"]

      request(
        :method => :put,
        :path   => "servers/#{id}/reconcile",
        :url    => url,
      )
    end
  end # Real

  class Mock
    def reconcile_server(params={})
      request_id  = self.uuid
      identity = resource_identity(params)

      find(:servers, identity)

      reconcile_request = {
        "finished_at" => Time.now,
        "id"          => request_id,
        "started_at"  => Time.now,
        "successful"  => "true",
        "server"      => url_for("/servers/#{identity}"),
        "type"        => "reconcile_server_request",
      }

      self.data[:requests][request_id] = reconcile_request

      response(
        :body   => {"request" => reconcile_request},
        :status => 201,
      )
    end
  end # Mock
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
ey-core-3.6.0.autoscaling1 lib/ey-core/requests/reconcile_server.rb
ey-core-3.6.4 lib/ey-core/requests/reconcile_server.rb
ey-core-3.6.3 lib/ey-core/requests/reconcile_server.rb
ey-core-3.6.1 lib/ey-core/requests/reconcile_server.rb
groove-ey-core-3.6.3 lib/ey-core/requests/reconcile_server.rb
groove-ey-core-3.6.2 lib/ey-core/requests/reconcile_server.rb
groove-ey-core-3.6.1 lib/ey-core/requests/reconcile_server.rb
ey-core-3.5.0 lib/ey-core/requests/reconcile_server.rb
ey-core-3.4.4 lib/ey-core/requests/reconcile_server.rb
ey-core-3.4.2 lib/ey-core/requests/reconcile_server.rb
ey-core-3.4.1 lib/ey-core/requests/reconcile_server.rb
ey-core-3.4.0 lib/ey-core/requests/reconcile_server.rb
ey-core-3.3.1 lib/ey-core/requests/reconcile_server.rb
ey-core-3.3.0 lib/ey-core/requests/reconcile_server.rb
ey-core-3.2.6 lib/ey-core/requests/reconcile_server.rb
ey-core-3.2.5 lib/ey-core/requests/reconcile_server.rb
ey-core-3.2.4 lib/ey-core/requests/reconcile_server.rb
ey-core-3.2.3 lib/ey-core/requests/reconcile_server.rb