Skip to content

Commit 7a43293

Browse files
committed
BGP(Router): add BGP Neighbor Status chapiter
1 parent b64f024 commit 7a43293

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

Src/Private/Get-AbrFgtRoute.ps1

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,40 @@ function Get-AbrFgtRoute {
490490

491491
}
492492

493+
if ($BGPNeighbors) {
494+
495+
Section -Style Heading3 'BGP Neighbor Status' {
496+
$OutObj = @()
497+
498+
foreach ($n in $BGPNeighbors) {
499+
500+
$OutObj += [pscustomobject]@{
501+
"Neighbor IP" = $n.neighbor_ip
502+
"Local IP" = $n.local_ip
503+
"Remote AS" = $n.remote_as
504+
"Admin status" = $n.admin_status
505+
"State" = $n.state
506+
"type" = $n.type
507+
}
508+
}
509+
510+
$TableParams = @{
511+
Name = "BGP Neighbor Status"
512+
List = $false
513+
ColumnWidths = 15, 15, 15, 25, 15, 15
514+
}
515+
516+
if ($Report.ShowTableCaptions) {
517+
$TableParams['Caption'] = "- $($TableParams.Name)"
518+
}
519+
520+
$OutObj | Where-Object { $_.state -ne "Established" } | Set-Style -Style Critical
521+
$OutObj | Where-Object { $_.'Admin Status' -ne "True" } | Set-Style -Style Warning
522+
$OutObj | Table @TableParams
523+
}
524+
525+
}
526+
493527
}
494528
}
495529

0 commit comments

Comments
 (0)