Examples of PasswordDataAndPrivateKey


Examples of org.jclouds.ec2.compute.domain.PasswordDataAndPrivateKey

      // TODO: parameterize
      Predicate<String> passwordReadyRetryable = retry(passwordReady, 600, 10, SECONDS);

      logger.debug(">> awaiting password data for instance(%s/%s)", instance.getRegion(), instance.getId());
      if (passwordReadyRetryable.apply(instance.getId())) {
         credentials = pwDataToLoginCredentials.apply(new PasswordDataAndPrivateKey(data.get(), privateKey));
         logger.debug("<< obtained password data for instance(%s/%s)", instance.getRegion(), instance.getId());
      } else {
         logger.debug("<< unable to get password data for instance(%s/%s)", instance.getRegion(), instance.getId());
      }
      return credentials;
View Full Code Here

Examples of org.jclouds.ec2.compute.domain.PasswordDataAndPrivateKey

      // TODO: parameterize
      Predicate<String> passwordReadyRetryable = retry(passwordReady, 600, 10, SECONDS);

      logger.debug(">> awaiting password data for instance(%s/%s)", instance.getRegion(), instance.getId());
      if (passwordReadyRetryable.apply(instance.getId())) {
         credentials = pwDataToLoginCredentials.apply(new PasswordDataAndPrivateKey(data.get(), privateKey));
         logger.debug("<< obtained password data for instance(%s/%s)", instance.getRegion(), instance.getId());
      } else {
         logger.debug("<< unable to get password data for instance(%s/%s)", instance.getRegion(), instance.getId());
      }
      return credentials;
View Full Code Here

Examples of org.jclouds.ec2.compute.domain.PasswordDataAndPrivateKey

      PasswordData passwordData = PasswordData.builder()
                                              .instanceId("i-2574e22a")
                                              .timestamp(dateService.iso8601DateParse("2012-07-30T07:27:23.000+0000"))
                                              .passwordData(ENCRYPTED_PASSWORD).build();

      LoginCredentials credentials = f.apply(new PasswordDataAndPrivateKey(passwordData, PRIVATE_KEY));

      assertEquals(credentials.getUser(), "Administrator");
      assertEquals(credentials.getPassword(), "u4.y9mb;nR.");
      assertFalse(credentials.getOptionalPrivateKey().isPresent());
   }
View Full Code Here

Examples of org.jclouds.ec2.compute.domain.PasswordDataAndPrivateKey

         computeService.destroyNode(node.getId());
         return;
      }

      // Now we can get the password data, decrypt it, and get a LoginCredentials instance
      PasswordDataAndPrivateKey dataAndKey = new PasswordDataAndPrivateKey(
         ec2Client.getWindowsServices().getPasswordDataInRegion(region, node.getProviderId()),
         node.getCredentials().getPrivateKey());
      WindowsLoginCredentialsFromEncryptedData f = context.getUtils().getInjector().getInstance(WindowsLoginCredentialsFromEncryptedData.class);
      LoginCredentials credentials = f.apply(dataAndKey);
View Full Code Here

Examples of org.jclouds.ec2.compute.domain.PasswordDataAndPrivateKey

      PasswordData passwordData = PasswordData.builder()
                                              .instanceId("i-2574e22a")
                                              .timestamp(dateService.iso8601DateParse("2012-07-30T07:27:23.000+0000"))
                                              .passwordData(ENCRYPTED_PASSWORD).build();

      LoginCredentials credentials = f.apply(new PasswordDataAndPrivateKey(passwordData, PRIVATE_KEY));

      assertEquals(credentials.getUser(), "Administrator");
      assertEquals(credentials.getPassword(), "u4.y9mb;nR.");
      assertFalse(credentials.getOptionalPrivateKey().isPresent());
   }
View Full Code Here

Examples of org.jclouds.ec2.compute.domain.PasswordDataAndPrivateKey

      // TODO: parameterize
      Predicate<String> passwordReadyRetryable = retry(passwordReady, 600, 10, SECONDS);

      logger.debug(">> awaiting password data for instance(%s/%s)", instance.getRegion(), instance.getId());
      if (passwordReadyRetryable.apply(instance.getId())) {
         credentials = pwDataToLoginCredentials.apply(new PasswordDataAndPrivateKey(data.get(), privateKey));
         logger.debug("<< obtained password data for instance(%s/%s)", instance.getRegion(), instance.getId());
      } else {
         logger.debug("<< unable to get password data for instance(%s/%s)", instance.getRegion(), instance.getId());
      }
      return credentials;
View Full Code Here

Examples of org.jclouds.ec2.compute.domain.PasswordDataAndPrivateKey

         computeService.destroyNode(node.getId());
         return;
      }

      // Now we can get the password data, decrypt it, and get a LoginCredentials instance
      PasswordDataAndPrivateKey dataAndKey = new PasswordDataAndPrivateKey(
         ec2Client.getWindowsServices().getPasswordDataInRegion(region, node.getProviderId()),
         node.getCredentials().getPrivateKey());
      WindowsLoginCredentialsFromEncryptedData f = context.getUtils().getInjector().getInstance(WindowsLoginCredentialsFromEncryptedData.class);
      LoginCredentials credentials = f.apply(dataAndKey);
View Full Code Here

Examples of org.jclouds.ec2.compute.domain.PasswordDataAndPrivateKey

      PasswordData passwordData = PasswordData.builder()
                                              .instanceId("i-2574e22a")
                                              .timestamp(dateService.iso8601DateParse("2012-07-30T07:27:23.000+0000"))
                                              .passwordData(ENCRYPTED_PASSWORD).build();

      LoginCredentials credentials = f.apply(new PasswordDataAndPrivateKey(passwordData, PRIVATE_KEY));

      assertEquals(credentials.getUser(), "Administrator");
      assertEquals(credentials.getOptionalPassword().get(), "u4.y9mb;nR.");
      assertFalse(credentials.getOptionalPrivateKey().isPresent());
   }
View Full Code Here

Examples of org.jclouds.ec2.compute.domain.PasswordDataAndPrivateKey

      // TODO: parameterize
      Predicate<String> passwordReadyRetryable = retry(passwordReady, 600, 10, SECONDS);

      logger.debug(">> awaiting password data for instance(%s/%s)", instance.getRegion(), instance.getId());
      if (passwordReadyRetryable.apply(instance.getId())) {
         credentials = pwDataToLoginCredentials.apply(new PasswordDataAndPrivateKey(data.get(), privateKey));
         logger.debug("<< obtained password data for instance(%s/%s)", instance.getRegion(), instance.getId());
      } else {
         logger.debug("<< unable to get password data for instance(%s/%s)", instance.getRegion(), instance.getId());
      }
      return credentials;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.