Proposed fix for issue #5#6
Open
nonspecialist wants to merge 3 commits into
Open
Conversation
nonspecialist
commented
Aug 22, 2017
- Determine whether an RDS resource is a cluster prior to snapshotting
- use the appropriate snapshot method
- missing `self` call - removed exception for flow control.
stevemac007
approved these changes
Aug 23, 2017
Contributor
stevemac007
left a comment
There was a problem hiding this comment.
Pushed updates and additional tests to cover the new code.
I'm happy with it now, hopefully @wobeng will be able to validate this works as expected once its merged.
|
|
||
| def is_cluster(self, resource): | ||
| try: | ||
| return resource['DBClusterIdentifier'] is not None |
Contributor
There was a problem hiding this comment.
Can do this as
return 'DBClusterIdentifier' in resource
And not need the try except.
| current_snap = self.conn.create_db_snapshot(DBInstanceIdentifier=self.resolve_backupable_id(resource), | ||
| DBSnapshotIdentifier=snapshot_id, | ||
| Tags=aws_tagset) | ||
| if is_cluster(resource): |
Contributor
There was a problem hiding this comment.
if self.is_cluster(resource):
Contributor
|
Looking further into the API I think this is a bit more complex than the current approach supports. I might have to actually build a cluster and see what responses come back from AWS to make it work. |
Contributor
|
Take a look at #8 . It has db cluster support |
This file contains hidden or 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
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.