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

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

Best Java code snippets using org.jclouds.cloudstack.features.SSHKeyPairApi.deleteSSHKeyPair (Showing top 5 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

@BeforeMethod
@AfterMethod
public void removeExistingKey() {
 client.getSSHKeyPairApi().deleteSSHKeyPair(keyPairName);
}
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 testRegisterDeleteSSHKeyPair() {
 final Map<String, String> sshKey = SshKeys.generate();
 final String publicKey = sshKey.get("public");
 sshKeyPair = client.getSSHKeyPairApi().registerSSHKeyPair(keyPairName, publicKey);
 assertNull(sshKeyPair.getPrivateKey());
 checkSSHKeyPair(sshKeyPair);
 client.getSSHKeyPairApi().deleteSSHKeyPair(keyPairName);
 assertEquals(client.getSSHKeyPairApi().getSSHKeyPair(sshKeyPair.getName()), null);
 assertEquals(SshKeys.fingerprintPublicKey(publicKey), sshKeyPair.getFingerprint());
 sshKeyPair = null;
}
origin: apache/jclouds

@Test
public void testCreateDeleteSSHKeyPair() {
 sshKeyPair = client.getSSHKeyPairApi().createSSHKeyPair(keyPairName);
 assertNotNull(sshKeyPair.getPrivateKey());
 checkSSHKeyPair(sshKeyPair);
 client.getSSHKeyPairApi().deleteSSHKeyPair(sshKeyPair.getName());
 assertEquals(client.getSSHKeyPairApi().getSSHKeyPair(sshKeyPair.getName()), null);
 assertEquals(SshKeys.fingerprintPrivateKey(sshKeyPair.getPrivateKey()), sshKeyPair.getFingerprint());
 sshKeyPair = null;
}
origin: apache/jclouds

@BeforeGroups(groups = { "live" })
public void setupContext() {
 super.setupContext();
 adapter = context.utils().injector().getInstance(
    CloudStackComputeServiceAdapter.class);
 keyPairName = prefix + "-adapter-test-keypair";
 keyPair = SshKeys.generate();
 client.getSSHKeyPairApi().deleteSSHKeyPair(keyPairName);
 client.getSSHKeyPairApi().registerSSHKeyPair(keyPairName, keyPair.get("public"));
}
org.jclouds.cloudstack.featuresSSHKeyPairApideleteSSHKeyPair

Javadoc

Deletes the SSHKeyPairApi with given name.

Popular methods of SSHKeyPairApi

  • createSSHKeyPair
    Creates a SshKeyPair with specified name.
  • getSSHKeyPair
    Retrieves the SSHKeyPairApi with given name.
  • listSSHKeyPairs
    Returns a list of SshKeyPairs registered by current user.
  • 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