diff --git a/PowerArubaCX/Public/Interfaces.ps1 b/PowerArubaCX/Public/Interfaces.ps1 index 3baeb29..f23b246 100644 --- a/PowerArubaCX/Public/Interfaces.ps1 +++ b/PowerArubaCX/Public/Interfaces.ps1 @@ -631,6 +631,9 @@ function Set-ArubaCXInterfaces { [Parameter(Mandatory = $false)] [Alias('active_gateway')] [ipaddress[]]$vsx_virtual_ip4, + [Parameter (Mandatory = $false)] + [ValidateSet('active-gateway', IgnoreCase = $false)] + [string[]]$vsx_sync, [Parameter(Mandatory = $false)] [string]$vrf, [Parameter (Mandatory = $false)] @@ -789,6 +792,20 @@ function Set-ArubaCXInterfaces { $_interface.vsx_virtual_ip4 = $ag_ip4 } + if ( $PsBoundParameters.ContainsKey('vsx_sync') ) { + $vsync = @() + + foreach ($vs in $vsx_sync) { + if($vs -eq "active-gateway"){ + $vsync += "^vsx_virtual.*" + $vsync += "virtual_gw_l3_src_mac_enable" + } else { + $vsync += $vs + } + } + $_interface.vsx_sync = $vsync + } + if ( $PsBoundParameters.ContainsKey('vrf') ) { $_interface.vrf = "/rest/" + $($connection.api_version) + "/system/vrfs/" + $vrf }