From: Christoph Heiss <c.heiss@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [PATCH datacenter-manager 2/5] api-types: auto-installer: add new options for configuring vlan and bond
Date: Mon, 2 Nov 2026 13:49:34 +0100 [thread overview]
Message-ID: <20261102124939.1023342-3-c.heiss@proxmox.com> (raw)
In-Reply-To: <20261102124939.1023342-1-c.heiss@proxmox.com>
Effectively mirroring the available options from
`pdm_config::auto_install::types::PreparedInstallationSectionConfig`.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
lib/pdm-api-types/Cargo.toml | 1 +
lib/pdm-api-types/src/auto_installer.rs | 48 +++++++++++++++++++++++++
2 files changed, 49 insertions(+)
diff --git a/lib/pdm-api-types/Cargo.toml b/lib/pdm-api-types/Cargo.toml
index f9e3d07e..0a133889 100644
--- a/lib/pdm-api-types/Cargo.toml
+++ b/lib/pdm-api-types/Cargo.toml
@@ -23,6 +23,7 @@ proxmox-lang.workspace = true
proxmox-config-digest.workspace = true
proxmox-installer-types = { workspace = true, features = ["api-types"] }
proxmox-network-types = { workspace = true, features = ["api-types"] }
+proxmox-network-api.workspace = true
proxmox-schema = { workspace = true, features = ["api-macro"] }
proxmox-section-config.workspace = true
proxmox-dns-api.workspace = true
diff --git a/lib/pdm-api-types/src/auto_installer.rs b/lib/pdm-api-types/src/auto_installer.rs
index 4b5027fb..4a2dce13 100644
--- a/lib/pdm-api-types/src/auto_installer.rs
+++ b/lib/pdm-api-types/src/auto_installer.rs
@@ -7,6 +7,7 @@ use proxmox_auth_api::types::Userid;
use proxmox_installer_types::{
SystemInfo, answer::SUBSCRIPTION_KEY_SCHEMA, post_hook::PostHookInfo,
};
+use proxmox_network_api::{BondXmitHashPolicy, LinuxBondMode};
use proxmox_schema::{
ApiStringFormat, Schema, StringSchema, Updater, api,
api_types::{CERT_FINGERPRINT_SHA256_SCHEMA, COMMENT_SCHEMA, HTTP_URL_SCHEMA, UUID_FORMAT},
@@ -144,6 +145,19 @@ pub const PREPARED_INSTALL_CONFIG_ID_SCHEMA: proxmox_schema::Schema =
additional_properties: true,
optional: true,
},
+ "bond-members-filter": {
+ type: Object,
+ properties: {},
+ additional_properties: true,
+ optional: true,
+ },
+ // 0 and 4095 are reserved, 1 is the untagged default PVID of VLAN-aware bridges on Linux
+ "vlan-id": {
+ type: Integer,
+ optional: true,
+ minimum: 2,
+ maximum: 4094,
+ },
"disk-mode": {
type: String,
},
@@ -298,6 +312,32 @@ pub struct PreparedInstallationConfig {
#[updater(serde(default, skip_serializing_if = "Option::is_none"))]
pub netif_name_pinning_enabled: bool,
+ /// Whether to enable interface bonding for the management network.
+ #[updater(serde(default, skip_serializing_if = "Option::is_none"))]
+ pub bond_enabled: bool,
+ /// Netdev filter for selecting management network bond members
+ #[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
+ #[updater(serde(default, skip_serializing_if = "Option::is_none"))]
+ pub bond_members_filter: BTreeMap<String, String>,
+ /// Whether it is enough that any filter matches on a network interface or all given
+ /// filters must match to select an interface as bond member.
+ #[serde(default, skip_serializing_if = "Option::is_none")]
+ #[updater(serde(default, skip_serializing_if = "Option::is_none"))]
+ pub bond_members_filter_match: Option<answer::FilterMatch>,
+ /// Mode of the management interface bond, defaults to `active-backup`.
+ #[serde(default, skip_serializing_if = "Option::is_none")]
+ #[updater(serde(default, skip_serializing_if = "Option::is_none"))]
+ pub bond_mode: Option<LinuxBondMode>,
+ /// Hash policy of the management interface bond, only used with the `802.3ad` and
+ /// `balance-xor` modes.
+ #[serde(default, skip_serializing_if = "Option::is_none")]
+ #[updater(serde(default, skip_serializing_if = "Option::is_none"))]
+ pub bond_hash_policy: Option<BondXmitHashPolicy>,
+ /// Optional VLAN tag to configure on the management interface.
+ #[serde(default, skip_serializing_if = "Option::is_none")]
+ #[updater(serde(default, skip_serializing_if = "Option::is_none"))]
+ pub vlan_id: Option<u16>,
+
/// Root filesystem options.
#[updater(serde(default, skip_serializing_if = "Option::is_none"))]
pub filesystem: answer::FilesystemOptions,
@@ -353,6 +393,14 @@ pub enum DeletablePreparedInstallationConfigProperty {
TargetFilter,
/// Delete all udev property filters for the management network device
NetdevFilter,
+ /// Delete all udev property filters for selecting management network bond members
+ BondMembersFilter,
+ /// Delete the management interface bond mode.
+ BondMode,
+ /// Delete the management interface bond hash policy.
+ BondHashPolicy,
+ /// Delete the management interface VLAN tag.
+ VlanId,
/// Delete all udev property filters for disks
DiskFilter,
/// Delete all `root` user public ssh keys.
--
2.55.0
next prev parent reply other threads:[~2026-11-02 12:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 12:49 [PATCH datacenter-manager 0/5] auto-install: add support for VLAN and bond configurations Christoph Heiss
2026-11-02 12:49 ` [PATCH datacenter-manager 1/5] config: auto-install: add new options for configuring vlan and bond Christoph Heiss
2026-11-02 12:49 ` Christoph Heiss [this message]
2026-11-02 12:49 ` [PATCH datacenter-manager 3/5] api: auto-installer: wire up new vlan and bond network options Christoph Heiss
2026-11-02 12:49 ` [PATCH datacenter-manager 4/5] ui: auto-installer: use .to_string() instead of manual serde variant Christoph Heiss
2026-11-02 12:49 ` [PATCH datacenter-manager 5/5] ui: auto-installer: add vlan and bond config as advanced options Christoph Heiss
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=20261102124939.1023342-3-c.heiss@proxmox.com \
--to=c.heiss@proxmox.com \
--cc=pdm-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