Codota Logo
org.jclouds.digitalocean2.compute.strategy
Code IndexAdd Codota to your IDE (free)

How to use org.jclouds.digitalocean2.compute.strategy

Best Java code snippets using org.jclouds.digitalocean2.compute.strategy (Showing top 12 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: com.amysta.jclouds.provider/digitalocean2

@Override
public void onFailure(Throwable t) {
 cleanupAutoGeneratedKeyPairs(generatedSshKeyIds);
}
origin: org.apache.jclouds.provider/digitalocean2

  generateKeyPairAndAddKeyToSet(options, generatedSshKeyIds, group);
  createKeyPairForPublicKeyInOptionsAndAddToSet(options, generatedSshKeyIds);
registerAutoGeneratedKeyPairCleanupCallbacks(responses, generatedSshKeyIds);
origin: com.amysta.jclouds.provider/digitalocean2

private void createKeyPairForPublicKeyInOptionsAndAddToSet(DigitalOcean2TemplateOptions options,
   Set<Integer> generatedSshKeyIds) {
 logger.debug(">> checking if the key pair already exists...");
 PublicKey userKey = sshKeyToPublicKey.apply(options.getPublicKey());
 String userFingerprint = computeFingerprint(userKey);
 Key key = api.keyApi().get(userFingerprint);  
 if (key == null) {
   logger.debug(">> key pair not found. creating a new one...");
   Key newKey = api.keyApi().create(userFingerprint, options.getPublicKey());
   generatedSshKeyIds.add(newKey.id());
   logger.debug(">> key pair created! %s", newKey);
 } else {
   logger.debug(">> key pair found! %s", key);
   generatedSshKeyIds.add(key.id());
 }
}
origin: com.amysta.jclouds.provider/digitalocean2

  generateKeyPairAndAddKeyToSet(options, generatedSshKeyIds, group);
  createKeyPairForPublicKeyInOptionsAndAddToSet(options, generatedSshKeyIds);
registerAutoGeneratedKeyPairCleanupCallbacks(responses, generatedSshKeyIds);
origin: org.apache.jclouds.provider/digitalocean2

@Override
public void onSuccess(List<Void> result) {
 cleanupAutoGeneratedKeyPairs(generatedSshKeyIds);
}
origin: org.apache.jclouds.provider/digitalocean2

private void createKeyPairForPublicKeyInOptionsAndAddToSet(DigitalOcean2TemplateOptions options,
   Set<Integer> generatedSshKeyIds) {
 logger.debug(">> checking if the key pair already exists...");
 PublicKey userKey = sshKeyToPublicKey.apply(options.getPublicKey());
 String userFingerprint = computeFingerprint(userKey);
 Key key = api.keyApi().get(userFingerprint);  
 if (key == null) {
   logger.debug(">> key pair not found. creating a new one...");
   Key newKey = api.keyApi().create(userFingerprint, options.getPublicKey());
   generatedSshKeyIds.add(newKey.id());
   logger.debug(">> key pair created! %s", newKey);
 } else {
   logger.debug(">> key pair found! %s", key);
   generatedSshKeyIds.add(key.id());
 }
}
origin: apache/jclouds

  generateKeyPairAndAddKeyToSet(options, generatedSshKeyIds, group);
  createKeyPairForPublicKeyInOptionsAndAddToSet(options, generatedSshKeyIds);
registerAutoGeneratedKeyPairCleanupCallbacks(responses, generatedSshKeyIds);
origin: com.amysta.jclouds.provider/digitalocean2

@Override
public void onSuccess(List<Void> result) {
 cleanupAutoGeneratedKeyPairs(generatedSshKeyIds);
}
origin: apache/jclouds

private void createKeyPairForPublicKeyInOptionsAndAddToSet(DigitalOcean2TemplateOptions options,
   Set<Integer> generatedSshKeyIds) {
 logger.debug(">> checking if the key pair already exists...");
 PublicKey userKey = sshKeyToPublicKey.apply(options.getPublicKey());
 String userFingerprint = computeFingerprint(userKey);
 Key key = api.keyApi().get(userFingerprint);  
 if (key == null) {
   logger.debug(">> key pair not found. creating a new one...");
   Key newKey = api.keyApi().create(userFingerprint, options.getPublicKey());
   generatedSshKeyIds.add(newKey.id());
   logger.debug(">> key pair created! %s", newKey);
 } else {
   logger.debug(">> key pair found! %s", key);
   generatedSshKeyIds.add(key.id());
 }
}
origin: org.apache.jclouds.provider/digitalocean2

@Override
public void onFailure(Throwable t) {
 cleanupAutoGeneratedKeyPairs(generatedSshKeyIds);
}
origin: apache/jclouds

@Override
public void onSuccess(List<Void> result) {
 cleanupAutoGeneratedKeyPairs(generatedSshKeyIds);
}
origin: apache/jclouds

@Override
public void onFailure(Throwable t) {
 cleanupAutoGeneratedKeyPairs(generatedSshKeyIds);
}
org.jclouds.digitalocean2.compute.strategy

Most used classes

  • CreateKeyPairsThenCreateNodes$1
  • CreateKeyPairsThenCreateNodes
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now