Examples of SshjSshClientModule


Examples of org.jclouds.sshj.config.SshjSshClientModule

      provider = "elb";
   }

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

Examples of org.jclouds.sshj.config.SshjSshClientModule

            props.setProperty(AWSEC2Constants.PROPERTY_EC2_AMI_QUERY, "owner-id=" + m_ImageOwnerId + ";state=available;image-type=machine;root-device-type=ebs");
            props.setProperty(AWSEC2Constants.PROPERTY_EC2_CC_AMI_QUERY, "");
        }
       
        Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
        m_computeServiceContext = ContextBuilder.newBuilder("aws-ec2").credentials(m_accessKeyId, m_secretAccessKey).modules(ImmutableSet.<Module>of(new SshjSshClientModule())).overrides(props).build(ComputeServiceContext.class);
        //m_computeServiceContext = new ComputeServiceContextFactory().createContext("aws-ec2", m_accessKeyId, m_secretAccessKey, ImmutableSet.<Module>of(new SshjSshClientModule()), props);
    }
View Full Code Here

Examples of org.jclouds.sshj.config.SshjSshClientModule

      provider = "ec2";
   }

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

Examples of org.jclouds.sshj.config.SshjSshClientModule

      client.destroyDrive(drive.getUuid());
      assertEquals(client.getDriveInfo(drive.getUuid()), null);
   }

   protected void doConnectViaSsh(Server server, LoginCredentials creds) throws IOException {
      SshClient ssh = Guice.createInjector(new SshjSshClientModule()).getInstance(SshClient.Factory.class).create(
               HostAndPort.fromParts(server.getVnc().getIp(), 22), creds);
      try {
         ssh.connect();
         ExecResponse hello = ssh.exec("echo hello");
         assertEquals(hello.getOutput().trim(), "hello");
View Full Code Here

Examples of org.jclouds.sshj.config.SshjSshClientModule

      if ("stub".equals(spec.getProvider())) {
        modules = ImmutableSet.<Module>of(new SLF4JLoggingModule(), new DryRunModule());
      } else {
        modules = ImmutableSet.<Module>of(new SLF4JLoggingModule(),
            new EnterpriseConfigurationModule(), new SshjSshClientModule());
      }
    }
View Full Code Here

Examples of org.jclouds.sshj.config.SshjSshClientModule

            properties.put(entry.getKey(), entry.getValue());
        }

        // set modules
        Iterable<Module> modules =
            ImmutableSet.<Module> of(new SshjSshClientModule(), new SLF4JLoggingModule(),
                                     new EnterpriseConfigurationModule());

        // build context
        ContextBuilder builder =
            ContextBuilder.newBuilder(iaas.getProvider())
View Full Code Here

Examples of org.jclouds.sshj.config.SshjSshClientModule

               }
               throw new RuntimeException("command " + command + " not stubbed");
            }
         };
      } else {
         Injector i = Guice.createInjector(new SshjSshClientModule(), 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.sshj.config.SshjSshClientModule

      super.testDestroyNodes();
   }

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

Examples of org.jclouds.sshj.config.SshjSshClientModule

      super.tearDown();
   }

   @Override
   protected Iterable<Module> setupModules() {
      return ImmutableSet.<Module> of(getLoggingModule(), new SshjSshClientModule());
   }
View Full Code Here

Examples of org.jclouds.sshj.config.SshjSshClientModule

      provider = "gogrid";
   }

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