MikrotikDesiredStateBuilder
Builds a MikrotikDesiredState from NETSetupConfig for the Liberator VLAN cutover. Only the Liberator host role gets the full bridge/VLAN/WiFi recipe; other host descriptions (Power Station, etc.) get an empty state so converge becomes a no-op. Inputs (all pulled off the config entity graph - no NETSetupConfig.* password fields): - admin password → NETSetupMikrotik.Users["admin"].Password (seeded by DeviceTranslator from Device.Description on the AccessPoint device) - wifi PSK → DirectoryService.Users["wifi"].Password (seeded by LiberatorWithWinDCTranslator as Key.Value + DateTime.Now.Year) - SSID → DirectoryService.Key.Value (single source of truth)
public static class MikrotikDesiredStateBuilder
1. Fields
1.1. DefaultIdentityName
Liberator hAP ax2 hostname default when no SelectedHostname is set.
public const string DefaultIdentityName
1.2. ManagedPrefix
netsetup-managed objects use this name/comment prefix so the converge engine only ever deletes its own entries.
public const string ManagedPrefix
1.3. WanInterface
WAN-facing ether port on the hAP ax2 (consistent with the trunk/LAN ether2-5 wiring above).
public const string WanInterface
1.4. WanInterfaceList
RouterOS interface-list the dst-nat/forward rules match on. Must equal the WAN list name created at flash time by MikrotikRscBuilder - which holds BOTH the untagged ether1 AND the tagged ether1-vlan WAN sub-iface. Matching the list (not a single iface) makes port-forwards work whether the modem hands WAN untagged or tagged - whichever actually carries the inbound traffic.
public const string WanInterfaceList
2. Methods
2.1. Build(NETSetupConfig, string)
Build the desired MikroTik state for the given customer + host role.
public static MikrotikDesiredState Build(NETSetupConfig config, string hostDescription)
| Name | Type | Description |
|---|---|---|
config |
NETSetupConfig |
|
hostDescription |
string |
Returns: MikrotikDesiredState