Skip to content

Conversation

@hub-cap
Copy link
Contributor

@hub-cap hub-cap commented Aug 19, 2019

The get and list APIs are a single API in this commit. Whether
requesting one named policy or all policies, a list of policies is
returened. The list API code has all been removed and the GET api is
what remains, which contains much of the list response code.

The get and list APIs are a single API in this commit. Whether
requesting one named policy or all policies, a list of policies is
returened. The list API code has all been removed and the GET api is
what remains, which contains much of the list response code.
@hub-cap hub-cap added the :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP label Aug 19, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

if (policy == null) {
throw new ResourceNotFoundException("Policy [{}] was not found", request.getName());
}
policies = Collections.singletonMap(request.getName(), policy);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: maybe use Map.of()? When backporting this change, this then has to be changed back. I just prefer Map.of over Collections.singletonMap in master.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a better solution. I forget about Map.of!

@hub-cap hub-cap merged commit a7c5925 into elastic:enrich Aug 20, 2019
@hub-cap hub-cap deleted the enrich_merge_get_list branch August 20, 2019 15:05
hub-cap added a commit that referenced this pull request Aug 20, 2019
The get and list APIs are a single API in this commit. Whether
requesting one named policy or all policies, a list of policies is
returened. The list API code has all been removed and the GET api is
what remains, which contains much of the list response code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >non-issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants