Package org.platformlayer.ops

Examples of org.platformlayer.ops.SshOpsTarget


    return false;
  }

  public static AsBlock find(OpsTarget target) {
    SshOpsTarget sshOpsTarget = (SshOpsTarget) target;
    InetAddress host = sshOpsTarget.getHost();

    AsBlock asBlock = find(host);

    if (asBlock == null) {
      log.warn("Could not determine AS-Block for: " + host.getHostAddress() + " (" + target + ")");
View Full Code Here


    try {
      final File tempDest = new File(tempDir, finalDestFile.getName());

      {
        SshOpsTarget srcSshOpsTarget = (SshOpsTarget) src;

        String sshSrc = srcSshOpsTarget.getUsername() + "@";
        InetAddress srcHost = srcSshOpsTarget.getHost();
        if (InetAddressUtils.isIpv6(srcHost)) {
          sshSrc += "[" + InetAddresses.toAddrString(srcHost) + "]";
        } else {
          sshSrc += InetAddresses.toAddrString(srcHost);
        }
        sshSrc += ":" + srcFile.getAbsolutePath();

        Command pullCommand = Command.build("scp -o StrictHostKeyChecking=no {0} {1}", sshSrc, tempDest);

        pullCommand.setKeyPair(srcSshOpsTarget.getKeyPair());

        dest.executeCommand(pullCommand.setTimeout(TimeSpan.TEN_MINUTES));

        Md5Hash targetHash = dest.getFileHash(tempDest);
        Md5Hash srcHash = src.getFileHash(srcFile);
View Full Code Here

TOP

Related Classes of org.platformlayer.ops.SshOpsTarget

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.