Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove wsa groups from export-iamjsonspec #450

Merged
merged 1 commit into from
Dec 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions PowerValidatedSolutions.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Function Export-IamJsonSpec {
'nsxEnterpriseAdminGroup' = $pnpWorkbook.Workbook.Names["group_gg_nsx_enterprise_admins"].Value + "@" + $pnpWorkbook.Workbook.Names["region_ad_child_fqdn"].Value
'nsxNetworkAdminsGroup' = $pnpWorkbook.Workbook.Names["group_gg_nsx_network_admins"].Value + "@" + $pnpWorkbook.Workbook.Names["region_ad_child_fqdn"].Value
'nsxAuditorGroup' = $pnpWorkbook.Workbook.Names["group_gg_nsx_auditors"].Value + "@" + $pnpWorkbook.Workbook.Names["region_ad_child_fqdn"].Value
'nsxAdGroups' = "$($pnpWorkbook.Workbook.Names["group_gg_nsx_enterprise_admins"].Value)","$($pnpWorkbook.Workbook.Names["group_gg_nsx_network_admins"].Value)","$($pnpWorkbook.Workbook.Names["group_gg_nsx_auditors"].Value)","$($pnpWorkbook.Workbook.Names["group_child_gg_wsa_admins"].Value)","$($pnpWorkbook.Workbook.Names["group_child_gg_wsa_directory_admins"].Value)","$($pnpWorkbook.Workbook.Names["group_child_gg_wsa_read_only"].Value)"
'nsxAdGroups' = "$($pnpWorkbook.Workbook.Names["group_gg_nsx_enterprise_admins"].Value)","$($pnpWorkbook.Workbook.Names["group_gg_nsx_network_admins"].Value)","$($pnpWorkbook.Workbook.Names["group_gg_nsx_auditors"].Value)"
'vsphereRoleName' = $pnpWorkbook.Workbook.Names["nsxt_vsphere_role_name"].Value
}
Close-ExcelPackage $pnpWorkbook -NoSave -ErrorAction SilentlyContinue
Expand All @@ -104,12 +104,12 @@ Function Export-IamJsonSpec {
}
}
if ($issueWithJson) {
Write-Error "Creation of JSON Specification file for Identity and Access Management, missing data: POST_VALIDATION_FAILED"
Show-PowerValidatedSolutionsOutput -type ERROR -message "Creation of JSON Specification file for Identity and Access Management, missing data: POST_VALIDATION_FAILED"
} else {
Write-Output "Creation of JSON Specification file for Identity and Access Management: SUCCESSFUL"
Show-PowerValidatedSolutionsOutput -message "Creation of JSON Specification file for Identity and Access Management: SUCCESSFUL"
}
} else {
Write-Error "Planning and Preparation Workbook (.xlsx) ($workbook): File Not Found"
Show-PowerValidatedSolutionsOutput -type ERROR -message "Planning and Preparation Workbook (.xlsx) ($workbook): File Not Found"
}
} Catch {
Debug-ExceptionWriter -object $_
Expand Down Expand Up @@ -9903,12 +9903,12 @@ Function Export-IlaJsonSpec {
}
}
if ($issueWithJson) {
Write-Error "Creation of JSON Specification file for Intelligent Logging and Analytics, missing data: POST_VALIDATION_FAILED"
Show-PowerValidatedSolutionsOutput -type ERROR -message "Creation of JSON Specification file for Intelligent Logging and Analytics, missing data: POST_VALIDATION_FAILED"
} else {
Write-Output "Creation of JSON Specification file for Intelligent Logging and Analytics: SUCCESSFUL"
Show-PowerValidatedSolutionsOutput -message "Creation of JSON Specification file for Intelligent Logging and Analytics: SUCCESSFUL"
}
} else {
Write-Error "Planning and Preparation Workbook (.xlsx) ($workbook): File Not Found"
Show-PowerValidatedSolutionsOutput -type ERROR -message "Planning and Preparation Workbook (.xlsx) ($workbook): File Not Found"
}
} Catch {
Debug-ExceptionWriter -object $_
Expand Down Expand Up @@ -9978,7 +9978,7 @@ Function Invoke-IlaDeployment {
$StatusMsg = New-vRLIDeployment -server $jsonInput.sddcManagerFqdn -user $jsonInput.sddcManagerUser -pass $jsonInput.sddcManagerPass -workbook $workbook -monitor -WarningAction SilentlyContinue -ErrorAction SilentlyContinue -WarningVariable WarnMsg -ErrorVariable ErrorMsg
}
if ( $StatusMsg ) { Show-PowerValidatedSolutionsOutput -Type INFO -Message "$StatusMsg" }; if ($WarnMsg) { Show-PowerValidatedSolutionsOutput -Type WARNING -Message $WarnMsg }; if ( $ErrorMsg ) { Show-PowerValidatedSolutionsOutput -Type ERROR -Message $ErrorMsg; $failureDetected = $true }
if ( $StatusMsg -match "FAILED" -or $WarnMsg -match "FAILED" ) { Show-PowerValidatedSolutionsOutput -Type ERROR -Message "Deployment of $logsProductName FAILED"; Break }
if ( $StatusMsg -match "FAILED" -or $WarnMsg -match "FAILED" ) { Show-PowerValidatedSolutionsOutput -Type ERROR -Message "Deployment of $logsProductName FAILED"; $failureDetected = $true }
}

if (!$failureDetected) {
Expand Down Expand Up @@ -13289,12 +13289,12 @@ Function Export-IomJsonSpec {
}
}
if ($issueWithJson) {
Write-Error "Creation of JSON Specification file for Intelligent Operations Management, missing data: POST_VALIDATION_FAILED"
Show-PowerValidatedSolutionsOutput -type ERROR -message "Creation of JSON Specification file for Intelligent Operations Management, missing data: POST_VALIDATION_FAILED"
} else {
Write-Output "Creation of JSON Specification file for Intelligent Operations Management: SUCCESSFUL"
Show-PowerValidatedSolutionsOutput -message "Creation of JSON Specification file for Intelligent Operations Management: SUCCESSFUL"
}
} else {
Write-Error "Planning and Preparation Workbook (.xlsx) ($workbook): File Not Found"
Show-PowerValidatedSolutionsOutput -type ERROR -message "Planning and Preparation Workbook (.xlsx) ($workbook): File Not Found"
}
} Catch {
Debug-ExceptionWriter -object $_
Expand Down