Skip to content

Commit 0d16c05

Browse files
author
Daan Hoogland
committed
removed deprecated parameter
1 parent c82a041 commit 0d16c05

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/command/LinkDomainToLdapCmd.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,10 @@ public class LinkDomainToLdapCmd extends BaseCmd {
5151
@Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, required = true, description = "type of the ldap name. GROUP or OU")
5252
private String type;
5353

54-
@Parameter(name = ApiConstants.LDAP_DOMAIN, type = CommandType.STRING, required = false, description = "name of the group or OU in LDAP")
54+
@Parameter(name = ApiConstants.LDAP_DOMAIN, type = CommandType.STRING, required = true, description = "name of the group or OU in LDAP")
5555
private String ldapDomain;
5656

57-
@Deprecated
58-
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = false, description = "name of the group or OU in LDAP")
59-
private String name;
60-
61-
@Parameter(name = ApiConstants.ADMIN, type = CommandType.STRING, required = false, description = "domain admin username in LDAP ")
57+
@Parameter(name = ApiConstants.ADMIN, type = CommandType.STRING, description = "domain admin username in LDAP ")
6258
private String admin;
6359

6460
@Parameter(name = ApiConstants.ACCOUNT_TYPE, type = CommandType.INTEGER, required = true, description = "Type of the account to auto import. Specify 0 for user and 2 for " +
@@ -77,7 +73,7 @@ public String getType() {
7773
}
7874

7975
public String getLdapDomain() {
80-
return ldapDomain == null ? name : ldapDomain;
76+
return ldapDomain;
8177
}
8278

8379
public String getAdmin() {
@@ -98,7 +94,7 @@ public void execute() throws ServerApiException {
9894
try {
9995
ldapUser = _ldapManager.getUser(admin, type, getLdapDomain(), domainId);
10096
} catch (NoLdapUserMatchingQueryException e) {
101-
logger.debug("no ldap user matching username " + admin + " in the given group/ou", e);
97+
logger.debug("no ldap user matching username {} in the given group/ou", admin, e);
10298
}
10399
if (ldapUser != null && !ldapUser.isDisabled()) {
104100
Account account = _accountService.getActiveAccountByName(admin, domainId);
@@ -115,7 +111,7 @@ public void execute() throws ServerApiException {
115111
logger.debug("an account with name {} already exists in the domain {} with id {}", admin, _domainService.getDomain(domainId), domainId);
116112
}
117113
} else {
118-
logger.debug("ldap user with username "+admin+" is disabled in the given group/ou");
114+
logger.debug("ldap user with username {} is disabled in the given group/ou", admin);
119115
}
120116
}
121117
response.setObjectName("LinkDomainToLdap");

0 commit comments

Comments
 (0)