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

New facts module for AWS VPC Peering #19910

Merged
merged 5 commits into from
Jun 6, 2017

Conversation

willthames
Copy link
Contributor

@willthames willthames commented Jan 5, 2017

SUMMARY

Retrieves AWS VPC Peering details using AWS methods. Requires Boto3.

ISSUE TYPE

Feature Pull Request

COMPONENT NAME

ec2_vpc_peering_facts module

ANSIBLE VERSION

2.3

ADDITIONAL INFORMATION

@willthames
Copy link
Contributor Author

Migrated from ansible/ansible-modules-extras#1431 by willthames (not original author)

@ansibot ansibot added affects_2.3 This issue/PR affects Ansible v2.3 aws cloud module This issue/PR relates to a module. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. needs_triage Needs a first human triage before being processed. new_module This PR includes a new module. labels Jan 5, 2017
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Jan 6, 2017
@ansibot ansibot added owner_pr This PR is made by the module's maintainer. and removed owner_pr This PR is made by the module's maintainer. labels Jan 11, 2017
@zyv
Copy link
Contributor

zyv commented Jan 16, 2017

Tested on Ansible 2.2, works nicely for me, would be awesome if this could be included upstream! Need such a module to construct routing tables by querying VPC peerings.

@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jan 16, 2017
@ansibot
Copy link
Contributor

ansibot commented Jan 31, 2017

Copy link
Contributor

@ryansb ryansb left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM, just needs to return normalized snake case variables.


results = get_vpc_peers(ec2, module)

module.exit_json(result=results)
Copy link
Contributor

Choose a reason for hiding this comment

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

For results, it looks like you're returning the camelcase output from boto3. Can you please use camel_dict_to_snake_dict to normalize the returned values?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@willthames willthames force-pushed the ansible-modules-extras/pull/1431 branch from f7eb506 to 9627374 Compare February 2, 2017 04:56
@ansibot ansibot added needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed community_review In order to be merged, this PR must follow the community review workflow. labels Feb 2, 2017
@mattclay
Copy link
Member

mattclay commented Feb 3, 2017

Closing and re-opening to trigger CI.

@mattclay mattclay closed this Feb 3, 2017
@mattclay mattclay reopened this Feb 3, 2017
@ansibot ansibot removed the needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. label Feb 3, 2017
@mattclay
Copy link
Member

mattclay commented Feb 3, 2017

CI failure due to module validation failures:

2017-02-03 01:52:35 ============================================================================
2017-02-03 01:52:35 lib/ansible/modules/cloud/amazon/ec2_vpc_peering_facts.py
2017-02-03 01:52:35 ============================================================================
2017-02-03 01:52:35 ERROR: No ANSIBLE_METADATA provided
2017-02-03 01:52:35 ERROR: Import found before documentation variables. All imports must appear below DOCUMENTATION/EXAMPLES/RETURN/ANSIBLE_METADATA. line 17
2017-02-03 01:52:35 ERROR: Import found before documentation variables. All imports must appear below DOCUMENTATION/EXAMPLES/RETURN/ANSIBLE_METADATA. line 20
2017-02-03 01:52:35 ERROR: Import found before documentation variables. All imports must appear below DOCUMENTATION/EXAMPLES/RETURN/ANSIBLE_METADATA. line 21
2017-02-03 01:52:35 ERROR: Import found before documentation variables. All imports must appear below DOCUMENTATION/EXAMPLES/RETURN/ANSIBLE_METADATA. line 22
2017-02-03 01:52:35 ERROR: Import found before documentation variables. All imports must appear below DOCUMENTATION/EXAMPLES/RETURN/ANSIBLE_METADATA. line 23

@mattclay mattclay added the ci_verified Changes made in this PR are causing tests to fail. label Feb 3, 2017
@willthames willthames force-pushed the ansible-modules-extras/pull/1431 branch from 9627374 to 30be0db Compare February 7, 2017 09:58
@ansibot ansibot added needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. and removed ci_verified Changes made in this PR are causing tests to fail. labels Feb 7, 2017
@willthames willthames force-pushed the ansible-modules-extras/pull/1431 branch from 30be0db to 051461f Compare February 7, 2017 10:40
@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. 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 ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. community_review In order to be merged, this PR must follow the community review workflow. labels Apr 5, 2017
@willthames willthames force-pushed the ansible-modules-extras/pull/1431 branch from 4f21648 to 5c93e0e Compare April 6, 2017 00:29
@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. and removed 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. labels Apr 6, 2017
@zyv
Copy link
Contributor

zyv commented May 8, 2017

Just tested the new version with Ansible 2.3 and it works fine for me, just had to adjust playbooks re. snake case / camel case. Looks good to me, a very useful module! Not sure what else I could do to get this merged eventually, too bad it didn't make it into 2.3...

shipit

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label May 8, 2017
Etherdaemon and others added 5 commits June 2, 2017 15:51
Update version to 2.3
Update for python3 exception handling
Use ansible_dict_to_boto3_filter_list rather than duplicating
implementation
Use camel_dict_to_snake_dict on results for ansible standard results
Tidy up flake8 compliance
Add supports_check_mode to the module declaration
Update version to 2.4
Add ANSIBLE_METADATA
Move imports
@willthames willthames force-pushed the ansible-modules-extras/pull/1431 branch from 5c93e0e to d8223ad Compare June 2, 2017 05:51
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. community_review In order to be merged, this PR must follow the community review workflow. and removed stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. community_review In order to be merged, this PR must follow the community review workflow. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jun 2, 2017
@s-hertel s-hertel merged commit 3549391 into ansible:devel Jun 6, 2017
@ansibot ansibot added feature This issue/PR relates to a feature request. and removed feature_pull_request labels Mar 4, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.3 This issue/PR affects Ansible v2.3 aws cloud community_review In order to be merged, this PR must follow the community review workflow. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. new_module This PR includes a new module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants