Package org.platformlayer.ops

Examples of org.platformlayer.ops.Command.addFile()


      command.addLiteral("-w"); // Simple auth password
      command.addQuoted(password);

      command.addLiteral("-f"); // Command file
      command.addFile(ldifTempFile);

      target.executeCommand(command);
    } finally {
      target.rmdir(ldifTempDir);
    }
View Full Code Here


    if (rebuild) {
      Command mkisoCommand = Command.build("genisoimage -input-charset utf-8 -R -o {0}", iso);
      if (volumeLabel != null) {
        mkisoCommand.addLiteral("-V").addQuoted(volumeLabel);
      }
      mkisoCommand.addFile(srcDir);

      target.executeCommand(mkisoCommand);
    }
  }
}
View Full Code Here

      command.addLiteral("--variant=fakechroot");
      // command.addLiteral("--variant=minbase");
    }
    command.addQuoted("--include=", Joiner.on(",").join(packages));
    command.addLiteral(operatingSystem.getVersion());
    command.addFile(rootfsDir);
    // command.addQuoted(aptSource);

    command.setEnvironment(httpProxyEnv);

    command.setTimeout(TimeSpan.THIRTY_MINUTES);
View Full Code Here

    CurlRequest curlRequest = session.toCurlRequest(request);
    curlRequest.bareRequest = true;

    Command curlCommand = curlRequest.toCommand();
    curlCommand.addLiteral(">");
    curlCommand.addFile(targetPath);

    ProcessExecution execution = target.executeCommand(curlCommand);

    // CurlResult curlResult = curlRequest.parseResponse(execution);
    //
View Full Code Here

      curlRequest.bareRequest = true;
      CommandEnvironment commandEnvironment = httpProxies.getHttpProxyEnvironment(target, Usage.General, uri);

      Command curlCommand = curlRequest.toCommand();
      curlCommand.addLiteral(">");
      curlCommand.addFile(remoteFilePath);
      curlCommand.setEnvironment(commandEnvironment);
      curlCommand.setTimeout(TimeSpan.FIVE_MINUTES);

      target.executeCommand(curlCommand);
    } else {
View Full Code Here

      CommandEnvironment commandEnvironment = httpProxies.getHttpProxyEnvironment(target, Usage.General, url);

      Command curlCommand = curlRequest.toCommand();
      curlCommand.addLiteral(">");
      curlCommand.addFile(remoteFilePath);
      curlCommand.setEnvironment(commandEnvironment);
      curlCommand.setTimeout(TimeSpan.FIVE_MINUTES);

      // TODO: Can we cache into CAS instead??
      log.info("Not found in CAS system; downloading directly: " + url);
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.