You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.
The CapacityList.to_dict function does not work because it attempts to call to_dict on each Capacity in the CapacityList, but Capacity is already a dict. This probably requires a fix in openapi-generator, but we may be able to fix it with custom templates. If we can fix it with custom templates we should contribute that template change back to openapi-generator as well.
The code is failing with the following error due to a bug in the SDK:
File "/tmp/ansible_equinix.cloud.metal_metro_capacity_info_payload_csk2ijq1/ansible_equinix.cloud.metal_metro_capacity_info_payload.zip/ansible_collections/equinix/cloud/plugins/module_utils/metal/metal_api.py", line 447, in populate_ids_from_hrefs return_dict = response.to_dict() File "/home/pcernada/.local/lib/python3.10/site-packages/equinix_metal/models/capacity_list.py", line 79, in to_dict _field_dict[_key] = self.capacity[_key].to_dict() AttributeError: 'dict' object has no attribute 'to_dict'
This error occurs because the to_dict method is being called on a dictionary object, which does not have this method. The capacity field in the capacity_list model is expected to contain objects with a to_dict method, but it currently contains plain dictionaries instead.
The text was updated successfully, but these errors were encountered:
The CapacityList.to_dict function does not work because it attempts to call
to_dict
on each Capacity in the CapacityList, but Capacity is already a dict. This probably requires a fix in openapi-generator, but we may be able to fix it with custom templates. If we can fix it with custom templates we should contribute that template change back to openapi-generator as well.From equinix/ansible-collection-equinix#194 (comment)
The text was updated successfully, but these errors were encountered: