-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from rebelinux/dev
v0.6.7
- Loading branch information
Showing
11 changed files
with
408 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,7 @@ | |
"Vserver": { | ||
"Status": true, | ||
"Iscsi": true, | ||
"Nvme": true, | ||
"FCP": true, | ||
"CG": true, | ||
"NFS": true, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
function Get-AbrOntapVserverNvmeFcAdapter { | ||
<# | ||
.SYNOPSIS | ||
Used by As Built Report to retrieve NetApp ONTAP Vserver Nvme FC adapter information from the Cluster Management Network | ||
.DESCRIPTION | ||
.NOTES | ||
Version: 0.6.7 | ||
Author: Jonathan Colon | ||
Twitter: @jcolonfzenpr | ||
Github: rebelinux | ||
.EXAMPLE | ||
.LINK | ||
#> | ||
param ( | ||
[Parameter ( | ||
Position = 0, | ||
Mandatory)] | ||
[string] | ||
$Vserver | ||
) | ||
|
||
begin { | ||
Write-PScriboMessage "Collecting ONTAP Vserver Nvme FC adapter information." | ||
} | ||
|
||
process { | ||
try { | ||
$VserverData = Get-NcNvmeInterface -VserverContext $Vserver -Controller $Array | Where-Object {$_.PhysicalProtocol -eq 'fibre_channel'} | Sort-Object -Property HomeNode | ||
$VserverObj = @() | ||
if ($VserverData) { | ||
foreach ($Item in $VserverData) { | ||
try { | ||
$inObj = [ordered] @{ | ||
'Node Name' = $Item.HomeNode | ||
'Adapter' = $Item.HomePort | ||
'Protocol' = $Item.PhysicalProtocol | ||
'WWNN' = $Item.FcWwnn | ||
'WWPN' = $Item.FcWwpn | ||
'Status' = Switch ($Item.StatusAdmin) { | ||
'up' { 'Up' } | ||
'down' { 'Down' } | ||
default { $Item.StatusAdmin } | ||
} | ||
} | ||
$VserverObj += [pscustomobject]$inobj | ||
} catch { | ||
Write-PScriboMessage -IsWarning $_.Exception.Message | ||
} | ||
} | ||
if ($Healthcheck.Vserver.FCP) { | ||
$VserverObj | Where-Object { $_.'Status' -like 'Down' } | Set-Style -Style Warning -Property 'Status' | ||
} | ||
|
||
$TableParams = @{ | ||
Name = "Nvme FC Physical Adapter - $($Vserver)" | ||
List = $false | ||
ColumnWidths = 25, 12, 15, 18, 18, 12 | ||
|
||
} | ||
if ($Report.ShowTableCaptions) { | ||
$TableParams['Caption'] = "- $($TableParams.Name)" | ||
} | ||
$VserverObj | Table @TableParams | ||
} | ||
} catch { | ||
Write-PScriboMessage -IsWarning $_.Exception.Message | ||
} | ||
} | ||
|
||
end {} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
function Get-AbrOntapVserverNvmeInterface { | ||
<# | ||
.SYNOPSIS | ||
Used by As Built Report to retrieve NetApp ONTAP Vserver NVME interface information from the Cluster Management Network | ||
.DESCRIPTION | ||
.NOTES | ||
Version: 0.6.7 | ||
Author: Jonathan Colon | ||
Twitter: @jcolonfzenpr | ||
Github: rebelinux | ||
.EXAMPLE | ||
.LINK | ||
#> | ||
param ( | ||
[Parameter ( | ||
Position = 0, | ||
Mandatory)] | ||
[string] | ||
$Vserver | ||
) | ||
|
||
begin { | ||
Write-PScriboMessage "Collecting ONTAP Vserver NVME interface information." | ||
} | ||
|
||
process { | ||
try { | ||
$VserverData = Get-NcNvmeInterface -VserverContext $Vserver -Controller $Array | Sort-Object -Property TransportProtocols | ||
$VserverObj = @() | ||
if ($VserverData) { | ||
foreach ($Item in $VserverData) { | ||
try { | ||
$inObj = [ordered] @{ | ||
'Interface Name' = $Item.Lif | ||
'Transport Address' = $Item.TransportAddress | ||
'Transport Protocols' = $Item.TransportProtocols | ||
'Status' = Switch ($Item.StatusAdmin) { | ||
'up' { 'Up' } | ||
'down' { 'Down' } | ||
default { $Item.StatusAdmin } | ||
} | ||
} | ||
$VserverObj += [pscustomobject]$inobj | ||
} catch { | ||
Write-PScriboMessage -IsWarning $_.Exception.Message | ||
} | ||
} | ||
if ($Healthcheck.Vserver.Nvme) { | ||
$VserverObj | Where-Object { $_.'Status' -like 'Down' } | Set-Style -Style Warning -Property 'Status' | ||
} | ||
|
||
$TableParams = @{ | ||
Name = "NVME Interface - $($Vserver)" | ||
List = $false | ||
ColumnWidths = 40, 36, 12, 12 | ||
} | ||
if ($Report.ShowTableCaptions) { | ||
$TableParams['Caption'] = "- $($TableParams.Name)" | ||
} | ||
$VserverObj | Table @TableParams | ||
} | ||
} catch { | ||
Write-PScriboMessage -IsWarning $_.Exception.Message | ||
} | ||
} | ||
|
||
end {} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
function Get-AbrOntapVserverNvmeTcpAdapter { | ||
<# | ||
.SYNOPSIS | ||
Used by As Built Report to retrieve NetApp ONTAP Vserver Nvme TCP adapter information from the Cluster Management Network | ||
.DESCRIPTION | ||
.NOTES | ||
Version: 0.6.7 | ||
Author: Jonathan Colon | ||
Twitter: @jcolonfzenpr | ||
Github: rebelinux | ||
.EXAMPLE | ||
.LINK | ||
#> | ||
param ( | ||
[Parameter ( | ||
Position = 0, | ||
Mandatory)] | ||
[string] | ||
$Vserver | ||
) | ||
|
||
begin { | ||
Write-PScriboMessage "Collecting ONTAP Vserver Nvme TCP adapter information." | ||
} | ||
|
||
process { | ||
try { | ||
$VserverData = Get-NcNvmeInterface -VserverContext $Vserver -Controller $Array | Where-Object {$_.PhysicalProtocol -eq 'ethernet'} | Sort-Object -Property HomeNode | ||
$VserverObj = @() | ||
if ($VserverData) { | ||
foreach ($Item in $VserverData) { | ||
try { | ||
$inObj = [ordered] @{ | ||
'Node Name' = $Item.HomeNode | ||
'Adapter' = $Item.HomePort | ||
'Protocol' = $Item.PhysicalProtocol | ||
'IP Address' = $Item.TransportAddress | ||
'Status' = Switch ($Item.StatusAdmin) { | ||
'up' { 'Up' } | ||
'down' { 'Down' } | ||
default { $Item.StatusAdmin } | ||
} | ||
} | ||
$VserverObj += [pscustomobject]$inobj | ||
} catch { | ||
Write-PScriboMessage -IsWarning $_.Exception.Message | ||
} | ||
} | ||
if ($Healthcheck.Vserver.FCP) { | ||
$VserverObj | Where-Object { $_.'Status' -like 'Down' } | Set-Style -Style Warning -Property 'Status' | ||
} | ||
|
||
$TableParams = @{ | ||
Name = "Nvme TCP Physical Adapter - $($Vserver)" | ||
List = $false | ||
ColumnWidths = 30, 17, 17, 20, 16 | ||
|
||
} | ||
if ($Report.ShowTableCaptions) { | ||
$TableParams['Caption'] = "- $($TableParams.Name)" | ||
} | ||
$VserverObj | Table @TableParams | ||
} | ||
} catch { | ||
Write-PScriboMessage -IsWarning $_.Exception.Message | ||
} | ||
} | ||
|
||
end {} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.