Implement New and Remove SsoGroup cmdlets.

Signed-off-by: Dimitar Milov <dmilov@vmware.com>
This commit is contained in:
Dimitar Milov
2021-05-25 19:11:15 +03:00
parent 09fad317e1
commit 04b0807ed5
11 changed files with 1259 additions and 841 deletions

View File

@@ -103,7 +103,7 @@ namespace VMware.vSphere.SsoAdminClient.Tests
var ssoAdminClient = new SsoAdminClient(_vc, _user, _password, new AcceptAllX509CertificateValidator());
// Act
var actual = ssoAdminClient.GetPersonUsersInGroup("", new Group {
var actual = ssoAdminClient.GetPersonUsersInGroup("", new Group(ssoAdminClient) {
Name = "Administrators",
Domain = "vsphere.local"
}).ToArray();

View File

@@ -9,13 +9,26 @@ using System.Threading.Tasks;
namespace VMware.vSphere.SsoAdminClient.DataTypes
{
public class Group
{
public string Name { get; set; }
public string Domain { get; set; }
public class Group
{
SsoAdminClient _client;
public Group(SsoAdminClient client)
{
_client = client;
}
public override string ToString() {
return $"{Name}@{Domain}";
}
}
public string Name { get; set; }
public string Domain { get; set; }
public string Description { get; set; }
public SsoAdminClient GetClient()
{
return _client;
}
public override string ToString()
{
return $"{Name}@{Domain}";
}
}
}