Skip to content

Commit 1fd7fef

Browse files
committed
router(BGP): fix indent after vscode settings change
1 parent 670d946 commit 1fd7fef

File tree

1 file changed

+54
-57
lines changed

1 file changed

+54
-57
lines changed

Src/Private/Get-AbrFgtRoute.ps1

Lines changed: 54 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -110,20 +110,17 @@ function Get-AbrFgtRoute {
110110
elseif ($static.'internet-service') {
111111
#TODO: add Lookup, only display the id...
112112
$dst = $static.'internet-service'
113-
}
114-
else {
113+
} else {
115114
$dst = $(if ($Options.UseCIDRNotation) { Convert-AbrFgtSubnetToCIDR -Input $static.dst } else { $static.dst })
116115
}
117116

118117
#when Blackhole is enable, display blackhole for interface
119118
if ($static.blackhole -eq "enable") {
120119
$interface = "Blackhole"
121-
}
122-
elseif ($static.device -eq "") {
120+
} elseif ($static.device -eq "") {
123121
#No device => SD-Wan (Zone)
124122
$interface = $static.'sdwan-zone'.name
125-
}
126-
else {
123+
} else {
127124
$interface = $static.device
128125
}
129126

@@ -201,16 +198,16 @@ function Get-AbrFgtRoute {
201198
Paragraph "The following section provides a summary of BGP settings."
202199
BlankLine
203200
$OutObj = [pscustomobject]@{
204-
"BGP Neighbor" = @($BGP.neighbor).count
205-
"BGP Neighbor Group" = @($BGP.'neighbor-group').count
206-
"BGP Neighbor Range" = @($BGP.'neighbor-range').count
207-
"BGP Network" = @($BGP.network).count
201+
"BGP Neighbor" = @($BGP.neighbor).count
202+
"BGP Neighbor Group" = @($BGP.'neighbor-group').count
203+
"BGP Neighbor Range" = @($BGP.'neighbor-range').count
204+
"BGP Network" = @($BGP.network).count
208205
"BGP Neighbors Status" = @($BGPNeighbors).count
209206
}
210207

211208
$TableParams = @{
212-
Name = "Summary"
213-
List = $true
209+
Name = "Summary"
210+
List = $true
214211
ColumnWidths = 50, 50
215212
}
216213

@@ -240,15 +237,15 @@ function Get-AbrFgtRoute {
240237
}
241238
}
242239
$OutObj += [pscustomobject]@{
243-
"Name" = $name
244-
"Value" = $value
240+
"Name" = $name
241+
"Value" = $value
245242
"Default" = $default
246243
}
247244
}
248245

249246
$TableParams = @{
250-
Name = "BGP Configuration"
251-
List = $false
247+
Name = "BGP Configuration"
248+
List = $false
252249
ColumnWidths = 34, 33, 33
253250
}
254251

@@ -270,16 +267,16 @@ function Get-AbrFgtRoute {
270267
foreach ($n in $neighbor) {
271268

272269
$OutObj += [pscustomobject]@{
273-
"IP" = $n.ip
274-
"Remote AS" = $n.'remote-as'
270+
"IP" = $n.ip
271+
"Remote AS" = $n.'remote-as'
275272
"Description" = $n.description
276-
"Activate" = $n.activate
273+
"Activate" = $n.activate
277274
}
278275
}
279276

280277
$TableParams = @{
281-
Name = "BGP Neighbor"
282-
List = $false
278+
Name = "BGP Neighbor"
279+
List = $false
283280
ColumnWidths = 25, 25, 25, 25
284281
}
285282

@@ -320,15 +317,15 @@ function Get-AbrFgtRoute {
320317
}
321318
}
322319
$OutObj += [pscustomobject]@{
323-
"Name" = $name
324-
"Value" = $value
320+
"Name" = $name
321+
"Value" = $value
325322
"Default" = $default
326323
}
327324
}
328325

329326
$TableParams = @{
330-
Name = "BGP Neighbor Configuration $($n.ip)"
331-
List = $false
327+
Name = "BGP Neighbor Configuration $($n.ip)"
328+
List = $false
332329
ColumnWidths = 34, 33, 33
333330
}
334331

@@ -355,16 +352,16 @@ function Get-AbrFgtRoute {
355352
foreach ($n in $neighborgroup) {
356353

357354
$OutObj += [pscustomobject]@{
358-
"Name" = $n.name
359-
"Remote AS" = $n.'remote-as'
355+
"Name" = $n.name
356+
"Remote AS" = $n.'remote-as'
360357
"Description" = $n.description
361-
"Activate" = $n.activate
358+
"Activate" = $n.activate
362359
}
363360
}
364361

365362
$TableParams = @{
366-
Name = "BGP Neighbor Group"
367-
List = $false
363+
Name = "BGP Neighbor Group"
364+
List = $false
368365
ColumnWidths = 25, 25, 25, 25
369366
}
370367

@@ -405,23 +402,23 @@ function Get-AbrFgtRoute {
405402
}
406403
}
407404
$OutObj += [pscustomobject]@{
408-
"Name" = $name
409-
"Value" = $value
405+
"Name" = $name
406+
"Value" = $value
410407
"Default" = $default
411408
}
412409
}
413410

414411
$TableParams = @{
415-
Name = "BGP Neighbor Group Configuration $($n.name)"
416-
List = $false
412+
Name = "BGP Neighbor Group Configuration $($n.name)"
413+
List = $false
417414
ColumnWidths = 34, 33, 33
418415
}
419416

420417
if ($Report.ShowTableCaptions) {
421418
$TableParams['Caption'] = "- $($TableParams.Name)"
422419
}
423420

424-
$OutObj | Where-Object { $_.value -ne $_.default } | Set-Style -Style Critical
421+
$OutObj | Where-Object { $_.value -NE $_.default } | Set-Style -Style Critical
425422
$OutObj | Table @TableParams
426423
}
427424
}
@@ -439,16 +436,16 @@ function Get-AbrFgtRoute {
439436
foreach ($n in $neighborrange) {
440437

441438
$OutObj += [pscustomobject]@{
442-
"id" = $n.id
443-
"Prefix" = $(if ($Options.UseCIDRNotation) { Convert-AbrFgtSubnetToCIDR -Input $n.prefix } else { $n.prefix })
444-
"Neighbor Group" = $n.'neighbor-group'
439+
"id" = $n.id
440+
"Prefix" = $(if ($Options.UseCIDRNotation) { Convert-AbrFgtSubnetToCIDR -Input $n.prefix } else { $n.prefix })
441+
"Neighbor Group" = $n.'neighbor-group'
445442
"Max Neighbor Num " = $n.'max-neighbor-num'
446443
}
447444
}
448445

449446
$TableParams = @{
450-
Name = "BGP Neighbor Range"
451-
List = $false
447+
Name = "BGP Neighbor Range"
448+
List = $false
452449
ColumnWidths = 10, 35, 30, 25
453450
}
454451

@@ -470,17 +467,17 @@ function Get-AbrFgtRoute {
470467
foreach ($n in $neighbornetwork) {
471468

472469
$OutObj += [pscustomobject]@{
473-
"id" = $n.id
474-
"Prefix " = $(if ($Options.UseCIDRNotation) { Convert-AbrFgtSubnetToCIDR -Input $n.prefix } else { $n.prefix })
470+
"id" = $n.id
471+
"Prefix " = $(if ($Options.UseCIDRNotation) { Convert-AbrFgtSubnetToCIDR -Input $n.prefix } else { $n.prefix })
475472
"Network-import-check" = $n.'network-import-check'
476-
"Backdoor" = $n.backdoor
477-
"Route-map" = $n.'route-map'
473+
"Backdoor" = $n.backdoor
474+
"Route-map" = $n.'route-map'
478475
}
479476
}
480477

481478
$TableParams = @{
482-
Name = "BGP Network"
483-
List = $false
479+
Name = "BGP Network"
480+
List = $false
484481
ColumnWidths = 10, 35, 24, 11, 20
485482
}
486483

@@ -502,15 +499,15 @@ function Get-AbrFgtRoute {
502499
foreach ($r in $redistribute) {
503500

504501
$OutObj += [pscustomobject]@{
505-
"Name" = $r.name
506-
"Status" = $r.status
502+
"Name" = $r.name
503+
"Status" = $r.status
507504
"Route-map" = $r.'route-map'
508505
}
509506
}
510507

511508
$TableParams = @{
512-
Name = "BGP Redistribute"
513-
List = $false
509+
Name = "BGP Redistribute"
510+
List = $false
514511
ColumnWidths = 40, 30, 30
515512
}
516513

@@ -532,18 +529,18 @@ function Get-AbrFgtRoute {
532529
foreach ($n in $BGPNeighbors) {
533530

534531
$OutObj += [pscustomobject]@{
535-
"Neighbor IP" = $n.neighbor_ip
536-
"Local IP" = $n.local_ip
537-
"Remote AS" = $n.remote_as
532+
"Neighbor IP" = $n.neighbor_ip
533+
"Local IP" = $n.local_ip
534+
"Remote AS" = $n.remote_as
538535
"Admin status" = $n.admin_status
539-
"State" = $n.state
540-
"type" = $n.type
536+
"State" = $n.state
537+
"type" = $n.type
541538
}
542539
}
543540

544541
$TableParams = @{
545-
Name = "BGP Neighbor Status"
546-
List = $false
542+
Name = "BGP Neighbor Status"
543+
List = $false
547544
ColumnWidths = 15, 15, 15, 25, 15, 15
548545
}
549546

0 commit comments

Comments
 (0)