diff --git a/README.md b/README.md index 077eea5e758..48d55ad314a 100644 --- a/README.md +++ b/README.md @@ -45,11 +45,6 @@ Name | Description [community.aws.aws_config_delivery_channel](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_config_delivery_channel_module.rst)|Manage AWS Config delivery channels [community.aws.aws_config_recorder](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_config_recorder_module.rst)|Manage AWS Config Recorders [community.aws.aws_config_rule](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_config_rule_module.rst)|Manage AWS Config resources -[community.aws.aws_direct_connect_confirm_connection](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_direct_connect_confirm_connection_module.rst)|Confirms the creation of a hosted DirectConnect connection. -[community.aws.aws_direct_connect_connection](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_direct_connect_connection_module.rst)|Creates, deletes, modifies a DirectConnect connection -[community.aws.aws_direct_connect_gateway](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_direct_connect_gateway_module.rst)|Manage AWS Direct Connect gateway -[community.aws.aws_direct_connect_link_aggregation_group](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_direct_connect_link_aggregation_group_module.rst)|Manage Direct Connect LAG bundles -[community.aws.aws_direct_connect_virtual_interface](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_direct_connect_virtual_interface_module.rst)|Manage Direct Connect virtual interfaces [community.aws.aws_elasticbeanstalk_app](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_elasticbeanstalk_app_module.rst)|Create, update, and delete an elastic beanstalk application [community.aws.aws_glue_connection](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_glue_connection_module.rst)|Manage an AWS Glue connection [community.aws.aws_glue_job](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_glue_job_module.rst)|Manage an AWS Glue job @@ -82,6 +77,11 @@ Name | Description [community.aws.cloudwatchlogs_log_group_info](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.cloudwatchlogs_log_group_info_module.rst)|Get information about log_group in CloudWatchLogs [community.aws.cloudwatchlogs_log_group_metric_filter](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.cloudwatchlogs_log_group_metric_filter_module.rst)|Manage CloudWatch log group metric filter [community.aws.data_pipeline](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.data_pipeline_module.rst)|Create and manage AWS Datapipelines +[community.aws.directconnect_confirm_connection](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.directconnect_confirm_connection_module.rst)|Confirms the creation of a hosted DirectConnect connection +[community.aws.directconnect_connection](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.directconnect_connection_module.rst)|Creates, deletes, modifies a DirectConnect connection +[community.aws.directconnect_gateway](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.directconnect_gateway_module.rst)|Manage AWS Direct Connect gateway +[community.aws.directconnect_link_aggregation_group](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.directconnect_link_aggregation_group_module.rst)|Manage Direct Connect LAG bundles +[community.aws.directconnect_virtual_interface](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.directconnect_virtual_interface_module.rst)|Manage Direct Connect virtual interfaces [community.aws.dms_endpoint](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.dms_endpoint_module.rst)|Creates or destroys a data migration services endpoint [community.aws.dms_replication_subnet_group](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.dms_replication_subnet_group_module.rst)|creates or destroys a data migration services subnet group [community.aws.dynamodb_table](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.dynamodb_table_module.rst)|Create, update or delete AWS Dynamo DB tables diff --git a/changelogs/fragments/1286-rename-directconnect.yml b/changelogs/fragments/1286-rename-directconnect.yml new file mode 100644 index 00000000000..fdcc168dea1 --- /dev/null +++ b/changelogs/fragments/1286-rename-directconnect.yml @@ -0,0 +1,6 @@ +minor_changes: +- aws_direct_connect_confirm_connection - the ``aws_direct_connect_confirm_connection`` module has been renamed to ``directconnect_confirm_connection``, ``aws_direct_connect_confirm_connection`` remains as an alias (https://github.com/ansible-collections/community.aws/pull/1286). +- aws_direct_connect_connection - the ``aws_direct_connect_connection`` module has been renamed to ``directconnect_connection``, ``aws_direct_connect_connection`` remains as an alias (https://github.com/ansible-collections/community.aws/pull/1286). +- aws_direct_connect_gateway - the ``aws_direct_connect_gateway`` module has been renamed to ``directconnect_gateway``, ``aws_direct_connect_gateway`` remains as an alias (https://github.com/ansible-collections/community.aws/pull/1286). +- aws_direct_connect_link_aggregation_group - the ``aws_direct_connect_link_aggregation_group`` module has been renamed to ``directconnect_link_aggregation_group``, ``aws_direct_connect_link_aggregation_group`` remains as an alias (https://github.com/ansible-collections/community.aws/pull/1286). +- aws_direct_connect_virtual_interface - the ``aws_direct_connect_virtual_interface`` module has been renamed to ``directconnect_virtual_interface``, ``aws_direct_connect_virtual_interface`` remains as an alias (https://github.com/ansible-collections/community.aws/pull/1286). diff --git a/docs/community.aws.aws_direct_connect_confirm_connection_module.rst b/docs/community.aws.directconnect_confirm_connection_module.rst similarity index 96% rename from docs/community.aws.aws_direct_connect_confirm_connection_module.rst rename to docs/community.aws.directconnect_confirm_connection_module.rst index cb232628610..5e90e756020 100644 --- a/docs/community.aws.aws_direct_connect_confirm_connection_module.rst +++ b/docs/community.aws.directconnect_confirm_connection_module.rst @@ -1,11 +1,11 @@ -.. _community.aws.aws_direct_connect_confirm_connection_module: +.. _community.aws.directconnect_confirm_connection_module: -*************************************************** -community.aws.aws_direct_connect_confirm_connection -*************************************************** +********************************************** +community.aws.directconnect_confirm_connection +********************************************** -**Confirms the creation of a hosted DirectConnect connection.** +**Confirms the creation of a hosted DirectConnect connection** @@ -17,8 +17,8 @@ community.aws.aws_direct_connect_confirm_connection Synopsis -------- - Confirms the creation of a hosted DirectConnect, which requires approval before it can be used. -- DirectConnect connections that require approval would be in the 'ordering'. -- After confirmation, they will move to the 'pending' state and finally the 'available' state. +- DirectConnect connections that require approval would be in the ``ordering``. +- After confirmation, they will move to the ``pending`` state and finally the ``available`` state. @@ -265,12 +265,12 @@ Examples # confirm a Direct Connect by name - name: confirm the connection id - aws_direct_connect_confirm_connection: + community.aws.directconnect_confirm_connection: name: my_host_direct_connect # confirm a Direct Connect by connection_id - name: confirm the connection id - aws_direct_connect_confirm_connection: + community.aws.directconnect_confirm_connection: connection_id: dxcon-xxxxxxxx diff --git a/docs/community.aws.aws_direct_connect_connection_module.rst b/docs/community.aws.directconnect_connection_module.rst similarity index 97% rename from docs/community.aws.aws_direct_connect_connection_module.rst rename to docs/community.aws.directconnect_connection_module.rst index 124e98c0209..00c0fb1826d 100644 --- a/docs/community.aws.aws_direct_connect_connection_module.rst +++ b/docs/community.aws.directconnect_connection_module.rst @@ -1,9 +1,9 @@ -.. _community.aws.aws_direct_connect_connection_module: +.. _community.aws.directconnect_connection_module: -******************************************* -community.aws.aws_direct_connect_connection -******************************************* +************************************** +community.aws.directconnect_connection +************************************** **Creates, deletes, modifies a DirectConnect connection** @@ -17,7 +17,9 @@ Version added: 1.0.0 Synopsis -------- -- Create, update, or delete a Direct Connect connection between a network and a specific AWS Direct Connect location. Upon creation the connection may be added to a link aggregation group or established as a standalone connection. The connection may later be associated or disassociated with a link aggregation group. +- Create, update, or delete a Direct Connect connection between a network and a specific AWS Direct Connect location. +- Upon creation the connection may be added to a link aggregation group or established as a standalone connection. +- The connection may later be associated or disassociated with a link aggregation group. @@ -356,7 +358,7 @@ Examples .. code-block:: yaml # create a Direct Connect connection - - community.aws.aws_direct_connect_connection: + - community.aws.directconnect_connection: name: ansible-test-connection state: present location: EqDC2 @@ -365,14 +367,14 @@ Examples register: dc # disassociate the LAG from the connection - - community.aws.aws_direct_connect_connection: + - community.aws.directconnect_connection: state: present connection_id: dc.connection.connection_id location: EqDC2 bandwidth: 1Gbps # replace the connection with one with more bandwidth - - community.aws.aws_direct_connect_connection: + - community.aws.directconnect_connection: state: present name: ansible-test-connection location: EqDC2 @@ -380,7 +382,7 @@ Examples forced_update: true # delete the connection - - community.aws.aws_direct_connect_connection: + - community.aws.directconnect_connection: state: absent name: ansible-test-connection diff --git a/docs/community.aws.aws_direct_connect_gateway_module.rst b/docs/community.aws.directconnect_gateway_module.rst similarity index 98% rename from docs/community.aws.aws_direct_connect_gateway_module.rst rename to docs/community.aws.directconnect_gateway_module.rst index ee2c181cb4c..b8c5b1a712b 100644 --- a/docs/community.aws.aws_direct_connect_gateway_module.rst +++ b/docs/community.aws.directconnect_gateway_module.rst @@ -1,9 +1,9 @@ -.. _community.aws.aws_direct_connect_gateway_module: +.. _community.aws.directconnect_gateway_module: -**************************************** -community.aws.aws_direct_connect_gateway -**************************************** +*********************************** +community.aws.directconnect_gateway +*********************************** **Manage AWS Direct Connect gateway** @@ -332,7 +332,7 @@ Examples .. code-block:: yaml - name: Create a new direct connect gateway attached to virtual private gateway - community.aws.aws_direct_connect_gateway: + community.aws.directconnect_gateway: state: present name: my-dx-gateway amazon_asn: 7224 @@ -340,7 +340,7 @@ Examples register: created_dxgw - name: Create a new unattached dxgw - community.aws.aws_direct_connect_gateway: + community.aws.directconnect_gateway: state: present name: my-dx-gateway amazon_asn: 7224 diff --git a/docs/community.aws.aws_direct_connect_link_aggregation_group_module.rst b/docs/community.aws.directconnect_link_aggregation_group_module.rst similarity index 99% rename from docs/community.aws.aws_direct_connect_link_aggregation_group_module.rst rename to docs/community.aws.directconnect_link_aggregation_group_module.rst index 671981a01bc..884af2d2a32 100644 --- a/docs/community.aws.aws_direct_connect_link_aggregation_group_module.rst +++ b/docs/community.aws.directconnect_link_aggregation_group_module.rst @@ -1,9 +1,9 @@ -.. _community.aws.aws_direct_connect_link_aggregation_group_module: +.. _community.aws.directconnect_link_aggregation_group_module: -******************************************************* -community.aws.aws_direct_connect_link_aggregation_group -******************************************************* +************************************************** +community.aws.directconnect_link_aggregation_group +************************************************** **Manage Direct Connect LAG bundles** @@ -431,7 +431,7 @@ Examples .. code-block:: yaml # create a Direct Connect connection - - community.aws.aws_direct_connect_link_aggregation_group: + - community.aws.directconnect_link_aggregation_group: state: present location: EqDC2 lag_id: dxlag-xxxxxxxx diff --git a/docs/community.aws.aws_direct_connect_virtual_interface_module.rst b/docs/community.aws.directconnect_virtual_interface_module.rst similarity index 99% rename from docs/community.aws.aws_direct_connect_virtual_interface_module.rst rename to docs/community.aws.directconnect_virtual_interface_module.rst index 9021131ec35..821794a9794 100644 --- a/docs/community.aws.aws_direct_connect_virtual_interface_module.rst +++ b/docs/community.aws.directconnect_virtual_interface_module.rst @@ -1,9 +1,9 @@ -.. _community.aws.aws_direct_connect_virtual_interface_module: +.. _community.aws.directconnect_virtual_interface_module: -************************************************** -community.aws.aws_direct_connect_virtual_interface -************************************************** +********************************************* +community.aws.directconnect_virtual_interface +********************************************* **Manage Direct Connect virtual interfaces** @@ -458,14 +458,14 @@ Examples --- - name: create an association between a LAG and connection - community.aws.aws_direct_connect_virtual_interface: + community.aws.directconnect_virtual_interface: state: present name: "{{ name }}" link_aggregation_group_id: LAG-XXXXXXXX connection_id: dxcon-XXXXXXXX - name: remove an association between a connection and virtual interface - community.aws.aws_direct_connect_virtual_interface: + community.aws.directconnect_virtual_interface: state: absent connection_id: dxcon-XXXXXXXX virtual_interface_id: dxv-XXXXXXXX diff --git a/meta/runtime.yml b/meta/runtime.yml index b0de597b408..77a8982a3b9 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -66,6 +66,11 @@ action_groups: - cloudwatchlogs_log_group_info - cloudwatchlogs_log_group_metric_filter - data_pipeline + - directconnect_confirm_connection + - directconnect_connection + - directconnect_gateway + - directconnect_link_aggregation_group + - directconnect_virtual_interface - dms_endpoint - dms_replication_subnet_group - dynamodb_table @@ -235,6 +240,21 @@ plugin_routing: aws_batch_job_queue: # Deprecation for this alias should not *start* prior to 2024-09-01 redirect: community.aws.batch_job_queue + aws_direct_connect_confirm_connection: + # Deprecation for this alias should not *start* prior to 2024-09-01 + redirect: community.aws.directconnect_confirm_connection + aws_direct_connect_connection: + # Deprecation for this alias should not *start* prior to 2024-09-01 + redirect: community.aws.directconnect_connection + aws_direct_connect_gateway: + # Deprecation for this alias should not *start* prior to 2024-09-01 + redirect: community.aws.directconnect_gateway + aws_direct_connect_link_aggregation_group: + # Deprecation for this alias should not *start* prior to 2024-09-01 + redirect: community.aws.directconnect_link_aggregation_group + aws_direct_connect_virtual_interface: + # Deprecation for this alias should not *start* prior to 2024-09-01 + redirect: community.aws.directconnect_virtual_interface aws_eks_cluster: # Deprecation for this alias should not *start* prior to 2024-09-01 redirect: community.aws.eks_cluster diff --git a/plugins/modules/aws_direct_connect_confirm_connection.py b/plugins/modules/directconnect_confirm_connection.py similarity index 93% rename from plugins/modules/aws_direct_connect_confirm_connection.py rename to plugins/modules/directconnect_confirm_connection.py index b583def09d9..57934f3a332 100644 --- a/plugins/modules/aws_direct_connect_confirm_connection.py +++ b/plugins/modules/directconnect_confirm_connection.py @@ -11,16 +11,17 @@ DOCUMENTATION = ''' --- -module: aws_direct_connect_confirm_connection -short_description: Confirms the creation of a hosted DirectConnect connection. +module: directconnect_confirm_connection +short_description: Confirms the creation of a hosted DirectConnect connection description: - Confirms the creation of a hosted DirectConnect, which requires approval before it can be used. - - DirectConnect connections that require approval would be in the 'ordering'. - - After confirmation, they will move to the 'pending' state and finally the 'available' state. -author: "Matt Traynham (@mtraynham)" + - DirectConnect connections that require approval would be in the C(ordering). + - After confirmation, they will move to the C(pending) state and finally the C(available) state. +author: + - "Matt Traynham (@mtraynham)" extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 + - amazon.aws.aws + - amazon.aws.ec2 options: name: description: @@ -38,12 +39,12 @@ # confirm a Direct Connect by name - name: confirm the connection id - aws_direct_connect_confirm_connection: + community.aws.directconnect_confirm_connection: name: my_host_direct_connect # confirm a Direct Connect by connection_id - name: confirm the connection id - aws_direct_connect_confirm_connection: + community.aws.directconnect_confirm_connection: connection_id: dxcon-xxxxxxxx ''' diff --git a/plugins/modules/aws_direct_connect_connection.py b/plugins/modules/directconnect_connection.py similarity index 96% rename from plugins/modules/aws_direct_connect_connection.py rename to plugins/modules/directconnect_connection.py index 3764b1c7802..20ab393fd75 100644 --- a/plugins/modules/aws_direct_connect_connection.py +++ b/plugins/modules/directconnect_connection.py @@ -8,17 +8,18 @@ DOCUMENTATION = ''' --- -module: aws_direct_connect_connection +module: directconnect_connection version_added: 1.0.0 short_description: Creates, deletes, modifies a DirectConnect connection description: - Create, update, or delete a Direct Connect connection between a network and a specific AWS Direct Connect location. - Upon creation the connection may be added to a link aggregation group or established as a standalone connection. - The connection may later be associated or disassociated with a link aggregation group. -author: "Sloane Hertel (@s-hertel)" + - Upon creation the connection may be added to a link aggregation group or established as a standalone connection. + - The connection may later be associated or disassociated with a link aggregation group. +author: + - "Sloane Hertel (@s-hertel)" extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 + - amazon.aws.aws + - amazon.aws.ec2 options: state: description: @@ -69,7 +70,7 @@ EXAMPLES = """ # create a Direct Connect connection -- community.aws.aws_direct_connect_connection: +- community.aws.directconnect_connection: name: ansible-test-connection state: present location: EqDC2 @@ -78,14 +79,14 @@ register: dc # disassociate the LAG from the connection -- community.aws.aws_direct_connect_connection: +- community.aws.directconnect_connection: state: present connection_id: dc.connection.connection_id location: EqDC2 bandwidth: 1Gbps # replace the connection with one with more bandwidth -- community.aws.aws_direct_connect_connection: +- community.aws.directconnect_connection: state: present name: ansible-test-connection location: EqDC2 @@ -93,7 +94,7 @@ forced_update: true # delete the connection -- community.aws.aws_direct_connect_connection: +- community.aws.directconnect_connection: state: absent name: ansible-test-connection """ diff --git a/plugins/modules/aws_direct_connect_gateway.py b/plugins/modules/directconnect_gateway.py similarity index 98% rename from plugins/modules/aws_direct_connect_gateway.py rename to plugins/modules/directconnect_gateway.py index 54c336fffbe..bdf388675f6 100644 --- a/plugins/modules/aws_direct_connect_gateway.py +++ b/plugins/modules/directconnect_gateway.py @@ -7,8 +7,9 @@ DOCUMENTATION = ''' -module: aws_direct_connect_gateway -author: Gobin Sougrakpam (@gobins) +module: directconnect_gateway +author: + - Gobin Sougrakpam (@gobins) version_added: 1.0.0 short_description: Manage AWS Direct Connect gateway description: @@ -17,8 +18,8 @@ - Attaches Virtual Gateways to Direct Connect Gateway. - Detaches Virtual Gateways to Direct Connect Gateway. extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 + - amazon.aws.aws + - amazon.aws.ec2 options: state: description: @@ -54,7 +55,7 @@ EXAMPLES = ''' - name: Create a new direct connect gateway attached to virtual private gateway - community.aws.aws_direct_connect_gateway: + community.aws.directconnect_gateway: state: present name: my-dx-gateway amazon_asn: 7224 @@ -62,12 +63,11 @@ register: created_dxgw - name: Create a new unattached dxgw - community.aws.aws_direct_connect_gateway: + community.aws.directconnect_gateway: state: present name: my-dx-gateway amazon_asn: 7224 register: created_dxgw - ''' RETURN = ''' diff --git a/plugins/modules/aws_direct_connect_link_aggregation_group.py b/plugins/modules/directconnect_link_aggregation_group.py similarity index 99% rename from plugins/modules/aws_direct_connect_link_aggregation_group.py rename to plugins/modules/directconnect_link_aggregation_group.py index 0567ba90288..77ff74de6d5 100644 --- a/plugins/modules/aws_direct_connect_link_aggregation_group.py +++ b/plugins/modules/directconnect_link_aggregation_group.py @@ -8,15 +8,16 @@ DOCUMENTATION = ''' --- -module: aws_direct_connect_link_aggregation_group +module: directconnect_link_aggregation_group version_added: 1.0.0 short_description: Manage Direct Connect LAG bundles description: - Create, delete, or modify a Direct Connect link aggregation group. -author: "Sloane Hertel (@s-hertel)" +author: + - "Sloane Hertel (@s-hertel)" extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 + - amazon.aws.aws + - amazon.aws.ec2 options: state: description: @@ -82,12 +83,11 @@ EXAMPLES = """ # create a Direct Connect connection -- community.aws.aws_direct_connect_link_aggregation_group: +- community.aws.directconnect_link_aggregation_group: state: present location: EqDC2 lag_id: dxlag-xxxxxxxx bandwidth: 1Gbps - """ RETURN = """ diff --git a/plugins/modules/aws_direct_connect_virtual_interface.py b/plugins/modules/directconnect_virtual_interface.py similarity index 98% rename from plugins/modules/aws_direct_connect_virtual_interface.py rename to plugins/modules/directconnect_virtual_interface.py index f0c1b7f7800..8cd5fd70f55 100644 --- a/plugins/modules/aws_direct_connect_virtual_interface.py +++ b/plugins/modules/directconnect_virtual_interface.py @@ -8,12 +8,13 @@ DOCUMENTATION = r''' --- -module: aws_direct_connect_virtual_interface +module: directconnect_virtual_interface version_added: 1.0.0 short_description: Manage Direct Connect virtual interfaces description: - Create, delete, or modify a Direct Connect public or private virtual interface. -author: "Sloane Hertel (@s-hertel)" +author: + - "Sloane Hertel (@s-hertel)" options: state: description: @@ -83,9 +84,8 @@ - The virtual interface ID. type: str extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 - + - amazon.aws.aws + - amazon.aws.ec2 ''' RETURN = r''' @@ -230,14 +230,14 @@ EXAMPLES = r''' --- - name: create an association between a LAG and connection - community.aws.aws_direct_connect_virtual_interface: + community.aws.directconnect_virtual_interface: state: present name: "{{ name }}" link_aggregation_group_id: LAG-XXXXXXXX connection_id: dxcon-XXXXXXXX - name: remove an association between a connection and virtual interface - community.aws.aws_direct_connect_virtual_interface: + community.aws.directconnect_virtual_interface: state: absent connection_id: dxcon-XXXXXXXX virtual_interface_id: dxv-XXXXXXXX diff --git a/tests/integration/targets/legacy_missing_tests/aliases b/tests/integration/targets/legacy_missing_tests/aliases index 9c04811ee54..061eecb8cb7 100644 --- a/tests/integration/targets/legacy_missing_tests/aliases +++ b/tests/integration/targets/legacy_missing_tests/aliases @@ -5,17 +5,17 @@ aws_application_scaling_policy aws_batch_compute_environment aws_batch_job_definition aws_batch_job_queue -aws_direct_connect_confirm_connection -aws_direct_connect_connection -aws_direct_connect_gateway -aws_direct_connect_link_aggregation_group -aws_direct_connect_virtual_interface aws_sgw_info cloudfront_info cloudfront_invalidation cloudfront_origin_access_identity cloudwatchevent_rule data_pipeline +directconnect_confirm_connection +directconnect_connection +directconnect_gateway +directconnect_link_aggregation_group +directconnect_virtual_interface dynamodb_ttl ec2_ami_copy ec2_asg_lifecycle_hook diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_connection/__init__.py b/tests/unit/plugins/modules/placebo_recordings/directconnect_connection/__init__.py similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_connection/__init__.py rename to tests/unit/plugins/modules/placebo_recordings/directconnect_connection/__init__.py diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_connection/associations_are_not_updated/directconnect.DescribeConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_connection/associations_are_not_updated/directconnect.DescribeConnections_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_connection/associations_are_not_updated/directconnect.DescribeConnections_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_connection/associations_are_not_updated/directconnect.DescribeConnections_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_connection/changed_properties/directconnect.DescribeConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_connection/changed_properties/directconnect.DescribeConnections_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_connection/changed_properties/directconnect.DescribeConnections_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_connection/changed_properties/directconnect.DescribeConnections_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_connection/connection_does_not_exist/directconnect.DescribeConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_connection/connection_does_not_exist/directconnect.DescribeConnections_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_connection/connection_does_not_exist/directconnect.DescribeConnections_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_connection/connection_does_not_exist/directconnect.DescribeConnections_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_connection/connection_exists_by_id/directconnect.DescribeConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_connection/connection_exists_by_id/directconnect.DescribeConnections_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_connection/connection_exists_by_id/directconnect.DescribeConnections_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_connection/connection_exists_by_id/directconnect.DescribeConnections_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_connection/connection_exists_by_name/directconnect.DescribeConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_connection/connection_exists_by_name/directconnect.DescribeConnections_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_connection/connection_exists_by_name/directconnect.DescribeConnections_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_connection/connection_exists_by_name/directconnect.DescribeConnections_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_connection/connection_status/directconnect.DescribeConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_connection/connection_status/directconnect.DescribeConnections_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_connection/connection_status/directconnect.DescribeConnections_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_connection/connection_status/directconnect.DescribeConnections_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_connection/create_and_delete/directconnect.CreateConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_connection/create_and_delete/directconnect.CreateConnection_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_connection/create_and_delete/directconnect.CreateConnection_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_connection/create_and_delete/directconnect.CreateConnection_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_connection/create_and_delete/directconnect.DeleteConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_connection/create_and_delete/directconnect.DeleteConnection_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_connection/create_and_delete/directconnect.DeleteConnection_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_connection/create_and_delete/directconnect.DeleteConnection_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/__init__.py b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/__init__.py similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/__init__.py rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/__init__.py diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DeleteConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections/directconnect.DeleteConnection_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DeleteConnection_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections/directconnect.DeleteConnection_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DeleteLag_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections/directconnect.DeleteLag_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DeleteLag_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections/directconnect.DeleteLag_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeLags_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeLags_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeLags_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeLags_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeLags_2.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeLags_2.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeLags_2.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeLags_2.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeLags_3.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeLags_3.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeLags_3.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeLags_3.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeVirtualInterfaces_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeVirtualInterfaces_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeVirtualInterfaces_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeVirtualInterfaces_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DisassociateConnectionFromLag_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections/directconnect.DisassociateConnectionFromLag_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DisassociateConnectionFromLag_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections/directconnect.DisassociateConnectionFromLag_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.UpdateLag_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections/directconnect.UpdateLag_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.UpdateLag_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections/directconnect.UpdateLag_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeLags_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeLags_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeLags_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeLags_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeLags_2.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeLags_2.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeLags_2.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeLags_2.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeLags_3.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeLags_3.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeLags_3.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeLags_3.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeVirtualInterfaces_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeVirtualInterfaces_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeVirtualInterfaces_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeVirtualInterfaces_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_nonexistent_lag/directconnect.DescribeLags_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_nonexistent_lag/directconnect.DescribeLags_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_nonexistent_lag/directconnect.DescribeLags_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/delete_nonexistent_lag/directconnect.DescribeLags_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_changed_true/directconnect.DescribeLags_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/lag_changed_true/directconnect.DescribeLags_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_changed_true/directconnect.DescribeLags_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/lag_changed_true/directconnect.DescribeLags_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_changed_true_no/directconnect.DescribeLags_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/lag_changed_true_no/directconnect.DescribeLags_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_changed_true_no/directconnect.DescribeLags_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/lag_changed_true_no/directconnect.DescribeLags_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_exists/directconnect.DescribeLags_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/lag_exists/directconnect.DescribeLags_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_exists/directconnect.DescribeLags_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/lag_exists/directconnect.DescribeLags_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_exists_using_name/directconnect.DescribeLags_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/lag_exists_using_name/directconnect.DescribeLags_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_exists_using_name/directconnect.DescribeLags_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/lag_exists_using_name/directconnect.DescribeLags_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_status/directconnect.DescribeLags_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/lag_status/directconnect.DescribeLags_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_status/directconnect.DescribeLags_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/lag_status/directconnect.DescribeLags_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/nonexistent_lag_does_not_exist/directconnect.DescribeLags_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/nonexistent_lag_does_not_exist/directconnect.DescribeLags_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/nonexistent_lag_does_not_exist/directconnect.DescribeLags_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/nonexistent_lag_does_not_exist/directconnect.DescribeLags_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/nonexistent_lag_status/directconnect.DescribeLags_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/nonexistent_lag_status/directconnect.DescribeLags_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/nonexistent_lag_status/directconnect.DescribeLags_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/nonexistent_lag_status/directconnect.DescribeLags_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/update_lag/directconnect.DescribeLags_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/update_lag/directconnect.DescribeLags_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/update_lag/directconnect.DescribeLags_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/update_lag/directconnect.DescribeLags_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/update_lag/directconnect.DescribeLags_2.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/update_lag/directconnect.DescribeLags_2.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/update_lag/directconnect.DescribeLags_2.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/update_lag/directconnect.DescribeLags_2.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/update_lag/directconnect.UpdateLag_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/update_lag/directconnect.UpdateLag_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/update_lag/directconnect.UpdateLag_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_link_aggregation_group/update_lag/directconnect.UpdateLag_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_private_vi/directconnect.CreatePrivateVirtualInterface_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/create_private_vi/directconnect.CreatePrivateVirtualInterface_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_private_vi/directconnect.CreatePrivateVirtualInterface_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/create_private_vi/directconnect.CreatePrivateVirtualInterface_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_private_vi/directconnect.DescribeVirtualInterfaces_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/create_private_vi/directconnect.DescribeVirtualInterfaces_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_private_vi/directconnect.DescribeVirtualInterfaces_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/create_private_vi/directconnect.DescribeVirtualInterfaces_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_private_vi/directconnect.DescribeVirtualInterfaces_2.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/create_private_vi/directconnect.DescribeVirtualInterfaces_2.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_private_vi/directconnect.DescribeVirtualInterfaces_2.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/create_private_vi/directconnect.DescribeVirtualInterfaces_2.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_private_vi/directconnect.DescribeVirtualInterfaces_3.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/create_private_vi/directconnect.DescribeVirtualInterfaces_3.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_private_vi/directconnect.DescribeVirtualInterfaces_3.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/create_private_vi/directconnect.DescribeVirtualInterfaces_3.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_public_vi/directconnect.CreatePublicVirtualInterface_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/create_public_vi/directconnect.CreatePublicVirtualInterface_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_public_vi/directconnect.CreatePublicVirtualInterface_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/create_public_vi/directconnect.CreatePublicVirtualInterface_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_public_vi/directconnect.DescribeVirtualInterfaces_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/create_public_vi/directconnect.DescribeVirtualInterfaces_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_public_vi/directconnect.DescribeVirtualInterfaces_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/create_public_vi/directconnect.DescribeVirtualInterfaces_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_public_vi/directconnect.DescribeVirtualInterfaces_2.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/create_public_vi/directconnect.DescribeVirtualInterfaces_2.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_public_vi/directconnect.DescribeVirtualInterfaces_2.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/create_public_vi/directconnect.DescribeVirtualInterfaces_2.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_public_vi/directconnect.DescribeVirtualInterfaces_3.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/create_public_vi/directconnect.DescribeVirtualInterfaces_3.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_public_vi/directconnect.DescribeVirtualInterfaces_3.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/create_public_vi/directconnect.DescribeVirtualInterfaces_3.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/delete_vi/directconnect.DeleteVirtualInterface_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/delete_vi/directconnect.DeleteVirtualInterface_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/delete_vi/directconnect.DeleteVirtualInterface_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/delete_vi/directconnect.DeleteVirtualInterface_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/delete_vi/directconnect.DescribeVirtualInterfaces_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/delete_vi/directconnect.DescribeVirtualInterfaces_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/delete_vi/directconnect.DescribeVirtualInterfaces_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/delete_vi/directconnect.DescribeVirtualInterfaces_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_by_connection_id/directconnect.DescribeVirtualInterfaces_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/find_unique_vi_by_connection_id/directconnect.DescribeVirtualInterfaces_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_by_connection_id/directconnect.DescribeVirtualInterfaces_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/find_unique_vi_by_connection_id/directconnect.DescribeVirtualInterfaces_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_by_name/directconnect.DescribeVirtualInterfaces_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/find_unique_vi_by_name/directconnect.DescribeVirtualInterfaces_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_by_name/directconnect.DescribeVirtualInterfaces_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/find_unique_vi_by_name/directconnect.DescribeVirtualInterfaces_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_by_vi_id/directconnect.DescribeVirtualInterfaces_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/find_unique_vi_by_vi_id/directconnect.DescribeVirtualInterfaces_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_by_vi_id/directconnect.DescribeVirtualInterfaces_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/find_unique_vi_by_vi_id/directconnect.DescribeVirtualInterfaces_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_returns_missing_for_vi_id/directconnect.DescribeVirtualInterfaces_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/find_unique_vi_returns_missing_for_vi_id/directconnect.DescribeVirtualInterfaces_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_returns_missing_for_vi_id/directconnect.DescribeVirtualInterfaces_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/find_unique_vi_returns_missing_for_vi_id/directconnect.DescribeVirtualInterfaces_1.json diff --git a/tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_returns_multiple/directconnect.DescribeVirtualInterfaces_1.json b/tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/find_unique_vi_returns_multiple/directconnect.DescribeVirtualInterfaces_1.json similarity index 100% rename from tests/unit/plugins/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_returns_multiple/directconnect.DescribeVirtualInterfaces_1.json rename to tests/unit/plugins/modules/placebo_recordings/directconnect_virtual_interface/find_unique_vi_returns_multiple/directconnect.DescribeVirtualInterfaces_1.json diff --git a/tests/unit/plugins/modules/test_aws_direct_connect_confirm_connection.py b/tests/unit/plugins/modules/test_directconnect_confirm_connection.py similarity index 89% rename from tests/unit/plugins/modules/test_aws_direct_connect_confirm_connection.py rename to tests/unit/plugins/modules/test_directconnect_confirm_connection.py index 17bd5c7e45d..5478e9c05f8 100644 --- a/tests/unit/plugins/modules/test_aws_direct_connect_confirm_connection.py +++ b/tests/unit/plugins/modules/test_directconnect_confirm_connection.py @@ -8,7 +8,7 @@ except ImportError: pass -from ansible_collections.amazon.aws.plugins.module_utils.ec2 import HAS_BOTO3 +from ansible_collections.amazon.aws.plugins.module_utils.botocore import HAS_BOTO3 from ansible_collections.community.aws.tests.unit.compat.mock import call from ansible_collections.community.aws.tests.unit.compat.mock import patch from ansible_collections.community.aws.tests.unit.plugins.modules.utils import AnsibleExitJson @@ -16,19 +16,19 @@ from ansible_collections.community.aws.tests.unit.plugins.modules.utils import ModuleTestCase from ansible_collections.community.aws.tests.unit.plugins.modules.utils import set_module_args -from ansible_collections.community.aws.plugins.modules import aws_direct_connect_confirm_connection +from ansible_collections.community.aws.plugins.modules import directconnect_confirm_connection if not HAS_BOTO3: - pytestmark = pytest.mark.skip("test_aws_direct_connect_confirm_connection.py requires the `boto3` and `botocore` modules") + pytestmark = pytest.mark.skip("test_directconnect_confirm_connection.py requires the `boto3` and `botocore` modules") @patch('ansible_collections.amazon.aws.plugins.module_utils.core.HAS_BOTO3', new=True) -@patch.object(aws_direct_connect_confirm_connection.AnsibleAWSModule, "client") +@patch.object(directconnect_confirm_connection.AnsibleAWSModule, "client") class TestAWSDirectConnectConfirmConnection(ModuleTestCase): def test_missing_required_parameters(self, *args): set_module_args({}) with self.assertRaises(AnsibleFailJson) as exec_info: - aws_direct_connect_confirm_connection.main() + directconnect_confirm_connection.main() result = exec_info.exception.args[0] assert result["failed"] is True @@ -53,7 +53,7 @@ def test_get_by_connection_id(self, mock_client): "connection_id": "dxcon-fgq9rgot" }) with self.assertRaises(AnsibleExitJson) as exec_info: - aws_direct_connect_confirm_connection.main() + directconnect_confirm_connection.main() result = exec_info.exception.args[0] assert result["changed"] is False @@ -81,7 +81,7 @@ def test_get_by_name(self, mock_client): "name": "ansible-test-connection" }) with self.assertRaises(AnsibleExitJson) as exec_info: - aws_direct_connect_confirm_connection.main() + directconnect_confirm_connection.main() result = exec_info.exception.args[0] assert result["changed"] is False @@ -99,7 +99,7 @@ def test_missing_connection_id(self, mock_client): "connection_id": "dxcon-aaaabbbb" }) with self.assertRaises(AnsibleFailJson) as exec_info: - aws_direct_connect_confirm_connection.main() + directconnect_confirm_connection.main() result = exec_info.exception.args[0] assert result["failed"] is True @@ -125,7 +125,7 @@ def test_missing_name(self, mock_client): "name": "foobar" }) with self.assertRaises(AnsibleFailJson) as exec_info: - aws_direct_connect_confirm_connection.main() + directconnect_confirm_connection.main() result = exec_info.exception.args[0] assert result["failed"] is True @@ -152,7 +152,7 @@ def test_confirm(self, mock_client): "connection_id": "dxcon-fgq9rgot" }) with self.assertRaises(AnsibleExitJson) as exec_info: - aws_direct_connect_confirm_connection.main() + directconnect_confirm_connection.main() result = exec_info.exception.args[0] assert result["changed"] is True diff --git a/tests/unit/plugins/modules/test_aws_direct_connect_connection.py b/tests/unit/plugins/modules/test_directconnect_connection.py similarity index 57% rename from tests/unit/plugins/modules/test_aws_direct_connect_connection.py rename to tests/unit/plugins/modules/test_directconnect_connection.py index fe0febdfc69..49c70f3cf0b 100644 --- a/tests/unit/plugins/modules/test_aws_direct_connect_connection.py +++ b/tests/unit/plugins/modules/test_directconnect_connection.py @@ -7,25 +7,17 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type +import pytest + +from ansible_collections.amazon.aws.plugins.module_utils.botocore import HAS_BOTO3 # Magic... Incorrectly identified by pylint as unused from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import maybe_sleep # pylint: disable=unused-import from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify # pylint: disable=unused-import -from ansible_collections.community.aws.plugins.modules import aws_direct_connect_connection - - -class FakeModule(object): - def __init__(self, **kwargs): - self.params = kwargs - - def fail_json(self, *args, **kwargs): - self.exit_args = args - self.exit_kwargs = kwargs - raise Exception('FAIL') +from ansible_collections.community.aws.plugins.modules import directconnect_connection - def exit_json(self, *args, **kwargs): - self.exit_args = args - self.exit_kwargs = kwargs +if not HAS_BOTO3: + pytestmark = pytest.mark.skip("test_directconnect_confirm_connection.py requires the `boto3` and `botocore` modules") # When rerecording these tests, create a stand alone connection with default values in us-west-2 @@ -36,42 +28,42 @@ def exit_json(self, *args, **kwargs): def test_connection_status(placeboify, maybe_sleep): client = placeboify.client('directconnect') - status = aws_direct_connect_connection.connection_status(client, connection_id)['connection'] + status = directconnect_connection.connection_status(client, connection_id)['connection'] assert status['connectionName'] == connection_name assert status['connectionId'] == connection_id def test_connection_exists_by_id(placeboify, maybe_sleep): client = placeboify.client('directconnect') - exists = aws_direct_connect_connection.connection_exists(client, connection_id) + exists = directconnect_connection.connection_exists(client, connection_id) assert exists == connection_id def test_connection_exists_by_name(placeboify, maybe_sleep): client = placeboify.client('directconnect') - exists = aws_direct_connect_connection.connection_exists(client, None, connection_name) + exists = directconnect_connection.connection_exists(client, None, connection_name) assert exists == connection_id def test_connection_does_not_exist(placeboify, maybe_sleep): client = placeboify.client('directconnect') - exists = aws_direct_connect_connection.connection_exists(client, 'dxcon-notthere') + exists = directconnect_connection.connection_exists(client, 'dxcon-notthere') assert exists is False def test_changed_properties(placeboify, maybe_sleep): client = placeboify.client('directconnect') - status = aws_direct_connect_connection.connection_status(client, connection_id)['connection'] + status = directconnect_connection.connection_status(client, connection_id)['connection'] location = "differentlocation" bandwidth = status['bandwidth'] - assert aws_direct_connect_connection.changed_properties(status, location, bandwidth) is True + assert directconnect_connection.changed_properties(status, location, bandwidth) is True def test_associations_are_not_updated(placeboify, maybe_sleep): client = placeboify.client('directconnect') - status = aws_direct_connect_connection.connection_status(client, connection_id)['connection'] + status = directconnect_connection.connection_status(client, connection_id)['connection'] lag_id = status.get('lagId') - assert aws_direct_connect_connection.update_associations(client, status, connection_id, lag_id) is False + assert directconnect_connection.update_associations(client, status, connection_id, lag_id) is False def test_create_and_delete(placeboify, maybe_sleep): @@ -81,15 +73,15 @@ def test_create_and_delete(placeboify, maybe_sleep): def verify_create_works(placeboify, maybe_sleep, client): - created = aws_direct_connect_connection.create_connection(client=client, - location="EqSE2", - bandwidth="1Gbps", - name="ansible-test-2", - lag_id=None) + created = directconnect_connection.create_connection(client=client, + location="EqSE2", + bandwidth="1Gbps", + name="ansible-test-2", + lag_id=None) assert created.startswith('dxcon') return created def verify_delete_works(placeboify, maybe_sleep, client, conn_id): - changed = aws_direct_connect_connection.ensure_absent(client, conn_id) + changed = directconnect_connection.ensure_absent(client, conn_id) assert changed is True diff --git a/tests/unit/plugins/modules/test_aws_direct_connect_link_aggregation_group.py b/tests/unit/plugins/modules/test_directconnect_link_aggregation_group.py similarity index 95% rename from tests/unit/plugins/modules/test_aws_direct_connect_link_aggregation_group.py rename to tests/unit/plugins/modules/test_directconnect_link_aggregation_group.py index 8bce744421b..90c8d9604b6 100644 --- a/tests/unit/plugins/modules/test_aws_direct_connect_link_aggregation_group.py +++ b/tests/unit/plugins/modules/test_directconnect_link_aggregation_group.py @@ -15,10 +15,14 @@ from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import maybe_sleep # pylint: disable=unused-import from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify # pylint: disable=unused-import +from ansible_collections.amazon.aws.plugins.module_utils.botocore import HAS_BOTO3 from ansible_collections.amazon.aws.plugins.module_utils.ec2 import boto3_conn from ansible_collections.amazon.aws.plugins.module_utils.ec2 import get_aws_connection_info -from ansible_collections.community.aws.plugins.modules import aws_direct_connect_link_aggregation_group as lag_module +from ansible_collections.community.aws.plugins.modules import directconnect_link_aggregation_group as lag_module + +if not HAS_BOTO3: + pytestmark = pytest.mark.skip("test_directconnect_confirm_connection.py requires the `boto3` and `botocore` modules") @pytest.fixture(scope="module") diff --git a/tests/unit/plugins/modules/test_aws_direct_connect_virtual_interface.py b/tests/unit/plugins/modules/test_directconnect_virtual_interface.py similarity index 84% rename from tests/unit/plugins/modules/test_aws_direct_connect_virtual_interface.py rename to tests/unit/plugins/modules/test_directconnect_virtual_interface.py index a0a715acc0b..1383c9a8e69 100644 --- a/tests/unit/plugins/modules/test_aws_direct_connect_virtual_interface.py +++ b/tests/unit/plugins/modules/test_directconnect_virtual_interface.py @@ -7,11 +7,17 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type +import pytest + +from ansible_collections.amazon.aws.plugins.module_utils.botocore import HAS_BOTO3 # Magic... Incorrectly identified by pylint as unused from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import maybe_sleep # pylint: disable=unused-import from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify # pylint: disable=unused-import -from ansible_collections.community.aws.plugins.modules import aws_direct_connect_virtual_interface +from ansible_collections.community.aws.plugins.modules import directconnect_virtual_interface + +if not HAS_BOTO3: + pytestmark = pytest.mark.skip("test_directconnect_confirm_connection.py requires the `boto3` and `botocore` modules") class FakeModule(object): @@ -30,22 +36,22 @@ def exit_json(self, *args, **kwargs): def test_find_unique_vi_by_connection_id(placeboify, maybe_sleep): client = placeboify.client("directconnect") - vi_id = aws_direct_connect_virtual_interface.find_unique_vi(client, "dxcon-aaaaaaaa", None, None) + vi_id = directconnect_virtual_interface.find_unique_vi(client, "dxcon-aaaaaaaa", None, None) assert vi_id == "dxvif-aaaaaaaa" def test_find_unique_vi_by_vi_id(placeboify, maybe_sleep): client = placeboify.client("directconnect") - vi_id = aws_direct_connect_virtual_interface.find_unique_vi(client, - None, - "dxvif-aaaaaaaaa", - None) + vi_id = directconnect_virtual_interface.find_unique_vi(client, + None, + "dxvif-aaaaaaaaa", + None) assert vi_id == "dxvif-aaaaaaaa" def test_find_unique_vi_by_name(placeboify, maybe_sleep): client = placeboify.client("directconnect") - vi_id = aws_direct_connect_virtual_interface.find_unique_vi(client, None, None, "aaaaaaaa") + vi_id = directconnect_virtual_interface.find_unique_vi(client, None, None, "aaaaaaaa") assert vi_id == "dxvif-aaaaaaaa" @@ -56,7 +62,7 @@ def test_find_unique_vi_returns_multiple(placeboify, maybe_sleep): public=False, name=None) try: - aws_direct_connect_virtual_interface.ensure_state( + directconnect_virtual_interface.ensure_state( client, module ) @@ -72,7 +78,7 @@ def test_find_unique_vi_returns_missing_for_vi_id(placeboify, maybe_sleep): name=None, virtual_interface_id="dxvif-aaaaaaaa") try: - aws_direct_connect_virtual_interface.ensure_state( + directconnect_virtual_interface.ensure_state( client, module ) @@ -94,7 +100,7 @@ def test_construct_public_vi(): cidr=["10.88.0.0/30"], virtual_gateway_id="xxxx", direct_connect_gateway_id="yyyy") - vi = aws_direct_connect_virtual_interface.assemble_params_for_creating_vi(module.params) + vi = directconnect_virtual_interface.assemble_params_for_creating_vi(module.params) assert vi == { "virtualInterfaceName": "aaaaaaaa", "vlan": 1, @@ -121,7 +127,7 @@ def test_construct_private_vi_with_virtual_gateway_id(): cidr=["10.88.0.0/30"], virtual_gateway_id="xxxx", direct_connect_gateway_id="yyyy") - vi = aws_direct_connect_virtual_interface.assemble_params_for_creating_vi(module.params) + vi = directconnect_virtual_interface.assemble_params_for_creating_vi(module.params) assert vi == { "virtualInterfaceName": "aaaaaaaa", "vlan": 1, @@ -148,7 +154,7 @@ def test_construct_private_vi_with_direct_connect_gateway_id(): cidr=["10.88.0.0/30"], virtual_gateway_id=None, direct_connect_gateway_id="yyyy") - vi = aws_direct_connect_virtual_interface.assemble_params_for_creating_vi(module.params) + vi = directconnect_virtual_interface.assemble_params_for_creating_vi(module.params) print(vi) assert vi == { "virtualInterfaceName": "aaaaaaaa", @@ -178,7 +184,7 @@ def test_create_public_vi(placeboify, maybe_sleep): cidr=["10.88.0.0/30"], virtual_gateway_id="xxxx", direct_connect_gateway_id="yyyy") - changed, latest_state = aws_direct_connect_virtual_interface.ensure_state(client, module) + changed, latest_state = directconnect_virtual_interface.ensure_state(client, module) assert changed is True assert latest_state is not None @@ -199,7 +205,7 @@ def test_create_private_vi(placeboify, maybe_sleep): cidr=["10.88.0.0/30"], virtual_gateway_id="xxxx", direct_connect_gateway_id="yyyy") - changed, latest_state = aws_direct_connect_virtual_interface.ensure_state(client, module) + changed, latest_state = directconnect_virtual_interface.ensure_state(client, module) assert changed is True assert latest_state is not None @@ -220,6 +226,6 @@ def test_delete_vi(placeboify, maybe_sleep): cidr=["10.88.0.0/30"], virtual_gateway_id=None, direct_connect_gateway_id="yyyy") - changed, latest_state = aws_direct_connect_virtual_interface.ensure_state(client, module) + changed, latest_state = directconnect_virtual_interface.ensure_state(client, module) assert changed is True assert latest_state == {}