Skip to content

Commit 538ed4b

Browse files
authored
Merge pull request #46 from rebelinux/dev
v0.6.7
2 parents 75afb88 + ab64f83 commit 538ed4b

11 files changed

+408
-135
lines changed

.github/workflows/Release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
publish-to-gallery:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
11+
- uses: actions/checkout@v4
1212
- name: Set PSRepository to Trusted for PowerShell Gallery
1313
shell: pwsh
1414
run: |
@@ -33,7 +33,7 @@ jobs:
3333
needs: publish-to-gallery
3434
runs-on: ubuntu-latest
3535
steps:
36-
- uses: Eomm/why-don-t-you-tweet@v1
36+
- uses: Eomm/why-don-t-you-tweet@v2
3737
# We don't want to tweet if the repository is not a public one
3838
if: ${{ !github.event.repository.private }}
3939
with:

AsBuiltReport.NetApp.ONTAP.json

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

AsBuiltReport.NetApp.ONTAP.psd1

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@
5454
RequiredModules = @(
5555
@{
5656
ModuleName = 'AsBuiltReport.Core';
57-
ModuleVersion = '1.3.0'
57+
ModuleVersion = '1.4.0'
5858
},
5959
@{
6060
ModuleName = 'NetApp.ONTAP';
61-
ModuleVersion = '9.10.1.2111'
61+
ModuleVersion = '9.15.1.2407'
6262
}
6363
)
6464

@@ -128,6 +128,4 @@
128128
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
129129
# DefaultCommandPrefix = ''
130130

131-
}
132-
133-
131+
}

CHANGELOG.md

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

3-
## [0.6.7] - 2024-02-02
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.6.7] - Unreleased
9+
10+
### Added
11+
12+
- Initial Vserver NVME support
413

514
### Changed
615

7-
- Code Cleanup
16+
- Update the Eomm/why-don-t-you-tweet action to v2.0.0
17+
- General code cleanup/improvements
18+
- Increased Required Modules version:
19+
- AsBuiltReport.Core v1.4.0
20+
- NetApp.Ontap v9.15.1.2407
21+
22+
### Fixed
823

24+
- Fix [#40](https://github.com/AsBuiltReport/AsBuiltReport.NetApp.ONTAP/issues/40)
25+
- Fix [#41](https://github.com/AsBuiltReport/AsBuiltReport.NetApp.ONTAP/issues/41)
26+
- Fix [#42](https://github.com/AsBuiltReport/AsBuiltReport.NetApp.ONTAP/issues/42)
27+
- Fix [#43](https://github.com/AsBuiltReport/AsBuiltReport.NetApp.ONTAP/issues/43)
928

1029
## [0.6.6] - 2023-08-07
1130

Src/Private/Get-AbrOntapNetworkMGMT.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,14 @@ function Get-AbrOntapNetworkMgmt {
153153
}
154154
try {
155155
Section -ExcludeFromTOC -Style Heading6 'Data Network Interfaces' {
156-
$ClusterData = Get-NcNetInterface -Controller $Array | Where-Object { $_.Role -eq 'data' -and $_.DataProtocols -ne 'fcp' -and $_.Vserver -notin $options.Exclude.Vserver }
156+
$ClusterData = Get-NcNetInterface -Controller $Array | Where-Object { $_.Role -eq 'data' -and $_.Vserver -notin $options.Exclude.Vserver }
157157
$ClusterObj = @()
158158
if ($ClusterData) {
159159
foreach ($Item in $ClusterData) {
160160
try {
161+
if ($Item.Wwpn) {
162+
$AddressData = $Item.Wwpn
163+
} else {$AddressData = $Item.Address}
161164
$inObj = [ordered] @{
162165
'Data Interface' = $Item.InterfaceName
163166
'Status' = Switch ($Item.OpStatus) {
@@ -166,7 +169,7 @@ function Get-AbrOntapNetworkMgmt {
166169
default { $Item.OpStatus.ToString().ToUpper() }
167170
}
168171
'Data Protocols' = [string]$Item.DataProtocols
169-
'Address' = $Item.Address
172+
'Address' = $AddressData
170173
'Vserver' = $Item.Vserver
171174
}
172175
$ClusterObj += [pscustomobject]$inobj

Src/Private/Get-AbrOntapVserverFcpAdapter.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ function Get-AbrOntapVserverFcpAdapter {
5252
$TableParams = @{
5353
Name = "FCP Physical Adapter - $($ClusterInfo.ClusterName)"
5454
List = $false
55+
ColumnWidths = 32, 17, 17, 17, 17
5556
}
5657
if ($Report.ShowTableCaptions) {
5758
$TableParams['Caption'] = "- $($TableParams.Name)"
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
function Get-AbrOntapVserverNvmeFcAdapter {
2+
<#
3+
.SYNOPSIS
4+
Used by As Built Report to retrieve NetApp ONTAP Vserver Nvme FC adapter information from the Cluster Management Network
5+
.DESCRIPTION
6+
7+
.NOTES
8+
Version: 0.6.7
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 Vserver Nvme FC adapter information."
27+
}
28+
29+
process {
30+
try {
31+
$VserverData = Get-NcNvmeInterface -VserverContext $Vserver -Controller $Array | Where-Object {$_.PhysicalProtocol -eq 'fibre_channel'} | Sort-Object -Property HomeNode
32+
$VserverObj = @()
33+
if ($VserverData) {
34+
foreach ($Item in $VserverData) {
35+
try {
36+
$inObj = [ordered] @{
37+
'Node Name' = $Item.HomeNode
38+
'Adapter' = $Item.HomePort
39+
'Protocol' = $Item.PhysicalProtocol
40+
'WWNN' = $Item.FcWwnn
41+
'WWPN' = $Item.FcWwpn
42+
'Status' = Switch ($Item.StatusAdmin) {
43+
'up' { 'Up' }
44+
'down' { 'Down' }
45+
default { $Item.StatusAdmin }
46+
}
47+
}
48+
$VserverObj += [pscustomobject]$inobj
49+
} catch {
50+
Write-PScriboMessage -IsWarning $_.Exception.Message
51+
}
52+
}
53+
if ($Healthcheck.Vserver.FCP) {
54+
$VserverObj | Where-Object { $_.'Status' -like 'Down' } | Set-Style -Style Warning -Property 'Status'
55+
}
56+
57+
$TableParams = @{
58+
Name = "Nvme FC Physical Adapter - $($Vserver)"
59+
List = $false
60+
ColumnWidths = 25, 12, 15, 18, 18, 12
61+
62+
}
63+
if ($Report.ShowTableCaptions) {
64+
$TableParams['Caption'] = "- $($TableParams.Name)"
65+
}
66+
$VserverObj | Table @TableParams
67+
}
68+
} catch {
69+
Write-PScriboMessage -IsWarning $_.Exception.Message
70+
}
71+
}
72+
73+
end {}
74+
75+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
function Get-AbrOntapVserverNvmeInterface {
2+
<#
3+
.SYNOPSIS
4+
Used by As Built Report to retrieve NetApp ONTAP Vserver NVME interface information from the Cluster Management Network
5+
.DESCRIPTION
6+
7+
.NOTES
8+
Version: 0.6.7
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 Vserver NVME interface information."
27+
}
28+
29+
process {
30+
try {
31+
$VserverData = Get-NcNvmeInterface -VserverContext $Vserver -Controller $Array | Sort-Object -Property TransportProtocols
32+
$VserverObj = @()
33+
if ($VserverData) {
34+
foreach ($Item in $VserverData) {
35+
try {
36+
$inObj = [ordered] @{
37+
'Interface Name' = $Item.Lif
38+
'Transport Address' = $Item.TransportAddress
39+
'Transport Protocols' = $Item.TransportProtocols
40+
'Status' = Switch ($Item.StatusAdmin) {
41+
'up' { 'Up' }
42+
'down' { 'Down' }
43+
default { $Item.StatusAdmin }
44+
}
45+
}
46+
$VserverObj += [pscustomobject]$inobj
47+
} catch {
48+
Write-PScriboMessage -IsWarning $_.Exception.Message
49+
}
50+
}
51+
if ($Healthcheck.Vserver.Nvme) {
52+
$VserverObj | Where-Object { $_.'Status' -like 'Down' } | Set-Style -Style Warning -Property 'Status'
53+
}
54+
55+
$TableParams = @{
56+
Name = "NVME Interface - $($Vserver)"
57+
List = $false
58+
ColumnWidths = 40, 36, 12, 12
59+
}
60+
if ($Report.ShowTableCaptions) {
61+
$TableParams['Caption'] = "- $($TableParams.Name)"
62+
}
63+
$VserverObj | Table @TableParams
64+
}
65+
} catch {
66+
Write-PScriboMessage -IsWarning $_.Exception.Message
67+
}
68+
}
69+
70+
end {}
71+
72+
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
function Get-AbrOntapVserverNvmeTcpAdapter {
2+
<#
3+
.SYNOPSIS
4+
Used by As Built Report to retrieve NetApp ONTAP Vserver Nvme TCP adapter information from the Cluster Management Network
5+
.DESCRIPTION
6+
7+
.NOTES
8+
Version: 0.6.7
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 Vserver Nvme TCP adapter information."
27+
}
28+
29+
process {
30+
try {
31+
$VserverData = Get-NcNvmeInterface -VserverContext $Vserver -Controller $Array | Where-Object {$_.PhysicalProtocol -eq 'ethernet'} | Sort-Object -Property HomeNode
32+
$VserverObj = @()
33+
if ($VserverData) {
34+
foreach ($Item in $VserverData) {
35+
try {
36+
$inObj = [ordered] @{
37+
'Node Name' = $Item.HomeNode
38+
'Adapter' = $Item.HomePort
39+
'Protocol' = $Item.PhysicalProtocol
40+
'IP Address' = $Item.TransportAddress
41+
'Status' = Switch ($Item.StatusAdmin) {
42+
'up' { 'Up' }
43+
'down' { 'Down' }
44+
default { $Item.StatusAdmin }
45+
}
46+
}
47+
$VserverObj += [pscustomobject]$inobj
48+
} catch {
49+
Write-PScriboMessage -IsWarning $_.Exception.Message
50+
}
51+
}
52+
if ($Healthcheck.Vserver.FCP) {
53+
$VserverObj | Where-Object { $_.'Status' -like 'Down' } | Set-Style -Style Warning -Property 'Status'
54+
}
55+
56+
$TableParams = @{
57+
Name = "Nvme TCP Physical Adapter - $($Vserver)"
58+
List = $false
59+
ColumnWidths = 30, 17, 17, 20, 16
60+
61+
}
62+
if ($Report.ShowTableCaptions) {
63+
$TableParams['Caption'] = "- $($TableParams.Name)"
64+
}
65+
$VserverObj | Table @TableParams
66+
}
67+
} catch {
68+
Write-PScriboMessage -IsWarning $_.Exception.Message
69+
}
70+
}
71+
72+
end {}
73+
74+
}

Src/Private/Get-NetAppOntapAPI.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,12 @@ function Get-NetAppOntapAPI {
7575

7676
Process {
7777
Try {
78-
$response = Invoke-RestMethod -Method Get -Uri ($api + $uri) -Headers $headers -SkipCertificateCheck
78+
if ($PSVersionTable.PSEdition -eq 'Core') {
79+
$response = Invoke-RestMethod -Method Get -Uri ($api + $uri) -Headers $headers -SkipCertificateCheck
80+
81+
} else {
82+
$response = Invoke-RestMethod -Method Get -Uri ($api + $uri) -Headers $headers
83+
}
7984
$response.records
8085
} Catch {
8186
Write-Verbose -Message $_

0 commit comments

Comments
 (0)