equinix-labs / ansible-collection-equinix

Ansible content to help automate the management of Equinix resources
https://deploy.equinix.com/labs/ansible-collection-equinix/
GNU General Public License v3.0
2 stars 8 forks source link

fix: skip uuid check when hardware_reservation_id is next-available #185

Closed Lukasz-Equinix closed 1 month ago

Lukasz-Equinix commented 1 month ago

When using reserved hardware the api https://github.com/equinix-labs/ansible-collection-equinix/blob/55bc3d1b645a859b7b3c93309cf5b264d23a4976/plugins/modules/metal_device.py#L373 says you can provide next-available instead of the device uuid, but currently this is still checked against the uuid regex and the exception is thrown https://github.com/equinix-labs/ansible-collection-equinix/blob/55bc3d1b645a859b7b3c93309cf5b264d23a4976/plugins/module_utils/equinix.py#L110

Skipping the uuid check if this is the case.

github-actions[bot] commented 1 month ago

This PR is included in version 0.6.1 :tada: