mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-03 23:51:48 +00:00
##### SUMMARY We collect all changes for the Storage Box support in this PR. It will only be merged when everything is implemented through smaller pull requests targeting the `storage-boxes` branch. --------- Co-authored-by: Julian Tölle <julian.toelle@hetzner-cloud.de>
21 lines
546 B
Python
21 lines
546 B
Python
from __future__ import annotations
|
|
|
|
from ..module_utils.vendor.hcloud.storage_boxes import (
|
|
BoundStorageBoxSnapshot,
|
|
)
|
|
|
|
|
|
def prepare_result(o: BoundStorageBoxSnapshot):
|
|
return {
|
|
"storage_box": o.storage_box.id,
|
|
"id": o.id,
|
|
"name": o.name,
|
|
"description": o.description,
|
|
"labels": o.labels,
|
|
"stats": {
|
|
"size": o.stats.size,
|
|
"size_filesystem": o.stats.size_filesystem,
|
|
},
|
|
"is_automatic": o.is_automatic,
|
|
"created": o.created.isoformat(),
|
|
}
|