-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from AsBuiltReport/dev
v0.6.5 public release
- Loading branch information
Showing
44 changed files
with
668 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,7 @@ | |
"Status": true, | ||
"Iscsi": true, | ||
"FCP": true, | ||
"CG": true, | ||
"NFS": true, | ||
"Quota": true, | ||
"CIFS": true, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
function Get-AbrOntapSecurityMAP { | ||
<# | ||
.SYNOPSIS | ||
Used by As Built Report to retrieve NetApp ONTAP Security Multi-Admin Approval information from the Cluster Management Network | ||
.DESCRIPTION | ||
.NOTES | ||
Version: 0.6.5 | ||
Author: Jonathan Colon | ||
Twitter: @jcolonfzenpr | ||
Github: rebelinux | ||
.EXAMPLE | ||
.LINK | ||
#> | ||
[CmdletBinding()] | ||
param ( | ||
) | ||
|
||
begin { | ||
Write-PscriboMessage "Collecting ONTAP Security Vserver Multi-Admin Approval information." | ||
} | ||
|
||
process { | ||
try { | ||
$Data = Get-NetAppOntapAPI -uri "/api/security/multi-admin-verify/approval-groups?fields=**&return_records=true&return_timeout=15" | ||
$OutObj = @() | ||
if ($Data) { | ||
foreach ($Item in $Data) { | ||
try { | ||
$inObj = [ordered] @{ | ||
'Name' = $Item.Name | ||
'Approvers' = Switch ([string]::IsNullOrEmpty($Item.Approvers)) { | ||
$true {'-'} | ||
$false {$Item.Approvers -join ', '} | ||
default {'-'} | ||
} | ||
'Email' = Switch ([string]::IsNullOrEmpty($Item.Email)) { | ||
$true {'-'} | ||
$false {$Item.Email -join ', '} | ||
default {'-'} | ||
} | ||
} | ||
$OutObj += [pscustomobject]$inobj | ||
} | ||
catch { | ||
Write-PscriboMessage -IsWarning $_.Exception.Message | ||
} | ||
} | ||
|
||
$TableParams = @{ | ||
Name = "Multi-Admin Approval - $($ClusterInfo.ClusterName)" | ||
List = $false | ||
ColumnWidths = 34,33, 33 | ||
} | ||
if ($Report.ShowTableCaptions) { | ||
$TableParams['Caption'] = "- $($TableParams.Name)" | ||
} | ||
$OutObj | Table @TableParams | ||
} | ||
} | ||
catch { | ||
Write-PscriboMessage -IsWarning $_.Exception.Message | ||
} | ||
} | ||
|
||
end {} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
function Get-AbrOntapSecurityMAPRule { | ||
<# | ||
.SYNOPSIS | ||
Used by As Built Report to retrieve NetApp ONTAP Security Multi-Admin Approval rules information from the Cluster Management Network | ||
.DESCRIPTION | ||
.NOTES | ||
Version: 0.6.5 | ||
Author: Jonathan Colon | ||
Twitter: @jcolonfzenpr | ||
Github: rebelinux | ||
.EXAMPLE | ||
.LINK | ||
#> | ||
[CmdletBinding()] | ||
param ( | ||
) | ||
|
||
begin { | ||
Write-PscriboMessage "Collecting ONTAP Security Vserver Multi-Admin Approval rules information." | ||
} | ||
|
||
process { | ||
try { | ||
$Data = Get-NetAppOntapAPI -uri "/api/security/multi-admin-verify/rules?fields=**&return_records=true&return_timeout=15" | ||
$OutObj = @() | ||
if ($Data) { | ||
foreach ($Item in $Data) { | ||
try { | ||
$inObj = [ordered] @{ | ||
'operation' = $Item.operation | ||
'query' = ConvertTo-EmptyToFiller $Item.query | ||
'Approval Groups' = Switch ([string]::IsNullOrEmpty($Item.approval_groups.name)) { | ||
$true {'-'} | ||
$false {$Item.approval_groups.name} | ||
default {'-'} | ||
} | ||
'Required Approvers' = ConvertTo-EmptyToFiller $Item.required_approvers | ||
'System Defined' = ConvertTo-TextYN $Item.system_defined | ||
|
||
} | ||
$OutObj += [pscustomobject]$inobj | ||
} | ||
catch { | ||
Write-PscriboMessage -IsWarning $_.Exception.Message | ||
} | ||
} | ||
|
||
$TableParams = @{ | ||
Name = "Multi-Admin Approval Rules - $($ClusterInfo.ClusterName)" | ||
List = $false | ||
ColumnWidths = 26, 25, 25, 12, 12 | ||
} | ||
if ($Report.ShowTableCaptions) { | ||
$TableParams['Caption'] = "- $($TableParams.Name)" | ||
} | ||
$OutObj | Sort-Object -Property 'System Defined' | Table @TableParams | ||
} | ||
} | ||
catch { | ||
Write-PscriboMessage -IsWarning $_.Exception.Message | ||
} | ||
} | ||
|
||
end {} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.