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

ec2_customer_gateway: bgp_asn is not required #1075

Closed
1 task done
neilkatin opened this issue Apr 19, 2022 · 3 comments · Fixed by #1197
Closed
1 task done

ec2_customer_gateway: bgp_asn is not required #1075

neilkatin opened this issue Apr 19, 2022 · 3 comments · Fixed by #1197

Comments

@neilkatin
Copy link

Summary

The ec2_customer_gateway module has incorrect documentation for the bgp_asn parameter.

It says the ASN must be passed when state=present, but the code defaults to 25000 if the parameter is absent. See the ensure_cgw_present() method:

    def ensure_cgw_present(self, bgp_asn, ip_address):
        if not bgp_asn:
            bgp_asn = 65000
        response = self.ec2.create_customer_gateway(
            DryRun=False,
            Type='ipsec.1',
            PublicIp=ip_address,
            BgpAsn=bgp_asn,
        )
        return response

### Issue Type

Documentation Report

### Component Name

ec2_customer_gateway

### Ansible Version

```console (paste below)
$ ansible --version
ansible [core 2.12.4]
  config file = None
  configured module search path = ['/home/neil/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/neil/.local/share/virtualenvs/community.aws-uRL047Ho/lib/python3.10/site-packages/ansible
  ansible collection location = /home/neil/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/neil/.local/share/virtualenvs/community.aws-uRL047Ho/bin/ansible
  python version = 3.10.1 (main, Jan 10 2022, 00:00:00) [GCC 11.2.1 20211203 (Red Hat 11.2.1-7)]
  jinja version = 3.1.1
  libyaml = True

Collection Versions

$ ansible-galaxy collection list

Configuration

$ ansible-config dump --only-changed

OS / Environment

main branch, as of 2022-04-18.

Additional Information

Suggested rewording:

options:
  bgp_asn:
    description:
      - Border Gateway Protocol (BGP) Autonomous System Number (ASN), defaults to 25000.
    type: int

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link

@alinabuzachis
Copy link
Contributor

@neilkatin Thank you for raising this. bgp_asn shouldn't be a required parameter anymore since it defaults to 65000 as reported in the boto3 documentation. https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.create_customer_gateway

Would you be willing to open a pull request to fix that inconsistency?

softwarefactory-project-zuul bot pushed a commit that referenced this issue Jun 3, 2022
ec2_customer_gateway: fix bgp_asn documentation inconsistency

SUMMARY

Fixes #1075

ISSUE TYPE


Docs Pull Request

COMPONENT NAME

ec2_customer_gateway
ADDITIONAL INFORMATION



While current documentation for the parameter states that
Border Gateway Protocol (BGP) Autonomous System Number (ASN), required when I(state=present).,
according to  boto3 documentation, bgp_asn defaults to 65000.

Reviewed-by: Markus Bergholz <git@osuv.de>
Reviewed-by: Alina Buzachis <None>
patchback bot pushed a commit that referenced this issue Jun 3, 2022
ec2_customer_gateway: fix bgp_asn documentation inconsistency

SUMMARY

Fixes #1075

ISSUE TYPE

Docs Pull Request

COMPONENT NAME

ec2_customer_gateway
ADDITIONAL INFORMATION

While current documentation for the parameter states that
Border Gateway Protocol (BGP) Autonomous System Number (ASN), required when I(state=present).,
according to  boto3 documentation, bgp_asn defaults to 65000.

Reviewed-by: Markus Bergholz <git@osuv.de>
Reviewed-by: Alina Buzachis <None>
(cherry picked from commit 877ebbd)
patchback bot pushed a commit that referenced this issue Jun 3, 2022
ec2_customer_gateway: fix bgp_asn documentation inconsistency

SUMMARY

Fixes #1075

ISSUE TYPE

Docs Pull Request

COMPONENT NAME

ec2_customer_gateway
ADDITIONAL INFORMATION

While current documentation for the parameter states that
Border Gateway Protocol (BGP) Autonomous System Number (ASN), required when I(state=present).,
according to  boto3 documentation, bgp_asn defaults to 65000.

Reviewed-by: Markus Bergholz <git@osuv.de>
Reviewed-by: Alina Buzachis <None>
(cherry picked from commit 877ebbd)
softwarefactory-project-zuul bot pushed a commit that referenced this issue Jun 4, 2022
…#1207)

[PR #1197/877ebbd8 backport][stable-3] ec2_customer_gateway: fix bgp_asn documentation inconsistency

This is a backport of PR #1197 as merged into main (877ebbd).
SUMMARY

Fixes #1075

ISSUE TYPE


Docs Pull Request

COMPONENT NAME

ec2_customer_gateway
ADDITIONAL INFORMATION



While current documentation for the parameter states that
Border Gateway Protocol (BGP) Autonomous System Number (ASN), required when I(state=present).,
according to  boto3 documentation, bgp_asn defaults to 65000.

Reviewed-by: Markus Bergholz <git@osuv.de>
softwarefactory-project-zuul bot pushed a commit that referenced this issue Jun 4, 2022
…#1206)

[PR #1197/877ebbd8 backport][stable-2] ec2_customer_gateway: fix bgp_asn documentation inconsistency

This is a backport of PR #1197 as merged into main (877ebbd).
SUMMARY

Fixes #1075

ISSUE TYPE


Docs Pull Request

COMPONENT NAME

ec2_customer_gateway
ADDITIONAL INFORMATION



While current documentation for the parameter states that
Border Gateway Protocol (BGP) Autonomous System Number (ASN), required when I(state=present).,
according to  boto3 documentation, bgp_asn defaults to 65000.

Reviewed-by: Markus Bergholz <git@osuv.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants