mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-03 23:51:48 +00:00
##### SUMMARY All `module_utils` are now marked as **private**. None of the modules were intended for public use. Similar to https://togithub.com/ansible-collections/community.general/issues/11312
24 lines
720 B
Python
24 lines
720 B
Python
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
|
# Do not use this from other collections or standalone plugins/modules!
|
|
|
|
from __future__ import annotations
|
|
|
|
from ._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,
|
|
}
|