Package org.platformlayer.ops.templates

Examples of org.platformlayer.ops.templates.TemplateDataSource


    {
      ConfigIso iso = injected(ConfigIso.class);
      iso.isoFile = getConfigIsoPath();
      iso.buildDir = new File(getInstanceDir(), "config_iso_src");
      iso.model = new TemplateDataSource() {
        @Override
        public void buildTemplateModel(Map<String, Object> model) throws OpsException {
          InterfaceModel eth0 = InterfaceModel.build("eth0");
          AddressModel ipv4 = address4.get();
          eth0.addAddress(ipv4);
View Full Code Here


      script.configure(model, service);
    }
  }

  private TemplateDataSource buildDeviceConfigModel() {
    return new TemplateDataSource() {
      @Override
      public void buildTemplateModel(Map<String, Object> model) throws OpsException {
        model.put("instance", ManagedKvmInstance.this);

        model.put("nics", nics);
View Full Code Here

    addChild(DefaultAptSourcesConfigurationFile.class);

    {
      File aptConfDir = new File("/etc/apt/apt.conf.d");

      TemplateDataSource template = new TemplateDataSource() {
        @Override
        public void buildTemplateModel(Map<String, Object> model) throws OpsException {
        }
      };
      addChild(TemplatedFile.build(template, new File(aptConfDir, "90-install-recommends")));
View Full Code Here

    return Utf8.getBytes(templateString);
  }

  protected Map<String, Object> buildModel() throws OpsException {
    Map<String, Object> model = Maps.newHashMap();
    TemplateDataSource templateDataSource = getTemplateDataSource();
    if (templateDataSource != null) {
      templateDataSource.buildTemplateModel(model);
    }
    return model;
  }
View Full Code Here

TOP

Related Classes of org.platformlayer.ops.templates.TemplateDataSource

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.