From 8dc0183851d90a12b111492d1d2a894c1ad8f540 Mon Sep 17 00:00:00 2001 From: MicKBfr Date: Thu, 8 Aug 2024 14:19:45 +0200 Subject: [PATCH 1/5] Update AsBuiltReport.NetApp.ONTAP.json add metrocluster option to remove all -mc vserver --- AsBuiltReport.NetApp.ONTAP.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/AsBuiltReport.NetApp.ONTAP.json b/AsBuiltReport.NetApp.ONTAP.json index ba585a3..07b23f5 100755 --- a/AsBuiltReport.NetApp.ONTAP.json +++ b/AsBuiltReport.NetApp.ONTAP.json @@ -10,7 +10,8 @@ }, "Options": { "Exclude": { - "Vserver": [] + "Vserver": [], + "MetroCluster" : false } }, "InfoLevel": { @@ -80,4 +81,4 @@ "KMS": true } } -} \ No newline at end of file +} From e8c6cd8eb470b01949cbf1f66c995728b150cb4b Mon Sep 17 00:00:00 2001 From: MicKBfr Date: Thu, 8 Aug 2024 14:27:09 +0200 Subject: [PATCH 2/5] Update Invoke-AsBuiltReport.NetApp.ONTAP.ps1 add all -mc vserver to $Options.Exclude.Vserver option when $Options.exclude.MetroCluster is true --- Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 b/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 index 67a456e..a548c18 100755 --- a/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 +++ b/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 @@ -69,6 +69,13 @@ function Invoke-AsBuiltReport.NetApp.ONTAP { } $ClusterInfo = Get-NcCluster -Controller $Array + #If metrocluster option remove all -mc vserver + if ($Options.Exclude.MetroCluster) { + $Options.Exclude.Vserver = $Options.Exclude.Vserver + (get-ncvserver |where {$_ -like '*-mc'}).Vserver + $exclude_vserver = $Options.Exclude.Vserver + Write-PScriboMessage "exclude vserver = $exclude_vserver" + } + #---------------------------------------------------------------------------------------------# # Cluster Section # #---------------------------------------------------------------------------------------------# From d4c89acce554acd9e87cd8e45c1e4f5bf1b12270 Mon Sep 17 00:00:00 2001 From: MicKBfr Date: Thu, 8 Aug 2024 14:30:16 +0200 Subject: [PATCH 3/5] Update README.md Add option metrocluster --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4332f0b..7bc565e 100755 --- a/README.md +++ b/README.md @@ -140,6 +140,7 @@ The **Options** schema allows certain options within the report to be toggled on | Sub-Schema | Setting | Default | Description | |-----------------|--------------|---------|-----------------------------------------------------------------| | Exclude: Vserver | Array List | Empty | Allow to filter on Vserver Name +| Exclude: MetroCluster | true / false | false | Allow to filter automatically all Vserver with -mc ### InfoLevel From be48a0006d4b12ee60a9834583f113e39b12e858 Mon Sep 17 00:00:00 2001 From: MicKBfr Date: Thu, 8 Aug 2024 15:57:03 +0200 Subject: [PATCH 4/5] Update Invoke-AsBuiltReport.NetApp.ONTAP.ps1 change where with where-object --- Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 b/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 index a548c18..e25a8d0 100755 --- a/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 +++ b/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 @@ -71,7 +71,7 @@ function Invoke-AsBuiltReport.NetApp.ONTAP { #If metrocluster option remove all -mc vserver if ($Options.Exclude.MetroCluster) { - $Options.Exclude.Vserver = $Options.Exclude.Vserver + (get-ncvserver |where {$_ -like '*-mc'}).Vserver + $Options.Exclude.Vserver = $Options.Exclude.Vserver + (get-ncvserver |where-object {$_ -like '*-mc'}).Vserver $exclude_vserver = $Options.Exclude.Vserver Write-PScriboMessage "exclude vserver = $exclude_vserver" } From 4e0c2f89463d20637ee3958e8899029cf4dd27d3 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Thu, 8 Aug 2024 12:55:00 -0400 Subject: [PATCH 5/5] Fix indentation --- AsBuiltReport.NetApp.ONTAP.json | 4 +- README.md | 70 +++++++++---------- .../Invoke-AsBuiltReport.NetApp.ONTAP.ps1 | 2 +- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/AsBuiltReport.NetApp.ONTAP.json b/AsBuiltReport.NetApp.ONTAP.json index 07b23f5..a09f9ae 100755 --- a/AsBuiltReport.NetApp.ONTAP.json +++ b/AsBuiltReport.NetApp.ONTAP.json @@ -11,7 +11,7 @@ "Options": { "Exclude": { "Vserver": [], - "MetroCluster" : false + "MetroCluster": false } }, "InfoLevel": { @@ -81,4 +81,4 @@ "KMS": true } } -} +} \ No newline at end of file diff --git a/README.md b/README.md index 7bc565e..6b53b36 100755 --- a/README.md +++ b/README.md @@ -57,9 +57,9 @@ The ONTAP Storage As Built Report supports the following ONTAP versions; This report is compatible with the following PowerShell versions; -| PowerShell 5.1 | PowerShell 7 | -|:----------------------:|:---------------:| -| :white_check_mark: | :white_check_mark:| +| PowerShell 5.1 | PowerShell 7 | +| :----------------: | :----------------: | +| :white_check_mark: | :white_check_mark: | ## :wrench: System Requirements @@ -68,10 +68,10 @@ Each of the following modules will be automatically installed by following the [ These modules may also be manually installed. | Module Name | Minimum Required Version | PS Gallery | GitHub | -|--------------------|:------------------------:|:---------------------------------------------------------------------:|:---------------------------------------------------------------------------:| +| ------------------ | :----------------------: | :-------------------------------------------------------------------: | :-------------------------------------------------------------------------: | | PScribo | 0.9.1 | [Link](https://www.powershellgallery.com/packages/PScribo) | [Link](https://github.com/iainbrighton/PScribo/tree/master) | | AsBuiltReport.Core | 1.2.0 | [Link](https://www.powershellgallery.com/packages/AsBuiltReport.Core) | [Link](https://github.com/AsBuiltReport/AsBuiltReport.Core/releases/latest) | -| Netapp.ONTAP | 9.10.1.2111 | [Link](https://www.powershellgallery.com/packages/NetApp.ONTAP) | | +| Netapp.ONTAP | 9.10.1.2111 | [Link](https://www.powershellgallery.com/packages/NetApp.ONTAP) | | ## :package: Module Installation @@ -124,23 +124,23 @@ The following provides information of how to configure each schema within the re The **Report** schema provides configuration of the NetApp ONTAP report information. -| Sub-Schema | Setting | Default | Description | -|---------------------|--------------|--------------------------------|--------------------------------------------------------------| -| Name | User defined | NetApp ONTAP As Built Report | The name of the As Built Report | -| Version | User defined | 1.0 | The report version | -| Status | User defined | Released | The report release status | -| ShowCoverPageImage | true / false | true | Toggle to enable/disable the display of the cover page image | -| ShowTableOfContents | true / false | true | Toggle to enable/disable table of contents | -| ShowHeaderFooter | true / false | true | Toggle to enable/disable document headers & footers | -| ShowTableCaptions | true / false | true | Toggle to enable/disable table captions/numbering | +| Sub-Schema | Setting | Default | Description | +| ------------------- | ------------ | ---------------------------- | ------------------------------------------------------------ | +| Name | User defined | NetApp ONTAP As Built Report | The name of the As Built Report | +| Version | User defined | 1.0 | The report version | +| Status | User defined | Released | The report release status | +| ShowCoverPageImage | true / false | true | Toggle to enable/disable the display of the cover page image | +| ShowTableOfContents | true / false | true | Toggle to enable/disable table of contents | +| ShowHeaderFooter | true / false | true | Toggle to enable/disable document headers & footers | +| ShowTableCaptions | true / false | true | Toggle to enable/disable table captions/numbering | ### Options The **Options** schema allows certain options within the report to be toggled on or off. -| Sub-Schema | Setting | Default | Description | -|-----------------|--------------|---------|-----------------------------------------------------------------| -| Exclude: Vserver | Array List | Empty | Allow to filter on Vserver Name -| Exclude: MetroCluster | true / false | false | Allow to filter automatically all Vserver with -mc +| Sub-Schema | Setting | Default | Description | +| --------------------- | ------------ | ------- | -------------------------------------------------- | +| Exclude: Vserver | Array List | Empty | Allow to filter on Vserver Name | +| Exclude: MetroCluster | true / false | false | Allow to filter automatically all Vserver with -mc | ### InfoLevel @@ -148,26 +148,26 @@ The **InfoLevel** schema allows configuration of each section of the report at a There are 3 levels (0-2) of detail granularity for each section as follows; -| Setting | InfoLevel | Description | -|:-------:|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------| -| 0 | Disabled | Does not collect or display any information | -| 1 | Enabled / Summary | Provides summarised information for a collection of objects | -| 2 | Adv Summary | Provides condensed, detailed information for a collection of objects | +| Setting | InfoLevel | Description | +| :-----: | ----------------- | -------------------------------------------------------------------- | +| 0 | Disabled | Does not collect or display any information | +| 1 | Enabled / Summary | Provides summarised information for a collection of objects | +| 2 | Adv Summary | Provides condensed, detailed information for a collection of objects | The table below outlines the default and maximum **InfoLevel** settings for each section. -| Sub-Schema | Default Setting | Maximum Setting | -|--------------|:---------------:|:---------------:| -| Cluster | 1 | 2 | -| Node | 1 | 2 | -| Storage | 1 | 2 | -| Network | 1 | 2 | -| License | 1 | 2 | -| Vserver | 1 | 2 | -| Efficiency | 1 | 2 | -| Security | 1 | 2 | -| System | 1 | 2 | -| Replication | 1 | 2 | +| Sub-Schema | Default Setting | Maximum Setting | +| ----------- | :-------------: | :-------------: | +| Cluster | 1 | 2 | +| Node | 1 | 2 | +| Storage | 1 | 2 | +| Network | 1 | 2 | +| License | 1 | 2 | +| Vserver | 1 | 2 | +| Efficiency | 1 | 2 | +| Security | 1 | 2 | +| System | 1 | 2 | +| Replication | 1 | 2 | ### Healthcheck diff --git a/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 b/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 index e25a8d0..a314a1b 100755 --- a/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 +++ b/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 @@ -71,7 +71,7 @@ function Invoke-AsBuiltReport.NetApp.ONTAP { #If metrocluster option remove all -mc vserver if ($Options.Exclude.MetroCluster) { - $Options.Exclude.Vserver = $Options.Exclude.Vserver + (get-ncvserver |where-object {$_ -like '*-mc'}).Vserver + $Options.Exclude.Vserver = $Options.Exclude.Vserver + (Get-NcVserver | Where-Object { $_ -like '*-mc' }).Vserver $exclude_vserver = $Options.Exclude.Vserver Write-PScriboMessage "exclude vserver = $exclude_vserver" }