jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Turli <notificati...@github.com>
Subject Re: [jclouds/jclouds] [JCLOUDS-1318] fix based on nodeTerminatePredicate (#1117)
Date Sat, 15 Jul 2017 09:21:12 GMT
andreaturli commented on this pull request.



>        if (templateOptions.getKeyPairName() != null) {
          options.keyPairName(templateOptions.getKeyPairName());
-         KeyPair keyPair = keyPairCache.getIfPresent(RegionAndName.fromRegionAndName(template.getLocation().getId(),
templateOptions.getKeyPairName()));
-         if (keyPair != null && keyPair.getPrivateKey() != null) {
-            privateKey = Optional.of(keyPair.getPrivateKey());
-            credentialsBuilder.privateKey(privateKey.get());
-         }

right! 
I've re-added same logic in `ApplyNovaTemplateOptionsCreateNodesWithGroupEncodedIntoNameThenAddToSet`
thanks!

Tested with
```
               templateOptions.generateKeyPair(true);
```
and with
```
               templateOptions.keyPairName("test");
               String privateKey = Files.toString(new File("/Users/andrea/Downloads/test.pem"),
Charsets.UTF_8);
               templateOptions.overrideLoginPrivateKey(privateKey);
```
looks good to me

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1117#discussion_r127580623
Mime
View raw message