}
@Override
public void buildTemplateModel(Map<String, Object> model) throws OpsException {
LdapDomain ldapDomain = getLdapDomain();
LdapService ldapService = getLdapService();
LdapDN organizationDN = LdapDN.fromDomainName(ldapDomain.organizationName);
LdapDN allUsersDN = organizationDN.childDN("ou", "Users");
LdapDN managerDN = organizationDN.childDN("cn", "Manager");
LdapDN groupsDN = organizationDN.childDN("ou", "Groups");
LdapDN gitUsersDN = groupsDN.childDN("cn", "Git");
// String authLdapUrl = "ldap://192.168.192.67:389/ou=Users,dc=com,dc=fathomscale?uid";
// String authLDAPBindDN = "cn=Manager,dc=com,dc=fathomscale";
// String authLDAPBindPassword = "adminsecret";
// String requireLdapGroup = "cn=Git,ou=Groups,dc=com,dc=fathomscale";
int port = 389;
List<EndpointInfo> endpoints = EndpointInfo.findEndpoints(ldapService.getTags(), port);
EndpointInfo ldapEndpoint = EndpointChooser.preferIpv4().choose(endpoints);
if (ldapEndpoint == null) {
throw new OpsException("Cannot find suitable LDAP endpoint");