DaanHoogland commented on a change in pull request #5337:
URL: https://github.com/apache/cloudstack/pull/5337#discussion_r692867216
##########
File path: server/src/main/java/com/cloud/resource/ResourceManagerImpl.java
##########
@@ -687,6 +688,10 @@ public Discoverer getMatchingDiscover(final
Hypervisor.HypervisorType hypervisor
if ((clusterName != null || clusterId != null) && podId == null) {
throw new InvalidParameterValueException("Can't specify cluster
without specifying the pod");
}
+ if (!hypervisorType.equalsIgnoreCase(HypervisorType.VMware.toString())
&&
+ (Strings.isNullOrEmpty(username) ||
Strings.isNullOrEmpty(password))) {
+ throw new InvalidParameterValueException("Username and Password
need to be provided.");
+ }
Review comment:
maybe excessive but also a tat safer:
```suggestion
if
(!HypervisorType.VMware.toString().equalsIgnoreCase(hypervisorType) &&
(Strings.isNullOrEmpty(username) ||
Strings.isNullOrEmpty(password))) {
throw new InvalidParameterValueException("Username and Password
need to be provided.");
}
```
--
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]