Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .github/workflows/PSScriptAnalyzer.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: PSScriptAnalyzer
on: [push, pull_request]
jobs:
lint:
name: Run PSScriptAnalyzer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: lint
uses: devblackops/github-action-psscriptanalyzer@master
with:
sendComment: true
failOnErrors: true
failOnWarnings: false
failOnInfos: false
repoToken: ${{ secrets.GITHUB_TOKEN }}
settingsPath: .github/workflows/PSScriptAnalyzerSettings.psd1
lint:
name: Run PSScriptAnalyzer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: lint
uses: alagoutte/github-action-psscriptanalyzer@master
with:
sendComment: true
failOnErrors: true
failOnWarnings: false
failOnInfos: false
repoToken: ${{ secrets.GITHUB_TOKEN }}
settingsPath: .github/workflows/PSScriptAnalyzerSettings.psd1
112 changes: 56 additions & 56 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
name: Publish PowerShell Module

on:
release:
types: [published]
release:
types: [published]

jobs:
publish-to-gallery:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set PSRepository to Trusted for PowerShell Gallery
shell: pwsh
run: |
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
- name: Install AsBuiltReport.Core module
shell: pwsh
run: |
Install-Module -Name AsBuiltReport.Core -Repository PSGallery -Force
- name: Install NetApp.ONTAP module
shell: pwsh
run: |
Install-Module -Name NetApp.ONTAP -Repository PSGallery -Force
- name: Install Diagrammer.Core module
shell: pwsh
run: |
Install-Module -Name Diagrammer.Core -Repository PSGallery -Force
- name: Test Module Manifest
shell: pwsh
run: |
Test-ModuleManifest .\AsBuiltReport.NetApp.ONTAP.psd1
- name: Publish module to PowerShell Gallery
shell: pwsh
run: |
Publish-Module -Path ./ -NuGetApiKey ${{ secrets.PSGALLERY_API_KEY }} -Verbose
tweet:
needs: publish-to-gallery
runs-on: ubuntu-latest
steps:
- uses: Eomm/why-don-t-you-tweet@v2
# We don't want to tweet if the repository is not a public one
if: ${{ !github.event.repository.private }}
with:
# GitHub event payload
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release
tweet-message: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #Netapp #AsBuiltReport #PowerShell #Ontap #NetAppATeam"
env:
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
bsky-post:
needs: publish-to-gallery
runs-on: ubuntu-latest
steps:
- uses: zentered/bluesky-post-action@v0.3.0
with:
post: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #Netapp #AsBuiltReport #PowerShell #Ontap #NetAppATeam"
env:
BSKY_IDENTIFIER: ${{ secrets.BSKY_IDENTIFIER }}
BSKY_PASSWORD: ${{ secrets.BSKY_PASSWORD }}
publish-to-gallery:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set PSRepository to Trusted for PowerShell Gallery
shell: pwsh
run: |
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
- name: Install AsBuiltReport.Core module
shell: pwsh
run: |
Install-Module -Name AsBuiltReport.Core -Repository PSGallery -Force
- name: Install NetApp.ONTAP module
shell: pwsh
run: |
Install-Module -Name NetApp.ONTAP -Repository PSGallery -Force
- name: Install Diagrammer.Core module
shell: pwsh
run: |
Install-Module -Name Diagrammer.Core -Repository PSGallery -Force
- name: Test Module Manifest
shell: pwsh
run: |
Test-ModuleManifest .\AsBuiltReport.NetApp.ONTAP.psd1
- name: Publish module to PowerShell Gallery
shell: pwsh
run: |
Publish-Module -Path ./ -NuGetApiKey ${{ secrets.PSGALLERY_API_KEY }} -Verbose
tweet:
needs: publish-to-gallery
runs-on: ubuntu-latest
steps:
- uses: Eomm/why-don-t-you-tweet@v2
# We don't want to tweet if the repository is not a public one
if: ${{ !github.event.repository.private }}
with:
# GitHub event payload
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release
tweet-message: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #Netapp #AsBuiltReport #PowerShell #Ontap #NetAppATeam"
env:
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
bsky-post:
needs: publish-to-gallery
runs-on: ubuntu-latest
steps:
- uses: zentered/bluesky-post-action@v0.3.0
with:
post: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #Netapp #AsBuiltReport #PowerShell #Ontap #NetAppATeam"
env:
BSKY_IDENTIFIER: ${{ secrets.BSKY_IDENTIFIER }}
BSKY_PASSWORD: ${{ secrets.BSKY_PASSWORD }}
62 changes: 31 additions & 31 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,40 @@
name: CodeQL

on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
schedule:
- cron: '20 14 * * 1'
push:
branches: ["dev"]
pull_request:
branches: ["dev"]
schedule:
- cron: "20 14 * * 1"

permissions:
contents: read
contents: read

jobs:
build:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
name: PSScriptAnalyzer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
build:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
name: PSScriptAnalyzer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Run PSScriptAnalyzer
uses: microsoft/psscriptanalyzer-action@v1.1
with:
# Check https://github.com/microsoft/action-psscriptanalyzer for more info about the options.
# The below set up runs PSScriptAnalyzer to your entire repository and runs some basic security rules.
path: .\
recurse: true
# Include your own basic security rules. Removing this option will run all the rules
excludeRule: '"PSAvoidUsingPlainTextForPassword", "PSAvoidUsingUsernameAndPasswordParams", "PSAvoidUsingConvertToSecureStringWithPlainText"'
output: results.sarif
- name: Run PSScriptAnalyzer
uses: microsoft/psscriptanalyzer-action@v1.1
with:
# Check https://github.com/microsoft/action-psscriptanalyzer for more info about the options.
# The below set up runs PSScriptAnalyzer to your entire repository and runs some basic security rules.
path: .\
recurse: true
# Include your own basic security rules. Removing this option will run all the rules
excludeRule: '"PSAvoidUsingPlainTextForPassword", "PSAvoidUsingUsernameAndPasswordParams", "PSAvoidUsingConvertToSecureStringWithPlainText"'
output: results.sarif

# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
6 changes: 3 additions & 3 deletions AsBuiltReport.NetApp.ONTAP.Style.ps1

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion AsBuiltReport.NetApp.ONTAP.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"EnableDiagramSignature": false,
"DiagramColumnSize": 4,
"SignatureAuthorName": "",
"SignatureCompanyName": ""
"SignatureCompanyName": "",
"UpdateCheck": true
},
"InfoLevel": {
"_comment_": "0 = Disabled, 1 = Enabled, 2 = Adv Summary",
Expand Down
6 changes: 3 additions & 3 deletions AsBuiltReport.NetApp.ONTAP.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'AsBuiltReport.NetApp.ONTAP.psm1'

# Version number of this module.
ModuleVersion = '0.6.11'
ModuleVersion = '0.6.12'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -54,15 +54,15 @@
RequiredModules = @(
@{
ModuleName = 'AsBuiltReport.Core';
ModuleVersion = '1.5.0'
ModuleVersion = '1.5.1'
},
@{
ModuleName = 'NetApp.ONTAP';
ModuleVersion = '9.17.1.2509'
},
@{
ModuleName = 'Diagrammer.Core';
ModuleVersion = '0.2.33'
ModuleVersion = '0.2.36'
}
)

Expand Down
28 changes: 28 additions & 0 deletions AsBuiltReport.NetApp.ONTAP.psm1
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
# Get assemblies files and import them
$assemblyName = switch ($PSVersionTable.PSEdition) {
'Core' {
if ($IsMacOS) {
@(Get-ChildItem -Path ("$PSScriptRoot{0}Src{0}Bin{0}Assemblies{0}net90{0}osx-x64{0}*.dll" -f [System.IO.Path]::DirectorySeparatorChar) -ErrorAction SilentlyContinue)
} elseif ($IsLinux) {
@(Get-ChildItem -Path ("$PSScriptRoot{0}Src{0}Bin{0}Assemblies{0}net90{0}linux-x64{0}*.dll" -f [System.IO.Path]::DirectorySeparatorChar) -ErrorAction SilentlyContinue)
} elseif ($IsWindows) {
@(Get-ChildItem -Path ("$PSScriptRoot{0}Src{0}Bin{0}Assemblies{0}net90{0}win-x64{0}*.dll" -f [System.IO.Path]::DirectorySeparatorChar) -ErrorAction SilentlyContinue)
}
}
'Desktop' {
@(Get-ChildItem -Path ("$PSScriptRoot{0}Src{0}Bin{0}Assemblies{0}net48{0}*.dll" -f [System.IO.Path]::DirectorySeparatorChar) -ErrorAction SilentlyContinue)
}
default {
Write-Verbose -Message 'Unable to find compatible assemblies.'
}
}

foreach ($Assembly in $assemblyName) {
try {
Write-Verbose -Message "Loading assembly '$($Assembly.Name)'."
Add-Type -Path $Assembly.FullName -Verbose
} catch {
Write-Error -Message "Failed to add assembly $($Assembly.FullName): $_"
}
}

# Get public and private function definition files and dot source them
$Public = @(Get-ChildItem -Path $PSScriptRoot\Src\Public\*.ps1 -ErrorAction SilentlyContinue)
$Private = @(Get-ChildItem -Path $PSScriptRoot\Src\Private\*.ps1 -ErrorAction SilentlyContinue)
Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,35 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.6.12] - Unreleased

### Added

- Add Health Check best practices for Network Broadcast Domains
- Add Health Check best practices for NTP configuration
- Recommend multiple NTP servers for redundancy
- Add Per Volume export policy information
- Add `Node Name` to FCP Interfaces section in FCP Vserver configuration
- Apply powershell best practices
- Add ConvertTo-HashToYN function
- Add EMS configuration setting health check

### Changed

- Bump Diagrammer.Core module requirement to v0.2.36
- Bump module version to v0.6.12

### Fixed

- Fix snapshot reserve space health check to use correct calculation method
- Enhance Get-AbrOntapNodesSP function with detailed service-processor information
- Fix model property assignment in Get-AbrOntapStorageAggrDiagram function
- Fix Volume SnapShot Configuration section showing healthcheck for non violated item

### Removed

- Removed Pwsh v5.1 support

## [0.6.11] - 2025-11-07

### Added
Expand Down
Binary file not shown.
Binary file not shown.
Binary file added Src/Bin/Assemblies/net90/linux-x64/ScottPlot.dll
Binary file not shown.
Binary file not shown.
Binary file added Src/Bin/Assemblies/net90/linux-x64/SkiaSharp.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Src/Bin/Assemblies/net90/osx-arm64/ScottPlot.dll
Binary file not shown.
Binary file not shown.
Binary file added Src/Bin/Assemblies/net90/osx-arm64/SkiaSharp.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Src/Bin/Assemblies/net90/osx-x64/ScottPlot.dll
Binary file not shown.
Binary file not shown.
Binary file added Src/Bin/Assemblies/net90/osx-x64/SkiaSharp.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Src/Bin/Assemblies/net90/win-x64/ScottPlot.dll
Binary file not shown.
Binary file not shown.
Binary file added Src/Bin/Assemblies/net90/win-x64/SkiaSharp.dll
Binary file not shown.
Binary file not shown.
Binary file added Src/Bin/Assemblies/net90/win-x64/libSkiaSharp.dll
Binary file not shown.
35 changes: 35 additions & 0 deletions Src/Private/ConvertTo-HashToYN.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
function ConvertTo-HashToYN {
<#
.SYNOPSIS
Used by As Built Report to convert array content true or false automatically to Yes or No.
.DESCRIPTION

.NOTES
Version: 0.2.0
Author: Jonathan Colon

.EXAMPLE

.LINK

#>
[CmdletBinding()]
[OutputType([System.Collections.Specialized.OrderedDictionary])]
param (
[Parameter (Position = 0, Mandatory)]
[AllowEmptyString()]
[System.Collections.Specialized.OrderedDictionary] $TEXT
)

$result = [ordered] @{}
foreach ($i in $TEXT.GetEnumerator()) {
try {
$result.add($i.Key, (ConvertTo-TextYN $i.Value))
} catch {
$result.add($i.Key, ($i.Value))
}
}
if ($result) {
return $result
} else { return $TEXT }
}
Loading
Loading