mirror of https://github.com/apache/cloudstack.git
server: remove username required condition for listVmsForImport (#9124)
* server: remove username required condition for listVmsForImport Fixes #8414 Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com> * fix Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com> * revert Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com> --------- Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
parent
6ce2a58f9b
commit
df5c546559
|
|
@ -2446,11 +2446,7 @@ public class UnmanagedVMsManagerImpl implements UnmanagedVMsManager {
|
|||
throw new InvalidParameterValueException("Please specify a valid zone.");
|
||||
}
|
||||
final String hypervisorType = cmd.getHypervisor();
|
||||
if (Hypervisor.HypervisorType.KVM.toString().equalsIgnoreCase(hypervisorType)) {
|
||||
if (StringUtils.isBlank(cmd.getUsername())) {
|
||||
throw new InvalidParameterValueException("Username need to be provided.");
|
||||
}
|
||||
} else {
|
||||
if (!Hypervisor.HypervisorType.KVM.toString().equalsIgnoreCase(hypervisorType)) {
|
||||
throw new InvalidParameterValueException(String.format("VM Import is currently not supported for hypervisor: %s", hypervisorType));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue