Skip to content

Commit 5ed83be

Browse files
authored
Merge pull request #33 from rebelinux/dev
v0.6.5
2 parents 21a2609 + 41bc48b commit 5ed83be

39 files changed

+572
-80
lines changed

AsBuiltReport.NetApp.ONTAP.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"Status": true,
5656
"Iscsi": true,
5757
"FCP": true,
58+
"CG": true,
5859
"NFS": true,
5960
"Quota": true,
6061
"CIFS": true,

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.6.4'
15+
ModuleVersion = '0.6.5'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()

CHANGELOG.md

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

3+
## [0.6.5] - 2022-11-06
4+
5+
### Added
6+
7+
- Added aggregate spare reporting [#26](https://github.com/AsBuiltReport/AsBuiltReport.NetApp.ONTAP/issues/26)
8+
- Added Ontap Multi Admin Approval [#29](https://github.com/AsBuiltReport/AsBuiltReport.NetApp.ONTAP/issues/29)
9+
- Added Consistency Group Support [#28](https://github.com/AsBuiltReport/AsBuiltReport.NetApp.ONTAP/issues/28)
10+
- Added Audit Logs Support [#31](https://github.com/AsBuiltReport/AsBuiltReport.NetApp.ONTAP/issues/31)
11+
- Added Audit log destination [#30](https://github.com/AsBuiltReport/AsBuiltReport.NetApp.ONTAP/issues/30)
12+
13+
### Fixed
14+
15+
- Fix #22
16+
- Fix #23
17+
- Fix #24
18+
- Close #29
19+
- Close #26
20+
- Close #28
21+
- Close #30
22+
- Close #31
23+
- Fixed SNMP section not shown in report.
24+
325
## [0.6.4] - 2022-05-14
426

527
### Added

Src/Private/Get-AbrOntapEfficiencyAggr.ps1

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -59,38 +59,42 @@ function Get-AbrOntapEfficiencyAggr {
5959
$Data = Get-NcAggr -Controller $Array | Where-Object {$_.AggrRaidAttributes.HasLocalRoot -ne 'True'}
6060
$Savingfilter = (Get-NcAggrEfficiency -Controller $Array | Select-Object -ExpandProperty AggrEfficiencyAdditionalDetailsInfo).NumberOfSisDisabledVolumes | Measure-Object -Sum
6161
if ($Data -and $Savingfilter.Sum -gt 0 -and $Healthcheck.Storage.Efficiency) {
62-
Section -Style Heading4 'HealthCheck - Volume with Disabled Deduplication' {
63-
Paragraph "The following section provides the Volume efficiency healthcheck Information on $($ClusterInfo.ClusterName)."
64-
BlankLine
65-
$OutObj = @()
66-
foreach ($Item in $Data) {
67-
try {
68-
$Saving = Get-NcAggrEfficiency -Aggregate $Item.Name -Controller $Array | Select-Object -ExpandProperty AggrEfficiencyAdditionalDetailsInfo
69-
$VolInAggr = Get-NcVol -Aggregate $Item.Name -Controller $Array
70-
$VolFilter = $VolInAggr | Where-Object { $_.VolumeSisAttributes.IsSisStateEnabled -ne "True"}
62+
$OutObj = @()
63+
foreach ($Item in $Data) {
64+
try {
65+
$Saving = (Get-NcAggrEfficiency -Aggregate $Item.Name -Controller $Array | Select-Object -ExpandProperty AggrEfficiencyAdditionalDetailsInfo).NumberOfSisDisabledVolumes
66+
$VolInAggr = Get-NcVol -Aggregate $Item.Name -Controller $Array | Where-Object {$_.VolumeStateAttributes.IsVserverRoot -ne 'True'}
67+
$VolFilter = $VolInAggr | Where-Object { $_.VolumeSisAttributes.IsSisStateEnabled -ne "True"}
68+
if ($Saving -ne 0 -and $VolFilter) {
7169
$inObj = [ordered] @{
7270
'Aggregate' = $Item.Name
73-
'Volumes without Deduplication' = $VolFilter.Name
71+
'Volumes without Deduplication' = $VolFilter.Name -join ", "
7472
}
7573
$OutObj += [pscustomobject]$inobj
7674
}
77-
catch {
78-
Write-PscriboMessage -IsWarning $_.Exception.Message
79-
}
8075
}
81-
82-
if ($Healthcheck.Storage.Efficiency) {
83-
$OutObj | Set-Style -Style Warning -Property 'Aggregate','Volumes without Deduplication'
76+
catch {
77+
Write-PscriboMessage -IsWarning $_.Exception.Message
8478
}
79+
}
8580

86-
$TableParams = @{
87-
Name = "HealthCheck - Volume without deduplication - $($ClusterInfo.ClusterName)"
88-
List = $false
89-
ColumnWidths = 45, 55
90-
}
91-
if ($Report.ShowTableCaptions) {
92-
$TableParams['Caption'] = "- $($TableParams.Name)"
93-
}
81+
if ($Healthcheck.Storage.Efficiency) {
82+
$OutObj | Set-Style -Style Warning -Property 'Aggregate','Volumes without Deduplication'
83+
}
84+
85+
$TableParams = @{
86+
Name = "HealthCheck - Volume without deduplication - $($ClusterInfo.ClusterName)"
87+
List = $false
88+
ColumnWidths = 45, 55
89+
}
90+
if ($Report.ShowTableCaptions) {
91+
$TableParams['Caption'] = "- $($TableParams.Name)"
92+
}
93+
}
94+
if ($OutObj) {
95+
Section -Style Heading4 'HealthCheck - Volume with Disabled Deduplication' {
96+
Paragraph "The following section provides the Volume efficiency healthcheck Information on $($ClusterInfo.ClusterName)."
97+
BlankLine
9498
$OutObj | Table @TableParams
9599
}
96100
}

Src/Private/Get-AbrOntapRepVserverPeer.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function Get-AbrOntapRepVserverPeer {
4747
}
4848

4949
$TableParams = @{
50-
Name = "Vserver Peer - $($ClusterInfo.ClusterName)"
50+
Name = "Peer - $($ClusterInfo.ClusterName)"
5151
List = $false
5252
ColumnWidths = 20, 20, 20 ,20, 20
5353
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
function Get-AbrOntapSecurityMAP {
2+
<#
3+
.SYNOPSIS
4+
Used by As Built Report to retrieve NetApp ONTAP Security Multi-Admin Approval information from the Cluster Management Network
5+
.DESCRIPTION
6+
7+
.NOTES
8+
Version: 0.6.5
9+
Author: Jonathan Colon
10+
Twitter: @jcolonfzenpr
11+
Github: rebelinux
12+
.EXAMPLE
13+
14+
.LINK
15+
16+
#>
17+
[CmdletBinding()]
18+
param (
19+
)
20+
21+
begin {
22+
Write-PscriboMessage "Collecting ONTAP Security Vserver Multi-Admin Approval information."
23+
}
24+
25+
process {
26+
try {
27+
$Data = Get-NetAppOntapAPI -uri "/api/security/multi-admin-verify/approval-groups?fields=**&return_records=true&return_timeout=15"
28+
$OutObj = @()
29+
if ($Data) {
30+
foreach ($Item in $Data) {
31+
try {
32+
$inObj = [ordered] @{
33+
'Name' = $Item.Name
34+
'Approvers' = Switch ([string]::IsNullOrEmpty($Item.Approvers)) {
35+
$true {'-'}
36+
$false {$Item.Approvers -join ', '}
37+
default {'-'}
38+
}
39+
'Email' = Switch ([string]::IsNullOrEmpty($Item.Email)) {
40+
$true {'-'}
41+
$false {$Item.Email -join ', '}
42+
default {'-'}
43+
}
44+
}
45+
$OutObj += [pscustomobject]$inobj
46+
}
47+
catch {
48+
Write-PscriboMessage -IsWarning $_.Exception.Message
49+
}
50+
}
51+
52+
$TableParams = @{
53+
Name = "Multi-Admin Approval - $($ClusterInfo.ClusterName)"
54+
List = $false
55+
ColumnWidths = 34,33, 33
56+
}
57+
if ($Report.ShowTableCaptions) {
58+
$TableParams['Caption'] = "- $($TableParams.Name)"
59+
}
60+
$OutObj | Table @TableParams
61+
}
62+
}
63+
catch {
64+
Write-PscriboMessage -IsWarning $_.Exception.Message
65+
}
66+
}
67+
68+
end {}
69+
70+
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
function Get-AbrOntapSecurityMAPRule {
2+
<#
3+
.SYNOPSIS
4+
Used by As Built Report to retrieve NetApp ONTAP Security Multi-Admin Approval rules information from the Cluster Management Network
5+
.DESCRIPTION
6+
7+
.NOTES
8+
Version: 0.6.5
9+
Author: Jonathan Colon
10+
Twitter: @jcolonfzenpr
11+
Github: rebelinux
12+
.EXAMPLE
13+
14+
.LINK
15+
16+
#>
17+
[CmdletBinding()]
18+
param (
19+
)
20+
21+
begin {
22+
Write-PscriboMessage "Collecting ONTAP Security Vserver Multi-Admin Approval rules information."
23+
}
24+
25+
process {
26+
try {
27+
$Data = Get-NetAppOntapAPI -uri "/api/security/multi-admin-verify/rules?fields=**&return_records=true&return_timeout=15"
28+
$OutObj = @()
29+
if ($Data) {
30+
foreach ($Item in $Data) {
31+
try {
32+
$inObj = [ordered] @{
33+
'operation' = $Item.operation
34+
'query' = ConvertTo-EmptyToFiller $Item.query
35+
'Approval Groups' = Switch ([string]::IsNullOrEmpty($Item.approval_groups.name)) {
36+
$true {'-'}
37+
$false {$Item.approval_groups.name}
38+
default {'-'}
39+
}
40+
'Required Approvers' = ConvertTo-EmptyToFiller $Item.required_approvers
41+
'System Defined' = ConvertTo-TextYN $Item.system_defined
42+
43+
}
44+
$OutObj += [pscustomobject]$inobj
45+
}
46+
catch {
47+
Write-PscriboMessage -IsWarning $_.Exception.Message
48+
}
49+
}
50+
51+
$TableParams = @{
52+
Name = "Multi-Admin Approval Rules - $($ClusterInfo.ClusterName)"
53+
List = $false
54+
ColumnWidths = 26, 25, 25, 12, 12
55+
}
56+
if ($Report.ShowTableCaptions) {
57+
$TableParams['Caption'] = "- $($TableParams.Name)"
58+
}
59+
$OutObj | Sort-Object -Property 'System Defined' | Table @TableParams
60+
}
61+
}
62+
catch {
63+
Write-PscriboMessage -IsWarning $_.Exception.Message
64+
}
65+
}
66+
67+
end {}
68+
69+
}

Src/Private/Get-AbrOntapStorageAGGR.ps1

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,56 @@ function Get-AbrOntapStorageAGGR {
7575
}
7676
$AggrSpaceSummary | Table @TableParams
7777
}
78+
try {
79+
$AggrSpare = Get-NcAggrSpare -Controller $Array
80+
if ($AggrSpare) {
81+
Section -Style Heading4 'Aggregate Spares' {
82+
$AggrSpareSummary = foreach ($Spare in $AggrSpare) {
83+
try {
84+
[PSCustomObject] @{
85+
'Name' = $Spare.Disk
86+
'Capacity' = Switch ([string]::IsNullOrEmpty($Spare.TotalSize)) {
87+
$true {'-'}
88+
$false {$Spare.TotalSize | ConvertTo-FormattedNumber -Type Datasize -ErrorAction SilentlyContinue}
89+
default {'-'}
90+
}
91+
'Root Usable' = Switch ([string]::IsNullOrEmpty($Spare.LocalUsableRootSize)) {
92+
$true {'-'}
93+
$false {$Spare.LocalUsableRootSize | ConvertTo-FormattedNumber -Type Datasize -ErrorAction SilentlyContinue}
94+
default {'-'}
95+
}
96+
'Data Usable' = Switch ([string]::IsNullOrEmpty($Spare.LocalUsableDataSize)) {
97+
$true {'-'}
98+
$false {$Spare.LocalUsableDataSize | ConvertTo-FormattedNumber -Type Datasize -ErrorAction SilentlyContinue}
99+
default {'-'}
100+
}
101+
'Shared Disk' = ConvertTo-TextYN $Spare.IsDiskShared
102+
'Disk Zeroed' = ConvertTo-TextYN $Spare.IsDiskZeroed
103+
'Owner' = $Spare.OriginalOwner
104+
}
105+
}
106+
catch {
107+
Write-PscriboMessage -IsWarning $_.Exception.Message
108+
}
109+
}
110+
if ($Healthcheck.Storage.Aggr) {
111+
$AggrSpareSummary | Where-Object { $_.'Disk Zeroed' -eq 'No' } | Set-Style -Style Warning -Property 'Disk Zeroed'
112+
}
113+
$TableParams = @{
114+
Name = "Aggregates Spares - $($ClusterInfo.ClusterName)"
115+
List = $false
116+
ColumnWidths = 20, 12, 12, 12, 12, 12, 20
117+
}
118+
if ($Report.ShowTableCaptions) {
119+
$TableParams['Caption'] = "- $($TableParams.Name)"
120+
}
121+
$AggrSpareSummary | Table @TableParams
122+
}
123+
}
124+
}
125+
catch {
126+
Write-PscriboMessage -IsWarning $_.Exception.Message
127+
}
78128
try {
79129
if ($InfoLevel.Storage -ge 2) {
80130
Section -Style Heading4 'Aggregate Options' {

Src/Private/Get-AbrOntapSysConfigBackupURL.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ function Get-AbrOntapSysConfigBackupURL {
3030
foreach ($Item in $Data) {
3131
try {
3232
$inObj = [ordered] @{
33-
'Cluster IP' = $Item.NcController
3433
'Url' = Switch ($Item.Url) {
3534
$Null { 'Not Configured' }
3635
default { $Item.Url }
@@ -55,7 +54,7 @@ function Get-AbrOntapSysConfigBackupURL {
5554
$TableParams = @{
5655
Name = "System Configuration Backup Setting - $($ClusterInfo.ClusterName)"
5756
List = $false
58-
ColumnWidths = 20, 60, 20
57+
ColumnWidths = 60, 40
5958
}
6059
if ($Report.ShowTableCaptions) {
6160
$TableParams['Caption'] = "- $($TableParams.Name)"

0 commit comments

Comments
 (0)