Skip to content

Commit 94227e6

Browse files
committed
BGP(Router): Add Neighbor Range chapiter
with prefix, neighbor Group
1 parent 417ef5c commit 94227e6

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

Src/Private/Get-AbrFgtRoute.ps1

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ function Get-AbrFgtRoute {
327327
"Name" = $n.name
328328
"Remote AS" = $n.'remote-as'
329329
"Description" = $n.description
330-
"Activate" = $n.activate
330+
"Activate" = $n.activate
331331
}
332332
}
333333

@@ -395,6 +395,39 @@ function Get-AbrFgtRoute {
395395

396396
}
397397
}
398+
399+
if ($bgp.'neighbor-range') {
400+
401+
$neighborrange = $bgp.'neighbor-range'
402+
Section -Style Heading3 'Neighbor Range' {
403+
$OutObj = @()
404+
405+
foreach ($n in $neighborrange) {
406+
407+
$OutObj += [pscustomobject]@{
408+
"id" = $n.id
409+
"Prefix" = $(if ($Options.UseCIDRNotation) { Convert-AbrFgtSubnetToCIDR -Input $n.prefix } else { $n.prefix })
410+
"Neighbor Group" = $n.'neighbor-group'
411+
"Max Neighbor Num " = $n.'max-neighbor-num'
412+
}
413+
}
414+
415+
$TableParams = @{
416+
Name = "BGP Neighbor Range"
417+
List = $false
418+
ColumnWidths = 10, 35, 30, 25
419+
}
420+
421+
if ($Report.ShowTableCaptions) {
422+
$TableParams['Caption'] = "- $($TableParams.Name)"
423+
}
424+
425+
$OutObj | Table @TableParams
426+
}
427+
428+
}
429+
430+
398431
}
399432
}
400433

0 commit comments

Comments
 (0)