-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boto3 elasticsearch master #55768
Merged
dwoz
merged 12 commits into
saltstack:master
from
ogd-software:boto3_elasticsearch-master
Jan 2, 2020
Merged
Boto3 elasticsearch master #55768
dwoz
merged 12 commits into
saltstack:master
from
ogd-software:boto3_elasticsearch-master
Jan 2, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
utils/boto3_elasticsearch.py: Contains custom waiter definitions that we will need to use until they get implemented in botocore (not present in 1.12.183). modules/boto3_elasticsearch.py: Contains all functions from boto3 that interact with AWS. Added a few helper functions. states/boto3_elasticsearch.py: Added states for the AWS ES service.
…enough. Renamed ESUpgradeFinished2 to ESUpgradeFinished instead. Renamed references to ESUpgradeFInished2 in the execution module.
…ded nontrivial CLI examples. Fixed broken CLI example.
…_check_return_value
ghost
requested a review
from DmitryKuzmenko
December 31, 2019 09:34
dwoz
approved these changes
Jan 2, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Master port of #53745
What does this PR do?
It adds a execution module, implemented with boto3 only, to interface with the AWS ElasticSearch service.
It adds a state to allow stateful interaction with said execution module.
It adds an elasticsearch-specific utils file with waiter definitions currently not present in botocore, allowing us to use boto3's waiter system to wait until a certain state has been achieved. When the waiters are eventually added to botocore, this file will no longer be required, though past experience (and the history of PRs for extra waiters for botocore) has taught me that this may take years.
!! Requires the following (currently not yet merged) PR:
What issues does this PR fix or reference?
None that I know of.
Previous Behavior
The execution module
boto_elasticsearch_domain
is implemented using a mix of boto2 and boto3 exists, which does not implement all API calls the AWS ES service has made available.The state module
boto_elasticsearch_domain
does not use all parameters that can currently be used with the AWS ES service in itspresent
andabsent
functions.There is no support for tagging or version upgrades. (The
present
-function does allow aTags
-parameter but doesn't do anything with it).No blocking functionality is present to ensure that the requested resource are actually present after the
present
-function returns. The same goes forabsent
.New Behavior
The new state supplies
present
,absent
,upgraded
,latest
andtagged
functions. The new state requires certain module functions to be loaded (which implicitly requires botocore version 1.10.77).The
upgraded
andlatest
functions allow for managing the version (upgrading only) of Elasticsearch that is running on a targeted AWS ES domain.The new execution module is implemented using boto3 only, with
@depends
-version checks per function in order to allow the module to work on multiple versions of boto3/botocore without any difficulties.The state- and (some, where applicable) execution module functions have
blocking
arguments to allow blocking the return of the called function until the managed resource has the required state.All functions pertaining interaction with AWS ES listed in https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/es.html are present in the execution module.
Tests written?
Yes, unittests for the execution module have been written.
Commits signed with GPG?
Yes