Skip to content

Commit 4f32afc

Browse files
authored
Merge pull request #9 from rebelinux/dev
2 parents 8eb67fc + f0a9b75 commit 4f32afc

10 files changed

+2254
-1349
lines changed

AsBuiltReport.NetApp.ONTAP.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
},
1414
"InfoLevel": {
15-
"_comment_": "0 = Disabled, 1 = Enabled",
15+
"_comment_": "0 = Disabled, 1 = Enabled / Summary, 2 = Adv Summary",
1616
"Cluster": 1,
1717
"Node": 1,
1818
"Storage": 1,

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.5.0'
15+
ModuleVersion = '0.6.0'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ For detailed documentation around the whole project, please refer to the `README
3333

3434
### Sample Report - Custom Style 1
3535

36-
Sample NetApp ONTAP As Built report HTML file: [Sample NetApp As-Built Report.html](https://raw.githubusercontent.com/AsBuiltReport/AsBuiltReport.NetApp.ONTAP/master/Samples/Sample%20NetApp%20As-Built%20Report.html)
36+
Sample NetApp ONTAP As Built report HTML file: [Sample NetApp As-Built Report.html](https://technomyth.zenprsolutions.net/wp-content/uploads/2021/11/NetApp-ONTAP-As-Built-Report.html)
3737

3838
Sample NetApp ONTAP As Built report with health checks, using custom report style.
3939

@@ -148,12 +148,13 @@ The **Options** schema allows certain options within the report to be toggled on
148148

149149
The **InfoLevel** schema allows configuration of each section of the report at a granular level. The following sections can be set.
150150

151-
There are 2 levels (0-1) of detail granularity for each section as follows;
151+
There are 3 levels (0-2) of detail granularity for each section as follows;
152152

153153
| Setting | InfoLevel | Description |
154154
|:-------:|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
155155
| 0 | Disabled | Does not collect or display any information |
156-
| 1 | Enabled | Provides condensed, detailed information for a collection of objects |
156+
| 1 | Enabled / Summary | Provides summarised information for a collection of objects |
157+
| 2 | Adv Summary | Provides condensed, detailed information for a collection of objects |
157158

158159
### Healthcheck
159160

Samples/Sample NetApp As-Built Report.html

100644100755
Lines changed: 1829 additions & 1104 deletions
Large diffs are not rendered by default.

Src/Private/Get-AbrOntapEfficiencyAggr.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function Get-AbrOntapEfficiencyAggr {
5252
$Data = Get-NcAggr -Controller $Array | Where-Object {$_.AggrRaidAttributes.HasLocalRoot -ne 'True'}
5353
$Savingfilter = (Get-NcAggrEfficiency -Controller $Array | Select-Object -ExpandProperty AggrEfficiencyAdditionalDetailsInfo).NumberOfSisDisabledVolumes | Measure-Object -Sum
5454
if ($Data -and $Savingfilter.Sum -gt 0 -and $Healthcheck.Storage.Efficiency) {
55-
Section -Style Heading4 'HealthCheck - Volume without deduplication enabled' {
55+
Section -Style Heading4 'HealthCheck - Volume with Disabled Deduplication' {
5656
Paragraph "The following section provides the Volume efficiency healthcheck Information on $($ClusterInfo.ClusterName)."
5757
BlankLine
5858
$OutObj = @()

Src/Private/Get-AbrOntapEfficiencyVolSisStatus.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ function Get-AbrOntapEfficiencyVolSisStatus {
4040
default {$Item.State}
4141
}
4242
'Status' = $Item.Status
43-
'Schedule Or Policy' = $Item.ScheduleOrPolicy
44-
'Progress' = $Item.Progress
43+
'Schedule Or Policy' = ConvertTo-EmptyToFiller $Item.ScheduleOrPolicy
44+
'Progress' = ConvertTo-EmptyToFiller $Item.Progress
4545
}
4646
$OutObj += [pscustomobject]$inobj
4747
}

Src/Private/Get-AbrOntapStorageAGGR.ps1

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrOntapStorageAGGR {
55
.DESCRIPTION
66
77
.NOTES
8-
Version: 0.5.0
8+
Version: 0.6.0
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -53,6 +53,64 @@ function Get-AbrOntapStorageAGGR {
5353
}
5454
$AggrSpaceSummary | Table @TableParams
5555
}
56+
if ($InfoLevel.Storage -ge 2) {
57+
Section -Style Heading4 'Aggregate Options' {
58+
Paragraph "The following section provides the Aggregates Options on $($ClusterInfo.ClusterName)."
59+
BlankLine
60+
$Aggregates = Get-NcAggr -Controller $Array | Where-Object {!$_.AggrRaidAttributes.HasLocalRoot}
61+
foreach ($Aggregate in $Aggregates) {
62+
Section -Style Heading5 "$($Aggregate.Name) Options" {
63+
Paragraph "The following section provides the Aggregates Options on $($Aggregate.Name)."
64+
BlankLine
65+
$OutObj = @()
66+
$Options = Get-NcAggrOption -Controller $Array -Name $Aggregate.Name
67+
$Option = @{}
68+
$Options | ForEach-Object {$Option.add($_.Name, $_.Value)}
69+
$inObj = [ordered] @{
70+
'azcs_read_optimization' = $TextInfo.ToTitleCase($Option.azcs_read_optimization)
71+
'dir_holes' = ConvertTo-TextYN $Option.dir_holes
72+
'dlog_hole_reserve' = $TextInfo.ToTitleCase($Option.dlog_hole_reserve)
73+
'enable_cold_data_reporting' = ConvertTo-TextYN $Option.enable_cold_data_reporting
74+
'encrypt_with_aggr_key' = ConvertTo-TextYN $Option.encrypt_with_aggr_key
75+
'free_space_realloc' = $TextInfo.ToTitleCase($Option.free_space_realloc)
76+
'fs_size_fixed' = $TextInfo.ToTitleCase($Option.fs_size_fixed)
77+
'ha_policy' = $TextInfo.ToTitleCase($Option.ha_policy)
78+
'hybrid_enabled' = ConvertTo-TextYN $Option.hybrid_enabled
79+
'ignore_inconsistent' = $TextInfo.ToTitleCase($Option.ignore_inconsistent)
80+
'logical_space_enforcement' = ConvertTo-TextYN $Option.logical_space_enforcement
81+
'logical_space_reporting' = ConvertTo-TextYN $Option.logical_space_reporting
82+
'max_write_alloc_blocks' = $TextInfo.ToTitleCase($Option.max_write_alloc_blocks)
83+
'nearly_full_threshold' = $TextInfo.ToTitleCase($Option.nearly_full_threshold)
84+
'no_delete_log' = $TextInfo.ToTitleCase($Option.no_delete_log)
85+
'no_i2p' = $TextInfo.ToTitleCase($Option.no_i2p)
86+
'nosnap' = $TextInfo.ToTitleCase($Option.nosnap)
87+
'percent_snapshot_space' = $TextInfo.ToTitleCase($Option.percent_snapshot_space)
88+
'raid_cv' = $TextInfo.ToTitleCase($Option.raid_cv)
89+
'raid_lost_write' = $TextInfo.ToTitleCase($Option.raid_lost_write)
90+
'raidsize' = $TextInfo.ToTitleCase($Option.raidsize)
91+
'raidtype' = $TextInfo.ToTitleCase($Option.raidtype)
92+
'resyncsnaptime' = $TextInfo.ToTitleCase($Option.resyncsnaptime)
93+
'single_instance_data_logging' = $TextInfo.ToTitleCase($Option.single_instance_data_logging)
94+
'snapmirrored' = $TextInfo.ToTitleCase($Option.snapmirrored)
95+
'snapshot_autodelete' = $TextInfo.ToTitleCase($Option.snapshot_autodelete)
96+
'striping' = $TextInfo.ToTitleCase($Option.striping)
97+
'thorough_scrub' = $TextInfo.ToTitleCase($Option.thorough_scrub)
98+
}
99+
$OutObj += [pscustomobject]$inobj
100+
101+
$TableParams = @{
102+
Name = "Aggregates Options - $($Aggregate.Name)"
103+
List = $true
104+
ColumnWidths = 50, 50
105+
}
106+
if ($Report.ShowTableCaptions) {
107+
$TableParams['Caption'] = "- $($TableParams.Name)"
108+
}
109+
$OutObj | Table @TableParams
110+
}
111+
}
112+
}
113+
}
56114
}
57115

58116
end {}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
function Get-AbrOntapVserverCIFSSession {
2+
<#
3+
.SYNOPSIS
4+
Used by As Built Report to retrieve NetApp ONTAP Vserver CIFS Sessions information from the Cluster Management Network
5+
.DESCRIPTION
6+
7+
.NOTES
8+
Version: 0.5.0
9+
Author: Jonathan Colon
10+
Twitter: @jcolonfzenpr
11+
Github: rebelinux
12+
.EXAMPLE
13+
14+
.LINK
15+
16+
#>
17+
param (
18+
[Parameter (
19+
Position = 0,
20+
Mandatory)]
21+
[string]
22+
$Vserver
23+
)
24+
25+
begin {
26+
Write-PscriboMessage "Collecting ONTAP CIFS Session information."
27+
}
28+
29+
process {
30+
$VserverData = Get-NcCifsSession -VserverContext $Vserver -Controller $Array
31+
$VserverObj = @()
32+
if ($VserverData) {
33+
foreach ($Item in $VserverData) {
34+
$inObj = [ordered] @{
35+
'Lif Address' = $Item.LifAddress
36+
'Connected Time' = $Item.ConnectedTime
37+
'Protocol Version' = $Item.ProtocolVersion
38+
'Address' = $Item.Address
39+
'User' = $Item.WindowsUser
40+
}
41+
$VserverObj += [pscustomobject]$inobj
42+
}
43+
44+
$TableParams = @{
45+
Name = "Vserver CIFS Sessions Information - $($Vserver)"
46+
List = $false
47+
ColumnWidths = 20, 15, 15, 20, 30
48+
}
49+
if ($Report.ShowTableCaptions) {
50+
$TableParams['Caption'] = "- $($TableParams.Name)"
51+
}
52+
$VserverObj | Table @TableParams
53+
}
54+
}
55+
56+
end {}
57+
58+
}

0 commit comments

Comments
 (0)