weizhouapache commented on code in PR #11462:
URL: https://github.com/apache/cloudstack/pull/11462#discussion_r2390486713
##########
plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/LdapManagerImpl.java:
##########
@@ -257,6 +258,19 @@ public LdapUserResponse createLdapUserResponse(final
LdapUser user) {
@Override
public LdapConfigurationResponse deleteConfiguration(final
LdapDeleteConfigurationCmd cmd) throws InvalidParameterValueException {
+ Long id = cmd.getId();
+ String hostname = cmd.getHostname();
+ if (id == null && StringUtils.isEmpty(hostname)) {
+ throw new InvalidParameterValueException("Either id or hostname
must be specified");
+ }
+ if (id != null) {
Review Comment:
what if id and hostname/domainid/port are both passed ?
##########
plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/command/LdapDeleteConfigurationCmd.java:
##########
@@ -40,8 +40,10 @@ public class LdapDeleteConfigurationCmd extends BaseCmd {
@Inject
private LdapManager _ldapManager;
+ @Parameter(name = ApiConstants.ID, type = CommandType.UUID, required =
false, entityType = LdapConfigurationResponse.class, description = "ID of the
LDAP configuration")
+ private Long id;
- @Parameter(name = ApiConstants.HOST_NAME, type = CommandType.STRING,
required = true, description = "Hostname")
+ @Parameter(name = ApiConstants.HOST_NAME, type = CommandType.STRING,
description = "Hostname")
Review Comment:
makes sense, however, cloudstack-go might be impacted
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]