mirror of
https://github.com/ansible-collections/hetzner.hcloud
synced 2024-11-10 06:34:13 +00:00
fix!: always return iso-8601 formatted date time (#453)
##### SUMMARY Fixes #91 Always return datetime as iso-8601 formatted strings. ##### ISSUE TYPE - Bugfix Pull Request
This commit is contained in:
parent
d0c82aec86
commit
55d26162b3
4 changed files with 9 additions and 5 deletions
|
@ -0,0 +1,4 @@
|
|||
breaking_changes:
|
||||
- certificate_info - The `not_valid_before` and `not_valid_after` values are now returned as ISO-8601 formatted strings.
|
||||
- certificate - The `not_valid_before` and `not_valid_after` values are now returned as ISO-8601 formatted strings.
|
||||
- iso_info - The `deprecated` value is now returned as ISO-8601 formatted strings.
|
|
@ -165,8 +165,8 @@ class AnsibleHCloudCertificate(AnsibleHCloud):
|
|||
"type": to_native(self.hcloud_certificate.type),
|
||||
"fingerprint": to_native(self.hcloud_certificate.fingerprint),
|
||||
"certificate": to_native(self.hcloud_certificate.certificate),
|
||||
"not_valid_before": to_native(self.hcloud_certificate.not_valid_before),
|
||||
"not_valid_after": to_native(self.hcloud_certificate.not_valid_after),
|
||||
"not_valid_before": to_native(self.hcloud_certificate.not_valid_before.isoformat()),
|
||||
"not_valid_after": to_native(self.hcloud_certificate.not_valid_after.isoformat()),
|
||||
"domain_names": [to_native(domain) for domain in self.hcloud_certificate.domain_names],
|
||||
"labels": self.hcloud_certificate.labels,
|
||||
}
|
||||
|
|
|
@ -110,8 +110,8 @@ class AnsibleHCloudCertificateInfo(AnsibleHCloud):
|
|||
"name": to_native(certificate.name),
|
||||
"fingerprint": to_native(certificate.fingerprint),
|
||||
"certificate": to_native(certificate.certificate),
|
||||
"not_valid_before": to_native(certificate.not_valid_before),
|
||||
"not_valid_after": to_native(certificate.not_valid_after),
|
||||
"not_valid_before": to_native(certificate.not_valid_before.isoformat()),
|
||||
"not_valid_after": to_native(certificate.not_valid_after.isoformat()),
|
||||
"domain_names": [to_native(domain) for domain in certificate.domain_names],
|
||||
"labels": certificate.labels,
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ class AnsibleHCloudIsoInfo(AnsibleHCloud):
|
|||
"type": iso_info.type,
|
||||
"architecture": iso_info.architecture,
|
||||
"deprecated": (
|
||||
iso_info.deprecation.unavailable_after if iso_info.deprecation is not None else None
|
||||
iso_info.deprecation.unavailable_after.isoformat() if iso_info.deprecation is not None else None
|
||||
),
|
||||
"deprecation": (
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue