Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

actionify add policy API #298

Merged
merged 2 commits into from
Oct 7, 2020
Merged

actionify add policy API #298

merged 2 commits into from
Oct 7, 2020

Conversation

bowenlan-amzn
Copy link
Contributor

@bowenlan-amzn bowenlan-amzn commented Sep 21, 2020

Issue #, if available:
#292

Description of changes:

actionify add policy API, refactor our API code so we have an action name to each API

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@bowenlan-amzn bowenlan-amzn added the enhancement An improvement on the existing feature’s functionalities label Sep 21, 2020
@bowenlan-amzn bowenlan-amzn requested review from dbbaughe and qreshi and removed request for dbbaughe September 22, 2020 16:27
add tests

ktlint fix
import com.amazon.opendistroforelasticsearch.indexmanagement.indexstatemanagement.util.FailedIndex
import org.elasticsearch.common.io.stream.StreamInput

class AddPolicyResponse : ISMStatusResponse {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we actually need a subclass when there is nothing extra being added? Any reason not to just use ISMStatusResponse?

Copy link
Contributor Author

@bowenlan-amzn bowenlan-amzn Sep 28, 2020

Choose a reason for hiding this comment

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

No big reason, just to look orderly, should be easier to read and understand I guess

@codecov
Copy link

codecov bot commented Sep 28, 2020

Codecov Report

Merging #298 into master will increase coverage by 0.06%.
The diff coverage is 79.12%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #298      +/-   ##
============================================
+ Coverage     74.88%   74.95%   +0.06%     
- Complexity      735      747      +12     
============================================
  Files           100      104       +4     
  Lines          4050     4076      +26     
  Branches        636      638       +2     
============================================
+ Hits           3033     3055      +22     
- Misses          687      688       +1     
- Partials        330      333       +3     
Impacted Files Coverage Δ Complexity Δ
...temanagement/transport/action/ISMStatusResponse.kt 93.33% <ø> (ø) 6.00 <0.00> (ø)
...ment/transport/action/addpolicy/AddPolicyAction.kt 66.66% <66.66%> (ø) 2.00 <2.00> (?)
...sport/action/addpolicy/TransportAddPolicyAction.kt 74.60% <74.60%> (ø) 2.00 <2.00> (?)
...ent/transport/action/addpolicy/AddPolicyRequest.kt 86.66% <86.66%> (ø) 6.00 <6.00> (?)
...ticsearch/indexmanagement/IndexManagementPlugin.kt 90.90% <100.00%> (+0.13%) 9.00 <0.00> (ø)
...statemanagement/resthandler/RestAddPolicyAction.kt 73.33% <100.00%> (-3.38%) 7.00 <0.00> (ø)
...nt/transport/action/addpolicy/AddPolicyResponse.kt 100.00% <100.00%> (ø) 2.00 <2.00> (?)
...action/removepolicy/TransportRemovePolicyAction.kt 73.58% <100.00%> (ø) 2.00 <0.00> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b240a15...3ece272. Read the comment docs.

@bowenlan-amzn bowenlan-amzn merged commit 4df177b into opendistro-for-elasticsearch:master Oct 7, 2020
@bowenlan-amzn bowenlan-amzn deleted the security-addpolicy branch February 9, 2021 17:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement An improvement on the existing feature’s functionalities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants