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

Implement the list_global_accelerators module #95

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TylerLubeck
Copy link

SUMMARY

I took a stab at a proof of concept for part of #94 - this implements the most basic list_global_accelerators module to fetch information about active global accelerators for an account

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

list_global_accelerators

ADDITIONAL INFORMATION

The global accelerator API doesn't seem to allow for lookup by anything other than ARN, and doesn't allow for using ARNs to filter the pagination, which means that filtering has to be done client side and not server side. It's also highly possible that I'm just missing something in which case I would love to learn more!

➜ ansible localhost -m community.aws.list_global_accelerators -a 'region=us-west-2' -v
localhost | SUCCESS => {
    "accelerator": [
        {
            "accelerator_arn": "arn:aws:globalaccelerator::snip:accelerator/this-is-a-guid",
            "attributes": {
                "accelerator_attributes": {
                    "flow_logs_enabled": false
                },
                "response_metadata": {
                    "http_headers": {
                        "connection": "keep-alive",
                        "content-length": "51",
                        "content-type": "application/x-amz-json-1.1",
                        "date": "Wed, 10 Jun 2020 22:37:28 GMT",
                        "x-amzn-requestid": "snip"
                    },
                    "http_status_code": 200,
                    "request_id": "snip",
                    "retry_attempts": 0
                }
            },
            "created_time": "2020-04-24T04:54:02-07:00",
            "dns_name": "abcdefg12345.awsglobalaccelerator.com",
            "enabled": true,
            "ip_address_type": "IPV4",
            "ip_sets": [
                {
                    "ip_addresses": [
                        "snip"
                    ],
                    "ip_family": "IPv4"
                }
            ],
            "last_modified_time": "2020-04-24T04:54:05-07:00",
            "name": "myaccelerator",
            "status": "DEPLOYED",
            "tags": {}
        }
    ],
    "changed": false
}

@jillr jillr changed the base branch from master to main July 2, 2020 19:48
@ansibullbot
Copy link

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

plugins/modules/source_control/git/git_push.py:0:0: doc-required-mismatch: Argument 'url' in argument_spec is required, but is not documented as being required

The test ansible-test sanity --test ansible-doc [explain] failed with the error:

Output on stderr from ansible-doc is considered an error.

Command "ansible-doc -t module community.general.git_commit community.general.git_push" returned exit status 0.
>>> Standard Error
[WARNING]: module community.general.git_commit not found in:
/dev/null:/root/ansible/lib/ansible/modules
[WARNING]: module community.general.git_push not found in:
/dev/null:/root/ansible/lib/ansible/modules

click here for bot help

@ansibullbot
Copy link

@ansibullbot ansibullbot added affects_2.10 module module needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR needs_triage new_contributor Help guide this first time contributor new_module New module new_plugin New plugin stale_ci CI is older than 7 days, rerun before merging labels Aug 19, 2020
@ansibullbot ansibullbot added the plugins plugin (any type) label Aug 27, 2020
@jillr
Copy link
Collaborator

jillr commented Dec 1, 2020

Hi @TylerLubeck, thanks for this PR! This module should be named global_accelerators_info.py if it only provides information.

It will also need tests. Integration tests will likely rely on the module in #97, to create the accelerator to be gathered by this module, so I think this PR should probably depend on that one.

@jillr jillr added the pr_day Has been reviewed during a PR review Day. https://github.com/ansible/community/issues/407 label Dec 1, 2020
@tremble
Copy link
Contributor

tremble commented Dec 1, 2020

One comment in addition to @jillr's it would be good if the module supported describing a specific accelerator. Especially during integration tests this can be helpful for validating that you made the changes you thought you did. Only supporting the listing of all instances of an object can get very time/API-call expensive. (unfortunately boto3 doesn't support server-side filtering)

@goneri
Copy link
Member

goneri commented Feb 3, 2021

@TylerLubeck do you need help to address these issues? Don't hesitate to ping us on IRC (#ansible-aws).

alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request May 25, 2022
* Enable all sanity tests.

* Update 2.9 sanity ignores.

The 2.9 pylint test does not like deprecation by date, so we have to
ignore these 'errors'.

* Allow 2.11 (and later) as well.
@tremble tremble removed the pr_day Has been reviewed during a PR review Day. https://github.com/ansible/community/issues/407 label Jul 5, 2022
@ansibullbot
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.10 module module needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR new_contributor Help guide this first time contributor new_module New module new_plugin New plugin plugins plugin (any type) stale_ci CI is older than 7 days, rerun before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants