mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-09-04 03:05:32 +00:00
feat: VLAN-aware bridges via New-PveNetwork and Set-PveNetwork
PveNetwork already deserialised bridge_vlan_aware as BridgeVlanAware, so a VLAN-aware bridge could be read back but never created or changed. Both write paths now take a -BridgeVlanAware switch. Clearing the flag does not use bridge_vlan_aware=0. PVE merges the supplied keys onto the stored stanza and accepts that 0 without acting on it, so the obvious form is a silent no-op: an integration run against PVE 9 issued it and Get-PveNetwork still reported 1. The endpoint's delete list is what actually removes the key. The API schema advertises a plain boolean and gives no hint of this, which is why the behaviour is pinned by an integration test rather than inferred. Set-PveNetwork guards the switch on BoundParameters so an update that omits it leaves the flag alone; the create path follows the existing -Autostart form. Only bridge_vlan_aware is added. bridge_vids is an independent parameter that PVE defaults to 2-4094, and the issue asks only for the flag. Coverage: the integration suite pins create, disable, re-enable, and that an unrelated Set leaves the flag alone -- that last one kills a mutant that drops the BoundParameters guard, which every other test survives. A model test pins the read path the assertions depend on. The Pester unit tests assert only parameter metadata; the defect is server-side, so nothing offline can catch it. Closes #92
This commit is contained in:
@@ -14,7 +14,8 @@ schema: 2.0.0
|
||||
|
||||
```
|
||||
Set-PveNetwork [-Node] <String> [-Iface] <String> -Type <String> [-Address <String>] [-Netmask <String>]
|
||||
[-Gateway <String>] [-Address6 <String>] [-Netmask6 <Int32>] [-Gateway6 <String>] [-BridgePorts <String>]
|
||||
[-Gateway <String>] [-Address6 <String>] [-Netmask6 <Int32>] [-Gateway6 <String>] [-BridgeVlanAware]
|
||||
[-BridgePorts <String>]
|
||||
[-BondSlaves <String>] [-Mtu <Int32>] [-Autostart] [-Comments <String>] [-Session <PveSession>]
|
||||
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
@@ -93,6 +94,24 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -BridgeVlanAware
|
||||
|
||||
Enable or disable VLAN-aware bridging (802.1Q) on this bridge. Applies to `bridge` type interfaces
|
||||
only. The flag is sent only when the switch is explicitly bound, so an update that omits it leaves
|
||||
the current setting untouched; `-BridgeVlanAware:$false` clears it.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -BridgePorts
|
||||
Bridge ports (space-separated interface names).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user