Package org.platformlayer.ops.filesystem

Examples of org.platformlayer.ops.filesystem.TemplatedFile


    addChild(SysctlSetting.build("net.ipv6.conf.all.forwarding", "1"));
    addChild(SysctlSetting.build("net.ipv6.conf.all.proxy_ndp", "1"));

    {
      File scriptPath = new File("/etc/network/if-up.d/nat-for-bridge");
      TemplatedFile nat = addChild(TemplatedFile.build(template, scriptPath));
      nat.setFileMode("0755");

      // Simulate an ifup run
      Command command = Command.build(scriptPath);
      CommandEnvironment env = new CommandEnvironment();
      env.put("IFACE", template.getPublicInterface());
      env.put("MODE", "start");
      env.put("ADDRFAM", "inet");
      command.setEnvironment(env);

      nat.setUpdateAction(command);
    }
  }
View Full Code Here


  }

  @Override
  protected void addChildren() throws OpsException {
    File confDir = new File("/etc/collectd/conf");
    TemplatedFile confFile = TemplatedFile.build(Injection.getInstance(CollectdModelBuilder.class), new File(
        confDir, getMetricKey() + ".conf"));
    addChild(confFile);
  }
View Full Code Here

TOP

Related Classes of org.platformlayer.ops.filesystem.TemplatedFile

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.