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

Sanity test fixups for AWS ec2 modules #64230

Merged
merged 8 commits into from
Nov 4, 2019
Merged

Conversation

tremble
Copy link
Contributor

@tremble tremble commented Nov 1, 2019

SUMMARY

Sanity test fixups for AWS ec2 modules

  • standard python3 related boilierplate
  • move type checking into arg parser so we don't document "type: str" when it's going to be cast to int
  • deprecate a couple of unused options
  • remove duplicate definition of region (ec2 doc/spec adds it)
  • missing documentation of type / suboptions
ISSUE TYPE
  • Bugfix Pull Request
  • Docs Pull Request
COMPONENT NAME
   lib/ansible/modules/cloud/amazon/ec2.py
   lib/ansible/modules/cloud/amazon/ec2_ami.py
   lib/ansible/modules/cloud/amazon/ec2_ami_copy.py
   lib/ansible/modules/cloud/amazon/ec2_ami_info.py
   lib/ansible/modules/cloud/amazon/ec2_asg.py
   lib/ansible/modules/cloud/amazon/ec2_asg_info.py
   lib/ansible/modules/cloud/amazon/ec2_asg_lifecycle_hook.py
   lib/ansible/modules/cloud/amazon/ec2_customer_gateway.py
   lib/ansible/modules/cloud/amazon/ec2_customer_gateway_info.py
   lib/ansible/modules/cloud/amazon/ec2_eip.py
   lib/ansible/modules/cloud/amazon/ec2_eip_info.py
   lib/ansible/modules/cloud/amazon/ec2_eni.py
   lib/ansible/modules/cloud/amazon/ec2_eni_info.py
   lib/ansible/modules/cloud/amazon/ec2_group.py
   lib/ansible/modules/cloud/amazon/ec2_group_info.py
   lib/ansible/modules/cloud/amazon/ec2_key.py
   lib/ansible/modules/cloud/amazon/ec2_launch_template.py
   lib/ansible/modules/cloud/amazon/ec2_lc.py
   lib/ansible/modules/cloud/amazon/ec2_lc_find.py
   lib/ansible/modules/cloud/amazon/ec2_lc_info.py
   lib/ansible/modules/cloud/amazon/ec2_metadata_facts.py
   lib/ansible/modules/cloud/amazon/ec2_metric_alarm.py
   lib/ansible/modules/cloud/amazon/ec2_placement_group.py
   lib/ansible/modules/cloud/amazon/ec2_placement_group_info.py
   lib/ansible/modules/cloud/amazon/ec2_scaling_policy.py
   lib/ansible/modules/cloud/amazon/ec2_snapshot.py
   lib/ansible/modules/cloud/amazon/ec2_snapshot_copy.py
   lib/ansible/modules/cloud/amazon/ec2_snapshot_info.py
   lib/ansible/modules/cloud/amazon/ec2_tag.py
   lib/ansible/modules/cloud/amazon/ec2_transit_gateway.py
   lib/ansible/modules/cloud/amazon/ec2_vol.py
   lib/ansible/modules/cloud/amazon/ec2_vol_info.py
   lib/ansible/modules/cloud/amazon/ec2_win_password.py
ADDITIONAL INFORMATION

@ansibot
Copy link
Contributor

ansibot commented Nov 1, 2019

@tremble, just so you are aware we have a dedicated Working Group for aws.
You can find other people interested in this in #ansible-aws on Freenode IRC
For more information about communities, meetings and agendas see https://github.com/ansible/community

click here for bot help

@ansibot ansibot added affects_2.10 This issue/PR affects Ansible v2.10 aws bug This issue/PR relates to a bug. cloud core_review In order to be merged, this PR must follow the core review workflow. docs This issue/PR relates to or includes documentation. module This issue/PR relates to a module. needs_maintainer Ansibot is unable to identify maintainers for this PR. (Check `author` in docs or BOTMETA.yml) needs_triage Needs a first human triage before being processed. python3 support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests. labels Nov 1, 2019
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Nov 1, 2019
@ansibot
Copy link
Contributor

ansibot commented Nov 1, 2019

The test ansible-test sanity --test validate-modules [explain] failed with 2 errors:

lib/ansible/modules/cloud/amazon/ec2_eip.py:0:0: option-incorrect-version-added: version_added for new option (wait_timeout) should be '2.10'. Currently StrictVersion ('0.0')
lib/ansible/modules/cloud/amazon/ec2_lc.py:0:0: option-incorrect-version-added: version_added for new option (associate_public_ip_address) should be '2.10'. Currently StrictVersion ('0.0')

click here for bot help

Copy link
Contributor

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Nov 1, 2019
@jillr jillr self-assigned this Nov 1, 2019
@ansibot
Copy link
Contributor

ansibot commented Nov 4, 2019

The test ansible-test sanity --test validate-modules [explain] failed with 2 errors:

lib/ansible/modules/cloud/amazon/ec2_eip.py:0:0: option-incorrect-version-added: version_added for new option (wait_timeout) should be '2.10'. Currently StrictVersion ('0.0')
lib/ansible/modules/cloud/amazon/ec2_lc.py:0:0: option-incorrect-version-added: version_added for new option (associate_public_ip_address) should be '2.10'. Currently StrictVersion ('0.0')

click here for bot help

@ansibot ansibot added the ci_verified Changes made in this PR are causing tests to fail. label Nov 4, 2019
@gundalow gundalow merged commit 819ba22 into ansible:devel Nov 4, 2019
Copy link
Contributor

@jillr jillr left a comment

Choose a reason for hiding this comment

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

Missed the merged, adding these comments so I don't lose them in an unsaved review while I'm working on it and will open a new PR for them.

ebs:
description: Parameters used to automatically set up EBS volumes when the instance is launched.
description: Parameters used to automatically set up EBS volumes when the instance is launchedself
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
description: Parameters used to automatically set up EBS volumes when the instance is launchedself
description: Parameters used to automatically set up EBS volumes when the instance is launched

matches the tag_value
default: 'no'
- Supplements I(tag_name) but also checks that the value of the tag provided in I(tag_name) matches I(tag_value).
matches the I(tag_value)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
matches the I(tag_value)

You didn't add this, but this sentence fragment doesn't seem to belong here. Would you mind cleaning it up?

credit_specification:
description: The credit option for CPU usage of the instance. Valid for T2 or T3 instances only.
description: The credit option for CPU usage of the instance. Valid for T2 or T3 instances onlyself.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
description: The credit option for CPU usage of the instance. Valid for T2 or T3 instances onlyself.
description: The credit option for CPU usage of the instance. Valid for T2 or T3 instances only

instance_type:
description: >
The instance type, such as I(c5.2xlarge). For a full list of instance types, see
The instance type, such as C(c5.2xlarge). For a full list of instance types, see
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html
U(http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html)

ipv6_addresses:
description: >
A list of one or more specific IPv6 addresses from the IPv6 CIDR
block range of your subnet. You can't use this option if you're
specifying the I(ipv6_address_count) option.
type: list
elements: int
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
elements: int
elements: str

choices: ['default', 'dedicated']
associate_public_ip_address:
description:
- The I(wait_timeout) option does nothing and will be removed in Ansible 2.14.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- The I(wait_timeout) option does nothing and will be removed in Ansible 2.14.
- The I(associate_public_ip_address) option does nothing and will be removed in Ansible 2.14.

jillr added a commit to jillr/ansible that referenced this pull request Nov 4, 2019
Cleanup some typos that were missed in ansible#64230
@jillr jillr mentioned this pull request Nov 4, 2019
felixfontein added a commit that referenced this pull request Nov 5, 2019
* ec2_* Sanity corrections

Cleanup some typos that were missed in #64230

* Update lib/ansible/modules/cloud/amazon/ec2_launch_template.py

Co-Authored-By: Felix Fontein <felix@fontein.de>
@ansible ansible locked and limited conversation to collaborators Dec 2, 2019
@tremble tremble deleted the sanity_ec2 branch December 21, 2019 06:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.10 This issue/PR affects Ansible v2.10 aws bug This issue/PR relates to a bug. ci_verified Changes made in this PR are causing tests to fail. cloud docs This issue/PR relates to or includes documentation. module This issue/PR relates to a module. needs_maintainer Ansibot is unable to identify maintainers for this PR. (Check `author` in docs or BOTMETA.yml) needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. python3 support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants