Skip to content

Commit

Permalink
Update FQCN integration tests
Browse files Browse the repository at this point in the history
Signed-off-by: Alina Buzachis <[email protected]>
  • Loading branch information
alinabuzachis committed Oct 21, 2024
1 parent 8f6f1ba commit a53fb57
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 116 deletions.
3 changes: 1 addition & 2 deletions plugins/module_utils/transitgateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@
from ansible_collections.amazon.aws.plugins.module_utils.ec2 import describe_transit_gateway_vpc_attachments
from ansible_collections.amazon.aws.plugins.module_utils.ec2 import ensure_ec2_tags
from ansible_collections.amazon.aws.plugins.module_utils.ec2 import modify_transit_gateway_vpc_attachment
from ansible_collections.amazon.aws.plugins.module_utils.modules import AnsibleAWSModule
from ansible_collections.amazon.aws.plugins.module_utils.tagging import boto3_tag_list_to_ansible_dict
from ansible_collections.amazon.aws.plugins.module_utils.tagging import boto3_tag_specifications
from ansible_collections.amazon.aws.plugins.module_utils.transformation import ansible_dict_to_boto3_filter_list
from ansible_collections.amazon.aws.plugins.module_utils.transformation import boto3_resource_to_ansible_dict
from ansible_collections.amazon.aws.plugins.module_utils.waiters import get_waiter

from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule


def get_states() -> List[str]:
return [
Expand Down
9 changes: 4 additions & 5 deletions plugins/modules/ec2_transit_gateway_vpc_attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,10 @@

from ansible_collections.amazon.aws.plugins.module_utils.modules import AnsibleAWSModule
from ansible_collections.amazon.aws.plugins.module_utils.transformation import boto3_resource_to_ansible_dict

from ansible_collections.community.aws.plugins.module_utils.transitgateway import TransitGatewayVpcAttachmentManager
from ansible_collections.community.aws.plugins.module_utils.transitgateway import find_existing_attachment
from ansible_collections.community.aws.plugins.module_utils.transitgateway import get_states
from ansible_collections.community.aws.plugins.module_utils.transitgateway import subnets_to_vpc
from ansible_collections.amazon.aws.plugins.module_utils.transitgateway import TransitGatewayVpcAttachmentManager
from ansible_collections.amazon.aws.plugins.module_utils.transitgateway import find_existing_attachment
from ansible_collections.amazon.aws.plugins.module_utils.transitgateway import get_states
from ansible_collections.amazon.aws.plugins.module_utils.transitgateway import subnets_to_vpc


def handle_vpc_attachments(client, module: AnsibleAWSModule) -> NoReturn:
Expand Down
3 changes: 1 addition & 2 deletions plugins/modules/ec2_transit_gateway_vpc_attachment_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@
from ansible_collections.amazon.aws.plugins.module_utils.modules import AnsibleAWSModule
from ansible_collections.amazon.aws.plugins.module_utils.transformation import ansible_dict_to_boto3_filter_list
from ansible_collections.amazon.aws.plugins.module_utils.transformation import boto3_resource_to_ansible_dict

from ansible_collections.community.aws.plugins.module_utils.transitgateway import get_states
from ansible_collections.amazon.aws.plugins.module_utils.transitgateway import get_states


def main():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
- name: Describe all attachments on our VPC
community.aws.ec2_transit_gateway_vpc_attachment_info:
amazon.aws.ec2_transit_gateway_vpc_attachment_info:
filters:
transit-gateway-id: '{{ tgw_id }}'
register: info
ignore_errors: true

- name: Start deletion of all attachments
community.aws.ec2_transit_gateway_vpc_attachment:
amazon.aws.ec2_transit_gateway_vpc_attachment:
state: absent
id: '{{ item.transit_gateway_attachment_id }}'
wait: false
loop: '{{ info.attachments }}'
ignore_errors: true

- name: Wait for deletion of all attachments
community.aws.ec2_transit_gateway_vpc_attachment:
amazon.aws.ec2_transit_gateway_vpc_attachment:
state: absent
id: '{{ item.transit_gateway_attachment_id }}'
wait: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- block:
- name: (CHECK_MODE) Create an attachment - complex parameters
check_mode: true
community.aws.ec2_transit_gateway_vpc_attachment:
amazon.aws.ec2_transit_gateway_vpc_attachment:
name: '{{ attachment_name_complex }}'
transit_gateway: '{{ tgw_id }}'
subnets:
Expand Down Expand Up @@ -53,7 +53,7 @@
attachment: '{{ complex_attach.attachments[0] }}'

- name: Create an attachment - complex parameters
community.aws.ec2_transit_gateway_vpc_attachment:
amazon.aws.ec2_transit_gateway_vpc_attachment:
name: '{{ attachment_name_complex }}'
transit_gateway: '{{ tgw_id }}'
subnets:
Expand Down Expand Up @@ -112,7 +112,7 @@

- name: (CHECK_MODE) Create an attachment - complex parameters -- IDEMPOTENCY
check_mode: true
community.aws.ec2_transit_gateway_vpc_attachment:
amazon.aws.ec2_transit_gateway_vpc_attachment:
name: '{{ attachment_name_complex }}'
transit_gateway: '{{ tgw_id }}'
subnets:
Expand Down Expand Up @@ -165,7 +165,7 @@
attachment: '{{ complex_attach.attachments[0] }}'

- name: Create an attachment - complex parameters -- IDEMPOTENCY
community.aws.ec2_transit_gateway_vpc_attachment:
amazon.aws.ec2_transit_gateway_vpc_attachment:
name: '{{ attachment_name_complex }}'
transit_gateway: '{{ tgw_id }}'
subnets:
Expand Down Expand Up @@ -222,7 +222,7 @@

- name: (CHECK_MODE) Update an attachment - complex parameters
check_mode: true
community.aws.ec2_transit_gateway_vpc_attachment:
amazon.aws.ec2_transit_gateway_vpc_attachment:
name: '{{ attachment_name_complex }}'
transit_gateway: '{{ tgw_id }}'
subnets:
Expand Down Expand Up @@ -279,7 +279,7 @@
attachment: '{{ complex_attach.attachments[0] }}'

- name: Update an attachment - complex parameters
community.aws.ec2_transit_gateway_vpc_attachment:
amazon.aws.ec2_transit_gateway_vpc_attachment:
name: '{{ attachment_name_complex }}'
transit_gateway: '{{ tgw_id }}'
subnets:
Expand Down Expand Up @@ -337,7 +337,7 @@

- name: (CHECK_MODE) Update an attachment - complex parameters -- IDEMPOTENCY
check_mode: true
community.aws.ec2_transit_gateway_vpc_attachment:
amazon.aws.ec2_transit_gateway_vpc_attachment:
name: '{{ attachment_name_complex }}'
transit_gateway: '{{ tgw_id }}'
subnets:
Expand Down Expand Up @@ -394,7 +394,7 @@
attachment: '{{ complex_attach.attachments[0] }}'

- name: Update an attachment - complex parameters -- IDEMPOTENCY
community.aws.ec2_transit_gateway_vpc_attachment:
amazon.aws.ec2_transit_gateway_vpc_attachment:
name: '{{ attachment_name_complex }}'
transit_gateway: '{{ tgw_id }}'
subnets:
Expand Down
Loading

0 comments on commit a53fb57

Please sign in to comment.