Skip to content

Commit

Permalink
Merge pull request #44 from MicKBfr/dev
Browse files Browse the repository at this point in the history
New Metrocluster option
  • Loading branch information
rebelinux authored Aug 8, 2024
2 parents 8a678dc + ce472b1 commit 75afb88
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 33 deletions.
3 changes: 2 additions & 1 deletion AsBuiltReport.NetApp.ONTAP.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
},
"Options": {
"Exclude": {
"Vserver": []
"Vserver": [],
"MetroCluster": false
}
},
"InfoLevel": {
Expand Down
65 changes: 33 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -124,49 +124,50 @@ 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
| 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

The **InfoLevel** schema allows configuration of each section of the report at a granular level. The following sections can be set.

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

Expand Down
7 changes: 7 additions & 0 deletions Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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-Object { $_ -like '*-mc' }).Vserver
$exclude_vserver = $Options.Exclude.Vserver
Write-PScriboMessage "exclude vserver = $exclude_vserver"
}

#---------------------------------------------------------------------------------------------#
# Cluster Section #
#---------------------------------------------------------------------------------------------#
Expand Down

0 comments on commit 75afb88

Please sign in to comment.