Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2446,11 +2446,7 @@ public ListResponse<UnmanagedInstanceResponse> listVmsForImport(ListVmsForImport
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));
}

Expand Down