refactor: don't use ISO deprecated field (#371)

##### SUMMARY

The deprecated field is deprecated, we must use the deprecation object
instead.

##### COMPONENT NAME

hcloud_iso_info
This commit is contained in:
Jonas L 2023-10-23 13:36:14 +02:00 committed by GitHub
parent f35f5009aa
commit 41ea82cc07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -148,7 +148,9 @@ class AnsibleHCloudIsoInfo(AnsibleHCloud):
"description": to_native(iso_info.description),
"type": iso_info.type,
"architecture": iso_info.architecture,
"deprecated": iso_info.deprecated,
"deprecated": (
iso_info.deprecation.unavailable_after if iso_info.deprecation is not None else None
),
"deprecation": {
"announced": iso_info.deprecation.announced.isoformat(),
"unavailable_after": iso_info.deprecation.unavailable_after.isoformat(),