mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 16:11:49 +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
22 lines
662 B
Python
22 lines
662 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.floating_ips import (
|
|
BoundFloatingIP,
|
|
)
|
|
|
|
|
|
def prepare_result(o: BoundFloatingIP):
|
|
return {
|
|
"id": o.id,
|
|
"name": o.name,
|
|
"description": o.description,
|
|
"ip": o.ip,
|
|
"type": o.type,
|
|
"home_location": o.home_location.name,
|
|
"labels": o.labels,
|
|
"server": o.server.name if o.server is not None else None,
|
|
"delete_protection": o.protection["delete"],
|
|
}
|