[pdm-devel] [PATCH proxmox v2 4/4] pve-api-types: regenerate

Michael Köppl m.koeppl at proxmox.com
Mon Nov 10 14:47:12 CET 2025


On Wed Nov 5, 2025 at 5:35 PM CET, Hannes Laimer wrote:
>  CLUSTER_JOIN_INFO_PREFERRED_NODE_RE = r##"^(?i:[a-z0-9](?i:[a-z0-9\-]*[a-z0-9])?)$"##;
> @@ -1645,6 +1740,204 @@ pub struct CreateZone {
>      pub zone: String,
>  }
>  
> +#[api]
> +/// Firewall IO policies.
> +#[derive(Clone, Copy, Debug, Default, Eq, PartialEq, serde::Deserialize, serde::Serialize)]
> +pub enum FirewallFWPolicy {
> +    #[serde(rename = "ACCEPT")]
> +    /// ACCEPT.
> +    Accept,
> +    #[serde(rename = "DROP")]
> +    #[default]

If DROP is the default, then this differs from how PVE handles the case
where policy_forward is not explicitly configured. At least pve-manager
considers ACCEPT to be the default, even though the docs don't define a
default (I think?). So if policy_forward is not explicitly configured
(i.e. the cluster was just created), the PVE firewall options will
display Forward Policy set to ACCEPT, whereas PDM will show DROP.

> +    /// DROP.
> +    Drop,
> +}
> +serde_plain::derive_display_from_serialize!(FirewallFWPolicy);
> +serde_plain::derive_fromstr_from_deserialize!(FirewallFWPolicy);
> +
> +#[api]
> +/// Firewall IO policies.
> +#[derive(Clone, Copy, Debug, Default, Eq, PartialEq, serde::Deserialize, serde::Serialize)]
> +pub enum FirewallIOPolicy {
> +    #[serde(rename = "ACCEPT")]
> +    #[default]

Kind of the same problem as above. Input policy default is DROP, whereas
Output policy default is ACCEPT (at least for pve-manager). PDM would
display ACCEPT for both if the values are not explicitly configured.

> +    /// ACCEPT.
> +    Accept,
> +    #[serde(rename = "DROP")]
> +    /// DROP.
> +    Drop,
> +    #[serde(rename = "REJECT")]
> +    /// REJECT.
> +    Reject,
> +}
> +serde_plain::derive_display_from_serialize!(FirewallIOPolicy);
> +serde_plain::derive_fromstr_from_deserialize!(FirewallIOPolicy);
> +





More information about the pdm-devel mailing list