@@ -32,9 +32,9 @@ function Get-AbrFgtRoute {
3232 $MonitorRouterIPv4 = Get-FGTMonitorRouterIPv4
3333 $Statics = Get-FGTRouterStatic
3434 $PolicyBasedRouting = Get-FGTRouterPolicy
35- $BGPNeighbors = get -FGTMonitorRouterBGPNeighbors
35+ $BGPNeighbors = Get -FGTMonitorRouterBGPNeighbors
3636 $BGP = Get-FGTRouterBGP
37- $BGPSchema = (Invoke-FgtRestMethod ' api/v2/cmdb/router/bgp?&action=schema' ).results.children
37+ $BGPSchema = (Invoke-FGTRestMethod ' api/v2/cmdb/router/bgp?&action=schema' ).results.children
3838
3939 if ($InfoLevel.Route -ge 1 ) {
4040 Section - Style Heading3 ' Summary' {
@@ -224,7 +224,7 @@ function Get-AbrFgtRoute {
224224 Section - Style Heading3 ' Configuration' {
225225 $OutObj = @ ()
226226
227- foreach ($properties in $bgp .PSObject.properties ) {
227+ foreach ($properties in $BGP .PSObject.properties ) {
228228 # Skip System Object array (manually display after like Neighbor, network...)
229229 if ($properties.typeNameOfValue -eq " System.Object[]" ) {
230230 continue
@@ -257,9 +257,9 @@ function Get-AbrFgtRoute {
257257 $OutObj | Table @TableParams
258258 }
259259
260- if ($bgp .' neighbor' ) {
260+ if ($BGP .' neighbor' ) {
261261
262- $neighbor = $bgp .' neighbor'
262+ $neighbor = $BGP .' neighbor'
263263 Section - Style Heading3 ' Neighbor' {
264264 Section - Style NOTOCHeading4 - ExcludeFromTOC ' Summary' {
265265 $OutObj = @ ()
@@ -338,9 +338,9 @@ function Get-AbrFgtRoute {
338338 }
339339 }
340340
341- if ($bgp .' neighbor-group' ) {
341+ if ($BGP .' neighbor-group' ) {
342342
343- $neighborgroup = $bgp .' neighbor-group'
343+ $neighborgroup = $BGP .' neighbor-group'
344344 Section - Style Heading3 ' Neighbor Group' {
345345 Section - Style NOTOCHeading4 - ExcludeFromTOC ' Summary' {
346346 $OutObj = @ ()
@@ -419,9 +419,9 @@ function Get-AbrFgtRoute {
419419 }
420420 }
421421
422- if ($bgp .' neighbor-range' ) {
422+ if ($BGP .' neighbor-range' ) {
423423
424- $neighborrange = $bgp .' neighbor-range'
424+ $neighborrange = $BGP .' neighbor-range'
425425 Section - Style Heading3 ' Neighbor Range' {
426426 $OutObj = @ ()
427427
@@ -450,9 +450,9 @@ function Get-AbrFgtRoute {
450450
451451 }
452452
453- if ($bgp .network ) {
453+ if ($BGP .network ) {
454454
455- $neighbornetwork = $bgp .network
455+ $neighbornetwork = $BGP .network
456456 Section - Style Heading3 ' Network' {
457457 $OutObj = @ ()
458458
@@ -482,18 +482,18 @@ function Get-AbrFgtRoute {
482482
483483 }
484484
485- if ($bgp .redistribute ) {
485+ if ($BGP .redistribute ) {
486486
487- $neighborredistribute = $bgp .redistribute
487+ $redistribute = $BGP .redistribute
488488 Section - Style Heading3 ' Redistribute' {
489489 $OutObj = @ ()
490490
491- foreach ($n in $neighborredistribute ) {
491+ foreach ($r in $redistribute ) {
492492
493493 $OutObj += [pscustomobject ]@ {
494- " Name" = $n .name
495- " Status" = $n .status
496- " Route-map" = $n .' route-map'
494+ " Name" = $r .name
495+ " Status" = $r .status
496+ " Route-map" = $r .' route-map'
497497 }
498498 }
499499
0 commit comments