Package com.elastisys.scale.commons.net.ssh

Examples of com.elastisys.scale.commons.net.ssh.SshCommandResult


    RetryableRequest<SshCommandResult> sshCommand = new RetryableRequest<SshCommandResult>(
        new SshCommandRequester(publicIp, this.sshPort, this.sshUser,
            this.sshKeyPath, this.command), new RetrySshCommand(
            this.maxRetries, delayInMillis), this.taskName);
    SshCommandResult response = sshCommand.call();
    return response;
  }
View Full Code Here


      if (livenessTestResult.getError().isPresent()) {
        alert = alert.withTag("commandError", livenessTestResult
            .getError().get().getMessage());
      }
      if (livenessTestResult.getCommandResult().isPresent()) {
        SshCommandResult command = livenessTestResult
            .getCommandResult().get();
        alert = alert.withTag("commandExitCode",
            String.valueOf(command.getExitStatus()));
        alert = alert.withTag("commandStdout", command.getStdout());
        alert = alert.withTag("commandStderr", command.getStderr());
      }
      this.eventBus.post(alert);
    }
  }
View Full Code Here

    public LivenessTestResult call() throws Exception {
      Machine machine = this.livenessCheckTask.getMachine();

      LivenessTestResult result = null;
      try {
        SshCommandResult commandResult = this.livenessCheckTask.call();
        LivenessState state = (commandResult.getExitStatus() == 0) ? LivenessState.LIVE
            : LivenessState.UNHEALTHY;
        result = new LivenessTestResult(machine, state, commandResult);
      } catch (Exception e) {
        LOG.warn("liveness check failed: {}", e.getMessage());
        result = new LivenessTestResult(machine,
View Full Code Here

TOP

Related Classes of com.elastisys.scale.commons.net.ssh.SshCommandResult

Copyright © 2018 www.massapicom. 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.