Skip to content
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

Extending aws_s3_bucket_info module #260

Merged
merged 63 commits into from
Mar 14, 2021

Conversation

zeten30
Copy link
Contributor

@zeten30 zeten30 commented Oct 12, 2020

SUMMARY

Adding a new functionality to the module.

  • ability to filter retrieved bucket list by specifying bucket name or matching string. New options: name:, name_filter:
  • retrieve additional bucket facts/configuration by specifying bucket_facts: sub-options (see ansible-doc)
  • adding integration test for the module
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

aws_s3_bucket_info

ADDITIONAL INFORMATION

Example of extended bucket information

{  
  "buckets": [
  {
        "bucket_location": {
            "LocationConstraint": "us-east-1"
        },
        "bucket_request_payment": {
            "Payer": "BucketOwner"
        },
        "bucket_tagging": {},
        "creation_date": "2020-10-12T14:00:42+00:00",
        "name": "testing-bucket",
        "public_access_block": {}
    }
  ]
}

@zeten30
Copy link
Contributor Author

zeten30 commented Oct 13, 2020

@tremble @jillr please take a look. Thanks in advance.

@ansibullbot
Copy link

@ansibullbot ansibullbot added affects_2.10 community_review feature This issue/PR relates to a feature request has_issue integration tests/integration module module needs_triage plugins plugin (any type) stale_ci CI is older than 7 days, rerun before merging tests tests labels Nov 16, 2020
@zeten30
Copy link
Contributor Author

zeten30 commented Nov 18, 2020

Not sure about future release number (1.2.2 or 1.3.0?).

Changelog snippet??

v1.3.0
======

Major Changes
-------------

- aws_s3_bucket_info - new module options ``name:``, ``name_filter``, ``bucket_facts`` and ``transform_location
# aws_s3_bucket_info.py
  version_added: 1.?.?

I assume 1.3.0.

@tremble
Copy link
Contributor

tremble commented Nov 18, 2020

https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to

minor_changes:
- aws_s3_bucket_info - new module options ``name:``, ``name_filter``, ``bucket_facts`` and ``transform_location`` (https://github.com/ansible-collections/community.aws/pull/260).

I've been using 1.3.0 although it's possible they'll technically land in 1.2.x

@zeten30
Copy link
Contributor Author

zeten30 commented Nov 18, 2020

I hope it's all good now. @tremble thank you.

@tremble
Copy link
Contributor

tremble commented Nov 19, 2020

We generally transform the TagSet object into simple tags using boto3_tag_list_to_ansible_dict this is much easier for folks to consume.

@zeten30
Copy link
Contributor Author

zeten30 commented Nov 19, 2020

We generally transform the TagSet object into simple tags using boto3_tag_list_to_ansible_dict this is much easier for folks to consume.

Sure, no problem. b04699a

@zeten30
Copy link
Contributor Author

zeten30 commented Nov 19, 2020

"bucket_request_payment": {
"Payer": "BucketOwner"
},
"bucket_tagging": {
  "facts": "defined",
  "integration": "verified"
},
"bucket_website": {},
"creation_date": "2020-11-19T13:49:58+00:00",

@ansibullbot
Copy link

@zeten30 this PR contains the following merge commits:

Please rebase your branch to remove these commits.

click here for bot help

@ansibullbot ansibullbot added merge_commit This PR contains at least one merge commit. Please resolve! needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR and removed community_review needs_triage stale_ci CI is older than 7 days, rerun before merging labels Nov 19, 2020
@zeten30 zeten30 force-pushed the extending-aws_s3_bucket_info branch from be6c366 to 7662924 Compare November 20, 2020 09:53
@zeten30
Copy link
Contributor Author

zeten30 commented Dec 10, 2020

@tremble @jillr Hi, any blockers here? Thank you.

@zeten30
Copy link
Contributor Author

zeten30 commented Jan 6, 2021

@tremble @jillr Are we ready to merge now? Thanks in advance.

@markuman
Copy link
Member

I will review tomorrow. But you need to rebase with upstream main branch. https://docs.ansible.com/ansible/latest/dev_guide/developing_rebasing.html

@zeten30 zeten30 force-pushed the extending-aws_s3_bucket_info branch from 5e2231d to 22ea4fc Compare February 2, 2021 08:53
- fix wording and typos in DOCUMENTATION
- complete rewrite of RETURN
@zeten30 zeten30 requested a review from tremble February 2, 2021 13:31
@zeten30 zeten30 requested a review from tremble February 9, 2021 09:16
@zeten30
Copy link
Contributor Author

zeten30 commented Feb 9, 2021

@tremble I've fixed the RETURN part. Shippable is ok:)

changelogs/changelog.yaml Outdated Show resolved Hide resolved
changelogs/changelog.yaml Outdated Show resolved Hide resolved
@tremble
Copy link
Contributor

tremble commented Mar 14, 2021

Shippable's passing. Let's get this merged.

@tremble tremble merged commit d24d8f1 into ansible-collections:main Mar 14, 2021
danquixote pushed a commit to danquixote/community.aws that referenced this pull request May 16, 2021
* WIP - adding new functionality to aws_s3_bucket_info module

* Fixing exceptions adding integration tests

* Code linting - shippable

* Fixing option type

* Fixing RETURN / Shippable

* Sync with upstream + .gitignore VSCode

* Extending integration test

* Adding version_added to new module options

* Prepare 1.3.0 changelog

* Use boto3_tag_list_to_ansible_dict for bucket tags

* Fixing integration test (delete buckets)

* Adjust integration test (python 2.7)

* fix integratiuon test -2

* Adjusting changelogs/changelog.yaml

* WIP - adding new functionality to aws_s3_bucket_info module

* Fixing exceptions adding integration tests

* Code linting - shippable

* Fixing option type

* Fixing RETURN / Shippable

* Extending integration test

* Adding version_added to new module options

* Prepare 1.3.0 changelog

* Use boto3_tag_list_to_ansible_dict for bucket tags

* Fixing integration test (delete buckets)

* Adjust integration test (python 2.7)

* fix integratiuon test -2

* Adjusting changelogs/changelog.yaml

* WIP - adding new functionality to aws_s3_bucket_info module

* Fixing exceptions adding integration tests

* Code linting - shippable

* Fixing option type

* Fixing RETURN / Shippable

* Extending integration test

* Adding version_added to new module options

* Use boto3_tag_list_to_ansible_dict for bucket tags

* Fixing integration test (delete buckets)

* Adjust integration test (python 2.7)

* fix integratiuon test -2

* WIP - adding new functionality to aws_s3_bucket_info module

* Fixing exceptions adding integration tests

* Code linting - shippable

* Fixing option type

* Fixing RETURN / Shippable

* Extending integration test

* Adding version_added to new module options

* Use boto3_tag_list_to_ansible_dict for bucket tags

* Fixing integration test (delete buckets)

* Adjust integration test (python 2.7)

* fix integratiuon test -2

* Merging requested PR changes ansible-collections#1

Co-authored-by: Mark Chappell <[email protected]>

* Bump version_added 1.3.0->1.4.0

Co-authored-by: Mark Chappell <[email protected]>

* Fix module docstring

Co-authored-by: Mark Chappell <[email protected]>

* Fixing changelog

* Code cleanup

* Update integration tests

* Add S3 bucket location check to integration test

* Documentation update

- fix wording and typos in DOCUMENTATION
- complete rewrite of RETURN

* Update plugins/modules/aws_s3_bucket_info.py

* Update plugins/modules/aws_s3_bucket_info.py

* Fixing RETURN indentation

* Fixing missing type: in RETURN

* Revert changes to changelogs/changelog.yaml

* Revert changes to changelogs/changelog.yaml

Co-authored-by: Mark Chappell <[email protected]>
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request Jul 19, 2021
* WIP - adding new functionality to aws_s3_bucket_info module

* Fixing exceptions adding integration tests

* Code linting - shippable

* Fixing option type

* Fixing RETURN / Shippable

* Sync with upstream + .gitignore VSCode

* Extending integration test

* Adding version_added to new module options

* Prepare 1.3.0 changelog

* Use boto3_tag_list_to_ansible_dict for bucket tags

* Fixing integration test (delete buckets)

* Adjust integration test (python 2.7)

* fix integratiuon test -2

* Adjusting changelogs/changelog.yaml

* WIP - adding new functionality to aws_s3_bucket_info module

* Fixing exceptions adding integration tests

* Code linting - shippable

* Fixing option type

* Fixing RETURN / Shippable

* Extending integration test

* Adding version_added to new module options

* Prepare 1.3.0 changelog

* Use boto3_tag_list_to_ansible_dict for bucket tags

* Fixing integration test (delete buckets)

* Adjust integration test (python 2.7)

* fix integratiuon test -2

* Adjusting changelogs/changelog.yaml

* WIP - adding new functionality to aws_s3_bucket_info module

* Fixing exceptions adding integration tests

* Code linting - shippable

* Fixing option type

* Fixing RETURN / Shippable

* Extending integration test

* Adding version_added to new module options

* Use boto3_tag_list_to_ansible_dict for bucket tags

* Fixing integration test (delete buckets)

* Adjust integration test (python 2.7)

* fix integratiuon test -2

* WIP - adding new functionality to aws_s3_bucket_info module

* Fixing exceptions adding integration tests

* Code linting - shippable

* Fixing option type

* Fixing RETURN / Shippable

* Extending integration test

* Adding version_added to new module options

* Use boto3_tag_list_to_ansible_dict for bucket tags

* Fixing integration test (delete buckets)

* Adjust integration test (python 2.7)

* fix integratiuon test -2

* Merging requested PR changes #1

Co-authored-by: Mark Chappell <[email protected]>

* Bump version_added 1.3.0->1.4.0

Co-authored-by: Mark Chappell <[email protected]>

* Fix module docstring

Co-authored-by: Mark Chappell <[email protected]>

* Fixing changelog

* Code cleanup

* Update integration tests

* Add S3 bucket location check to integration test

* Documentation update

- fix wording and typos in DOCUMENTATION
- complete rewrite of RETURN

* Update plugins/modules/aws_s3_bucket_info.py

* Update plugins/modules/aws_s3_bucket_info.py

* Fixing RETURN indentation

* Fixing missing type: in RETURN

* Revert changes to changelogs/changelog.yaml

* Revert changes to changelogs/changelog.yaml

Co-authored-by: Mark Chappell <[email protected]>
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request Jul 19, 2021
* WIP - adding new functionality to aws_s3_bucket_info module

* Fixing exceptions adding integration tests

* Code linting - shippable

* Fixing option type

* Fixing RETURN / Shippable

* Sync with upstream + .gitignore VSCode

* Extending integration test

* Adding version_added to new module options

* Prepare 1.3.0 changelog

* Use boto3_tag_list_to_ansible_dict for bucket tags

* Fixing integration test (delete buckets)

* Adjust integration test (python 2.7)

* fix integratiuon test -2

* Adjusting changelogs/changelog.yaml

* WIP - adding new functionality to aws_s3_bucket_info module

* Fixing exceptions adding integration tests

* Code linting - shippable

* Fixing option type

* Fixing RETURN / Shippable

* Extending integration test

* Adding version_added to new module options

* Prepare 1.3.0 changelog

* Use boto3_tag_list_to_ansible_dict for bucket tags

* Fixing integration test (delete buckets)

* Adjust integration test (python 2.7)

* fix integratiuon test -2

* Adjusting changelogs/changelog.yaml

* WIP - adding new functionality to aws_s3_bucket_info module

* Fixing exceptions adding integration tests

* Code linting - shippable

* Fixing option type

* Fixing RETURN / Shippable

* Extending integration test

* Adding version_added to new module options

* Use boto3_tag_list_to_ansible_dict for bucket tags

* Fixing integration test (delete buckets)

* Adjust integration test (python 2.7)

* fix integratiuon test -2

* WIP - adding new functionality to aws_s3_bucket_info module

* Fixing exceptions adding integration tests

* Code linting - shippable

* Fixing option type

* Fixing RETURN / Shippable

* Extending integration test

* Adding version_added to new module options

* Use boto3_tag_list_to_ansible_dict for bucket tags

* Fixing integration test (delete buckets)

* Adjust integration test (python 2.7)

* fix integratiuon test -2

* Merging requested PR changes #1

Co-authored-by: Mark Chappell <[email protected]>

* Bump version_added 1.3.0->1.4.0

Co-authored-by: Mark Chappell <[email protected]>

* Fix module docstring

Co-authored-by: Mark Chappell <[email protected]>

* Fixing changelog

* Code cleanup

* Update integration tests

* Add S3 bucket location check to integration test

* Documentation update

- fix wording and typos in DOCUMENTATION
- complete rewrite of RETURN

* Update plugins/modules/aws_s3_bucket_info.py

* Update plugins/modules/aws_s3_bucket_info.py

* Fixing RETURN indentation

* Fixing missing type: in RETURN

* Revert changes to changelogs/changelog.yaml

* Revert changes to changelogs/changelog.yaml

Co-authored-by: Mark Chappell <[email protected]>
danielcotton pushed a commit to danielcotton/community.aws that referenced this pull request Nov 23, 2021
* WIP - adding new functionality to aws_s3_bucket_info module

* Fixing exceptions adding integration tests

* Code linting - shippable

* Fixing option type

* Fixing RETURN / Shippable

* Sync with upstream + .gitignore VSCode

* Extending integration test

* Adding version_added to new module options

* Prepare 1.3.0 changelog

* Use boto3_tag_list_to_ansible_dict for bucket tags

* Fixing integration test (delete buckets)

* Adjust integration test (python 2.7)

* fix integratiuon test -2

* Adjusting changelogs/changelog.yaml

* WIP - adding new functionality to aws_s3_bucket_info module

* Fixing exceptions adding integration tests

* Code linting - shippable

* Fixing option type

* Fixing RETURN / Shippable

* Extending integration test

* Adding version_added to new module options

* Prepare 1.3.0 changelog

* Use boto3_tag_list_to_ansible_dict for bucket tags

* Fixing integration test (delete buckets)

* Adjust integration test (python 2.7)

* fix integratiuon test -2

* Adjusting changelogs/changelog.yaml

* WIP - adding new functionality to aws_s3_bucket_info module

* Fixing exceptions adding integration tests

* Code linting - shippable

* Fixing option type

* Fixing RETURN / Shippable

* Extending integration test

* Adding version_added to new module options

* Use boto3_tag_list_to_ansible_dict for bucket tags

* Fixing integration test (delete buckets)

* Adjust integration test (python 2.7)

* fix integratiuon test -2

* WIP - adding new functionality to aws_s3_bucket_info module

* Fixing exceptions adding integration tests

* Code linting - shippable

* Fixing option type

* Fixing RETURN / Shippable

* Extending integration test

* Adding version_added to new module options

* Use boto3_tag_list_to_ansible_dict for bucket tags

* Fixing integration test (delete buckets)

* Adjust integration test (python 2.7)

* fix integratiuon test -2

* Merging requested PR changes ansible-collections#1

Co-authored-by: Mark Chappell <[email protected]>

* Bump version_added 1.3.0->1.4.0

Co-authored-by: Mark Chappell <[email protected]>

* Fix module docstring

Co-authored-by: Mark Chappell <[email protected]>

* Fixing changelog

* Code cleanup

* Update integration tests

* Add S3 bucket location check to integration test

* Documentation update

- fix wording and typos in DOCUMENTATION
- complete rewrite of RETURN

* Update plugins/modules/aws_s3_bucket_info.py

* Update plugins/modules/aws_s3_bucket_info.py

* Fixing RETURN indentation

* Fixing missing type: in RETURN

* Revert changes to changelogs/changelog.yaml

* Revert changes to changelogs/changelog.yaml

Co-authored-by: Mark Chappell <[email protected]>
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request May 25, 2022
…nsible-collections#260)

Since ansible/ansible #73162 this is being validated, and we're not
allowing the FQCN path to the plugin. Add that to choices.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.10 community_review feature This issue/PR relates to a feature request has_issue integration tests/integration module module needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants