Skip to content

Commit c432757

Browse files
committed
Neighbors (ARP): Add pipeline support
1 parent 994f505 commit c432757

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: PowerArubaCX/Public/Neighbors.ps1

+8
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ function Get-ArubaCXNeighbors {
2020
2121
#>
2222
Param(
23+
[Parameter (Mandatory = $false, ValueFromPipeline = $true)]
24+
[ValidateScript( { Confirm-ArubaCXVrfs $_ })]
25+
[psobject]$vrf_pp,
2326
[Parameter(Mandatory = $false, position = 1)]
2427
[String]$vrf = "*",
2528
[Parameter(Mandatory = $false)]
@@ -42,6 +45,11 @@ function Get-ArubaCXNeighbors {
4245

4346
Process {
4447

48+
#get vrf name from vrf_pp ps object (based by pipeline)
49+
if ($vrf_pp) {
50+
$vrf = $vrf_pp.name
51+
}
52+
4553
$invokeParams = @{ }
4654
if ( $PsBoundParameters.ContainsKey('depth') ) {
4755
$invokeParams.add( 'depth', $depth )

0 commit comments

Comments
 (0)