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

DNM Migrate ec2_placement_group* modules and tests #2344

Conversation

GomathiselviS
Copy link
Contributor

Migrate ec2_placement_group* modules and tests

jillr and others added 29 commits October 17, 2024 10:27
* Rename core collection

Rename references to ansible.amazon to amazon.aws.

* Rename community.amazon to community.aws
Fix pep8 line lengths for rewritten amazon.aws imports

* Missed a path in shippable.sh
* Dependency repos moved

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@235c5db
* Remove ANSIBLE_METADATA entirely, see ansible/ansible/pull/69454.
Remove `license` field from galaxy.yml, in favor of `license_file`.

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@05672a6
* Update module deprecations

Switch version to `removed_at_date`

* Don't install amazon.aws from galaxy

We've been using galaxy to install amazon.aws in shippable, but that
doesn't really work if we aren't publising faster. Get that collection
from git so it is most up to date.

* We need to declare python test deps now

* missed a python dep

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@7cd211e
Updated module examples with FQCN

Signed-off-by: Abhijeet Kasurde <[email protected]>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@98173ae
* Update docs

Remove .git from repo url so links in readme will generate correctly
Add required ansible version
Run latest version of add_docs.py
Add version_added string to modules

* galaxy.yml was missing authors

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@96ee268
* Reorder imports
* Make use of is_boto3_error_message
* Mass-migration over to is_boto3_error_code
* Remove unused imports
* unused vars in exception
* Improve consistency around catching BotoCoreError and ClientError
* Remove unused imports
* Remove unused 'PolicyError' from iam_policy_info
* Avoid catching botocore.exceptions.ClientError when we only want some error codes
* Import camel_dict_to_snake_dict/snake_dict_to_camel_dict from ansible.module_utils.common.dict_transformations

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@4cf52ef
Remove deprecated "facts" aliases

SUMMARY
Modules named "facts.py" that do not return ansible_facts were renamed to "info.py" in 2.9. Remove these aliases now that the deprecation period is over.
This PR should be included in 3.0.0 of the collection.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
*_facts.py

Reviewed-by: Mark Chappell <None>
Reviewed-by: Jill R <None>
Reviewed-by: None <None>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@68aaa70
…ble-collections#872)

ec2_placement_group: Add partition strategy and partition count

SUMMARY

Add partition as a strategy and an option, partition_count to choose the actual number of partitions for the community.aws.ec2_placement_group module.

Fixes ansible-collections#808
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

ec2_placement_group
ADDITIONAL INFO
Tested locally with
- name: Create a partition placement group with partition count 4.
    ec2_placement_group:
      name: my-cluster
      state: present
      strategy: partition
      partition_count: 4

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Mandar Kulkarni <[email protected]>
Reviewed-by: Mark Woolley <[email protected]>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@716ae77
Docs linting fixups

SUMMARY
While testing out linting/validation of the generated docs, a number of issues were highlighted.
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
plugins/modules/aws_batch_job_definition.py
plugins/modules/aws_config_rule.py
plugins/modules/aws_secret.py
plugins/modules/aws_waf_rule.py
plugins/modules/cloudfront_invalidation.py
plugins/modules/ec2_placement_group_info.py
plugins/modules/iam_user.py
plugins/modules/route53_health_check.py
plugins/modules/s3_sync.py
ADDITIONAL INFORMATION

Reviewed-by: Markus Bergholz <[email protected]>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@c5363d5
…nsible-collections#1477)

ec2_placement_group: Handle a potential race creation during create

Address a race condition during the creation of a new Placement Group.
The consequence was a "placement_group": null in output after a
successful new creation.
e.g: https://af0ac3e5f4e1620a8d63-ed3785e7f94a59162d05eede0959ab4b.ssl.cf5.rackcdn.com/1459/71e1a28c8ab7c12471b7f1cce5a37846ff642439/check/integration-community.aws-12/aa426fe/job-output.txt

Reviewed-by: Mark Chappell <None>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@d4eb13b
…collections#1459)

Update extends_documentation_fragment with amazon.aws.boto3

Depends-On: ansible/ansible-zuul-jobs#1654
SUMMARY

As per ansible-collections#985 add amazon.aws.boto3.

ISSUE TYPE

Docs Pull Request

COMPONENT NAME

several

Reviewed-by: Jill R <None>
Reviewed-by: Mark Chappell <None>
Reviewed-by: Markus Bergholz <[email protected]>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@bd3c03f
…ons#1632)

Ansible User-Agent identification for community.aws

SUMMARY

The value will be similar to this APN/1.0 Ansible/2.14.1 community.aws/6.0.0-dev0

ISSUE TYPE

Feature Pull Request

Reviewed-by: Mark Chappell <None>
Reviewed-by: Bikouo Aubin <None>
Reviewed-by: Alina Buzachis <None>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@a8cbce2
Cleanup headers and imports

SUMMARY
Mass update of imports, docs fragments and file headers

Many of the amazon.aws module_utils and docs fragments got moved about, update community.aws to reflect this.
Consistently apply the comment headers as documented at https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_documenting.html#python-shebang-utf-8-coding

ISSUE TYPE

Docs Pull Request
Feature Pull Request

COMPONENT NAME
ADDITIONAL INFORMATION
Header cleanup based upon:
https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_documenting.html#python-shebang-utf-8-coding

Begin your Ansible module with #!/usr/bin/python - this “shebang” allows ansible_python_interpreter to work. Follow the shebang immediately with # -*- coding: utf-8 -*- to clarify that the file is UTF-8 encoded.

and
https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_documenting.html#copyright-and-license

After the shebang and UTF-8 coding, add a copyright line with the original copyright holder and a license declaration. The license declaration should be ONLY one line, not the full GPL prefix.
...
Additions to the module (for instance, rewrites) are not permitted to add additional copyright lines other than the default copyright statement if missing:

Reviewed-by: Alina Buzachis

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@a4f20bf
* Black prep

* Black

* changelog

* Fix pylint unused-import in tests

* Split SSM connection plugin changes

* disable glue tests - bucket's missing

* Disable s3_logging and s3_sync tests

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@2c4575c
Bulk migration to Python 3.6 f-strings

SUMMARY
We've dropped support for Python <3.6, bulk migrate to fstrings and perform some general string cleanup
A combination of

black --preview
flynt
some manual cleanup

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
plugins/
tests/
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@de33821
…ollections#1921)

Mass update of docs and tests (credentials/session tokens)

SUMMARY
We had a cleanup of credentials/session parameters which included a batch of deprecations and renames.
Ensure that all of our tests and docs are using the 'canonical' names
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
plugins/modules/batch_compute_environment.py
plugins/modules/cloudformation_exports_info.py
plugins/modules/ec2_vpc_vpn.py
plugins/modules/elasticache.py
plugins/modules/elasticache_parameter_group.py
plugins/modules/elasticache_snapshot.py
plugins/modules/ses_rule_set.py
plugins/modules/sts_assume_role.py
plugins/modules/sts_session_token.py
tests/integration
ADDITIONAL INFORMATION
See also

ansible-collections#1172
ansible-collections#1714

Reviewed-by: Alina Buzachis

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@4a5b50e
Cleanup after renamed plugins

SUMMARY
Prior to 5.0.0 we renamed various modules.  Cleanup the integration tests (and some docs).
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
plugins/modules/acm_certificate.py
plugins/modules/acm_certificate_info.py
plugins/modules/autoscaling_policy.py
plugins/modules/codepipeline.py
plugins/modules/storagegateway_info.py
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@c2fead0
fix unsafe asserts

SUMMARY
Closes ansible-collections#2012
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
integrationtests

Reviewed-by: Mark Chappell
Reviewed-by: Alina Buzachis

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@4bdcecd
…s#2036)

ansible-lint (documentation) cleanup for plugins/

SUMMARY
Fixes an array of ansible-lint failures in plugins/
Adds ansible-lint plugins/ to tox -m lint
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
plugins/
ADDITIONAL INFORMATION
docs changes only (no changelog fragment needed)

Reviewed-by: Alina Buzachis

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@6dd4a00
SUMMARY
Allows users to optionally create EC2 placement groups with tags. Extend integration suite with additional test cases.
ISSUE TYPE

Feature Pull Request

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Mark Chappell
Reviewed-by: Haris Okanovic <[email protected]>
Reviewed-by: Alina Buzachis

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@c235bd3
Copy link
Contributor

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/ansible-collections/amazon.aws for 2344,a367116521a5a20e115e0877d8bf33bad5b89908

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.