TPT-4111: Support listing VPC availabilities in regions - #838
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new Ansible list module to the linode.cloud collection to retrieve VPC availability data across regions via the Linode API, along with generated documentation and an integration test target.
Changes:
- Added
region_vpc_availability_listmodule implemented with the sharedListModulehelper against/regions/vpc-availability. - Added specdoc doc fragments and generated module documentation for the new module.
- Added an
ansible-testintegration target and wired the module into the README module list.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/integration/targets/region_vpc_availability_list/tasks/main.yaml | Adds an integration test target validating basic listing behavior and count limiting. |
| README.md | Registers the new module in the collection’s module list. |
| plugins/modules/region_vpc_availability_list.py | Implements the new list module using the shared ListModule helper. |
| plugins/module_utils/doc_fragments/region_vpc_availability_list.py | Provides specdoc examples and sample return payloads for doc generation. |
| docs/modules/region_vpc_availability_list.md | Adds generated end-user documentation for the new module. |
Comments suppressed due to low confidence (1)
docs/modules/region_vpc_availability_list.md:41
- The return value description should be plural to match the returned list field name (
vpc_availabilities).
- `vpc_availabilities` - The returned Region VPC Availability.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| that: | ||
| - no_filter.vpc_availabilities | length > 0 | ||
| - no_filter.vpc_availabilities[0].region is defined | ||
| - no_filter.vpc_availabilities[0].available is defined |
There was a problem hiding this comment.
Does it make sense to add assertion for available_ipv6_prefix_lengths?
no_filter.vpc_availabilities[0].available_ipv6_prefix_lengths is defined
| } | ||
| ] | ||
| ``` | ||
| - See the [Linode API response documentation](https://techdocs.akamai.com/linode-api/reference/get-regions-vpc-availability) for a list of returned fields |
There was a problem hiding this comment.
I have doubts about this link TBH. As far as I know from TechDoc, it's not published yet so maybe it makes sense to leave it as TODO?
📝 Description
Add a new module for listing region vpc availabilities.
✔️ How to Test