mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
##### SUMMARY Deprecate datacenter in `primary ips` and `servers`. See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters.
21 lines
555 B
Python
21 lines
555 B
Python
from __future__ import annotations
|
|
|
|
from ..module_utils.vendor.hcloud.primary_ips import (
|
|
BoundPrimaryIP,
|
|
)
|
|
|
|
|
|
def prepare_result(o: BoundPrimaryIP):
|
|
return {
|
|
"id": o.id,
|
|
"name": o.name,
|
|
"ip": o.ip,
|
|
"type": o.type,
|
|
"location": o.location.name,
|
|
"datacenter": o.datacenter and o.datacenter.name,
|
|
"labels": o.labels,
|
|
"delete_protection": o.protection["delete"],
|
|
"assignee_id": o.assignee_id,
|
|
"assignee_type": o.assignee_type,
|
|
"auto_delete": o.auto_delete,
|
|
}
|