diff --git a/PowerArubaCX/Private/Confirm.ps1 b/PowerArubaCX/Private/Confirm.ps1 index 29d3f23..779b4ef 100644 --- a/PowerArubaCX/Private/Confirm.ps1 +++ b/PowerArubaCX/Private/Confirm.ps1 @@ -30,6 +30,34 @@ function Confirm-ArubaCXInterfaces { $true } + +function Confirm-ArubaCXStaticRoutes { + + Param ( + [Parameter (Mandatory = $true)] + [object]$argument + ) + #Check if it looks like an Static Routes element + + if ( -not ( $argument | get-member -name address_family -Membertype Properties)) { + throw "Element specified does not contain an address_family property." + } + if ( -not ( $argument | get-member -name prefix -Membertype Properties)) { + throw "Element specified does not contain a prefix property." + } + if ( -not ( $argument | get-member -name static_nexthops -Membertype Properties)) { + throw "Element specified does not contain a static_nexthops property." + } + if ( -not ( $argument | get-member -name type -Membertype Properties)) { + throw "Element specified does not contain a type property." + } + if ( -not ( $argument | get-member -name vrf -Membertype Properties)) { + throw "Element specified does not contain a vrf property." + } + $true + +} + function Confirm-ArubaCXSystem { Param ( diff --git a/PowerArubaCX/Public/StaticRoutes.ps1 b/PowerArubaCX/Public/StaticRoutes.ps1 new file mode 100644 index 0000000..06c894c --- /dev/null +++ b/PowerArubaCX/Public/StaticRoutes.ps1 @@ -0,0 +1,251 @@ +# +# Copyright 2020, Alexis La Goutte +# +# SPDX-License-Identifier: Apache-2.0 +# + +function Add-ArubaCXStaticRoutes { + + <# + .SYNOPSIS + Add Aruba CX Static Route + + .DESCRIPTION + Add Static Route (address_family, prefix, static_nexthops, type) + + .EXAMPLE + Add-ArubaCXStaticRoutes -address_family ipv4 -prefix_ip4 192.0.2.0 -prefix_ip4_mask 24 -type forward + + Add Static Route type forward for network 192.0.2.0/24 (on default vrf) + + .EXAMPLE + Add-ArubaCXStaticRoutes -address_family ipv4 -prefix_ip4 192.0.2.0 -prefix_ip4_mask 24 -type blackhole -vrf MyVrf + + Add Static Route type blackhole for network 192.0.2.0/24 on MyVRF + + .EXAMPLE + Get-ArubaCXVrf MyVRF | Add-ArubaCXStaticRoutes -address_family ipv4 -prefix_ip4 192.0.2.0 -prefix_ip4_mask 24 -type reject + + Add Static Route type reject for network 192.0.2.0/24 on MyVRF (using pipeline) + #> + Param( + [Parameter (Mandatory = $false, ValueFromPipeline = $true)] + [ValidateScript( { Confirm-ArubaCXVrfs $_ })] + [psobject]$vrf_pp, + [Parameter(Mandatory = $false)] + [string]$vrf = "default", + [Parameter (Mandatory = $true)] + [ValidateSet('ipv4', IgnoreCase = $false)] + [string]$address_family = "ipv4", + [Parameter (Mandatory = $true)] + [ipaddress]$prefix_ip4, + [Parameter (Mandatory = $true)] + [ValidateRange(0, 32)] + [int]$prefix_ip4_mask, + [Parameter (Mandatory = $true)] + [ValidateSet('forward', 'reject', 'blackhole')] + [string]$type, + [Parameter (Mandatory = $False)] + [ValidateNotNullOrEmpty()] + [PSObject]$connection = $DefaultArubaCXConnection + ) + + Begin { + } + + Process { + + #get vrf name from vrf_pp ps object (based by pipeline) + if ($vrf_pp) { + $vrf = $vrf_pp.name + } + + if ( -not ($prefix_ip4.AddressFamily -eq "InterNetwork" )) { + Throw "You need to specify a IPv4 Address" + } + $prefix = $prefix_ip4.ToString() + "/" + $prefix_ip4_mask + + $uri = "system/vrfs/$vrf/static_routes" + + $_sr = new-Object -TypeName PSObject + + $_sr | add-member -name "address_family" -membertype NoteProperty -Value $address_family + + $_sr | add-member -name "prefix" -membertype NoteProperty -Value $prefix + + $_sr | add-member -name "type" -membertype NoteProperty -Value $type + + $_sr | add-member -name "vrf" -membertype NoteProperty -Value ("/rest/" + $($connection.version) + "/system/vrfs/" + $vrf) + + $response = Invoke-ArubaCXRestMethod -uri $uri -method 'POST' -body $_sr -connection $connection + $response + + Get-ArubaCXStaticRoutes -vrf $vrf -prefix $prefix -connection $connection + } + + End { + } +} + +function Get-ArubaCXStaticRoutes { + + <# + .SYNOPSIS + Get list of all Aruba CX Routes + + .DESCRIPTION + Get list of all Aruba CX Static Route (address_family, prefix, static_nexthops, type) + + .EXAMPLE + Get-ArubaCXStaticRoutes + + Get list of all Static Routes information (address_family, prefix, static_nexthops, type) + + .EXAMPLE + Get-ArubaCXStaticRoutes -prefix 192.0.2.0/24 + + Get Static Route information of prefix 192.0.2.0/24 + + .EXAMPLE + Get-ArubaCXVrfs -vrf MyVRF | Get-ArubaCXStaticRoutes + + Get Static Route information from VRF named MyVRF (using pipeline) + + .EXAMPLE + Get-ArubaCXStaticRoutes -vrf MyVRF + + Get Static Route information from VRF named MyVRF + #> + + [CmdletBinding(DefaultParametersetname = "Default")] + Param( + [Parameter (Mandatory = $false, ParameterSetName = "prefix", position = "1")] + [string]$prefix, + [Parameter (Mandatory = $false, ValueFromPipeline = $true)] + [ValidateScript( { Confirm-ArubaCXVrfs $_ })] + [psobject]$vrf_pp, + [Parameter(Mandatory = $false)] + [string]$vrf = "default", + [Parameter(Mandatory = $false)] + [ValidateRange(1, 4)] + [Int]$depth, + [Parameter(Mandatory = $false)] + [ValidateSet("configuration", "status", "statistics", "writable")] + [String]$selector, + [Parameter(Mandatory = $false)] + [String[]]$attributes, + [Parameter(Mandatory = $false)] + [switch]$vsx_peer, + [Parameter (Mandatory = $False)] + [ValidateNotNullOrEmpty()] + [PSObject]$connection = $DefaultArubaCXConnection + ) + + Begin { + } + + Process { + + #get vrf name from vrf_pp ps object (based by pipeline) + if ($vrf_pp) { + $vrf = $vrf_pp.name + } + + $invokeParams = @{ } + if ( $PsBoundParameters.ContainsKey('depth') ) { + $invokeParams.add( 'depth', $depth ) + } + if ( $PsBoundParameters.ContainsKey('selector') ) { + $invokeParams.add( 'selector', $selector ) + } + if ( $PsBoundParameters.ContainsKey('attributes') ) { + $invokeParams.add( 'attributes', $attributes ) + } + if ( $PsBoundParameters.ContainsKey('vsx_peer') ) { + $invokeParams.add( 'vsx_peer', $true ) + } + + $uri = "system/vrfs/$vrf/static_routes" + + # you can directly filter by prefix + if ( $PsBoundParameters.ContainsKey('prefix') ) { + #replace / by %2F + $prefix = $prefix -replace '/', '%2F' + $uri += "/$prefix" + } + + $response = Invoke-ArubaCXRestMethod -uri $uri -method 'GET' -connection $connection @invokeParams + + #Add vrf parameter when use prefix (more easy to remove and also for get vrf source...) + if ( $PsBoundParameters.ContainsKey('prefix') ) { + $response | add-member -name "vrf" -membertype NoteProperty -Value $vrf + } + + $response + } + + End { + } +} + +function Remove-ArubaCXStaticRoutes { + + <# + .SYNOPSIS + Remove a Static Route on Aruba CX Switch + + .DESCRIPTION + Remove a Static Route on Aruba CX Switch + + .EXAMPLE + $sr = Get-ArubaCXStaticRoutes -prefix 192.0.2.0/24 + PS C:\>$sr | Remove-ArubaCXStaticRoutes + + Remove Static Route with prefix 192.0.2.0/24 (on default vrf) + + .EXAMPLE + Remove-ArubaCXStaticRoutes -prefix 192.0.2.0/24 -confirm:$false -vrf MyVRF + + Remove Static Route 192.0.2.0/24 on MyVRF with no confirmation + #> + + [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'high')] + Param( + [Parameter (Mandatory = $true, ParameterSetName = "prefix")] + [string]$prefix, + [Parameter (Mandatory = $true, ValueFromPipeline = $true, Position = 1, ParameterSetName = "route")] + [ValidateScript( { Confirm-ArubaCXStaticRoutes $_ })] + [psobject]$sr, + [Parameter(Mandatory = $true, ParameterSetName = "prefix")] + [string]$vrf, + [Parameter (Mandatory = $False)] + [ValidateNotNullOrEmpty()] + [PSObject]$connection = $DefaultArubaCXConnection + ) + + Begin { + } + + Process { + + #get prefix and vrf from static route ps object + if ($sr) { + $prefix = $sr.prefix + $vrf = $sr.vrf + } + + #replace / by %2F + $uri_prefix = $prefix -replace '/', '%2F' + + $uri = "system/vrfs/$vrf/static_routes/$uri_prefix" + + if ($PSCmdlet.ShouldProcess("Static Route (VRF: ${vrf})", "Remove ${prefix}")) { + Write-Progress -activity "Remove Static Route" + Invoke-ArubaCXRestMethod -method "DELETE" -uri $uri -connection $connection + Write-Progress -activity "Remove Static Route" -completed + } + } + + End { + } +} \ No newline at end of file diff --git a/Tests/common.ps1 b/Tests/common.ps1 index 98da328..2bee3ff 100644 --- a/Tests/common.ps1 +++ b/Tests/common.ps1 @@ -10,6 +10,9 @@ $script:pester_vlan = 85 #vlan id for Vlan test $script:pester_vlan2 = 86 #vlan id for Vlan test (for affect a second vlan to interface) $script:pester_interface = "1/1/1" #interface id for test... $script:pester_vrf = "pester_vrf" #interface id for test... +$script:pester_sr_ip4 = "192.0.2.0" # Network for Static Route +$script:pester_sr_mask = "24" # Netmask for Static Route +$script:pester_sr = $pester_sr_ip4 + "/" + $pester_sr_mask . ../credential.ps1 #TODO: Add check if no ipaddress/login/password info... diff --git a/Tests/integration/Connection.Tests.ps1 b/Tests/integration/Connection.Tests.ps1 index 185718c..cb41fc0 100644 --- a/Tests/integration/Connection.Tests.ps1 +++ b/Tests/integration/Connection.Tests.ps1 @@ -66,6 +66,9 @@ Describe "Connect to a switch (using multi connection)" { It "Use Multi connection for call Get Vrfs" { { Get-ArubaCXVrfs -connection $cx } | Should Not throw } + It "Use Multi connection for call Get Static Routes" { + { Get-ArubaCXStaticRoutes -connection $cx } | Should Not throw + } } It "Disconnect to a switch (Multi connection)" { diff --git a/Tests/integration/StaticRoutes.Tests.ps1 b/Tests/integration/StaticRoutes.Tests.ps1 new file mode 100644 index 0000000..37e6e7e --- /dev/null +++ b/Tests/integration/StaticRoutes.Tests.ps1 @@ -0,0 +1,391 @@ +# +# Copyright 2020, Alexis La Goutte +# +# SPDX-License-Identifier: Apache-2.0 +# +. ../common.ps1 + +Describe "Get Static Route" { + + Context "Get Static Route on VRF: default" { + + BeforeAll { + #Add a blackhole static route on vrf default + Add-ArubaCXStaticRoutes -address_family ipv4 -prefix_ip4 $pester_sr_ip4 -prefix_ip4_mask $pester_sr_mask -type blackhole + } + + It "Get Static Route Does not throw an error" { + { + Get-ArubaCXStaticRoutes + } | Should Not Throw + } + + It "Get ALL Static Route" { + $sr = Get-ArubaCXStaticRoutes + $sr.count | Should -Not -Be $NULL + } + + It "Get Static Route ($pester_sr)" { + $sr = Get-ArubaCXStaticRoutes -prefix $pester_sr + $sr.prefix | Should -Be $pester_sr + } + + It "Get Static Route ($pester_sr) and confirm (via Confirm-ArubaCXStaticRoutes)" { + $sr = Get-ArubaCXStaticRoutes -prefix $pester_sr + Confirm-ArubaCXStaticRoutes ($sr) | Should -Be $true + } + + #Get with attribute, depth... + Context "Selector" { + + It "Get Static Route with selector equal configuration" { + { + Get-ArubaCXStaticRoutes -selector configuration + } | Should Not Throw + } + + It "Get Static Route with selector equal statistics" { + { + Get-ArubaCXStaticRoutes -selector statistics + } | Should Not Throw + } + + It "Get Static Route with selector equal status" { + { + Get-ArubaCXStaticRoutes -selector status + } | Should Not Throw + } + + It "Get Static Route with selector equal writable" { + { + Get-ArubaCXStaticRoutes -selector writable + } | Should Not Throw + } + } + + Context "Depth" { + + It "Get Static Route with depth equal 1" { + { + Get-ArubaCXStaticRoutes -depth 1 + } | Should Not Throw + } + + It "Get Static Route with depth equal 2" { + { + Get-ArubaCXStaticRoutes -depth 2 + } | Should Not Throw + } + + It "Get Static Route with depth equal 3" { + { + Get-ArubaCXStaticRoutes -depth 3 + } | Should Not Throw + } + + It "Get Static Route with depth equal 4" { + { + Get-ArubaCXStaticRoutes -depth 4 + } | Should Not Throw + } + } + + Context "Attribute" { + + It "Get Static Route with one attribute (prefix)" { + $sr = Get-ArubaCXStaticRoutes -prefix $pester_sr -attribute prefix + @($sr).count | Should -be 1 + $sr.prefix | Should -Not -BeNullOrEmpty + } + + It "Get Static Route with two attributes (prefix, type)" { + $sr = Get-ArubaCXStaticRoutes -prefix $pester_sr -attribute prefix, type + @($sr).count | Should -be 1 + $sr.prefix | Should -Not -BeNullOrEmpty + $sr.type | Should -Not -BeNullOrEmpty + } + + } + + Context "Search" { + + It "Search Static Route by name ($pester_sr)" { + $sr = Get-ArubaCXStaticRoutes -prefix $pester_sr + @($sr).count | Should -be 1 + $sr.prefix | Should -Be $pester_sr + } + + } + + AfterAll { + Get-ArubaCXStaticRoutes -prefix $pester_sr | Remove-ArubaCXStaticRoutes -confirm:$false + } + } + + Context "Get Static Route on VRF: $pester_vrf" { + + BeforeAll { + #Add Vrf + Add-ArubaCXVrfs -name $pester_vrf + #Add a reject static route on vrf $pester_vrf + Add-ArubaCXStaticRoutes -address_family ipv4 -prefix_ip4 $pester_sr_ip4 -prefix_ip4_mask $pester_sr_mask -type reject -vrf $pester_vrf + } + + It "Get Static Route Does not throw an error" { + { + Get-ArubaCXStaticRoutes -vrf $pester_vrf + } | Should Not Throw + } + + It "Get ALL Static Route" { + $sr = Get-ArubaCXStaticRoutes -vrf $pester_vrf + $sr.count | Should -Not -Be $NULL + } + + It "Get Static Route ($pester_sr)" { + $sr = Get-ArubaCXStaticRoutes -prefix $pester_sr -vrf $pester_vrf + $sr.prefix | Should -Be $pester_sr + $sr.vrf | should -Be $pester_vrf + } + + It "Get Static Route ($pester_sr) and confirm (via Confirm-ArubaCXStaticRoutes)" { + $sr = Get-ArubaCXStaticRoutes -prefix $pester_sr -vrf $pester_vrf + Confirm-ArubaCXStaticRoutes ($sr) | Should -Be $true + } + + #Get with attribute, depth... + Context "Selector" { + + It "Get Static Route with selector equal configuration" { + { + Get-ArubaCXStaticRoutes -selector configuration -vrf $pester_vrf + } | Should Not Throw + } + + It "Get Static Route with selector equal statistics" { + { + Get-ArubaCXStaticRoutes -selector statistics -vrf $pester_vrf + } | Should Not Throw + } + + It "Get Static Route with selector equal status" { + { + Get-ArubaCXStaticRoutes -selector status -vrf $pester_vrf + } | Should Not Throw + } + + It "Get Static Route with selector equal writable" { + { + Get-ArubaCXStaticRoutes -selector writable -vrf $pester_vrf + } | Should Not Throw + } + } + + Context "Depth" { + + It "Get Static Route with depth equal 1" { + { + Get-ArubaCXStaticRoutes -depth 1 -vrf $pester_vrf + } | Should Not Throw + } + + It "Get Static Route with depth equal 2" { + { + Get-ArubaCXStaticRoutes -depth 2 -vrf $pester_vrf + } | Should Not Throw + } + + It "Get Static Route with depth equal 3" { + { + Get-ArubaCXStaticRoutes -depth 3 -vrf $pester_vrf + } | Should Not Throw + } + + It "Get Static Route with depth equal 4" { + { + Get-ArubaCXStaticRoutes -depth 4 -vrf $pester_vrf + } | Should Not Throw + } + + } + + Context "Attribute" { + + It "Get Static Route with one attribute (prefix)" { + $sr = Get-ArubaCXStaticRoutes -prefix $pester_sr -vrf $pester_vrf -attribute prefix + @($sr).count | Should -be 1 + $sr.prefix | Should -Not -BeNullOrEmpty + $sr.vrf | Should -Be $pester_vrf + } + + It "Get Static Route with two attributes (prefix, type)" { + $sr = Get-ArubaCXStaticRoutes -prefix $pester_sr -vrf $pester_vrf -attribute prefix, type + @($sr).count | Should -be 1 + $sr.prefix | Should -Not -BeNullOrEmpty + $sr.type | Should -Not -BeNullOrEmpty + $sr.vrf | Should -Be $pester_vrf + } + + } + + Context "Search" { + It "Search Static Route by name ($pester_sr)" { + $sr = Get-ArubaCXStaticRoutes -prefix $pester_sr -vrf $pester_vrf + @($sr).count | Should -be 1 + $sr.prefix | Should -Be $pester_sr + $sr.vrf | Should -Be $pester_vrf + } + } + + AfterAll { + Get-ArubaCXStaticRoutes -prefix $pester_sr -vrf $pester_vrf | Remove-ArubaCXStaticRoutes -confirm:$false + Get-ArubaCXVrfs -name $pester_vrf | Remove-ArubaCXVrfs -confirm:$false + } + + } + + +} + +Describe "Add Static Route" { + + Context "Add Static Route on VRF: default" { + + AfterEach { + Get-ArubaCXStaticRoutes -prefix $pester_sr | Remove-ArubaCXStaticRoutes -confirm:$false + } + + It "Add Static Route $pester_sr (type forward)" { + Add-ArubaCXStaticRoutes -address_family ipv4 -prefix_ip4 $pester_sr_ip4 -prefix_ip4_mask $pester_sr_mask -type forward + $sr = Get-ArubaCXStaticRoutes -prefix $pester_sr + $sr.prefix | Should -Be $pester_sr + $sr.address_family | Should -Be "ipv4" + $sr.type | Should -Be "forward" + $sr.vrf | Should -Be "default" + } + + It "Add Static Route $pester_sr (type reject)" { + Add-ArubaCXStaticRoutes -address_family ipv4 -prefix_ip4 $pester_sr_ip4 -prefix_ip4_mask $pester_sr_mask -type reject + $sr = Get-ArubaCXStaticRoutes -prefix $pester_sr + $sr.prefix | Should -Be $pester_sr + $sr.address_family | Should -Be "ipv4" + $sr.type | Should -Be "reject" + $sr.vrf | Should -Be "default" + } + + It "Add Static Route $pester_sr (type blackhole)" { + Add-ArubaCXStaticRoutes -address_family ipv4 -prefix_ip4 $pester_sr_ip4 -prefix_ip4_mask $pester_sr_mask -type blackhole + $sr = Get-ArubaCXStaticRoutes -prefix $pester_sr + $sr.prefix | Should -Be $pester_sr + $sr.address_family | Should -Be "ipv4" + $sr.type | Should -Be "blackhole" + $sr.vrf | Should -Be "default" + } + + } + + Context "Add Static Route on VRF: $pester_vrf" { + + BeforeAll { + #Add Vrf + Add-ArubaCXVrfs -name $pester_vrf + } + + AfterEach { + Get-ArubaCXStaticRoutes -prefix $pester_sr -vrf $pester_vrf | Remove-ArubaCXStaticRoutes -confirm:$false + } + + It "Add Static Route $pester_sr (type forward)" { + Add-ArubaCXStaticRoutes -address_family ipv4 -prefix_ip4 $pester_sr_ip4 -prefix_ip4_mask $pester_sr_mask -type forward -vrf $pester_vrf + $sr = Get-ArubaCXStaticRoutes -prefix $pester_sr -vrf $pester_vrf + $sr.prefix | Should -Be $pester_sr + $sr.address_family | Should -Be "ipv4" + $sr.type | Should -Be "forward" + $sr.vrf | Should -Be $pester_vrf + } + + It "Add Static Route $pester_sr (type reject)" { + Add-ArubaCXStaticRoutes -address_family ipv4 -prefix_ip4 $pester_sr_ip4 -prefix_ip4_mask $pester_sr_mask -type reject -vrf $pester_vrf + $sr = Get-ArubaCXStaticRoutes -prefix $pester_sr -vrf $pester_vrf + $sr.prefix | Should -Be $pester_sr + $sr.address_family | Should -Be "ipv4" + $sr.type | Should -Be "reject" + $sr.vrf | Should -Be $pester_vrf + } + + It "Add Static Route $pester_sr (type blackhole)" { + Add-ArubaCXStaticRoutes -address_family ipv4 -prefix_ip4 $pester_sr_ip4 -prefix_ip4_mask $pester_sr_mask -type blackhole -vrf $pester_vrf + $sr = Get-ArubaCXStaticRoutes -prefix $pester_sr -vrf $pester_vrf + $sr.prefix | Should -Be $pester_sr + $sr.address_family | Should -Be "ipv4" + $sr.type | Should -Be "blackhole" + $sr.vrf | Should -Be $pester_vrf + } + + AfterAll { + Get-ArubaCXVrfs -name $pester_vrf | Remove-ArubaCXVrfs -confirm:$false + } + + } + +} + +Describe "Remove Static Route" { + + Context "Add Static Route on VRF: default" { + + BeforeEach { + #Always add Static Route $pester_sr... + Add-ArubaCXStaticRoutes -address_family ipv4 -prefix_ip4 $pester_sr_ip4 -prefix_ip4_mask $pester_sr_mask -type blackhole + } + + It "Remove Static Route $pester_sr by prefix" { + Remove-ArubaCXStaticRoutes -prefix $pester_sr -vrf default -confirm:$false + $sr = Get-ArubaCXStaticRoutes + $sr.$pester_sr | Should -Be $NULL + } + + It "Remove Static Route $pester_sr by pipeline" { + $sr = Get-ArubaCXStaticRoutes -prefix $pester_sr + $sr | Remove-ArubaCXStaticRoutes -confirm:$false + $sr = Get-ArubaCXStaticRoutes + $sr.$pester_sr | Should -Be $NULL + } + + } + + Context "Add Static Route on VRF: $pester_vrf" { + + BeforeAll { + #Add Vrf + Add-ArubaCXVrfs -name $pester_vrf + } + + BeforeEach { + #Always add Static Route $pester_sr... + Add-ArubaCXStaticRoutes -address_family ipv4 -prefix_ip4 $pester_sr_ip4 -prefix_ip4_mask $pester_sr_mask -type blackhole -vrf $pester_vrf + } + + It "Remove Static Route $pester_sr by prefix" { + Remove-ArubaCXStaticRoutes -prefix $pester_sr -vrf $pester_vrf -confirm:$false + $sr = Get-ArubaCXStaticRoutes -vrf $pester_vrf + $sr.$pester_sr | Should -Be $NULL + } + + It "Remove Static Route $pester_sr by pipeline" { + $sr = Get-ArubaCXStaticRoutes -vrf $pester_vrf -prefix $pester_sr + $sr | Remove-ArubaCXStaticRoutes -confirm:$false + $sr = Get-ArubaCXStaticRoutes -vrf $pester_vrf + $sr.$pester_sr | Should -Be $NULL + } + + AfterAll { + #Remove vrf + Get-ArubaCXVrfs -name $pester_vrf | Remove-ArubaCXVrfs -confirm:$false + } + + } + +} + +Disconnect-ArubaCX -confirm:$false \ No newline at end of file