-
Notifications
You must be signed in to change notification settings - Fork 343
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_vpc_vpn* modules and tests #2300
Conversation
This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@eb75681
This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@13b104b
* 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
…tions#47) * Make sure that example string is parsed as string and not as datetime. * Make sure that expression is treated as string. This is probably not the correct value either, but at least it doesn't cause ansible-doc --json to crash. This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@dedf734
* 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
Co-authored-by: Ezekiel Hendrickson <[email protected]> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@10853d9
* 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
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@059cf9e
…ions#320) * Sanity test / doc-default-does-not-match-spec fixups * General docs cleanup This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@b22f280
* Remove cloudformation (amazon.aws) placebo recordings * Move module unit tests to the right location so ansible-test finds them This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@1cf83b1
…ble-collections#162) * Add a custom Retry so we can retry when we receive 'The maximum number of mutating objects has been reached' * Update ec2_vpc_vpn unit test to use a connection with an AWSRetry decorator * changelog This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@79e0928
… 3.6/boto3 This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@c097c55
There's some unittest magic involved This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@b857bf4
This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@fe960ac
This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@b730549
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
…aws (ansible-collections#914) Fix unit tests which broke due to things being moved about in amazon.aws Depends-On: ansible/ansible-zuul-jobs#1324 SUMMARY ansible-collections#649 moved a few things around, including a "private" wrapper class. The shuffles broke part of the monkey patching in some unit tests, and the private wrapper class wasn't made available in the old location (it's private, using it might result in things breaking) ISSUE TYPE Bugfix Pull Request COMPONENT NAME tests/unit/plugins/modules/test_aws_api_gateway.py tests/unit/plugins/modules/test_ec2_vpc_vpn.py ADDITIONAL INFORMATION CC @marknet15 Reviewed-by: Gonéri Le Bouder <[email protected]> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@3e30e37
…ansible-collections#1186) Tagging - remove default empty dict where purge_tags default is False Depends-On: ansible-collections#844 SUMMARY Deprecate purge_tags=False Remove default of empty dict for tags ISSUE TYPE Feature Pull Request COMPONENT NAME plugins/modules/aws_kms.py plugins/modules/cloudfront_distribution.py plugins/modules/ec2_vpc_vpn.py plugins/modules/rds_param_group.py ADDITIONAL INFORMATION Reviewed-by: Markus Bergholz <[email protected]> Reviewed-by: Alina Buzachis <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@374bcfd
…et (ansible-collections#1242) ec2_vpc_vpn - fix exception when running in check mode without tags set SUMMARY Rename ec2_vpc_vpn_info tests to ec2_vpc_vpn so we have baseline testing for VPNs (keep ec2_vpc_vpn_info as an alias) fix exception when run in check mode without tags set. ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_vpc_vpn ADDITIONAL INFORMATION TASK [ec2_vpc_vpn : (check) No change to tags without setting tags] ************ task path: /root/ansible_collections/community/aws/tests/output/.tmp/integration/ec2_vpc_vpn-oywt620e-ÅÑŚÌβŁÈ/tests/integration/targets/ec2_vpc_vpn/tasks/tags.yml:248 Using module file /root/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py Pipelining is enabled. <testhost> ESTABLISH LOCAL CONNECTION FOR USER: root <testhost> EXEC /bin/sh -c 'ANSIBLE_DEBUG_BOTOCORE_LOGS=True /usr/bin/python3.10 && sleep 0' The full traceback is: Traceback (most recent call last): File "<stdin>", line 121, in <module> File "<stdin>", line 113, in _ansiballz_main File "<stdin>", line 61, in invoke_module File "/usr/lib/python3.10/runpy.py", line 209, in run_module return _run_module_code(code, init_globals, run_name, mod_spec) File "/usr/lib/python3.10/runpy.py", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py", line 808, in <module> File "/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py", line 795, in main File "/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py", line 714, in ensure_present File "/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py", line 661, in get_check_mode_results AttributeError: 'NoneType' object has no attribute 'keys' fatal: [testhost]: FAILED! => { "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"<stdin>\", line 121, in <module>\n File \"<stdin>\", line 113, in _ansiballz_main\n File \"<stdin>\", line 61, in invoke_module\n File \"/usr/lib/python3.10/runpy.py\", line 209, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib/python3.10/runpy.py\", line 96, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \"/usr/lib/python3.10/runpy.py\", line 86, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py\", line 808, in <module>\n File \"/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py\", line 795, in main\n File \"/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py\", line 714, in ensure_present\n File \"/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py\", line 661, in get_check_mode_results\nAttributeError: 'NoneType' object has no attribute 'keys'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1 } Reviewed-by: Alina Buzachis <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@3433640
Update default value of purge_tags to True SUMMARY Complete the deprecation cycle and update purge_tags default value to True ISSUE TYPE Feature Pull Request COMPONENT NAME plugins/modules/acm_certificate.py plugins/modules/cloudfront_distribution.py plugins/modules/ec2_vpc_vpn.py plugins/modules/kms_key.py plugins/modules/rds_param_group.py plugins/modules/route53_health_check.py plugins/modules/route53_zone.py plugins/modules/sqs_queue.py ADDITIONAL INFORMATION Reviewed-by: Markus Bergholz <[email protected]> Reviewed-by: Alina Buzachis <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@b56f3c6
Minor linting fixups - 2022-08-12 SUMMARY Various linting and unit test fixups unused variables overly broad Exception catching (highlighted some broken tests) removes direct use of unittest in favour of pytest (see also ansible-collections#961) cleans up skipping of tests when botocore/boto3 aren't installed passes error message from VPNConnectionException into its super to make testing easier, should never be directly exposed to the user Removes tests for 3 modules which now have integration tests, they're either recording based (fragile)or test things which are separately tested in the integration tests. lambda s3_bucket_notifications route53_zone ISSUE TYPE Feature Pull Request COMPONENT NAME plugins/modules/ec2_vpc_vpn.py tests/unit ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@8b4afa9
adjust booleans: use true/false Depends-On: ansible-collections#1423 SUMMARY ansible-community/community-topics#116 ISSUE TYPE Docs Pull Request Reviewed-by: Mark Chappell <None> Reviewed-by: Alina Buzachis <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@cb9716e
…#1539) Make example AWS UUIDS follow a specific pattern SUMMARY Various AWS IAM resources have UUID which follow a specific pattern. Similarly AWS accounts are all 12 digit numbers (text aliases in a couple of cases). To minimize the risk of accidental data leaks use a consistent Account ID in examples (123456789012), and a specific format for the UUIDS: (AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)12345EXAMPLE54321 While this does nothing about historic data, having consistency makes it easier to prevent future leaks. Note: We should follow this up with an update to the developer docs, however I'd like to get this in prior to 5.0.0 ISSUE TYPE Docs Pull Request COMPONENT NAME plugins/modules/acm_certificate_info.py plugins/modules/application_autoscaling_policy.py plugins/modules/autoscaling_launch_config.py plugins/modules/autoscaling_launch_config_info.py plugins/modules/codecommit_repository.py plugins/modules/directconnect_link_aggregation_group.py plugins/modules/dms_endpoint.py plugins/modules/dynamodb_table.py plugins/modules/ec2_transit_gateway_info.py plugins/modules/ec2_transit_gateway_vpc_attachment.py plugins/modules/ec2_transit_gateway_vpc_attachment_info.py plugins/modules/ec2_vpc_peer.py plugins/modules/ec2_vpc_peering_info.py plugins/modules/ec2_vpc_vpn_info.py plugins/modules/ecs_cluster.py plugins/modules/ecs_ecr.py plugins/modules/ecs_service.py plugins/modules/ecs_service_info.py plugins/modules/ecs_task.py plugins/modules/efs.py plugins/modules/efs_info.py plugins/modules/eks_cluster.py plugins/modules/elasticache_subnet_group.py plugins/modules/elb_network_lb.py plugins/modules/elb_target_group.py plugins/modules/elb_target_group_info.py plugins/modules/elb_target_info.py plugins/modules/iam_group.py plugins/modules/iam_managed_policy.py plugins/modules/iam_mfa_device_info.py plugins/modules/iam_server_certificate_info.py plugins/modules/lightsail.py plugins/modules/lightsail_static_ip.py plugins/modules/msk_cluster.py plugins/modules/s3_bucket_notification.py plugins/modules/sns_topic.py plugins/modules/sns_topic_info.py plugins/modules/sqs_queue.py plugins/modules/stepfunctions_state_machine.py plugins/modules/stepfunctions_state_machine_execution.py plugins/modules/storagegateway_info.py plugins/modules/wafv2_web_acl.py ADDITIONAL INFORMATION While the 'secret' nature of these UUIDs is debatable (they're closer to user names than passwords), deliberately mangling them makes it easier for InfoSec teams to spot when their secret counterparts may have been leaked in combination with a real 'public' part. This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@9476422
…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
Fix non-matching defaults in docs Depends-On: ansible-collections#1579 SUMMARY Fix various non-matching default values exposed by ansible/ansible#79267. ISSUE TYPE Docs Pull Request COMPONENT NAME various Reviewed-by: Markus Bergholz <[email protected]> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@15568f0
…gration tests (ansible-collections#1585) autoscaling_scheduled_action - bump date for scheduled action in integration tests SUMMARY 2022-10-25 has now passed, so the integration tests are failing. ISSUE TYPE Bugfix Pull Request COMPONENT NAME tests/integration ADDITIONAL INFORMATION This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@2de48d3
…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
Various lint fixups SUMMARY minor linting fixups ISSUE TYPE Feature Pull Request COMPONENT NAME aws_ssm batch_job_definition inspector_target ADDITIONAL INFORMATION See Also: ansible-collections/news-for-maintainers#34 Reviewed-by: Felix Fontein <[email protected]> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@549ca71
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
…ctions#1877) Add transit-gateway-id parameter to ec2_vpc_vpn module SUMMARY This PR adds transit_gateway_id parameter to ec2_vpc_vpn module. It is needed for the validated content role that manages the creation of transit gateway and attaches VPN to the created transit gateway. ISSUE TYPE Feature Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: Bikouo Aubin Reviewed-by: Alina Buzachis Reviewed-by: GomathiselviS Reviewed-by: Mark Chappell This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@d74c698
…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
SUMMARY Apply isort - see also ansible-collections#1771 Apply flynt - see also ansible-collections#1802 ISSUE TYPE Feature Pull Request COMPONENT NAME ADDITIONAL INFORMATION This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@c0117b5
Build failed. ✔️ ansible-galaxy-importer SUCCESS in 6m 33s |
Build failed. ✔️ ansible-galaxy-importer SUCCESS in 5m 29s |
I think for now @abikouo can close this issue because we will open a new PR later. |
Migrate ec2_vpc_vpn* modules and tests