Package com.puppetlabs.geppetto.pp.pptp

Examples of com.puppetlabs.geppetto.pp.pptp.TPVariable


      facter.setLabel("Facter");
      facter.setVersion(getVersionString());

      for(Entry<String, String> entry : getRegularFactMap().entrySet()) {
        TPVariable var = PPTPFactory.eINSTANCE.createTPVariable();
        var.setName(entry.getKey());
        var.setAssignable(true);
        var.setDeprecated(false);
        var.setDocumentation(entry.getValue());
        facter.getContents().add(var);
      }
      for(Entry<String, String> entry : getArgumentedFactMap().entrySet()) {
        TPVariable var = PPTPFactory.eINSTANCE.createTPVariable();
        var.setName(entry.getKey());
        var.setAssignable(true);
        var.setDeprecated(false);
        var.setDocumentation(entry.getValue());
        var.setPattern(patternForVariable(entry.getKey()));
        facter.getContents().add(var);
      }
      return facter;
    }
View Full Code Here


    rubyProviderFactory = factory;
  }

  private TPVariable addTPVariable(ITargetElementContainer container, String name, String documentation,
      boolean deprecated) {
    TPVariable var = PPTPFactory.eINSTANCE.createTPVariable();
    var.setName(name);
    var.setDocumentation(documentation);
    var.setAssignable(false);
    var.setDeprecated(deprecated);
    container.getContents().add(var);
    return var;
  }
View Full Code Here

    }
    return result;
  }

  public void loadPuppetVariables(TargetEntry target) {
    TPVariable var = PPTPFactory.eINSTANCE.createTPVariable();
    var.setName("environment");
    var.setDocumentation("The node's current environment. Available when compiling a catalog for a node.");
    var.setDeprecated(false);
    target.getContents().add(var);

    var = PPTPFactory.eINSTANCE.createTPVariable();
    var.setName("clientcert");
    var.setDocumentation("The node's certname setting. Available when compiling a catalog for a node.");
    var.setDeprecated(false);
    target.getContents().add(var);

    var = PPTPFactory.eINSTANCE.createTPVariable();
    var.setName("clientversion");
    var.setDocumentation("The current version of the puppet agent. Available when compiling a catalog for a node.");
    var.setDeprecated(false);
    target.getContents().add(var);

    var = PPTPFactory.eINSTANCE.createTPVariable();
    var.setName("servername");
    var.setDocumentation(Joiner.on("").join(
      ImmutableList.of(
        "The puppet master’s fully-qualified domain name. (Note that this information ",
        "is gathered from the puppet master by Facter, rather than read from the config files; even if the ",
        "master’s certname is set to something other than its fully-qualified domain name, this variable ",
        "will still contain the server’s fqdn.)")));
    var.setDeprecated(false);
    target.getContents().add(var);

    var = PPTPFactory.eINSTANCE.createTPVariable();
    var.setName("serverip");
    var.setDocumentation("The puppet master's IP address");
    var.setDeprecated(false);
    target.getContents().add(var);

    var = PPTPFactory.eINSTANCE.createTPVariable();
    var.setName("serverversion");
    var.setDocumentation("The current version of puppet on the puppet master.");
    var.setDeprecated(false);
    target.getContents().add(var);

  }
View Full Code Here

    settings.setName("settings");
    target.getContents().add(settings);

    // Create a wildcard to match all settings::*
    //
    TPVariable wildcard = PPTPFactory.eINSTANCE.createTPVariable();
    wildcard.setName("*");
    wildcard.setAssignable(false);
    settings.getContents().add(wildcard);

    // Add known names in settings (the most common ones). This to avoid
    // warnings
    //
View Full Code Here

        if(p.isNamevar())
          data.put(PPDSLConstants.PARAMETER_NAMEVAR, "true");
        return data;
      }
      if(eObject.eClass() == PPTPPackage.Literals.TP_VARIABLE) {
        TPVariable tpvar = (TPVariable) eObject;
        String pattern = tpvar.getPattern();
        if(pattern != null && pattern.length() > 0) {
          data.put(PPDSLConstants.VARIABLE_PATTERN, pattern);
        }
        return data;
      }
View Full Code Here

TOP

Related Classes of com.puppetlabs.geppetto.pp.pptp.TPVariable

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.