mirror of https://github.com/apache/jclouds.git
log more details when creating keys
This commit is contained in:
parent
c28a2e38c3
commit
7278582730
|
@ -69,12 +69,12 @@ public class ImportOrReturnExistingKeypair implements Function<RegionNameAndPubl
|
||||||
try {
|
try {
|
||||||
keyPair = ec2Client.getKeyPairServices().importKeyPairInRegion(region, "jclouds#" + group,
|
keyPair = ec2Client.getKeyPairServices().importKeyPairInRegion(region, "jclouds#" + group,
|
||||||
publicKeyMaterial);
|
publicKeyMaterial);
|
||||||
logger.debug("<< imported keyPair(%s) fingerprint(%s)", keyPair.getKeyName(), keyPair.getKeyFingerprint());
|
logger.debug("<< imported keyPair(%s)", keyPair);
|
||||||
} catch (IllegalStateException e) {
|
} catch (IllegalStateException e) {
|
||||||
keyPair = Iterables.getFirst(
|
keyPair = Iterables.getFirst(
|
||||||
ec2Client.getKeyPairServices().describeKeyPairsInRegion(region, "jclouds#" + group), null);
|
ec2Client.getKeyPairServices().describeKeyPairsInRegion(region, "jclouds#" + group), null);
|
||||||
if (keyPair != null)
|
if (keyPair != null)
|
||||||
logger.debug("<< retrieved existing keyPair(%s) fingerprint(%s)", keyPair.getKeyName(), keyPair.getKeyFingerprint());
|
logger.debug("<< retrieved existing keyPair(%s)", keyPair);
|
||||||
}
|
}
|
||||||
return keyPair;
|
return keyPair;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue