Skip to content

Commit e77834f

Browse files
authored
Merge pull request #34 from AsBuiltReport/dev
v0.6.5 public release
2 parents f99ec94 + fbac2a9 commit e77834f

File tree

44 files changed

+668
-130
lines changed

Some content is hidden

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

44 files changed

+668
-130
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

README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
<a href="https://twitter.com/AsBuiltReport" alt="Twitter">
2323
<img src="https://img.shields.io/twitter/follow/AsBuiltReport.svg?style=social"/></a>
2424
</p>
25+
<p align="center">
26+
<a href='https://ko-fi.com/F1F8DEV80' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://cdn.ko-fi.com/cdn/kofi1.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
27+
</p>
2528

2629
# NetApp ONTAP Arrays AsBuiltReport
2730

@@ -48,14 +51,15 @@ Below are the instructions on how to install, configure and generate a NetApp ON
4851
The ONTAP Storage As Built Report supports the following ONTAP versions;
4952

5053
- ONTAP 9.x
54+
- Tested on v9.5, 9.7, 9.8, 9.9.1, 9.10.1, 9.11.1
5155

5256
### **PowerShell**
5357

5458
This report is compatible with the following PowerShell versions;
5559

56-
| Windows PowerShell 5.1 | PowerShell Core | PowerShell 7 |
57-
|:----------------------:|:---------------:|:------------:|
58-
| :white_check_mark: | :white_check_mark: | :white_check_mark: |
60+
| PowerShell 5.1 | PowerShell 7 |
61+
|:----------------------:|:---------------:|
62+
| :white_check_mark: | :white_check_mark:|
5963

6064
## :wrench: System Requirements
6165

@@ -69,14 +73,6 @@ These modules may also be manually installed.
6973
| AsBuiltReport.Core | 1.2.0 | [Link](https://www.powershellgallery.com/packages/AsBuiltReport.Core) | [Link](https://github.com/AsBuiltReport/AsBuiltReport.Core/releases/latest) |
7074
| Netapp.ONTAP | 9.10.1.2111 | [Link](https://www.powershellgallery.com/packages/NetApp.ONTAP) | |
7175

72-
### Linux & macOS
73-
74-
- .NET Core is required for cover page image support on Linux and macOS operating systems.
75-
- [Installing .NET Core for macOS](https://docs.microsoft.com/en-us/dotnet/core/install/macos)
76-
- [Installing .NET Core for Linux](https://docs.microsoft.com/en-us/dotnet/core/install/linux)
77-
78-
❗ If you are unable to install .NET Core, you must set `ShowCoverPageImage` to `False` in the report JSON configuration file.
79-
8076
## :package: Module Installation
8177

8278
### PowerShell
@@ -195,3 +191,6 @@ PS C:\> New-AsBuiltReport -Report NetApp.ONTAP -Target 192.168.7.60 -Credential
195191
PS C:\> New-AsBuiltReport -Report NetApp.ONTAP -Target 192.168.7.60 -Username 'admin' -Password 'P@ssw0rd' -Format Html,Word -OutputFolderPath 'C:\Users\Jon\Documents' -SendEmail
196192
197193
```
194+
## :x: Known Issues
195+
196+
- There are known issues with the NetApp.ONTAP module v9.11.1.2208. Therefore, v9.10.1.2111 is the recommended module version.

Src/Private/Get-AbrOntapClusterLicense.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function Get-AbrOntapClusterLicense {
3131
$License = Get-NcLicense -Owner $Node -Controller $Array
3232
if ($License) {
3333
$LicenseSummary = foreach ($Licenses in $License) {
34-
$EntitlementRisk = Get-NcLicenseEntitlementRisk -Package $Licenses.Package -Controller $Array
34+
$EntitlementRisk = Try {Get-NcLicenseEntitlementRisk -Package $Licenses.Package -Controller $Array -ErrorAction SilentlyContinue} catch {Write-PscriboMessage -IsWarning $_.Exception.Message}
3535
[PSCustomObject] @{
3636
'License' = $TextInfo.ToTitleCase($Licenses.Package)
3737
'Type' = $TextInfo.ToTitleCase($Licenses.Type)

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-AbrOntapSecuritySSLDetailed.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ function Get-AbrOntapSecuritySSLDetailed {
3434
'Protocol' = $Item.Protocol
3535
'Hash Function' = $Item.HashFunction
3636
'Serial Number' = $Item.SerialNumber
37-
'Expiration' = ($Item.ExpirationDateDT).ToString().Split(" ")[0]
37+
'Expiration' = Switch ([string]::IsNullOrEmpty($Item.ExpirationDateDT)) {
38+
$true {'-'}
39+
$false {($Item.ExpirationDateDT).ToString().Split(" ")[0]}
40+
default {'Unknown'}
41+
}
3842
'Vserver' = $Item.Vserver
3943
}
4044
$OutObj += [pscustomobject]$inobj

0 commit comments

Comments
 (0)