From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Christoph Heiss <c.heiss@proxmox.com>
Subject: [pve-devel] applied: [PATCH installer] fetch-answer: add `$fetchinfo` meta-field to HTTP POST payload
Date: Thu, 14 Nov 2024 21:05:58 +0100 [thread overview]
Message-ID: <4de8666e-7baf-46b7-8543-84ad427ced4f@proxmox.com> (raw)
In-Reply-To: <20241113090639.436459-1-c.heiss@proxmox.com>
Am 13.11.24 um 10:06 schrieb Christoph Heiss:
> This adds a metadata-field `$fetchinfo` containing a single key
> `version` (for now) to the POST payload json, indicating which schema
> version (and thus structure) this document uses.
>
> The version field follows the format "<major>.<minor>" and applies
> semantic versioning meaning for both the major and minor number. A patch
> version is left out here, as it doesn't make much sense in this context.
>
> Works in the same manner as the post-hook does it [0]. Useful to have it
> for this too, as we might change/expand this structure too in the
> future.
>
> In the resulting JSON, this will look like this:
> {
> "$fetchinfo": {
> "version": "1.0"
> },
> "product": ..,
> ..
> }
>
> [0] https://lore.proxmox.com/pve-devel/20241112145405.929194-1-c.heiss@proxmox.com/
>
> Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
> ---
> proxmox-auto-installer/src/sysinfo.rs | 5 --
> proxmox-fetch-answer/Cargo.toml | 2 +
> .../src/fetch_plugins/http.rs | 65 ++++++++++++++++++-
> 3 files changed, 66 insertions(+), 6 deletions(-)
>
>
applied, thanks!
But I made a follow-up to rename both meta keys, i.e. this and the post-hook
one, to `$format-info`. Reasoning is mostly consistency for similar things,
IMO users might wonder slightly why they are called different things and we
really do not want to change those anymore.
Anyhow, I'm not fixated on these specific names, feel free to change them,
and I'm not blocking different names, but I'd like some good reasoning for
why not call the keys the same thing if they tell the user the same thing.
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
prev parent reply other threads:[~2024-11-14 20:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 9:06 [pve-devel] " Christoph Heiss
2024-11-14 20:05 ` Thomas Lamprecht [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4de8666e-7baf-46b7-8543-84ad427ced4f@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=c.heiss@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox