Repository navigation
feat: Add new module for checking Equinix Metal metro capacity - #194
paolacernada wants to merge 8 commits into
Conversation
This commit adds the `metal_metro_capacity_info.py` module, which allows gathering information about the current capacity for Equinix Metal metros.
- Generated documentation for new module metal_metro_capacity_info - Injected DOCUMENTATION, EXAMPLES, and RETURN sections into metal_metro_capacity_info.py
The code changes in `api_routes.py` add a new endpoint for retrieving metro capacity information in the Equinix Metal API. This change is necessary to support the new `metal_metro_capacity_info` module.
This commit adds the attribute mapper for the `metal_metro_capacity_info` resource type in the `metal_api.py` file. The attribute mapper maps the response attributes for the `metal_metro_capacity_info` resource type to their corresponding keys in the API response.
|
I encountered an issue while using the CapacityApi.find_capacity_for_metro endpoint from the Equinix Python SDK. The error indicated that a
Any insights or directions are appreciated. |
| api_token = module.params['metal_api_token'] | ||
| headers = {'X-Auth-Token': api_token} | ||
|
|
||
| response = requests.get(f"{api_url}/capacity/metros", headers=headers) |
There was a problem hiding this comment.
This should go through the SDK client rather than using requests. Is the metro capacity endpoint missing in the SDK?
|
@paolacernada Quick note on the commits. Use |
|
The code is failing with the following error due to a bug in the SDK:
This error occurs because the |
Added a new Ansible module named metal_capacity_metro_info to gather capacity information for Equinix Metal metros.