OpnsenseDesiredStateBuilder

Builds an OpnsenseDesiredState from NETSetupConfig. Pure mapper - no IO. DHCP reservations are sourced from a side-channel (post-provision MAC discovery via the qm guest agent + persisted on the Proxmox host) and passed in by the caller; the builder itself stays stateless. Aliases and rules are derived from the directory machines and the Nix DNS VM IP.

public static class OpnsenseDesiredStateBuilder

1. Fields

1.1. ManagedPrefix

netsetup-managed firewall objects use this name/description prefix so the converge engine only ever deletes its own entries.

public const string ManagedPrefix

2. Methods

2.1. Build(NETSetupConfig, IReadOnlyList<DhcpReservation>)

Builds the desired state for the customer.

public static OpnsenseDesiredState Build(NETSetupConfig config, IReadOnlyList<DhcpReservation> reservations = null)
Table 1. Parameters
Name Type Description

config

NETSetupConfig

The customer config.

reservations

IReadOnlyList<DhcpReservation>

Optional pre-loaded DHCP static-map reservations (from Load(ConfigName)). Null/empty → no reservations are pushed.

Returns: OpnsenseDesiredState