diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index a4b943a..54a6b48 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -8,7 +8,7 @@ jobs: publish-to-gallery: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set PSRepository to Trusted for PowerShell Gallery shell: pwsh run: | @@ -33,7 +33,7 @@ jobs: needs: publish-to-gallery runs-on: ubuntu-latest steps: - - uses: Eomm/why-don-t-you-tweet@v1 + - 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: diff --git a/AsBuiltReport.NetApp.ONTAP.json b/AsBuiltReport.NetApp.ONTAP.json index a09f9ae..8599f5e 100755 --- a/AsBuiltReport.NetApp.ONTAP.json +++ b/AsBuiltReport.NetApp.ONTAP.json @@ -55,6 +55,7 @@ "Vserver": { "Status": true, "Iscsi": true, + "Nvme": true, "FCP": true, "CG": true, "NFS": true, diff --git a/AsBuiltReport.NetApp.ONTAP.psd1 b/AsBuiltReport.NetApp.ONTAP.psd1 index 2320593..ee9c518 100755 --- a/AsBuiltReport.NetApp.ONTAP.psd1 +++ b/AsBuiltReport.NetApp.ONTAP.psd1 @@ -54,11 +54,11 @@ RequiredModules = @( @{ ModuleName = 'AsBuiltReport.Core'; - ModuleVersion = '1.3.0' + ModuleVersion = '1.4.0' }, @{ ModuleName = 'NetApp.ONTAP'; - ModuleVersion = '9.10.1.2111' + ModuleVersion = '9.15.1.2407' } ) @@ -128,6 +128,4 @@ # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' -} - - +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 720b1b0..cee54aa 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,30 @@ # :arrows_counterclockwise: NetApp ONTAP Storage As Built Report Changelog -## [0.6.7] - 2024-02-02 +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.7] - Unreleased + +### Added + +- Initial Vserver NVME support ### Changed -- Code Cleanup +- Update the Eomm/why-don-t-you-tweet action to v2.0.0 +- General code cleanup/improvements +- Increased Required Modules version: + - AsBuiltReport.Core v1.4.0 + - NetApp.Ontap v9.15.1.2407 + +### Fixed +- Fix [#40](https://github.com/AsBuiltReport/AsBuiltReport.NetApp.ONTAP/issues/40) +- Fix [#41](https://github.com/AsBuiltReport/AsBuiltReport.NetApp.ONTAP/issues/41) +- Fix [#42](https://github.com/AsBuiltReport/AsBuiltReport.NetApp.ONTAP/issues/42) +- Fix [#43](https://github.com/AsBuiltReport/AsBuiltReport.NetApp.ONTAP/issues/43) ## [0.6.6] - 2023-08-07 diff --git a/Src/Private/Get-AbrOntapNetworkMGMT.ps1 b/Src/Private/Get-AbrOntapNetworkMGMT.ps1 index 3aeebdd..829583d 100755 --- a/Src/Private/Get-AbrOntapNetworkMGMT.ps1 +++ b/Src/Private/Get-AbrOntapNetworkMGMT.ps1 @@ -153,11 +153,14 @@ function Get-AbrOntapNetworkMgmt { } try { Section -ExcludeFromTOC -Style Heading6 'Data Network Interfaces' { - $ClusterData = Get-NcNetInterface -Controller $Array | Where-Object { $_.Role -eq 'data' -and $_.DataProtocols -ne 'fcp' -and $_.Vserver -notin $options.Exclude.Vserver } + $ClusterData = Get-NcNetInterface -Controller $Array | Where-Object { $_.Role -eq 'data' -and $_.Vserver -notin $options.Exclude.Vserver } $ClusterObj = @() if ($ClusterData) { foreach ($Item in $ClusterData) { try { + if ($Item.Wwpn) { + $AddressData = $Item.Wwpn + } else {$AddressData = $Item.Address} $inObj = [ordered] @{ 'Data Interface' = $Item.InterfaceName 'Status' = Switch ($Item.OpStatus) { @@ -166,7 +169,7 @@ function Get-AbrOntapNetworkMgmt { default { $Item.OpStatus.ToString().ToUpper() } } 'Data Protocols' = [string]$Item.DataProtocols - 'Address' = $Item.Address + 'Address' = $AddressData 'Vserver' = $Item.Vserver } $ClusterObj += [pscustomobject]$inobj diff --git a/Src/Private/Get-AbrOntapVserverFcpAdapter.ps1 b/Src/Private/Get-AbrOntapVserverFcpAdapter.ps1 index 9aadbd4..6587d0b 100755 --- a/Src/Private/Get-AbrOntapVserverFcpAdapter.ps1 +++ b/Src/Private/Get-AbrOntapVserverFcpAdapter.ps1 @@ -52,6 +52,7 @@ function Get-AbrOntapVserverFcpAdapter { $TableParams = @{ Name = "FCP Physical Adapter - $($ClusterInfo.ClusterName)" List = $false + ColumnWidths = 32, 17, 17, 17, 17 } if ($Report.ShowTableCaptions) { $TableParams['Caption'] = "- $($TableParams.Name)" diff --git a/Src/Private/Get-AbrOntapVserverNvmeFcAdapter.ps1 b/Src/Private/Get-AbrOntapVserverNvmeFcAdapter.ps1 new file mode 100755 index 0000000..e3e9da4 --- /dev/null +++ b/Src/Private/Get-AbrOntapVserverNvmeFcAdapter.ps1 @@ -0,0 +1,75 @@ +function Get-AbrOntapVserverNvmeFcAdapter { + <# + .SYNOPSIS + Used by As Built Report to retrieve NetApp ONTAP Vserver Nvme FC adapter information from the Cluster Management Network + .DESCRIPTION + + .NOTES + Version: 0.6.7 + Author: Jonathan Colon + Twitter: @jcolonfzenpr + Github: rebelinux + .EXAMPLE + + .LINK + + #> + param ( + [Parameter ( + Position = 0, + Mandatory)] + [string] + $Vserver + ) + + begin { + Write-PScriboMessage "Collecting ONTAP Vserver Nvme FC adapter information." + } + + process { + try { + $VserverData = Get-NcNvmeInterface -VserverContext $Vserver -Controller $Array | Where-Object {$_.PhysicalProtocol -eq 'fibre_channel'} | Sort-Object -Property HomeNode + $VserverObj = @() + if ($VserverData) { + foreach ($Item in $VserverData) { + try { + $inObj = [ordered] @{ + 'Node Name' = $Item.HomeNode + 'Adapter' = $Item.HomePort + 'Protocol' = $Item.PhysicalProtocol + 'WWNN' = $Item.FcWwnn + 'WWPN' = $Item.FcWwpn + 'Status' = Switch ($Item.StatusAdmin) { + 'up' { 'Up' } + 'down' { 'Down' } + default { $Item.StatusAdmin } + } + } + $VserverObj += [pscustomobject]$inobj + } catch { + Write-PScriboMessage -IsWarning $_.Exception.Message + } + } + if ($Healthcheck.Vserver.FCP) { + $VserverObj | Where-Object { $_.'Status' -like 'Down' } | Set-Style -Style Warning -Property 'Status' + } + + $TableParams = @{ + Name = "Nvme FC Physical Adapter - $($Vserver)" + List = $false + ColumnWidths = 25, 12, 15, 18, 18, 12 + + } + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $VserverObj | Table @TableParams + } + } catch { + Write-PScriboMessage -IsWarning $_.Exception.Message + } + } + + end {} + +} \ No newline at end of file diff --git a/Src/Private/Get-AbrOntapVserverNvmeInterface.ps1 b/Src/Private/Get-AbrOntapVserverNvmeInterface.ps1 new file mode 100755 index 0000000..204c1c1 --- /dev/null +++ b/Src/Private/Get-AbrOntapVserverNvmeInterface.ps1 @@ -0,0 +1,72 @@ +function Get-AbrOntapVserverNvmeInterface { + <# + .SYNOPSIS + Used by As Built Report to retrieve NetApp ONTAP Vserver NVME interface information from the Cluster Management Network + .DESCRIPTION + + .NOTES + Version: 0.6.7 + Author: Jonathan Colon + Twitter: @jcolonfzenpr + Github: rebelinux + .EXAMPLE + + .LINK + + #> + param ( + [Parameter ( + Position = 0, + Mandatory)] + [string] + $Vserver + ) + + begin { + Write-PScriboMessage "Collecting ONTAP Vserver NVME interface information." + } + + process { + try { + $VserverData = Get-NcNvmeInterface -VserverContext $Vserver -Controller $Array | Sort-Object -Property TransportProtocols + $VserverObj = @() + if ($VserverData) { + foreach ($Item in $VserverData) { + try { + $inObj = [ordered] @{ + 'Interface Name' = $Item.Lif + 'Transport Address' = $Item.TransportAddress + 'Transport Protocols' = $Item.TransportProtocols + 'Status' = Switch ($Item.StatusAdmin) { + 'up' { 'Up' } + 'down' { 'Down' } + default { $Item.StatusAdmin } + } + } + $VserverObj += [pscustomobject]$inobj + } catch { + Write-PScriboMessage -IsWarning $_.Exception.Message + } + } + if ($Healthcheck.Vserver.Nvme) { + $VserverObj | Where-Object { $_.'Status' -like 'Down' } | Set-Style -Style Warning -Property 'Status' + } + + $TableParams = @{ + Name = "NVME Interface - $($Vserver)" + List = $false + ColumnWidths = 40, 36, 12, 12 + } + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $VserverObj | Table @TableParams + } + } catch { + Write-PScriboMessage -IsWarning $_.Exception.Message + } + } + + end {} + +} \ No newline at end of file diff --git a/Src/Private/Get-AbrOntapVserverNvmeTcpAdapter.ps1 b/Src/Private/Get-AbrOntapVserverNvmeTcpAdapter.ps1 new file mode 100755 index 0000000..4af45b6 --- /dev/null +++ b/Src/Private/Get-AbrOntapVserverNvmeTcpAdapter.ps1 @@ -0,0 +1,74 @@ +function Get-AbrOntapVserverNvmeTcpAdapter { + <# + .SYNOPSIS + Used by As Built Report to retrieve NetApp ONTAP Vserver Nvme TCP adapter information from the Cluster Management Network + .DESCRIPTION + + .NOTES + Version: 0.6.7 + Author: Jonathan Colon + Twitter: @jcolonfzenpr + Github: rebelinux + .EXAMPLE + + .LINK + + #> + param ( + [Parameter ( + Position = 0, + Mandatory)] + [string] + $Vserver + ) + + begin { + Write-PScriboMessage "Collecting ONTAP Vserver Nvme TCP adapter information." + } + + process { + try { + $VserverData = Get-NcNvmeInterface -VserverContext $Vserver -Controller $Array | Where-Object {$_.PhysicalProtocol -eq 'ethernet'} | Sort-Object -Property HomeNode + $VserverObj = @() + if ($VserverData) { + foreach ($Item in $VserverData) { + try { + $inObj = [ordered] @{ + 'Node Name' = $Item.HomeNode + 'Adapter' = $Item.HomePort + 'Protocol' = $Item.PhysicalProtocol + 'IP Address' = $Item.TransportAddress + 'Status' = Switch ($Item.StatusAdmin) { + 'up' { 'Up' } + 'down' { 'Down' } + default { $Item.StatusAdmin } + } + } + $VserverObj += [pscustomobject]$inobj + } catch { + Write-PScriboMessage -IsWarning $_.Exception.Message + } + } + if ($Healthcheck.Vserver.FCP) { + $VserverObj | Where-Object { $_.'Status' -like 'Down' } | Set-Style -Style Warning -Property 'Status' + } + + $TableParams = @{ + Name = "Nvme TCP Physical Adapter - $($Vserver)" + List = $false + ColumnWidths = 30, 17, 17, 20, 16 + + } + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $VserverObj | Table @TableParams + } + } catch { + Write-PScriboMessage -IsWarning $_.Exception.Message + } + } + + end {} + +} \ No newline at end of file diff --git a/Src/Private/Get-NetAppOntapAPI.ps1 b/Src/Private/Get-NetAppOntapAPI.ps1 index c244626..591acab 100644 --- a/Src/Private/Get-NetAppOntapAPI.ps1 +++ b/Src/Private/Get-NetAppOntapAPI.ps1 @@ -75,7 +75,12 @@ function Get-NetAppOntapAPI { Process { Try { - $response = Invoke-RestMethod -Method Get -Uri ($api + $uri) -Headers $headers -SkipCertificateCheck + if ($PSVersionTable.PSEdition -eq 'Core') { + $response = Invoke-RestMethod -Method Get -Uri ($api + $uri) -Headers $headers -SkipCertificateCheck + + } else { + $response = Invoke-RestMethod -Method Get -Uri ($api + $uri) -Headers $headers + } $response.records } Catch { Write-Verbose -Message $_ diff --git a/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 b/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 index a314a1b..11c788c 100755 --- a/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 +++ b/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 @@ -369,158 +369,183 @@ function Invoke-AsBuiltReport.NetApp.ONTAP { Get-AbrOntapVserverVolumesQuota -Vserver $SVM } } - Section -Style Heading4 "Protocol Information" { - Paragraph "The following section provides a summary of the Vserver protocol information on $($SVM)." - BlankLine - #---------------------------------------------------------------------------------------------# - # NFS Section # - #---------------------------------------------------------------------------------------------# - if (Get-NcNfsService -VserverContext $SVM -Controller $Array) { - Section -Style Heading5 "NFS Services" { - Paragraph "The following section provides the NFS Service Information on $($SVM)." - BlankLine - Get-AbrOntapVserverNFSSummary -Vserver $SVM - if ($InfoLevel.Vserver -ge 2) { - Section -ExcludeFromTOC -Style Heading6 "NFS Options" { - Get-AbrOntapVserverNFSOption -Vserver $SVM - } + } + Section -Style Heading4 "Protocol Information" { + Paragraph "The following section provides a summary of the Vserver protocol information on $($SVM)." + BlankLine + #---------------------------------------------------------------------------------------------# + # NFS Section # + #---------------------------------------------------------------------------------------------# + if (Get-NcNfsService -VserverContext $SVM -Controller $Array) { + Section -Style Heading5 "NFS Services" { + Paragraph "The following section provides the NFS Service Information on $($SVM)." + BlankLine + Get-AbrOntapVserverNFSSummary -Vserver $SVM + if ($InfoLevel.Vserver -ge 2) { + Section -ExcludeFromTOC -Style Heading6 "NFS Options" { + Get-AbrOntapVserverNFSOption -Vserver $SVM } - if (Get-NcVserver -VserverContext $SVM -Controller $Array | Where-Object { $_.VserverType -eq 'data' -and $_.AllowedProtocols -eq 'nfs' -and $_.State -eq 'running' } | Get-NcNfsExport) { - Section -ExcludeFromTOC -Style Heading6 "NFS Volume Export" { - Get-AbrOntapVserverNFSExport -Vserver $SVM - } + } + if (Get-NcVserver -VserverContext $SVM -Controller $Array | Where-Object { $_.VserverType -eq 'data' -and $_.AllowedProtocols -eq 'nfs' -and $_.State -eq 'running' } | Get-NcNfsExport) { + Section -ExcludeFromTOC -Style Heading6 "NFS Volume Export" { + Get-AbrOntapVserverNFSExport -Vserver $SVM } } } - #---------------------------------------------------------------------------------------------# - # CIFS Section # - #---------------------------------------------------------------------------------------------# - if (Get-NcVserver -VserverContext $SVM -Controller $Array | Where-Object { $_.VserverType -eq 'data' -and $_.AllowedProtocols -eq 'cifs' -and $_.State -eq 'running' } | Get-NcCifsServerStatus -Controller $Array -ErrorAction SilentlyContinue) { - Section -Style Heading5 "CIFS Services Information" { - Paragraph "The following section provides the CIFS Service Information on $($SVM)." - BlankLine - Get-AbrOntapVserverCIFSSummary -Vserver $SVM - if ($InfoLevel.Vserver -ge 2) { - Section -ExcludeFromTOC -Style Heading6 'CIFS Service Configuration' { - Get-AbrOntapVserverCIFSSecurity -Vserver $SVM - } - Section -ExcludeFromTOC -Style Heading6 'CIFS Domain Controller' { - Get-AbrOntapVserverCIFSDC -Vserver $SVM - } + } + #---------------------------------------------------------------------------------------------# + # CIFS Section # + #---------------------------------------------------------------------------------------------# + if (Get-NcVserver -VserverContext $SVM -Controller $Array | Where-Object { $_.VserverType -eq 'data' -and $_.AllowedProtocols -eq 'cifs' -and $_.State -eq 'running' } | Get-NcCifsServerStatus -Controller $Array -ErrorAction SilentlyContinue) { + Section -Style Heading5 "CIFS Services Information" { + Paragraph "The following section provides the CIFS Service Information on $($SVM)." + BlankLine + Get-AbrOntapVserverCIFSSummary -Vserver $SVM + if ($InfoLevel.Vserver -ge 2) { + Section -ExcludeFromTOC -Style Heading6 'CIFS Service Configuration' { + Get-AbrOntapVserverCIFSSecurity -Vserver $SVM } - Section -ExcludeFromTOC -Style Heading6 'CIFS Local Group' { - Get-AbrOntapVserverCIFSLocalGroup -Vserver $SVM + Section -ExcludeFromTOC -Style Heading6 'CIFS Domain Controller' { + Get-AbrOntapVserverCIFSDC -Vserver $SVM } - Section -ExcludeFromTOC -Style Heading6 'CIFS Local Group Members' { - Get-AbrOntapVserverCIFSLGMember -Vserver $SVM + } + Section -ExcludeFromTOC -Style Heading6 'CIFS Local Group' { + Get-AbrOntapVserverCIFSLocalGroup -Vserver $SVM + } + Section -ExcludeFromTOC -Style Heading6 'CIFS Local Group Members' { + Get-AbrOntapVserverCIFSLGMember -Vserver $SVM + } + if ($InfoLevel.Vserver -ge 2) { + Section -ExcludeFromTOC -Style Heading6 'CIFS Options' { + Get-AbrOntapVserverCIFSOption -Vserver $SVM } - if ($InfoLevel.Vserver -ge 2) { - Section -ExcludeFromTOC -Style Heading6 'CIFS Options' { - Get-AbrOntapVserverCIFSOption -Vserver $SVM + } + Section -ExcludeFromTOC -Style Heading6 'CIFS Share' { + Get-AbrOntapVserverCIFSShare -Vserver $SVM + } + Section -ExcludeFromTOC -Style Heading6 'CIFS Share Configuration' { + Get-AbrOntapVserverCIFSShareProp -Vserver $SVM + } + if ($InfoLevel.Vserver -ge 2) { + if (Get-NcCifsSession -VserverContext $SVM -Controller $Array) { + Section -ExcludeFromTOC -Style Heading6 'CIFS Sessions' { + Get-AbrOntapVserverCIFSSession -Vserver $SVM } } - Section -ExcludeFromTOC -Style Heading6 'CIFS Share' { - Get-AbrOntapVserverCIFSShare -Vserver $SVM - } - Section -ExcludeFromTOC -Style Heading6 'CIFS Share Configuration' { - Get-AbrOntapVserverCIFSShareProp -Vserver $SVM + } + } + } + #---------------------------------------------------------------------------------------------# + # NVME Section # + #---------------------------------------------------------------------------------------------# + if ( Get-NcNvme -Controller $Array | Where-Object { $_.Vserver -eq $SVM } ) { + Section -Style Heading5 'Nvme Services Information' { + Paragraph "The following section provides the Nvme Service Information on $($SVM)." + BlankLine + # Get-AbrOntapVserverNvmeSummary -Vserver $SVM + if (Get-NcNvmeInterface -VserverContext $Vserver -Controller $Array | Where-Object { $_.PhysicalProtocol -eq 'fibre_channel' }) { + Section -ExcludeFromTOC -Style Heading6 'Nvme FC Physical Adapter' { + Get-AbrOntapVserverNvmeFcAdapter -Vserver $SVM } - if ($InfoLevel.Vserver -ge 2) { - if (Get-NcCifsSession -VserverContext $SVM -Controller $Array) { - Section -ExcludeFromTOC -Style Heading6 'CIFS Sessions' { - Get-AbrOntapVserverCIFSSession -Vserver $SVM - } - } + } + HomePort if (Get-NcNvmeInterface -VserverContext $Vserver -Controller $Array | Where-Object { $_.PhysicalProtocol -eq 'ethernet' }) { + Section -ExcludeFromTOC -Style Heading6 'Nvme TCP Physical Adapter' { + Get-AbrOntapVserverNvmeTcpAdapter -Vserver $SVM } } + Section -ExcludeFromTOC -Style Heading6 'NVME Interfaces' { + Get-AbrOntapVserverNvmeInterface -Vserver $SVM + } } - #---------------------------------------------------------------------------------------------# - # ISCSI Section # - #---------------------------------------------------------------------------------------------# - if ( Get-NcIscsiService -Controller $Array | Where-Object { $_.Vserver -eq $SVM } ) { - Section -Style Heading5 "ISCSI Services" { - Paragraph "The following section provides the ISCSI Service Information on $($SVM)." - BlankLine - Get-AbrOntapVserverIscsiSummary -Vserver $SVM - Section -ExcludeFromTOC -Style Heading6 "ISCSI Interfaces" { - Get-AbrOntapVserverIscsiInterface -Vserver $SVM - } + } + #---------------------------------------------------------------------------------------------# + # ISCSI Section # + #---------------------------------------------------------------------------------------------# + if ( Get-NcIscsiService -Controller $Array | Where-Object { $_.Vserver -eq $SVM } ) { + Section -Style Heading5 "ISCSI Services" { + Paragraph "The following section provides the ISCSI Service Information on $($SVM)." + BlankLine + Get-AbrOntapVserverIscsiSummary -Vserver $SVM + Section -ExcludeFromTOC -Style Heading6 "ISCSI Interfaces" { + Get-AbrOntapVserverIscsiInterface -Vserver $SVM + } - $ISCSIClientInitiators = Get-AbrOntapVserverIscsiInitiator -Vserver $SVM - if ($ISCSIClientInitiators) { - Section -ExcludeFromTOC -Style Heading6 "ISCSI Client Initiators" { - $ISCSIClientInitiators - } + $ISCSIClientInitiators = Get-AbrOntapVserverIscsiInitiator -Vserver $SVM + if ($ISCSIClientInitiators) { + Section -ExcludeFromTOC -Style Heading6 "ISCSI Client Initiators" { + $ISCSIClientInitiators } } } - #---------------------------------------------------------------------------------------------# - # FCP Section # - #---------------------------------------------------------------------------------------------# - if ( Get-NcFcpService -Controller $Array | Where-Object { $_.Vserver -eq $SVM } ) { - Section -Style Heading5 'FCP Services Information' { - Paragraph "The following section provides the FCP Service Information on $($SVM)." - BlankLine - Get-AbrOntapVserverFcpSummary -Vserver $SVM - Section -ExcludeFromTOC -Style Heading6 'FCP Physical Adapter' { - Get-AbrOntapVserverFcpAdapter - } - Section -ExcludeFromTOC -Style Heading6 'FCP Interfaces' { - Get-AbrOntapVserverFcpInterface -Vserver $SVM - } + } + #---------------------------------------------------------------------------------------------# + # FCP Section # + #---------------------------------------------------------------------------------------------# + if ( Get-NcFcpService -Controller $Array | Where-Object { $_.Vserver -eq $SVM } ) { + Section -Style Heading5 'FCP Services Information' { + Paragraph "The following section provides the FCP Service Information on $($SVM)." + BlankLine + Get-AbrOntapVserverFcpSummary -Vserver $SVM + Section -ExcludeFromTOC -Style Heading6 'FCP Physical Adapter' { + Get-AbrOntapVserverFcpAdapter + } + Section -ExcludeFromTOC -Style Heading6 'FCP Interfaces' { + Get-AbrOntapVserverFcpInterface -Vserver $SVM } } - #---------------------------------------------------------------------------------------------# - # Lun Storage Section # - #---------------------------------------------------------------------------------------------# - if (Get-NcLun -Controller $Array | Where-Object { $_.Vserver -eq $SVM }) { - Section -Style Heading5 'Lun Storage' { - Paragraph "The following section provides the Lun Storage Information on $($SVM)." - BlankLine - Get-AbrOntapVserverLunStorage -Vserver $SVM - if (Get-NcIgroup -Vserver $SVM -Controller $Array) { - Section -ExcludeFromTOC -Style Heading6 'Igroup Mapping' { - Get-AbrOntapVserverLunIgroup -Vserver $SVM - } - $NonMappedLun = Get-AbrOntapVserverNonMappedLun -Vserver $SVM - if ($Healthcheck.Vserver.Status -and $NonMappedLunFCP) { - Section -ExcludeFromTOC -Style Heading6 'HealthCheck - Non-Mapped Lun Information' { - Paragraph "The following section provides information of Non Mapped Lun on $($SVM)." - BlankLine - $NonMappedLun - } + } + #---------------------------------------------------------------------------------------------# + # Lun Storage Section # + #---------------------------------------------------------------------------------------------# + if (Get-NcLun -Controller $Array | Where-Object { $_.Vserver -eq $SVM }) { + Section -Style Heading5 'Lun Storage' { + Paragraph "The following section provides the Lun Storage Information on $($SVM)." + BlankLine + Get-AbrOntapVserverLunStorage -Vserver $SVM + if (Get-NcIgroup -Vserver $SVM -Controller $Array) { + Section -ExcludeFromTOC -Style Heading6 'Igroup Mapping' { + Get-AbrOntapVserverLunIgroup -Vserver $SVM + } + $NonMappedLun = Get-AbrOntapVserverNonMappedLun -Vserver $SVM + if ($Healthcheck.Vserver.Status -and $NonMappedLunFCP) { + Section -ExcludeFromTOC -Style Heading6 'HealthCheck - Non-Mapped Lun Information' { + Paragraph "The following section provides information of Non Mapped Lun on $($SVM)." + BlankLine + $NonMappedLun } } } } - #---------------------------------------------------------------------------------------------# - # Consistency Groups Section # - #---------------------------------------------------------------------------------------------# - $CGs = Get-NetAppOntapAPI -uri "/api/application/consistency-groups?svm=$SVM&fields=**&return_records=true&return_timeout=15" - if ($CGs) { - Section -Style Heading5 'Consistency Groups' { - Paragraph "The following section provides Consistency Group Information on $($SVM)." - BlankLine - Get-AbrOntapVserverCGSummary -Vserver $SVM - foreach ($CG in $CGs) { + } + #---------------------------------------------------------------------------------------------# + # Consistency Groups Section # + #---------------------------------------------------------------------------------------------# + $CGs = Get-NetAppOntapAPI -uri "/api/application/consistency-groups?svm=$SVM&fields=**&return_records=true&return_timeout=15" + if ($CGs) { + Section -Style Heading5 'Consistency Groups' { + Paragraph "The following section provides Consistency Group Information on $($SVM)." + BlankLine + Get-AbrOntapVserverCGSummary -Vserver $SVM + foreach ($CG in $CGs) { + if ($CG.luns) { Section -ExcludeFromTOC -Style Heading6 "$($CG.name) Luns" { Get-AbrOntapVserverCGLun -CGObj $CG } } } } - #---------------------------------------------------------------------------------------------# - # S3 Section # - #---------------------------------------------------------------------------------------------# - $S3Data = Get-NetAppOntapAPI -uri "/api/protocols/s3/services?svm=$SVM&fields=*&return_records=true&return_timeout=15" - if ($S3Data) { - Section -Style Heading5 'S3 Services Configuration Information' { - Paragraph "The following section provides the S3 Service Information on $($SVM)." - BlankLine - Get-AbrOntapVserverS3Summary -Vserver $SVM - Section -ExcludeFromTOC -Style Heading6 'S3 Buckets' { - Get-AbrOntapVserverS3Bucket -Vserver $SVM - } + } + #---------------------------------------------------------------------------------------------# + # S3 Section # + #---------------------------------------------------------------------------------------------# + $S3Data = Get-NetAppOntapAPI -uri "/api/protocols/s3/services?svm=$SVM&fields=*&return_records=true&return_timeout=15" + if ($S3Data) { + Section -Style Heading5 'S3 Services Configuration Information' { + Paragraph "The following section provides the S3 Service Information on $($SVM)." + BlankLine + Get-AbrOntapVserverS3Summary -Vserver $SVM + Section -ExcludeFromTOC -Style Heading6 'S3 Buckets' { + Get-AbrOntapVserverS3Bucket -Vserver $SVM } } }