Codota Logo
SSHKeyPairApi.listSSHKeyPairs
Code IndexAdd Codota to your IDE (free)

How to use
listSSHKeyPairs
method
in
org.jclouds.cloudstack.features.SSHKeyPairApi

Best Java code snippets using org.jclouds.cloudstack.features.SSHKeyPairApi.listSSHKeyPairs (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: apache/jclouds

@Test
public void testListSSHKeyPairs() {
 final Set<SshKeyPair> sshKeyPairs = client.getSSHKeyPairApi().listSSHKeyPairs();
 for (SshKeyPair sshKeyPair : sshKeyPairs) {
   checkSSHKeyPair(sshKeyPair);
 }
}
origin: apache/jclouds

private void cleanupOrphanedKeyPairsInZone(Set<String> groups, String zoneId) {
 for (String group : groups) {
   for (SshKeyPair pair : Iterables.filter(client.getSSHKeyPairApi().listSSHKeyPairs(),
                       nameMatches(namingConvention.create().containsGroup(group)))) {
    logger.debug(">> deleting keypair(%s)", pair.getName());
    client.getSSHKeyPairApi().deleteSSHKeyPair(pair.getName());
    // TODO: test this clear happens
    keyPairCache.invalidate(pair.getName());
    logger.debug("<< deleted keypair(%s)", pair.getName());
   }
   keyPairCache.invalidate(namingConvention.create().sharedNameForGroup(group));
 }
}
origin: apache/jclouds

@Test
public void testListAndGetSSHKeyPairsWhenResponseIs2xx() {
 HttpResponse response = HttpResponse.builder()
   .statusCode(200)
   .payload(payloadFromResource("/listsshkeypairsresponse.json"))
   .build();
 SSHKeyPairApi client = requestSendsResponse(HttpRequest.builder()
   .method("GET")
   .endpoint(
    URI.create("http://localhost:8080/client/api?response=json&" +
      "command=listSSHKeyPairs&listAll=true&apiKey=identity&signature=5d2J9u%2BdKpkQsadDbl9i9OcUSLQ%3D"))
    .addHeader("Accept", "application/json")
   .build(), response);
 assertEquals(client.listSSHKeyPairs(), ImmutableSet.of(
   SshKeyPair.builder().name("jclouds-keypair")
    .fingerprint("1c:06:74:52:3b:99:1c:95:5c:04:c2:f4:ba:77:6e:7b").build()));
 client = requestSendsResponse(HttpRequest.builder()
   .method("GET")
   .endpoint(
    URI.create("http://localhost:8080/client/api?response=json&command=listSSHKeyPairs&listAll=true&" +
      "name=jclouds-keypair&apiKey=identity&signature=hJIVCFOHhdOww3aq19tFHpeD2HI%3D"))
    .addHeader("Accept", "application/json")
   .build(), response);
 assertEquals(client.getSSHKeyPair("jclouds-keypair"),
   SshKeyPair.builder().name("jclouds-keypair")
    .fingerprint("1c:06:74:52:3b:99:1c:95:5c:04:c2:f4:ba:77:6e:7b").build());
}
org.jclouds.cloudstack.featuresSSHKeyPairApilistSSHKeyPairs

Javadoc

Returns a list of SshKeyPairs registered by current user.

Popular methods of SSHKeyPairApi

  • createSSHKeyPair
    Creates a SshKeyPair with specified name.
  • deleteSSHKeyPair
    Deletes the SSHKeyPairApi with given name.
  • getSSHKeyPair
    Retrieves the SSHKeyPairApi with given name.
  • registerSSHKeyPair
    Registers a SshKeyPair with the given name and public kay material.

Popular in Java

  • Reactive rest calls using spring rest template
  • onCreateOptionsMenu (Activity)
  • putExtra (Intent)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • Path (java.nio.file)
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • IsNull (org.hamcrest.core)
    Is the value null?
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