summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser
Commit message (Collapse)AuthorAgeFilesLines
...
* Removing some left-over debuggingluke2006-10-041-4/+0
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1727 980ebf18-57e1-0310-9a29-db15c13687c0
* Merging the changes from the override-refactor branch. This is a ↵luke2006-10-0432-3668/+3781
| | | | | | significant rewrite of the parser, but it has little affect on the rest of the code tree. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1726 980ebf18-57e1-0310-9a29-db15c13687c0
* - New type Notify for sending client-side log messagesajax2006-09-291-0/+7
| | | | | | | | | | | type.rb type/notify.rb - Added server-side functions named after each of the syslog log levels (debug, info, notice, warning, err, crit, alert, and emerg) parser/functions.rb git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1707 980ebf18-57e1-0310-9a29-db15c13687c0
* adding an extra make target for debugging, rather than defaulting to always ↵luke2006-09-202-2/+5
| | | | | | creating the debug file git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1637 980ebf18-57e1-0310-9a29-db15c13687c0
* Trying to fix a bug where files other than site.pp do not get noticed for ↵luke2006-09-193-54/+41
| | | | | | reparsing git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1621 980ebf18-57e1-0310-9a29-db15c13687c0
* Using the "trace" configuration parameter to determine whether a stack trace ↵luke2006-09-1512-23/+17
| | | | | | should be printed, rather than just using "debug". I added the param a little while ago and was using it internally in Puppet::DevError, but I just now went through the whole configuration and switched to using it. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1613 980ebf18-57e1-0310-9a29-db15c13687c0
* Reverting the work done in [1605] and [1606]. I have added it as a patch in ↵luke2006-09-155-765/+554
| | | | | | #271. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1610 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding the feature from #259. I had to rework the Scope#lookupvar a bit, ↵luke2006-09-151-4/+14
| | | | | | but everything now works as expected when variables are either undefined or set to empty strings. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1609 980ebf18-57e1-0310-9a29-db15c13687c0
* This commit adds two important features (but which probably were notluke2006-09-155-554/+765
| | | | | | | | | | | | | | | | | | | | | | | worth the priority I suddenly placed on them). First, it adds search paths as I originally requested in #114. There is now a 'lib' setting, which can be used to tell Puppet where to find manifests. Any file you tell Puppet to parse will have its directory automatically added to the lib path. Also, Puppet will check the PUPPETLIB environment variable for further directories to search. Second, it converts the 'import' mechanism into a normal function, which means that you can now use variables and what-have-you in it. Of course, this function uses the lib mechanism. This is something that's always bothered me about the language, and having it fixed means you can do simple things like have custom code in the top scope for each operating system and then do "import os/$operatingsystem" to evaluate that code. Without this, you would either need a huge case statement or the code would need to be in a class, which often isn't sufficient. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1605 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing the interpreter to nodesearch across all listed names, just like is ↵luke2006-09-131-11/+13
| | | | | | done in the manifests. Also fixing a comment in type.rb git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1586 980ebf18-57e1-0310-9a29-db15c13687c0
* Renaming parsedfile to loadedfile, which makes much more sense and reduces ↵luke2006-09-033-7/+7
| | | | | | some naming conflicts git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1544 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding eat-last-line support in ERBluke2006-09-031-1/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1542 980ebf18-57e1-0310-9a29-db15c13687c0
* downgrading the template interpolation messageluke2006-08-301-1/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1517 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding automatic stacktrace printing to deverror. I need to go through and ↵luke2006-08-291-4/+1
| | | | | | remove the redundant puts in the rest of the code, but I need this now for some client debugging git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1515 980ebf18-57e1-0310-9a29-db15c13687c0
* Tracking down some weird bugs that managed to creep into the parser. I ↵luke2006-08-286-254/+267
| | | | | | expect that the main ones were a result of the If support. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1494 980ebf18-57e1-0310-9a29-db15c13687c0
* Committing definition inheritance. I have not yet written tests yet, but my ↵luke2006-08-2210-272/+415
| | | | | | last commit pretty seriously broke some things without me realizing it, so I wanted to get this in. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1484 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding "if/else" constructs. No operators, no elsif, but it is a good ↵luke2006-08-227-1098/+796
| | | | | | start, anyway. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1483 980ebf18-57e1-0310-9a29-db15c13687c0
* Function autoloading now works as requested in #214.luke2006-08-221-3/+19
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1482 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding warnings and error throwing for #218 -- metaparams in prototypes are ↵luke2006-08-211-1/+29
| | | | | | treated specially. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1481 980ebf18-57e1-0310-9a29-db15c13687c0
* Committing changes that require dollar signs in prototypesluke2006-08-144-195/+280
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1468 980ebf18-57e1-0310-9a29-db15c13687c0
* First round of bugfixes in preparation for 0.18.4luke2006-07-211-11/+4
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1421 980ebf18-57e1-0310-9a29-db15c13687c0
* Apparently objects were legal rvalues, which does not make any sense. Fixed ↵luke2006-07-212-302/+292
| | | | | | this, and added a test verify. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1418 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing bug in scope/interpreter where nodes found in ldap must have parent ↵luke2006-07-182-1/+5
| | | | | | nodes. The problem was that the the scope was using the presence of a parent node to determine whether a node was found. Instead I added a flag in the arguments to "Scope#evaluate" to mark nodes as found. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1401 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding a unit test for plain "nodesearch"luke2006-07-181-0/+10
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1400 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing templating so it immediately fails when a variable is not found, as ↵luke2006-07-111-4/+19
| | | | | | opposed to passing up the method_missing heirarchy, which was causing a nasty memory leak and some kind of weird, long-running search git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1389 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing templating bug that can result in what looks like an infinite loop, ↵luke2006-07-111-1/+7
| | | | | | and changing default timeout to 2 minutes instead of 30 seconds git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1385 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing error when template does not existluke2006-07-112-1/+2
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1383 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding minimal update checking for templates. It will only check the ↵luke2006-07-032-63/+97
| | | | | | templates that have been parsed in this process, but it is better than nothing. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1353 980ebf18-57e1-0310-9a29-db15c13687c0
* Trying to merge metrics and reports. There is now a separate transaction ↵luke2006-06-301-2/+2
| | | | | | report class, and it works throughout the previously existing system. I will next go through trying to make a metric report that graphs the metrics in rrd. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1347 980ebf18-57e1-0310-9a29-db15c13687c0
* Moving the template handling into a simple wrapper object so templates don't ↵luke2006-06-302-21/+40
| | | | | | have full access to the scope object without some real hacking. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1342 980ebf18-57e1-0310-9a29-db15c13687c0
* adding some tests for the template functionluke2006-06-291-1/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1341 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding initial template support. It is just a function, and a ↵luke2006-06-292-1/+37
| | | | | | method_missing method on Scope. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1340 980ebf18-57e1-0310-9a29-db15c13687c0
* Making sure fail function converts everything to stringsluke2006-06-271-2/+2
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1323 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding "fail" function, which will raise a ParseError if it is encountered.luke2006-06-271-0/+5
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1322 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #182. Added a retry section to try reconnecting to ldap. Only one ↵luke2006-06-201-1/+9
| | | | | | reconnect is attempted in a given search, and LDAP produces bad enough error messages that we reconnect regardless of the error thrown. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1305 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding test and fix for empty execs being ignoredluke2006-06-151-3/+5
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1288 980ebf18-57e1-0310-9a29-db15c13687c0
* fixing interpreter to initialize ldap in the nodesearch_ldap method, which ↵luke2006-06-151-3/+5
| | | | | | really only matters for testing (since it is already being inited in the nodesearch method git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1287 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing some logging issues with puppetmasterd when daemonized with verbose ↵luke2006-06-141-11/+22
| | | | | | mode on, and fixing ldap support when daemonizing git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1276 980ebf18-57e1-0310-9a29-db15c13687c0
* abstracting out ldap connections so that there is a single method ↵luke2006-06-131-12/+22
| | | | | | responsible for all of them and a single connection can be shared in all classes if necessary git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1270 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing ldap usage when ldap libs are not availableluke2006-06-131-20/+28
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1268 980ebf18-57e1-0310-9a29-db15c13687c0
* removing extraneous debuggingluke2006-06-131-2/+0
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1267 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding support for default nodes as requested in #136.luke2006-06-134-212/+261
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1261 980ebf18-57e1-0310-9a29-db15c13687c0
* A round of bug-fixing in preparation for the next release.luke2006-06-131-1/+17
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1256 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing ldap node lookup. The test was set up badly, in that it did not ↵luke2006-06-121-3/+11
| | | | | | actually provide a way to enable ldap node support, even though there was a config option that should have worked. All works now. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1254 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding support for following referralsluke2006-06-121-0/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1252 980ebf18-57e1-0310-9a29-db15c13687c0
* Found a bug where single-value selectors can fail on a second compile. ↵luke2006-06-092-1/+7
| | | | | | Fixed it, and am now compiling all snippets twice. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1250 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #166. Function names are no longer reserved words.luke2006-06-083-420/+411
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1245 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #155. It is now valid to have arrays with no values, although you ↵luke2006-06-082-171/+187
| | | | | | will still likely get erratic behaviour elsewhere in the system, depending on what you do with this. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1240 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #163. Strings can now correctly escape dollar signs.luke2006-06-051-12/+8
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1234 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #160. Fixing the error in Puppet::Type#[]= and scope.newobjectluke2006-06-011-5/+11
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1230 980ebf18-57e1-0310-9a29-db15c13687c0