Skip to content

Commit 160f415

Browse files
tpcarmanrebelinux
andauthored
v0.4.0 release (#5)
* Repository setup * Add Sample Report Content * Merge Content * Merge Report Configuration File * Fix Manifest File Content * add new report structure and content * Fixed function logic and verbose messages * Added node function files and include it in main report * Add InfoLevel support for Node, Storage and License * Added ONTAP cluster licenses information * Added ONTAP cluster licenses usage information * Added ONTAP disk assign summary information * Added ONTAP failed disk information * Added ONTAP disk inventort information * Added ONTAP disk shelf information * Added ONTAP disk type information * Added ONTAP storage summary information * Added storage and license information to the main report file * Update Sample Report Content * Fix disk capacity unit * Added Network InfoLevel * Added Network category to the report * Fix broken disk logic * Fix ClusterHA logic to detect failed nodes * Added more Network related content to the report * Added Network content to main report * Added more fixes * Added Network Mgmt Lif to report * Added FCP and ISCSI services reporting * Added Vserver content to main report * Filter vserver to only display data type * Fix for table properties and filter more displayed content * add delimiter to content * Fix network content in main report * Cosmetic fixesa * Renaming for better function name structure * More Cosmetic fixes * Add vserver hosted volumes volumes * Split Disk Inventory Table for better columns handling * Added Lun Information to the report * Added flexclone information to the report * Added Qtree information to the volume section * Add Volume Quota Function * Add NFS Protocol Function * Add Volume Export Policy Function * Add Support for NFS and Quota Healthcheck * Add NFS and Volume Export Policy to the main Report * Update Sample Report with New Content * Added CIFS Healthchack support * Added CIFS Protocol Support * Fix Table Content * Relocate and rename get-metric function * Added snapshot healthcheck * Added volume snapshot to the vserver section * Added heading 6 font size * Added Vserver Volume Snapshot Section to main report * Added NetApp ONTAP Rest API function * Fix the field url component * Added S3 protocol support * Updated Sample wiith new content * Added Sample HTML File download * Added tap opening of the Sample report html file * Fix * Bahhh * Added Replication Section and modules * Added more replication content * Fix indentation * Fixing for better data management * Fixing for better data management * Added Storage Efficiency Section * Marks for future fixes * Added Storage Efficiency Functions * Split Vserver Volume Summary and Flexclone * Added Flexclone and Flexgroup volume functions * Split Volumes Summary from Flexclone and Flexgroup also added Efficiency section * Updated Sample HTML File * More Fucking Fixes * Improve columns width * Added FlexCache Volume Section * Remove global parameter * Split Snapshot function also fix many things * Added Volume Snapshot Health Report * Better logic for filtering if vserver has cifs service configured * Use ConvertTo-FormattedNumber netapp function also remove $Unit variable * Added FabricPool function and Report Section * Many miscellaneous fixes * Add collection conditions to varius sections * Fixes * Added Node Storage in Node Section * More fixes and implement collection conditions * Added more conditions to main report sections and Code Cleanup * Improve main report structure * Added fabricpool health check * report issues * ColumnWidths fixes * PageBreak fixes in main report * Added Disk Owner to the Disk Section * ColumnWidths fixes * HealthCheck - Aggregate Disk Spare Low * Fixes for snapshot volume section * Added LUN Reporting Nodes * Joun Disk Inventory tables * Added Route usage per lifs * Added Non Mapped Lun Healthcheck * Added Snapshot reserve info healthcheck * Added healthcheck and fix protocol label * ColumnWidths fixes * Added Get-AbrOntapNetworkRouteLifs and Get-AbrOntapVserverNonMappedLun functions * Replace PS6+ Join-String with PSv* -join * Confirm powershell v5, v6 and v7 support * Fix lag time * Added Volume Sis Status Reporting * Edit volume selection filter logic * Added System Configuration Section * Added System Configuration Section * Added System Web Service to system configuration section * Fix Vserver Column Position * Added QoS Info to Vserver Volume Section * Added Web Service Status and Volume QoS Setting to main Report * Added Security Section * Fixes * Added Security KMS, NAE and NVE to the security section * Added BackupURL HealthCheck * Misc Fixes * Fix for empty table cell * Fix volume offiline issues * Fix for empty content * Fix lun reporting node duplicates * Fix for empty columns * Fix for healthcheck logic * Fix to detect offline volumes * Added Snaplock functions to the security section * Added Snaplock Volume Attributes to the security section * Added Cluster and Intercluster lif detection (Ontap Select) * Added import-module fix for PSv5.x * Misc Fixes for Sections * Added a pagebreak at the end of the report to split multi cluster report generation * Prepare file for 0.3.0 version tag * Added misc fixes * Updated changelog to reflect 0.3.0 release * Added Network Interface Healthcheck * Update version to reflect 0.3.0 release * better empty detection logic * Added logic to detect if aggregate are asign to the vserver * Update CHANGELOG.md * Fix for ColumnWidths definition * Renaming function and file to Get-NetAppOntapAPI * Fix for Get-NetAppOntapAPI function renamng also remove Get-AbrOntapRequiredModule * Fix for specifying supported InfoLevels * Added Netapp.Ontap to the module manifest RequiredModules * Links should be to the AsBuiltReport repo * v0.3.0 release (#2) * v0.3.0 final - Add GitHub release workflow - Update NetApp style script to align with NetApp branding colours & guidelines - Update README & CHANGELOG - Correct module version in module manifest * Update NetApp Style - Fix headings 4-6 colours * Added a function to convert true or false automatically to Yes or No, also update files * Remove pagebreak at the end of the report * updated document style colors * Fix indentation * Implement ConvertTo-TextYN to convert T/F to Y/N (less to code) * Fix switch case with default option * Fix for Issue #3 * force connection through https also misc code cleanup * Added GitHub release workflow * Fix for version and showcoverpageimage * Change module version * Update Readme file * v0.4.0 release * Update 0.4.0 date * Fix Release GitHub Workflow Co-authored-by: Jonathan Colon <[email protected]> Co-authored-by: Jonathan Colon <[email protected]>
1 parent e73c82e commit 160f415

File tree

118 files changed

+9092
-20
lines changed

Some content is hidden

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

118 files changed

+9092
-20
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
5+
---
6+
7+
**Describe the bug**
8+
A clear and concise description of what the bug is.
9+
10+
**To Reproduce**
11+
Steps to reproduce the behavior:
12+
1. Go to '...'
13+
2. Click on '....'
14+
3. Scroll down to '....'
15+
4. See error
16+
17+
**Expected behavior**
18+
A clear and concise description of what you expected to happen.
19+
20+
**Screenshots**
21+
If applicable, add screenshots to help explain your problem.
22+
23+
**Desktop (please complete the following information):**
24+
- OS: [e.g. iOS]
25+
- Browser [e.g. chrome, safari]
26+
- Version [e.g. 22]
27+
28+
**Smartphone (please complete the following information):**
29+
- Device: [e.g. iPhone6]
30+
- OS: [e.g. iOS8.1]
31+
- Browser [e.g. stock browser, safari]
32+
- Version [e.g. 22]
33+
34+
**Additional context**
35+
Add any other context about the problem here.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
5+
---
6+
7+
**Is your feature request related to a problem? Please describe.**
8+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9+
10+
**Describe the solution you'd like**
11+
A clear and concise description of what you want to happen.
12+
13+
**Describe alternatives you've considered**
14+
A clear and concise description of any alternative solutions or features you've considered.
15+
16+
**Additional context**
17+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
3+
## Description
4+
<!--- Describe your changes in detail -->
5+
6+
## Related Issue
7+
<!--- This project only accepts pull requests related to open issues -->
8+
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
9+
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
10+
<!--- Please link to the issue here: -->
11+
12+
## Motivation and Context
13+
<!--- Why is this change required? What problem does it solve? -->
14+
15+
## How Has This Been Tested?
16+
<!--- Please describe in detail how you tested your changes. -->
17+
<!--- Include details of your testing environment, and the tests you ran to -->
18+
<!--- see how your change affects other areas of the code, etc. -->
19+
20+
## Screenshots (if appropriate):
21+
22+
## Types of changes
23+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
24+
- [ ] Bug fix (non-breaking change which fixes an issue)
25+
- [ ] New feature (non-breaking change which adds functionality)
26+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
27+
28+
## Checklist:
29+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
30+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
31+
- [ ] My code follows the code style of this project.
32+
- [ ] My change requires a change to the documentation.
33+
- [ ] I have updated the documentation accordingly.
34+
- [ ] I have read the [**CONTRIBUTING**](/CONTRIBUTING.md) document.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: PSScriptAnalyzer
2+
on: [push, pull_request]
3+
jobs:
4+
lint:
5+
name: Run PSScriptAnalyzer
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v2
9+
- name: lint
10+
uses: devblackops/github-action-psscriptanalyzer@master
11+
with:
12+
sendComment: true
13+
failOnErrors: true
14+
failOnWarnings: false
15+
failOnInfos: false
16+
repoToken: ${{ secrets.GITHUB_TOKEN }}
17+
settingsPath: .github/workflows/PSScriptAnalyzerSettings.psd1
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@{
2+
ExcludeRules = @(
3+
'PSUseToExportFieldsInManifest',
4+
'PSReviewUnusedParameter',
5+
'PSUseDeclaredVarsMoreThanAssignments',
6+
'PSAvoidGlobalVars'
7+
)
8+
}

.github/workflows/Release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish PowerShell Module
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish-to-gallery:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set PSRepository to Trusted for PowerShell Gallery
13+
shell: pwsh
14+
run: |
15+
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
16+
- name: Install AsBuiltReport.Core module
17+
shell: pwsh
18+
run: |
19+
Install-Module -Name AsBuiltReport.Core -Repository PSGallery -Force
20+
- name: Test Module Manifest
21+
shell: pwsh
22+
run: |
23+
Test-ModuleManifest .\AsBuiltReport.NetApp.ONTAP.psd1
24+
- name: Publish module to PowerShell Gallery
25+
shell: pwsh
26+
run: |
27+
Publish-Module -Path ./ -NuGetApiKey ${{ secrets.PSGALLERY_API_KEY }} -Verbose

.vscode/settings.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"powershell.codeFormatting.preset": "Custom",
3+
"powershell.codeFormatting.useCorrectCasing": true,
4+
"powershell.codeFormatting.autoCorrectAliases": true,
5+
"powershell.codeFormatting.whitespaceBeforeOpenBrace": true,
6+
"powershell.codeFormatting.whitespaceBeforeOpenParen": true,
7+
"powershell.codeFormatting.whitespaceAroundOperator": true,
8+
"powershell.codeFormatting.whitespaceAfterSeparator": true,
9+
"powershell.codeFormatting.addWhitespaceAroundPipe": true,
10+
"powershell.codeFormatting.ignoreOneLineBlock": true,
11+
"powershell.codeFormatting.newLineAfterCloseBrace": false,
12+
"powershell.codeFormatting.newLineAfterOpenBrace": true,
13+
"powershell.codeFormatting.openBraceOnSameLine": true,
14+
"powershell.codeFormatting.alignPropertyValuePairs": false,
15+
"powershell.codeFolding.enable": true,
16+
"powershell.scriptAnalysis.enable": true,
17+
"powershell.scriptAnalysis.settingsPath": ".github/workflows/PSScriptAnalyzerSettings.psd1",
18+
"editor.tabSize": 4,
19+
"editor.insertSpaces": true,
20+
"editor.detectIndentation": false,
21+
"editor.rulers": [
22+
115
23+
],
24+
"files.trimTrailingWhitespace": true
25+
}
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# NetApp ONTAP Default Document Style
2+
3+
# Configure document options
4+
DocumentOption -EnableSectionNumbering -PageSize A4 -DefaultFont 'Arial' -MarginLeftAndRight 71 -MarginTopAndBottom 71 -Orientation $Orientation
5+
6+
# Configure Heading and Font Styles
7+
Style -Name 'Title' -Size 24 -Color '0067C5' -Align Center
8+
Style -Name 'Title 2' -Size 18 -Color '58595B' -Align Center
9+
Style -Name 'Title 3' -Size 12 -Color '58595B' -Align Left
10+
Style -Name 'Heading 1' -Size 16 -Color '0067C5'
11+
Style -Name 'Heading 2' -Size 14 -Color '0067C5'
12+
Style -Name 'Heading 3' -Size 12 -Color '0067C5'
13+
Style -Name 'Heading 4' -Size 11 -Color '0067C5'
14+
Style -Name 'Heading 5' -Size 10 -Color '0067C5'
15+
Style -Name 'Heading 6' -Size 10 -Color '0067C5'
16+
Style -Name 'Normal' -Size 10 -Color '565656' -Default
17+
Style -Name 'Caption' -Size 10 -Color '565656' -Italic -Align Center
18+
Style -Name 'Header' -Size 10 -Color '565656' -Align Center
19+
Style -Name 'Footer' -Size 10 -Color '565656' -Align Center
20+
Style -Name 'TOC' -Size 16 -Color '0067C5'
21+
Style -Name 'TableDefaultHeading' -Size 10 -Color 'FFFFFF' -BackgroundColor '0067C5'
22+
Style -Name 'TableDefaultRow' -Size 10 -Color '565656'
23+
Style -Name 'Critical' -Size 10 -BackgroundColor 'F1655C'
24+
Style -Name 'Warning' -Size 10 -BackgroundColor 'F4A71C'
25+
Style -Name 'Info' -Size 10 -BackgroundColor '5AC0ED'
26+
Style -Name 'OK' -Size 10 -BackgroundColor '81BC50'
27+
28+
# Configure Table Styles
29+
$TableDefaultProperties = @{
30+
Id = 'TableDefault'
31+
HeaderStyle = 'TableDefaultHeading'
32+
RowStyle = 'TableDefaultRow'
33+
BorderColor = '0067C5'
34+
Align = 'Left'
35+
CaptionStyle = 'Caption'
36+
CaptionLocation = 'Below'
37+
BorderWidth = 0.25
38+
PaddingTop = 1
39+
PaddingBottom = 1.5
40+
PaddingLeft = 2
41+
PaddingRight = 2
42+
}
43+
44+
TableStyle @TableDefaultProperties -Default
45+
TableStyle -Id 'Borderless' -HeaderStyle Normal -RowStyle Normal -BorderWidth 0
46+
47+
# NetApp ONTAP Cover Page Layout
48+
# Header & Footer
49+
if ($ReportConfig.Report.ShowHeaderFooter) {
50+
Header -Default {
51+
Paragraph -Style Header "$($ReportConfig.Report.Name) - v$($ReportConfig.Report.Version)"
52+
}
53+
54+
Footer -Default {
55+
Paragraph -Style Footer 'Page <!# PageNumber #!>'
56+
}
57+
}
58+
59+
# Set position of report titles and information based on page orientation
60+
if (!($ReportConfig.Report.ShowCoverPageImage)) {
61+
$LineCount = 5
62+
}
63+
if ($Orientation -eq 'Portrait') {
64+
BlankLine -Count 11
65+
$LineCount = 32 + $LineCount
66+
} else {
67+
BlankLine -Count 7
68+
$LineCount = 15 + $LineCount
69+
}
70+
71+
# NetApp Logo Image
72+
# NETAPP DO NOT PERMIT THE USE OF THEIR LOGO WITHOUT WRITTEN AUTHORIZATION
73+
<#
74+
if ($ReportConfig.Report.ShowCoverPageImage) {
75+
Try {
76+
Image -Text 'NetApp Logo' -Align 'Center' -Percent 5 -Base64 ""
77+
} Catch {
78+
Write-PScriboMessage -Message ".NET Core is required for cover page image support. Please install .NET Core or disable 'ShowCoverPageImage' in the report JSON configuration file."
79+
}
80+
}
81+
#>
82+
83+
# Add Report Name
84+
Paragraph -Style Title $ReportConfig.Report.Name
85+
86+
if ($AsBuiltConfig.Company.FullName) {
87+
# Add Company Name if specified
88+
BlankLine -Count 2
89+
Paragraph -Style Title2 $AsBuiltConfig.Company.FullName
90+
BlankLine -Count $LineCount
91+
} else {
92+
BlankLine -Count ($LineCount + 1)
93+
}
94+
Table -Name 'Cover Page' -List -Style Borderless -Width 0 -Hashtable ([Ordered] @{
95+
'Author:' = $AsBuiltConfig.Report.Author
96+
'Date:' = (Get-Date).ToLongDateString()
97+
'Version:' = $ReportConfig.Report.Version
98+
})
99+
PageBreak
100+
101+
if ($ReportConfig.Report.ShowTableOfContents) {
102+
# Add Table of Contents
103+
TOC -Name 'Table of Contents'
104+
PageBreak
105+
}

AsBuiltReport.NetApp.ONTAP.json

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"Report": {
3+
"Name": "NetApp ONTAP As Built Report",
4+
"Version": "1.0",
5+
"Status": "Released",
6+
"ShowCoverPageImage": true,
7+
"ShowTableOfContents": true,
8+
"ShowHeaderFooter": true,
9+
"ShowTableCaptions": true
10+
},
11+
"Options": {
12+
13+
},
14+
"InfoLevel": {
15+
"_comment_": "0 = Disabled, 1 = Enabled",
16+
"Cluster": 1,
17+
"Node": 1,
18+
"Storage": 1,
19+
"License": 1,
20+
"Network": 1,
21+
"Vserver": 1,
22+
"Replication": 1,
23+
"Efficiency": 1,
24+
"Security": 1,
25+
"System": 1
26+
},
27+
"HealthCheck": {
28+
"Cluster": {
29+
"Summary": true,
30+
"HA": true,
31+
"AutoSupport": true
32+
},
33+
"Node": {
34+
"HW": true,
35+
"ServiceProcessor": true
36+
},
37+
"Storage": {
38+
"Aggr": true,
39+
"DiskStatus": true,
40+
"ShelfStatus": true,
41+
"Efficiency": true,
42+
"FabricPool": true
43+
},
44+
"Network": {
45+
"Port": true,
46+
"Interface": true
47+
},
48+
"License": {
49+
"RiskSummary": true,
50+
"ServiceProcessor": true
51+
},
52+
"Vserver": {
53+
"Status": true,
54+
"Iscsi": true,
55+
"FCP": true,
56+
"NFS": true,
57+
"Quota": true,
58+
"CIFS": true,
59+
"Snapshot": true
60+
},
61+
"Replication": {
62+
"Status": true,
63+
"ClusterPeer": true,
64+
"VserverPeer": true,
65+
"Relationship": true,
66+
"History": true,
67+
"Mediator": true
68+
},
69+
"System": {
70+
"NTP": true,
71+
"DNS": true,
72+
"EMS": true,
73+
"Backup": true
74+
},
75+
"Security": {
76+
"Users": true,
77+
"KMS": true
78+
}
79+
}
80+
}

0 commit comments

Comments
 (0)