Examples of ISshContext


Examples of org.platformlayer.ops.ssh.ISshContext

    // throw new OpsException("Unknown compute.type value: " + type);
  }

  private SshConnection getSshConnection(String host, String user, KeyPair sshKeyPair) throws OpsException {
    OpsSystem opsSystem = OpsContext.get().getOpsSystem();
    ISshContext sshContext = opsSystem.getSshContext();

    SshConnection sshConnection = sshContext.getSshConnection(user);
    try {
      sshConnection.setHost(InetAddress.getByName(host));
    } catch (UnknownHostException e) {
      throw new OpsException("Error resolving address: " + host, e);
    }
View Full Code Here

Examples of org.platformlayer.ops.ssh.ISshContext

public abstract class MachineBase extends Machine {
  @Override
  public OpsTarget getTarget(String user, KeyPair sshKeyPair) throws OpsException {
    OpsSystem opsSystem = OpsContext.get().getOpsSystem();
    ISshContext sshContext = opsSystem.getSshContext();

    SshConnection sshConnection = sshContext.getSshConnection(user);

    String address = getNetworkPoint().getBestAddress(NetworkPoint.forMe());
    try {
      sshConnection.setHost(InetAddress.getByName(address));
    } catch (UnknownHostException e) {
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.