Examples of JschSshClientModule


Examples of org.jclouds.ssh.jsch.config.JschSshClientModule

               throw new RuntimeException("command " + command + " not stubbed");
            }

         };
      } else {
         Injector i = Guice.createInjector(new JschSshClientModule(), new SLF4JLoggingModule());
         SshClient.Factory factory = i.getInstance(SshClient.Factory.class);
         SshClient connection;
         if (Strings.emptyToNull(sshKeyFile) != null) {
            connection = factory.create(HostAndPort.fromParts(sshHost, port), LoginCredentials.builder().user(sshUser)
                  .privateKey(Files.toString(new File(sshKeyFile), Charsets.UTF_8)).build());
View Full Code Here

Examples of org.jclouds.ssh.jsch.config.JschSshClientModule

public class ComputeServiceContextBuilder {

  public static ComputeServiceContext build(ClusterSpec spec) throws IOException {
    Configuration jcloudsConfig =
      spec.getConfigurationForKeysWithPrefix("jclouds");
    Set<AbstractModule> wiring = ImmutableSet.of(new JschSshClientModule(),
      new Log4JLoggingModule());

    return new ComputeServiceContextFactory().createContext(spec.getProvider(),
      spec.getIdentity(), spec.getCredential(),
      wiring, ConfigurationConverter.getProperties(jcloudsConfig));
View Full Code Here

Examples of org.jclouds.ssh.jsch.config.JschSshClientModule

* A convenience class for building jclouds {@link ComputeServiceContext} objects.
*/
public class ComputeServiceContextBuilder {

  public static ComputeServiceContext build(ClusterSpec spec) throws IOException {
    Set<AbstractModule> wiring = ImmutableSet.of(new JschSshClientModule(),
      new Log4JLoggingModule());

    ComputeServiceContext context = new ComputeServiceContextFactory()
      .createContext(spec.getProvider(), spec.getIdentity(), spec.getCredential(),
        wiring);
View Full Code Here

Examples of org.jclouds.ssh.jsch.config.JschSshClientModule

            .builder().user("username").password("password").build()));
      return ssh;
   }

   protected Module module() {
      return new JschSshClientModule();
   }
View Full Code Here

Examples of org.jclouds.ssh.jsch.config.JschSshClientModule

               throw new RuntimeException("command " + command + " not stubbed");
            }

         };
      } else {
         Injector i = Guice.createInjector(new JschSshClientModule(), new SLF4JLoggingModule());
         SshClient.Factory factory = i.getInstance(SshClient.Factory.class);
         SshClient connection;
         if (Strings.emptyToNull(sshKeyFile) != null) {
            connection = factory.create(HostAndPort.fromParts(sshHost, port), LoginCredentials.builder().user(sshUser)
                  .privateKey(Files.toString(new File(sshKeyFile), Charsets.UTF_8)).build());
View Full Code Here

Examples of org.jclouds.ssh.jsch.config.JschSshClientModule

      assertEquals(getCores(defaultTemplate.getHardware()), 0.5d);
   }

   @Override
   protected JschSshClientModule getSshModule() {
      return new JschSshClientModule();
   }
View Full Code Here

Examples of org.jclouds.ssh.jsch.config.JschSshClientModule

   
    public void start() {
        Properties props = new Properties();
        props.put(EC2Constants.PROPERTY_EC2_AMI_OWNERS, "");
        m_computeServiceContext = new ComputeServiceContextFactory().createContext("aws-ec2",
                m_accessKeyId, m_secretAccessKey, (List) Arrays.asList(new JschSshClientModule()), props);
    }
View Full Code Here

Examples of org.jclouds.ssh.jsch.config.JschSshClientModule

    public synchronized ComputeService getJcloudsComputeService() {
        if (jcloudsComputeService == null) {
            String username = awsCredentialsProvider.getCredentials().getAWSAccessKeyId();
            String password = awsCredentialsProvider.getCredentials().getAWSSecretKey();
            ComputeServiceContext jcloudsContext = ContextBuilder.newBuilder("ec2").credentials(username, password)
                    .modules(ImmutableSet.<Module>of(new SLF4JLoggingModule(), new JschSshClientModule()))
                    .buildView(ComputeServiceContext.class);

            this.jcloudsComputeService = jcloudsContext.getComputeService();
        }
View Full Code Here

Examples of org.jclouds.ssh.jsch.config.JschSshClientModule

          assertEquals(defaultTemplate.getSize().getCores(), 1.0d);
       }

       @Override
       protected JschSshClientModule getSshModule() {
          return new JschSshClientModule();
       }
View Full Code Here

Examples of org.jclouds.ssh.jsch.config.JschSshClientModule

      assertEquals(getCores(defaultTemplate.getHardware()), 0.5d);
   }

   @Override
   protected JschSshClientModule getSshModule() {
      return new JschSshClientModule();
   }
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.