Package com.xebialabs.overthere

Examples of com.xebialabs.overthere.OverthereConnection.execute()


    options.set(PASSWORD, "secret");
    options.set(OPERATING_SYSTEM, UNIX);
    options.set(CONNECTION_TYPE, SFTP);
    OverthereConnection connection = Overthere.getConnection("ssh", options);
    try {
      connection.execute(CmdLine.build("cp", "/etc/motd", "/tmp/motd1"));
      OverthereFile motd1 = connection.getFile("/tmp/motd1");
      OverthereFile motd2 = connection.getFile("/tmp/motd2");
      motd2.delete();

      System.err.println("Exists #1: " + motd1.exists());
View Full Code Here


    options.set(OPERATING_SYSTEM, WINDOWS);
    options.set(CONNECTION_TYPE, TELNET);
    OverthereConnection connection = Overthere.getConnection("cifs", options);

    try {
      connection.execute(CmdLine.build("type", "\\windows\\system32\\drivers\\etc\\hosts"));
    } finally {
      connection.close();
    }
  }
View Full Code Here

    options.set(PASSWORD, "secret");
    options.set(OPERATING_SYSTEM, UNIX);
    options.set(CONNECTION_TYPE, SFTP);
    OverthereConnection connection = Overthere.getConnection("ssh", options);
    try {
      connection.execute(CmdLine.build("cat", "/etc/motd"));
    } finally {
      connection.close();
    }
  }
View Full Code Here

    options.set(PASSWORD, "secret");
    options.set(OPERATING_SYSTEM, UNIX);
    options.set(CONNECTION_TYPE, SFTP);
    OverthereConnection connection = Overthere.getConnection("ssh", options);
    try {
      connection.execute(CmdLine.build("cp", "-r", "/var/log/apt", "/tmp/logs1"));
      OverthereFile logs1 = connection.getFile("/tmp/logs1");
      OverthereFile logs2 = connection.getFile("/tmp/logs2");
      logs2.delete();

      System.err.println("Exists #1: " + logs1.exists());
View Full Code Here

        w.println("An Overthere a day keeps the doctor away");
        w.println("Written on " + new java.util.Date() + " from " + InetAddress.getLocalHost() + " running " + System.getProperty("os.name") + " " + System.getProperty("os.version"));
      } finally {
        w.close();
      }
      connection.execute(CmdLine.build("cat", "/tmp/new-motd"));
    } finally {
      connection.close();
    }
  }
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.