summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/interpreter.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fixing #615 (subclasses with similar names) by getting rid of the class ↵luke2007-05-031-26/+22
| | | | | | "type" and "fqname", and instead using "classname" everywhere. You should no longer see unqualified class/definition names anywhere. Also, rewriting how snippet tests work, to avoid creating all of the files, since the point was the parsing tests, not functional tests. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2458 980ebf18-57e1-0310-9a29-db15c13687c0
* Not stripping domain info from the ldap node, as requestedluke2007-04-301-4/+0
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2432 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding a migration to create indexesluke2007-03-211-1/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2342 980ebf18-57e1-0310-9a29-db15c13687c0
* Clarifying the errors a bit when nodes come from external sources.luke2007-03-191-4/+11
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2324 980ebf18-57e1-0310-9a29-db15c13687c0
* Removing extraneous debuggingluke2007-02-181-5/+0
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2215 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing a problem in collecting exported resources. Virtual resources worked ↵luke2007-02-181-1/+6
| | | | | | fine, but exported resources resulted in an essentially infinite loop. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2213 980ebf18-57e1-0310-9a29-db15c13687c0
* Revamping collections to get what is hopefully more reasonable behaviour ↵luke2007-02-161-7/+32
| | | | | | when they are used in combination with defined resource types. You should now be able to combine them in just about any way and get "correct" behaviour, which in this case means that you can have virtual definitions or definitions wrapping virtual resources and the resources will still all get realized. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2198 980ebf18-57e1-0310-9a29-db15c13687c0
* Moving some of the stand-alone classes into the util/ subdirectory, to clean ↵luke2007-02-071-2/+2
| | | | | | up the top-level namespace a bit. This is a lot of file modifications, but most of them just change class names and file paths. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2178 980ebf18-57e1-0310-9a29-db15c13687c0
* Further work on #407. I forgot to actually connect it to the interpreter ↵luke2007-01-051-0/+4
| | | | | | internals. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2050 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #407. You can use external_node to specify a command to retrieve ↵luke2007-01-051-1/+49
| | | | | | your node information. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2049 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding extra connection statements and enabling concurrency support in ↵luke2007-01-031-1/+3
| | | | | | rails, hopefully fixing #399. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2027 980ebf18-57e1-0310-9a29-db15c13687c0
* Trying to clean up how rails is loadedluke2006-12-291-9/+9
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1989 980ebf18-57e1-0310-9a29-db15c13687c0
* A couple of small bug-fixesluke2006-12-281-8/+2
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1976 980ebf18-57e1-0310-9a29-db15c13687c0
* Loading the rails lib early on, so that the rails configuration parameters ↵luke2006-12-231-1/+1
| | | | | | are accepted on the CLI, as noted in #357. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1968 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #343. Collections and definition evaluation both now happen on every ↵luke2006-12-231-15/+23
| | | | | | iterative evaluation, with collections being evaluated first. This way collections can find resources that either are inside defined types or are the types themselves. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1967 980ebf18-57e1-0310-9a29-db15c13687c0
* Not downcasing facts any longer, closing #210 (although not using the patch ↵luke2006-12-231-0/+12
| | | | | | from mpalmer, since I had not noticed the patch was there). Also, making all nodes, classes, and definitions case insensitive, closing #344. Finally, I added case insensitivity to the language in general, which should preserve backwards compatibility and probably makes the most sense in the long run anyway. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1964 980ebf18-57e1-0310-9a29-db15c13687c0
* All rails *and* language tests now pass, with the exception of a ↵luke2006-12-191-2/+2
| | | | | | language/resource test that passes by itself but fails when run as part of the whole suite. Also, I added deletion where appropriate, so that unspecified resources, parameters, and facts are now deleted, as one would expect. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1951 980ebf18-57e1-0310-9a29-db15c13687c0
* Requiring puppet/rails in the interpreter before Rails.initluke2006-12-171-0/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1945 980ebf18-57e1-0310-9a29-db15c13687c0
* Changing some of the error output. This gets rid of the duplicated ↵luke2006-12-151-7/+3
| | | | | | information that occurred when definitions or nodes were duplicately defined, and it tightens the error output a bit. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1938 980ebf18-57e1-0310-9a29-db15c13687c0
* New rails stuff redux.shadoi2006-12-141-1/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1925 980ebf18-57e1-0310-9a29-db15c13687c0
* Working some on the export/collect problem. It actually works now, but ↵luke2006-12-121-2/+3
| | | | | | there are not yet sufficient tests for it, so I will leave the bug open until we have got the new work in place. I also added a "rails" feature, so I do not have to keep testing whether ActiveRecord is defined. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1911 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #342. Classes needed to have their namespaces set to their fully ↵luke2006-11-171-1/+5
| | | | | | qualified names, so that contained code and definitions looked for definitions starting with that fq name. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1890 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing configuration storage -- there was a check being done that caused ↵luke2006-11-151-8/+11
| | | | | | false values to get converted to nil values, which failed in the database git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1885 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing virtual object collection. I apparently broke it when I added rails ↵luke2006-10-181-2/+4
| | | | | | collection back, and I never created any end-to-end tests. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1805 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing gennode; it was not actually adding the class code to the generated node.luke2006-10-161-13/+19
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1792 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing weird case where the default node is in one node source and the real ↵luke2006-10-051-8/+14
| | | | | | node is in a different one git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1734 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing ldap nodes -- they were always returning true because i was returning ↵luke2006-10-051-1/+5
| | | | | | an empty array for missing nodes. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1733 980ebf18-57e1-0310-9a29-db15c13687c0
* Merging the changes from the override-refactor branch. This is a ↵luke2006-10-041-374/+685
| | | | | | 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
* Trying to fix a bug where files other than site.pp do not get noticed for ↵luke2006-09-191-12/+5
| | | | | | 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-151-4/+1
| | | | | | 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-151-12/+0
| | | | | | #271. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1610 980ebf18-57e1-0310-9a29-db15c13687c0
* This commit adds two important features (but which probably were notluke2006-09-151-0/+12
| | | | | | | | | | | | | | | | | | | | | | | 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-031-1/+1
| | | | | | some naming conflicts git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1544 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
* Fixing bug in scope/interpreter where nodes found in ldap must have parent ↵luke2006-07-181-0/+4
| | | | | | 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
* Adding minimal update checking for templates. It will only check the ↵luke2006-07-031-63/+92
| | | | | | 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
* 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
* 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-131-6/+21
| | | | 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
* Wrapping the host storage into a transaction. It might have a slight ↵luke2006-05-151-9/+15
| | | | | | performance improvement, but, ah, unlikely. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1200 980ebf18-57e1-0310-9a29-db15c13687c0