VMware Cloud Community
SeanKohler
Expert
Expert
Jump to solution

Custom Groups in vsphere.local

Anybody create these using vRO?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
Craig_G2
Hot Shot
Hot Shot
Jump to solution

Hey

vCACCAFEAuthenticationGroupService()  doesn't seem to have a method for creating a group but it does have one for saving a group.. so this might help you (not tested it though)...

var client = vCACCAFEHost.createAuthenticationClient();

var service = client.getAuthenticationGroupService();

service.saveCustomGroup(tenant,group);

group is an instance of vCACCAFEGroup

🙂

View solution in original post

0 Kudos
3 Replies
SeanKohler
Expert
Expert
Jump to solution

Looks like I am chasing it through rest API. Smiley Sad

0 Kudos
Craig_G2
Hot Shot
Hot Shot
Jump to solution

Hey

vCACCAFEAuthenticationGroupService()  doesn't seem to have a method for creating a group but it does have one for saving a group.. so this might help you (not tested it though)...

var client = vCACCAFEHost.createAuthenticationClient();

var service = client.getAuthenticationGroupService();

service.saveCustomGroup(tenant,group);

group is an instance of vCACCAFEGroup

🙂

0 Kudos
SeanKohler
Expert
Expert
Jump to solution

Thanks Craig.  Nice job!  Here is the group buildup...

=====================

group = new vCACCAFEGroup();

type = vCACCAFEType.fromValue("CUSTOM");

principalId = new vCACCAFEPrincipalId();

principalId.setDomain("vsphere.local");

principalId.setName("testyTesty");

group.setGroupType(type);

group.setName("testyTesty");

group.setDomain("vsphere.local");

group.setDescription("So much work");

group.setPrincipalId(principalId);

var client = cafeHost.createAuthenticationClient();

var service = client.getAuthenticationGroupService();

service.saveCustomGroup("vsphere.local",group);

========================

It is a little bit easier to do through REST post, but I like having options.

-----------------------------------

  • Creating a group: POST /tenants/vcac.local/groups
{ "@type": "Group", "groupType": "CUSTOM", "name": "Developers", "domain": "vcac.local", "description": "Developer Group", "principalId": { "domain": "vcac.local", "name": "DevGroup" } }
0 Kudos