amazon.aws icon indicating copy to clipboard operation
amazon.aws copied to clipboard

Refactor ec2_nat_gateway*, ec2_vpc_igw*, ec2_snapshot*, ec2_spot_instance*

Open abikouo opened this issue 2 months ago • 5 comments

SUMMARY

This pull request contains a set of changes:

module_utils/ec2.py: add a set of AWS API wrapped into retry and AnsibleEC2ErrorHandler, some of them will be used later to refactor others ec2_* modules
Refactorec2_vol*, ec2_nat_gateway*, ec2_vpc_igw*, ec2_snapshot*, ec2_spot_instance* modules: add type hint, the main() function should be limited to call either ensure_[absent|present] functions or any others function to describe resources.

The changes in this PR have been extracted from https://github.com/ansible-collections/amazon.aws/pull/2076

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • ec2_snapshot
  • ec2_snapshot_info
  • ec2_spot_instance
  • ec2_spot_instance_info
  • ec2_vol
  • ec2_vol_info
  • ec2_vpc_igw
  • ec2_vpc_igw_info
  • ec2_vpc_nat_gateway
  • ec2_vpc_nat_gateway_info
ADDITIONAL INFORMATION

abikouo avatar May 16 '24 16:05 abikouo