Subject: [bug#77019] [PATCH 0/1] machine: hetzner: Allow attaching existing public IPs.

From: Ludovic Courtès <[email-masked]>
Date: Thu, 17 Apr 2025 22:42:04 +0200

Hi,

Sergey Trofimov <[email-masked]> writes:

> * gnu/machine/hetzner.scm (hetzner-configuration): Add ipv4 and ipv6
> fields. Export accessors.
> * gnu/machine/hetzner/http.scm (hetnzer-api-primary-ips): New function.
> (<hetzner-primary-ip>): New json mapping.
> (hetzner-api-server-create): Pass IP addresses in request.
> * doc/guix.texi: Document it.
                 ^
Please specify the name of the node that is modified, for this list
bullet: 

  * doc/guix.texi (Invoking guix deploy): Document it.

> +@item @code{ipv4} (default: @code{'create})
> +When false, no public IPv4 address is going to be attached. Specify the
> +name of an existing primary ip to attach it to the machine. Other values
> +would create a new address automatically.
> +
> +@item @code{ipv6} (default: @code{'create})
> +When false, no public IPv6 address is going to be attached. Specify the
> +name of an existing primary ip to attach it to the machine. Other values
> +would create a new address automatically.

To avoid repetition, use @itemx like so:

  @item @code{ipv4} (default: @code{'create})
  @itemx @code{ipv6} (default: @code{'create})
  When false, no public IPv4 (respectively IPv6) address is attached. …

Also, please leave to spaces after end-of-sentence periods and
capitalize acronyms like “IP”.

> +  (ipv4 hetzner-configuration-ipv4
> +        (default 'create))
> +  (ipv6 hetzner-configuration-ipv6
> +        (default 'create))

Am I right that 'create doesn’t have any special meaning?  In that case,
it seems to be that it should be either #f or a string?  Or #f or string
or #t?  This should be documented.

> +(define-json-mapping <hetzner-primary-ip>

Please add a short comment above explaining what this is, possibly
linking to the relevant Hetzner doc.

The rest LGTM at first sight but I know nothing about Hetzner so I’d
prefer if Roman could chime in.

Thanks!

Ludo’.