Closed dmilov closed 3 years ago
Addresses issue #450
Implement new cmdlets for Group management and extended Get-SsoGroup to search for group members
Testing Done: Unit tests
>.\src\build.ps1 -TestVc 10.23.80.118 -TestVcUser administrator@vsphere.local -TestVcPassword 'Admin!23' [11:10:17 AM] INFO: Test build tools are available [11:10:17 AM] INFO: Build Microsoft (R) Build Engine version 16.9.0+57a23d249 for .NET Copyright (C) Microsoft Corporation. All rights reserved. Determining projects to restore... All projects are up-to-date for restore. VMware.vSphere.LsClient -> C:\git-repos\github\PowerCLI-Example-Scripts\Modules\VMware.vSphere.SsoAdmin\src\VMware.vSphere.SsoAdmin.Client\VMware.vSphere.LsClient\bin\Release\net45\VMware.vSphere.LsClient.dll VMware.vSphere.LsClient -> C:\git-repos\github\PowerCLI-Example-Scripts\Modules\VMware.vSphere.SsoAdmin\src\VMware.vSphere.SsoAdmin.Client\VMware.vSphere.LsClient\bin\Release\netcoreapp3.1\VMware.vSphere.LsClient.dll VMware.vSphere.SsoAdminClient -> C:\git-repos\github\PowerCLI-Example-Scripts\Modules\VMware.vSphere.SsoAdmin\src\VMware.vSphere.SsoAdmin.Client\VMware.vSphere.SsoAdminClient\bin\Release\net45\VMware.vSphere.SsoAdminClient.dll VMware.vSphere.SsoAdminClient -> C:\git-repos\github\PowerCLI-Example-Scripts\Modules\VMware.vSphere.SsoAdmin\src\VMware.vSphere.SsoAdmin.Client\VMware.vSphere.SsoAdminClient\bin\Release\netcoreapp3.1\VMware.vSphere.SsoAdminClient.dll VMware.vSphere.SsoAdmin.Utils -> C:\git-repos\github\PowerCLI-Example-Scripts\Modules\VMware.vSphere.SsoAdmin\src\VMware.vSphere.SsoAdmin.Client\VMware.vSphere.SsoAdmin.Utils\bin\Release\net45\VMware.vSphere.SsoAdmin.Utils.dll VMware.vSphere.SsoAdmin.Utils -> C:\git-repos\github\PowerCLI-Example-Scripts\Modules\VMware.vSphere.SsoAdmin\src\VMware.vSphere.SsoAdmin.Client\VMware.vSphere.SsoAdmin.Utils\bin\Release\netcoreapp3.1\VMware.vSphere.SsoAdmin.Utils.dll VMware.vSphere.SsoAdminClient.Tests -> C:\git-repos\github\PowerCLI-Example-Scripts\Modules\VMware.vSphere.SsoAdmin\src\VMware.vSphere.SsoAdmin.Client\VMware.vSphere.SsoAdminClient.Tests\bin\Release\netcoreapp3.1\VMware.vSphere.SsoAdminClient.Tests.dll Build succeeded. 0 Warning(s) 0 Error(s) Time Elapsed 00:00:01.54 [11:10:19 AM] INFO: Publish binaries to 'C:\git-repos\github\PowerCLI-Example-Scripts\Modules\VMware.vSphere.SsoAdmin' [11:10:19 AM] INFO: Run VC integration tests Starting discovery in 8 files. Discovery finished in 860ms. 'testserver' doesn't match any objects in $global:DefaultSsoAdminServers variable [+] C:\git-repos\github\PowerCLI-Example-Scripts\Modules\VMware.vSphere.SsoAdmin\src\test\ConnectDisconnect.Tests.ps1 3.88s (2.81s|408ms) [+] C:\git-repos\github\PowerCLI-Example-Scripts\Modules\VMware.vSphere.SsoAdmin\src\test\Group.Tests.ps1 8.47s (8.07s|343ms) [+] C:\git-repos\github\PowerCLI-Example-Scripts\Modules\VMware.vSphere.SsoAdmin\src\test\IdentitySource.Tests.ps1 1.21s (1.08s|116ms) [+] C:\git-repos\github\PowerCLI-Example-Scripts\Modules\VMware.vSphere.SsoAdmin\src\test\LockoutPolicy.Tests.ps1 1.04s (913ms|119ms) [+] C:\git-repos\github\PowerCLI-Example-Scripts\Modules\VMware.vSphere.SsoAdmin\src\test\LsClient.Tests.ps1 208ms (113ms|85ms) [+] C:\git-repos\github\PowerCLI-Example-Scripts\Modules\VMware.vSphere.SsoAdmin\src\test\PasswordPolicy.Tests.ps1 1.86s (1.72s|122ms) [+] C:\git-repos\github\PowerCLI-Example-Scripts\Modules\VMware.vSphere.SsoAdmin\src\test\PersonUser.Tests.ps1 9.33s (9s|274ms) [+] C:\git-repos\github\PowerCLI-Example-Scripts\Modules\VMware.vSphere.SsoAdmin\src\test\TokenLifetime.Tests.ps1 1.61s (1.46s|127ms) Tests completed in 27.64s Tests Passed: 47, Failed: 0, Skipped: 0 NotRun: 0
Manual Test to cover adding ActiveDirectory Group to vsphere.local Administrators group
Get-SsoGroup -Domain sof-powercli-qe.eng.vmware.com -Name 'DnsAdmins' Name Domain Description ---- ------ ----------- DnsAdmins sof-powercli-qe.eng.vmware.com DNS Administrators Group PS C:\Users\dmilov> $ldapGroup = Get-SsoGroup -Domain sof-powercli-qe.eng.vmware.com -Name 'DnsAdmins' PS C:\Users\dmilov> $targetGroup = Get-SsoGroup -Domain vsphere.local -Name Administrators PS C:\Users\dmilov> $targetGroup Name Domain Description ---- ------ ----------- Administrators vsphere.local PS C:\Users\dmilov> $ldapGroup | Add-GroupToSsoGroup -TargetGroup $targetGroup PS C:\Users\dmilov> Get-SsoGroup -Group $targetGroup Name Domain Description ---- ------ ----------- DnsAdmins sof-powercli-qe.eng.vmware.com DNS Administrators Group
Addresses issue #450
Implement new cmdlets for Group management and extended Get-SsoGroup to search for group members
Testing Done: Unit tests
Manual Test to cover adding ActiveDirectory Group to vsphere.local Administrators group