Skip to content

Commit 2822766

Browse files
committed
BGP(router): Add BGP Summmary (number of neighbor/group/range/status
1 parent 5df684f commit 2822766

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Src/Private/Get-AbrFgtRoute.ps1

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,31 @@ function Get-AbrFgtRoute {
199199
#There is always BGP config, only display if router-id is configured
200200
if ($BGP.'router-id' -and $InfoLevel.Route -ge 1) {
201201
Section -Style Heading3 'BGP' {
202+
203+
Section -Style Heading3 'Summary' {
204+
Paragraph "The following section provides a summary of BGP settings."
205+
BlankLine
206+
$OutObj = [pscustomobject]@{
207+
"BGP Neighbor" = @($BGP.neighbor).count
208+
"BGP Neighbor Group" = @($BGP.'neighbor-group').count
209+
"BGP Neighbor Range" = @($BGP.'neighbor-range').count
210+
"BGP Network" = @($BGP.network).count
211+
"BGP Neighbors Status" = @($BGPNeighbors).count
212+
}
213+
214+
$TableParams = @{
215+
Name = "Summary"
216+
List = $true
217+
ColumnWidths = 50, 50
218+
}
219+
220+
if ($Report.ShowTableCaptions) {
221+
$TableParams['Caption'] = "- $($TableParams.Name)"
222+
}
223+
224+
$OutObj | Table @TableParams
225+
}
226+
202227
Section -Style Heading3 'Configuration' {
203228
$OutObj = @()
204229

0 commit comments

Comments
 (0)