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:19:01 GMT
andreaturli commented on this pull request.



> -                  .sharedNameForGroup(group)));
-         keyPairCache.asMap().put(RegionAndName.fromRegionAndName(region, keyPair.getName()),
keyPair);
-         templateOptions.keyPairName(keyPair.getName());
-         tagsBuilder.add(JCLOUDS_KP);
-      } else if (templateOptions.getKeyPairName() != null) {
-         checkArgument(keyPairExtensionPresent,
-                  "Key Pairs are required by options, but the extension is not available!
options: %s", templateOptions);
-         if (templateOptions.getLoginPrivateKey() != null) {
-            String pem = templateOptions.getLoginPrivateKey();
-            KeyPair keyPair = KeyPair.builder().name(templateOptions.getKeyPairName())
-                     .fingerprint(fingerprintPrivateKey(pem)).privateKey(pem).build();
-            keyPairCache.asMap().put(RegionAndName.fromRegionAndName(region, keyPair.getName()),
keyPair);
+         checkArgument(novaApi.getKeyPairApi(region).isPresent(),
+                 "Key Pairs are required by options, but the extension is not available!
options: %s", templateOptions);
+      }
+      if (templateOptions.shouldGenerateKeyPair()) {

good point, changing it now

-- 
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_r127580589
Mime
View raw message