Sha256: a2212871d073b9363671dceaf03ea34eec643ccf759a119837cb626a65d82c8a

Contents?: true

Size: 1.05 KB

Versions: 39

Compression:

Stored size: 1.05 KB

Contents

class Ey::Core::Client
  class Real
    def get_logical_databases(params={})
      query = Ey::Core.paging_parameters(params)
      url = params.delete("url")

      request(
        :params => params,
        :query  => query,
        :path   => "/logical-databases",
        :url    => url,
      )
    end
  end

  class Mock
    def get_logical_databases(_params={})
      params = Cistern::Hash.stringify_keys(_params)

      extract_url_params!(params)

      params["service"] = params.delete("database_service") if params["database_service"]
      if environment_id = resource_identity(params.delete("environment") || params.delete("environment_id"))
        params["service"] = url_for("/database-services/#{find(:environments, environment_id)["database_service"]}")
      end

      headers, logical_databases_page = search_and_page(params, :logical_databases, search_keys: %w[name username service ])

      response(
        :body    => {"logical_databases" => logical_databases_page},
        :status  => 200,
        :headers => headers
      )
    end
  end
end

Version data entries

39 entries across 39 versions & 2 rubygems

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