Sha256: 497a5c60334256b859af3989be0aae64ace9c2382352a29ed034fb5135491f5d

Contents?: true

Size: 877 Bytes

Versions: 33

Compression:

Stored size: 877 Bytes

Contents

class Ey::Core::Client
  class Real
    def restart_environment_app_servers(params={})
      id = params.delete("id")
      url = params.delete("url")

      request(
        :body   => params,
        :method => :put,
        :path   => "environments/#{id}/app_restart",
        :url    => url,
      )
    end
  end

  class Mock
    def restart_environment_app_servers(params={})
      find(:environments, resource_identity(params))
      request_id = self.uuid

      request = {
        "id"           => request_id,
        "type"         => "app_deployment_maintenance",
        "successful"   => "true",
        "started_at"   => Time.now,
        "finished_at"  => nil,
        "resource_url" => nil
      }

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

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

Version data entries

33 entries across 33 versions & 2 rubygems

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