Package org.platformlayer.ops

Examples of org.platformlayer.ops.CommandEnvironment


    }

    if (InetAddressUtils.isPublic(host)) {
      CurlRequest curlRequest = new CurlRequest(uri);
      curlRequest.bareRequest = true;
      CommandEnvironment commandEnvironment = httpProxies.getHttpProxyEnvironment(target, Usage.General, uri);

      Command curlCommand = curlRequest.toCommand();
      curlCommand.addLiteral(">");
      curlCommand.addFile(remoteFilePath);
      curlCommand.setEnvironment(commandEnvironment);
View Full Code Here


      target.mkdir(remoteFilePath.getParentFile());

      CurlRequest curlRequest = new CurlRequest(url);
      curlRequest.bareRequest = true;

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

      Command curlCommand = curlRequest.toCommand();
      curlCommand.addLiteral(">");
      curlCommand.addFile(remoteFilePath);
      curlCommand.setEnvironment(commandEnvironment);
View Full Code Here

          @Override
          public void execute(OpsTarget target, ManagedFilesystemItem managedFilesystemItem)
              throws OpsException {
            if (managedFilesystemItem.getNewFileWasCreated()) {
              // Set the parameters the ifup sets
              CommandEnvironment env = new CommandEnvironment();
              env.put("MODE", "start");
              env.put("IFACE", "--all");
              env.put("ADDRFAM", "meta");

              Command runLockdown = Command.build("/etc/network/if-pre-up.d/iptables-lockdown");
              runLockdown.setEnvironment(env);
              target.executeCommand(runLockdown);
            }
View Full Code Here

TOP

Related Classes of org.platformlayer.ops.CommandEnvironment

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.