Skip to content

Commit

Permalink
Neighbors (ARP): Add pipeline support
Browse files Browse the repository at this point in the history
  • Loading branch information
alagoutte committed Apr 27, 2021
1 parent 1d95640 commit 314bfb2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions PowerArubaCX/Public/Neighbors.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ function Get-ArubaCXNeighbors {
#>
Param(
[Parameter (Mandatory = $false, ValueFromPipeline = $true)]
[ValidateScript( { Confirm-ArubaCXVrfs $_ })]
[psobject]$vrf_pp,
[Parameter(Mandatory = $false, position = 1)]
[String]$vrf = "*",
[Parameter(Mandatory = $false)]
Expand All @@ -42,6 +45,11 @@ function Get-ArubaCXNeighbors {

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 )
Expand Down

0 comments on commit 314bfb2

Please sign in to comment.