mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Do not save an SSH public key unless one is provided.
This commit is contained in:
parent
381717854c
commit
81bb2a43d1
@ -2316,7 +2316,8 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
||||
UserVmVO vm = new UserVmVO(id, instanceName, cmd.getDisplayName(), template.getId(), hypervisorType,
|
||||
template.getGuestOSId(), offering.getOfferHA(), domainId, owner.getId(), offering.getId(), userData, hostName);
|
||||
|
||||
vm.setDetail("SSH.PublicKey", sshPublicKey);
|
||||
if (sshPublicKey != null)
|
||||
vm.setDetail("SSH.PublicKey", sshPublicKey);
|
||||
|
||||
if (_itMgr.allocate(vm, template, offering, rootDiskOffering, dataDiskOfferings, networks, null, plan, cmd.getHypervisor(), owner) == null) {
|
||||
return null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user