From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id F28A81FF09C for ; Mon, 02 Nov 2026 13:50:43 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 7C37021869; Mon, 02 Nov 2026 13:50:37 +0100 (CET) From: Christoph Heiss 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 Message-ID: <20261102124939.1023342-3-c.heiss@proxmox.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261102124939.1023342-1-c.heiss@proxmox.com> References: <20261102124939.1023342-1-c.heiss@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793623799929 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.178 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: JSVY73UM5X5DDBAFVNQE52WBVXNM6ZAQ X-Message-ID-Hash: JSVY73UM5X5DDBAFVNQE52WBVXNM6ZAQ X-MailFrom: c.heiss@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Effectively mirroring the available options from `pdm_config::auto_install::types::PreparedInstallationSectionConfig`. Signed-off-by: Christoph Heiss --- 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, + /// 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, + /// 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, + /// 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, + /// 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, + /// 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