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-labs] Improve duplicate ssh key check in Packet (#397)
Date Wed, 14 Jun 2017 19:21:57 GMT
andreaturli commented on this pull request.

lgtm, some minor comments

also tested `PacketComputeServiceLiveTest` which look alright.

why only against `2.0.x`?

>  
+      PublicKey userKey = readPublicKey(options.getPublicKey());
+      final String fingerprint = computeFingerprint(userKey);
+      
+      synchronized (CreateSshKeysThenCreateNodes.class) {

why is it needed?

>  
+      PublicKey userKey = readPublicKey(options.getPublicKey());
+      final String fingerprint = computeFingerprint(userKey);
+      
+      synchronized (CreateSshKeysThenCreateNodes.class) {
+         boolean keyExists = api.sshKeyApi().list().concat().anyMatch(new Predicate<SshKey>()
{

isn't `SshKey key = api.sshKeyApi().get(fingerprint);` more appropriate here? 


-- 
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-labs/pull/397#pullrequestreview-44120886
Mime
View raw message