Skip to content

Commit 8eb67fc

Browse files
authored
Merge pull request #8 from rebelinux/dev
Release v0.5.0
2 parents ff2dd74 + 32827a3 commit 8eb67fc

File tree

102 files changed

+1125
-866
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+1125
-866
lines changed

AsBuiltReport.NetApp.ONTAP.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'AsBuiltReport.NetApp.ONTAP.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.4.0'
15+
ModuleVersion = '0.5.0'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# :arrows_counterclockwise: NetApp ONTAP Storage As Built Report Changelog
22

3+
## [0.5.0] - 2021-10-11
4+
5+
### Added
6+
7+
- Added function to convert from empty content to "-".
8+
9+
### Changed
10+
11+
- Changed main report to use per Node/Vserver filtering.
12+
- Changed Get-NetAppOntapAPI function to allow per Vserver Filtering.
13+
14+
### Fixed
15+
16+
- Fix to better detect unhealthy node.
17+
- Fix for ASUP Health Check.
18+
319
## [0.4.0] - 2021-09-22
420

521
- Add additional health check section support

Src/Private/Get-AbrOntapCluster.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrOntapCluster {
55
.DESCRIPTION
66
77
.NOTES
8-
Version: 0.4.0
8+
Version: 0.5.0
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -23,19 +23,19 @@ function Get-AbrOntapCluster {
2323
}
2424

2525
process {
26-
$ClusterInfo = Get-NcCluster
26+
$ClusterInfo = Get-NcCluster -Controller $Array
2727
if ($ClusterInfo) {
28-
$ClusterDiag = Get-NcDiagnosisStatus
29-
$ClusterVersion = Get-NcSystemVersion
30-
$ArrayAggr = Get-NcAggr
31-
$ArrayVolumes = Get-NcVol
28+
$ClusterDiag = Get-NcDiagnosisStatus -Controller $Array
29+
$ClusterVersion = Get-NcSystemVersion -Controller $Array
30+
$ArrayAggr = Get-NcAggr -Controller $Array
31+
$ArrayVolumes = Get-NcVol -Controller $Array
3232
$ClusterSummary = [PSCustomObject] @{
3333
'Cluster Name' = $ClusterInfo.ClusterName
3434
'Cluster UUID' = $ClusterInfo.ClusterUuid
3535
'Cluster Serial' = $ClusterInfo.ClusterSerialNumber
3636
'Cluster Controller' = $ClusterInfo.NcController
37-
'Cluster Contact' = $ClusterInfo.ClusterContact
38-
'Cluster Location' = $ClusterInfo.ClusterLocation
37+
'Cluster Contact' = ConvertTo-EmptyToFiller $ClusterInfo.ClusterContact
38+
'Cluster Location' = ConvertTo-EmptyToFiller $ClusterInfo.ClusterLocation
3939
'Ontap Version' = $ClusterVersion.value
4040
'Number of Aggregates' = $ArrayAggr.count
4141
'Number of Volumes' = $ArrayVolumes.count

Src/Private/Get-AbrOntapClusterASUP.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrOntapClusterASUP {
55
.DESCRIPTION
66
77
.NOTES
8-
Version: 0.4.0
8+
Version: 0.5.0
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -23,7 +23,7 @@ function Get-AbrOntapClusterASUP {
2323
}
2424

2525
process {
26-
$AutoSupport = Get-NcAutoSupportConfig
26+
$AutoSupport = Get-NcAutoSupportConfig -Controller $Array
2727
if ($AutoSupport) {
2828
$AutoSupportSummary = foreach ($NodesAUTO in $AutoSupport) {
2929
[PSCustomObject] @{
@@ -35,7 +35,7 @@ function Get-AbrOntapClusterASUP {
3535
}
3636
}
3737
if ($Healthcheck.Cluster.AutoSupport) {
38-
$AutoSupportSummary | Where-Object { $_.'Enabled' -like 'False' } | Set-Style -Style Warning -Property 'Enabled'
38+
$AutoSupportSummary | Where-Object { $_.'Enabled' -like 'No' } | Set-Style -Style Warning -Property 'Enabled'
3939
}
4040

4141
$TableParams = @{

Src/Private/Get-AbrOntapClusterHA.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrOntapClusterHA {
55
.DESCRIPTION
66
77
.NOTES
8-
Version: 0.4.0
8+
Version: 0.5.0
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -23,10 +23,10 @@ function Get-AbrOntapClusterHA {
2323
}
2424

2525
process {
26-
$NodeSum = Get-NcNode | Where-Object { $null -ne $_.NodeModel }
26+
$NodeSum = Get-NcNode -Controller $Array | Where-Object { $null -ne $_.NodeModel }
2727
if ($NodeSum) {
2828
$NodeSummary = foreach ($Nodes in $NodeSum) {
29-
$ClusterHa = Get-NcClusterHa -Node $Nodes.Node
29+
$ClusterHa = Get-NcClusterHa -Node $Nodes.Node -Controller $Array
3030
[PSCustomObject] @{
3131
'Name' = $Nodes.Node
3232
'Partner' = $ClusterHa.Partner

Src/Private/Get-AbrOntapClusterLicense.ps1

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrOntapClusterLicense {
55
.DESCRIPTION
66
77
.NOTES
8-
Version: 0.4.0
8+
Version: 0.5.0
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -23,32 +23,37 @@ function Get-AbrOntapClusterLicense {
2323
}
2424

2525
process {
26-
$License = Get-NcLicense
27-
if ($License) {
28-
$LicenseSummary = foreach ($Licenses in $License) {
29-
$EntitlementRisk = Get-NcLicenseEntitlementRisk -Package $Licenses.Package
30-
[PSCustomObject] @{
31-
'Name' = $Licenses.Owner
32-
'Package' = $Licenses.Package
33-
'Type' = $Licenses.Type
34-
'Description' = $Licenses.Description
35-
'Risk' = $EntitlementRisk.Risk
26+
$Nodes = Get-NcNode -Controller $Array
27+
foreach ($Node in $Nodes) {
28+
Section -Style Heading3 "$Node License Usage" {
29+
Paragraph "The following section provides per node installed licenses on $($ClusterInfo.ClusterName)."
30+
BlankLine
31+
$License = Get-NcLicense -Owner $Node -Controller $Array
32+
if ($License) {
33+
$LicenseSummary = foreach ($Licenses in $License) {
34+
$EntitlementRisk = Get-NcLicenseEntitlementRisk -Package $Licenses.Package -Controller $Array
35+
[PSCustomObject] @{
36+
'License' = $TextInfo.ToTitleCase($Licenses.Package)
37+
'Type' = $TextInfo.ToTitleCase($Licenses.Type)
38+
'Description' = $Licenses.Description
39+
'Risk' = ConvertTo-EmptyToFiller $EntitlementRisk.Risk
40+
}
41+
}
42+
if ($Healthcheck.License.RiskSummary) {
43+
$LicenseSummary | Where-Object { $_.'Risk' -like 'medium' -or $_.'Risk' -like 'unknown' -or $_.'Risk' -like 'unlicensed' } | Set-Style -Style Warning -Property 'Risk'
44+
$LicenseSummary | Where-Object { $_.'Risk' -like 'High' } | Set-Style -Style Critical -Property 'Risk'
45+
}
46+
$TableParams = @{
47+
Name = "License Usage - $($Node)"
48+
List = $false
49+
ColumnWidths = 25, 15, 38, 22
50+
}
51+
if ($Report.ShowTableCaptions) {
52+
$TableParams['Caption'] = "- $($TableParams.Name)"
53+
}
54+
$LicenseSummary | Table @TableParams
3655
}
3756
}
38-
if ($Healthcheck.License.RiskSummary) {
39-
$LicenseSummary | Where-Object { $_.'Risk' -like 'low' } | Set-Style -Style Ok -Property 'Risk'
40-
$LicenseSummary | Where-Object { $_.'Risk' -like 'medium' -or $_.'Risk' -like 'unknown' } | Set-Style -Style Warning -Property 'Risk'
41-
$LicenseSummary | Where-Object { $_.'Risk' -like 'High' } | Set-Style -Style Critical -Property 'Risk'
42-
}
43-
$TableParams = @{
44-
Name = "License Summary - $($ClusterInfo.ClusterName)"
45-
List = $false
46-
ColumnWidths = 30, 20, 10, 28, 12
47-
}
48-
if ($Report.ShowTableCaptions) {
49-
$TableParams['Caption'] = "- $($TableParams.Name)"
50-
}
51-
$LicenseSummary | Table @TableParams
5257
}
5358
}
5459

Src/Private/Get-AbrOntapClusterLicenseUsage.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrOntapClusterLicenseUsage {
55
.DESCRIPTION
66
77
.NOTES
8-
Version: 0.4.0
8+
Version: 0.5.0
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -23,7 +23,7 @@ function Get-AbrOntapClusterLicenseUsage {
2323
}
2424

2525
process {
26-
$LicenseFeature = Get-NcFeatureStatus
26+
$LicenseFeature = Get-NcFeatureStatus -Controller $Array
2727
if ($LicenseFeature) {
2828
$LicenseFeature = foreach ($NodeLFs in $LicenseFeature) {
2929
[PSCustomObject] @{
@@ -36,7 +36,7 @@ function Get-AbrOntapClusterLicenseUsage {
3636
}
3737
}
3838
$TableParams = @{
39-
Name = "License Feature Summary - $($ClusterInfo.ClusterName)"
39+
Name = "License Feature - $($ClusterInfo.ClusterName)"
4040
List = $false
4141
ColumnWidths = 40, 20, 40
4242
}

Src/Private/Get-AbrOntapDiskAssign.ps1

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrOntapDiskAssign {
55
.DESCRIPTION
66
77
.NOTES
8-
Version: 0.4.0
8+
Version: 0.5.0
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -23,7 +23,7 @@ function Get-AbrOntapDiskAssign {
2323
}
2424

2525
process {
26-
$NodeDiskCount = get-ncdisk | ForEach-Object{ $_.DiskOwnershipInfo.HomeNodeName } | Group-Object
26+
$NodeDiskCount = get-ncdisk -Controller $Array | ForEach-Object{ $_.DiskOwnershipInfo.HomeNodeName } | Group-Object
2727
if ($NodeDiskCount) {
2828
$DiskSummary = foreach ($Disks in $NodeDiskCount) {
2929
[PSCustomObject] @{
@@ -32,7 +32,7 @@ function Get-AbrOntapDiskAssign {
3232
}
3333
}
3434
$TableParams = @{
35-
Name = "Assigned Disk Summary - $($ClusterInfo.ClusterName)"
35+
Name = "Assigned Disk - $($ClusterInfo.ClusterName)"
3636
List = $false
3737
ColumnWidths = 50, 50
3838
}
@@ -41,29 +41,6 @@ function Get-AbrOntapDiskAssign {
4141
}
4242
$DiskSummary | Table @TableParams
4343
}
44-
$Node = Get-NcNode
45-
if ($Node) {
46-
$DiskSummary = foreach ($Nodes in $Node) {
47-
$DiskOwner = Get-NcDiskOwner -Node $Nodes.Node
48-
[PSCustomObject] @{
49-
'Disk' = $DiskOwner.Name
50-
'Owner' = $DiskOwner.Owner
51-
'Owner Id' = $DiskOwner.OwnerId
52-
'Home' = $DiskOwner.Home
53-
'Home Id' = $DiskOwner.HomeId
54-
'Type' = $DiskOwner.Type
55-
}
56-
}
57-
$TableParams = @{
58-
Name = "Disk Owner Summary - $($ClusterInfo.ClusterName)"
59-
List = $false
60-
ColumnWidths = 20, 20, 15, 20, 15, 10
61-
}
62-
if ($Report.ShowTableCaptions) {
63-
$TableParams['Caption'] = "- $($TableParams.Name)"
64-
}
65-
$DiskSummary | Table @TableParams
66-
}
6744
}
6845

6946
end {}

Src/Private/Get-AbrOntapDiskBroken.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrOntapDiskBroken {
55
.DESCRIPTION
66
77
.NOTES
8-
Version: 0.4.0
8+
Version: 0.5.0
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -23,7 +23,7 @@ function Get-AbrOntapDiskBroken {
2323
}
2424

2525
process {
26-
$NodeDiskBroken = Get-NcDisk | Where-Object{ $_.DiskRaidInfo.ContainerType -eq "broken" }
26+
$NodeDiskBroken = Get-NcDisk -Controller $Array | Where-Object{ $_.DiskRaidInfo.ContainerType -eq "broken" }
2727
if ($NodeDiskBroken) {
2828
$DiskFailed = foreach ($DiskBroken in $NodeDiskBroken) {
2929
[PSCustomObject] @{
@@ -38,7 +38,7 @@ function Get-AbrOntapDiskBroken {
3838
$DiskFailed | Set-Style -Style Critical -Property 'Disk Name','Shelf','Bay','Pool','Disk Paths'
3939
}
4040
$TableParams = @{
41-
Name = "Failed Disk Summary - $($ClusterInfo.ClusterName)"
41+
Name = "Failed Disk - $($ClusterInfo.ClusterName)"
4242
List = $false
4343
ColumnWidths = 26, 13, 13, 13, 35
4444
}

Src/Private/Get-AbrOntapDiskInv.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrOntapDiskInv {
55
.DESCRIPTION
66
77
.NOTES
8-
Version: 0.4.0
8+
Version: 0.5.0
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -23,11 +23,11 @@ function Get-AbrOntapDiskInv {
2323
}
2424

2525
process {
26-
$DiskInv = Get-NcDisk
27-
$NodeDiskBroken = Get-NcDisk | Where-Object{ $_.DiskRaidInfo.ContainerType -eq "broken" }
26+
$DiskInv = Get-NcDisk -Controller $Array
27+
$NodeDiskBroken = Get-NcDisk -Controller $Array | Where-Object{ $_.DiskRaidInfo.ContainerType -eq "broken" }
2828
if ($DiskInv) {
2929
$DiskInventory = foreach ($Disks in $DiskInv) {
30-
$DiskType = Get-NcDisk -Name $Disks.Name | ForEach-Object{ $_.DiskInventoryInfo }
30+
$DiskType = Get-NcDisk -Controller $Array -Name $Disks.Name | ForEach-Object{ $_.DiskInventoryInfo }
3131
$DiskFailed = $NodeDiskBroken | Where-Object { $_.'Name' -eq $Disks.Name }
3232
if ($DiskFailed.Name -eq $Disks.Name ) {
3333
$Disk = " $($DiskFailed.Name)(*)"
@@ -41,7 +41,7 @@ function Get-AbrOntapDiskInv {
4141
'Bay' = $Disks.Bay
4242
'Capacity' = $Disks.Capacity | ConvertTo-FormattedNumber -Type Disksize -ErrorAction SilentlyContinue
4343
'Model' = $Disks.Model
44-
'SerialNumber' = $DiskType.SerialNumber
44+
'Serial Number' = $DiskType.SerialNumber
4545
'Type' = $DiskType.DiskType
4646
}
4747
}

0 commit comments

Comments
 (0)