davidjumani commented on a change in pull request #5215:
URL: https://github.com/apache/cloudstack/pull/5215#discussion_r686671670
##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -862,25 +860,44 @@ public UserVm resetVMSSHKey(ResetVMSSHKeyCmd cmd) throws
ResourceUnavailableExce
throw new InvalidParameterValueException("Vm " + userVm + " should
be stopped to do SSH Key reset");
}
- SSHKeyPairVO s = _sshKeyPairDao.findByName(owner.getAccountId(),
owner.getDomainId(), cmd.getName());
- if (s == null) {
- throw new InvalidParameterValueException("A key pair with name '"
+ cmd.getName() + "' does not exist for account " + owner.getAccountName()
- + " in specified domain id");
+ String keypairnames = "";
+
+ List<SSHKeyPairVO> s_list = null;
+
+ if (cmd.getNames() != null) {
+ s_list = _sshKeyPairDao.findByNames(owner.getAccountId(),
owner.getDomainId(), cmd.getNames());
Review comment:
A check to ensure that all the keyparis passed exist
--
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]