summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixing #161. Basically, AST::ObjectDef now catches when users specify a ↵luke2006-06-011-8/+25
| | | | | | name as a parameter instead of the name before the colon and modify the results accordingly. This catches this kind of problem, and the normal name handling picks up everything else. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1229 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #162. Node names must now be comma-separated.luke2006-05-312-191/+200
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1228 980ebf18-57e1-0310-9a29-db15c13687c0
* Allowing empty filesluke2006-05-182-446/+453
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1207 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #146. I think I mostly just fixed the error message; I do not think ↵luke2006-05-182-34/+32
| | | | | | there was another bug there. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1206 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
* I believe I have finalized export/collection support. I still want to go ↵luke2006-05-152-27/+83
| | | | | | through all of the code and s/collectable/exported/g (thanks to womble for that term). git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1193 980ebf18-57e1-0310-9a29-db15c13687c0
* I had to redo how the scopes handled collectable objects (which I will soon ↵luke2006-05-146-33/+131
| | | | | | change to being called "exported objects"). All seems to work now, though. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1192 980ebf18-57e1-0310-9a29-db15c13687c0
* Made a *huge* performance difference in storing hosts -- down from about 25 ↵luke2006-05-131-5/+7
| | | | | | seconds per host to about 5 seconds on my machine. I will almost definitely still use forking or something to make this not affect the clients git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1191 980ebf18-57e1-0310-9a29-db15c13687c0
* I appear to have object collection working, incredibly. This commit does ↵luke2006-05-136-436/+520
| | | | | | the collection from the database up to adding the objects to the current scope, which is what sends it to the client. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1190 980ebf18-57e1-0310-9a29-db15c13687c0
* The "collectable" syntax now works end-to-end -- the parser correctly ↵luke2006-05-136-487/+474
| | | | | | recognizes it, the AST objects retain the settings, the scopes do the right conversion, the interpreter stores them all in the database, and then it strips the collectable objects out before sending the object list to the client git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1189 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding initial rails support. One can now store host configurations using ↵luke2006-05-131-24/+25
| | | | | | ActiveRecord into a database (I have only tested sqlite3). Tomorrow will be the grammars used to retrieve those records for object collection. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1187 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding some small changes towards fixing #140 and #83, but this work needs ↵luke2006-05-136-23/+73
| | | | | | to take a back seat to object collection, so i will come back to it later. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1186 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #141. It was a problem related to the recent parser changes I made.luke2006-05-122-11/+22
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1185 980ebf18-57e1-0310-9a29-db15c13687c0
* removing some extraneous loggingluke2006-05-121-1/+0
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1184 980ebf18-57e1-0310-9a29-db15c13687c0
* Preliminary commit of the first phase of the parser redesign. The biggest ↵luke2006-05-094-140/+217
| | | | | | difference is that overrides should now work for definitions (although i do not yet have a test case -- i will add one on the next commit). The way this is implemented is by having scopes translate themselves at eval time, but in two phases -- the first phase does the overrides, and the second phase does the evaluation of definitions and classes. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1180 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing a stupid bug i managed to introduce in 0.16.2 (probably) involving ↵luke2006-05-033-42/+85
| | | | | | importing files with classes in them. This is a better solution than what I had before the bug, anyway. Also, some documentation fixes. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1167 980ebf18-57e1-0310-9a29-db15c13687c0
* Allowing dashes in class names, although grammar rules restrict it from ↵luke2006-05-021-1/+1
| | | | | | working anywhere except node names or in tag(). They are valid in host names, and many companies have them in the host names; in fact, this fix is for a company with this exact problem -- they cannot use puppet with their nodes because all their hosts have dashes in the host names. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1165 980ebf18-57e1-0310-9a29-db15c13687c0
* This should have been in 0.16.1. Moving the "setclass" statements around so ↵luke2006-04-263-12/+17
| | | | | | that classes are set before a given class's code is evaluated, so it can be tested within the code, within node defs, components, or classes. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1139 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding "defined" functino to puppet, so you can now test whether a given ↵luke2006-04-261-0/+14
| | | | | | class or definition is defined. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1135 980ebf18-57e1-0310-9a29-db15c13687c0
* Creating a simplistic, generic function framework in the parser, so it is ↵luke2006-04-267-496/+637
| | | | | | now very easy to add new functions. There is a pretty crappy, hardwired distinction between functions that return values and those that do not, but I do not see a good way around it right now. Functions are also currently responsible for handling their own arity, although I have plans for fixing that. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1134 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing a bunch of small bugs, mostly found by testing on solaris, and added ↵luke2006-04-171-1/+1
| | | | | | a check to the test system that points out memory growth git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1113 980ebf18-57e1-0310-9a29-db15c13687c0
* Changing "set" to "tag"luke2006-04-115-12/+38
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1106 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding the host name as a tag (stripped of the domain name)luke2006-04-111-0/+4
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1105 980ebf18-57e1-0310-9a29-db15c13687c0
* Modifying "setclass" on scope to check the validity of class names, now that ↵luke2006-04-111-0/+4
| | | | | | "set" can be used to set them manually, and added a test for it. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1104 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing the language side of #109. Added a "set" keyword.luke2006-04-115-399/+435
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1103 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding a few informative facts on the server side: serverversion, ↵luke2006-04-111-1/+7
| | | | | | servername, serverip. And only printing the parse time in the interpreter if it is not a local connection. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1102 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding simple benchmarking, and using it in a few of the more obvious ↵luke2006-04-102-5/+14
| | | | | | places. Also, fixed a bug in Scope#gennode. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1098 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #117. If only one value was provided, then it was not placed in an ↵luke2006-04-101-0/+2
| | | | | | array, yet AST::Selector expected an array. The grammar needs to have some abstraction added or something, because I seem to have encountered this bug for every ast type that supports arrays internally. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1097 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #103. There are now no such things as node scopes; the entire tree ↵luke2006-04-053-955/+880
| | | | | | is evaluated on every node connection, and node facts are set at the top-level scope. This includes,um, the code; the last commit was accidentally just test changes. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1073 980ebf18-57e1-0310-9a29-db15c13687c0
* adding -e ability to puppet executableluke2006-04-041-20/+26
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1065 980ebf18-57e1-0310-9a29-db15c13687c0
* Change how names for nodes are specified: the 'node' keyword can be followed ↵lutter2006-04-044-362/+345
| | | | | | by a NAME or by single quoted text, i.e. fully qualified names for nodes must be enclosed in single quotes git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1064 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing the class file to actually store class names, not object ids. Also ↵luke2006-04-043-9/+7
| | | | | | added tests to make sure it all stays that way. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1063 980ebf18-57e1-0310-9a29-db15c13687c0
* Manifests can now specify node names with fully qualified domain names, too.lutter2006-03-315-294/+381
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1047 980ebf18-57e1-0310-9a29-db15c13687c0
* Using undefined variables is no longer an exception, it just returns an ↵luke2006-03-111-4/+5
| | | | | | empty string. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1003 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #96. Defaults are now set when the object is passed out by the ↵luke2006-03-092-45/+18
| | | | | | scope, rather than when the object is created. This is nice because it also moves awareness of the scope internals out of the AST object and back into the scope. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@996 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #97. I was wrong about the object type I had, so I was calling ↵luke2006-03-091-1/+1
| | | | | | "type" with no arguments, which was causing the bug. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@995 980ebf18-57e1-0310-9a29-db15c13687c0
* making case statements not create a new scopeluke2006-03-061-1/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@990 980ebf18-57e1-0310-9a29-db15c13687c0
* fixing some more logging issuesluke2006-03-061-4/+2
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@989 980ebf18-57e1-0310-9a29-db15c13687c0
* Supporting variables as the test value in both case statements and selectors.luke2006-03-034-220/+237
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@976 980ebf18-57e1-0310-9a29-db15c13687c0
* Definitions now always create their own context, which means that they ↵luke2006-03-032-15/+5
| | | | | | cannot override elements in the containing scopes. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@972 980ebf18-57e1-0310-9a29-db15c13687c0
* Changing the setdefaults input format somewhat. It is always a hash of some ↵luke2006-03-012-11/+11
| | | | | | kind now. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@962 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing bug #60. Converting nodes to use types everywhere instead of names, ↵luke2006-02-284-147/+276
| | | | | | and adding a localobjectable to keep track of what parameters have been defined locally. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@957 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #64; multiple class definitions in the same scope is now an error, ↵luke2006-02-271-1/+7
| | | | | | although using the same class name in different scopes is not an error. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@956 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing bug #73; node names now appear only once in the pathluke2006-02-273-6/+20
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@955 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing bug #75, providing support for unnecessary end commas.luke2006-02-272-118/+128
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@954 980ebf18-57e1-0310-9a29-db15c13687c0
* Removing all of the autoname codeluke2006-02-273-33/+3
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@953 980ebf18-57e1-0310-9a29-db15c13687c0
* Mostly, this is a refactoring commit. There is one significant new feature,luke2006-02-2721-162/+330
| | | | | | | | | | | | | | | | | though: overrides now only work within a class heirarchy, which is to say that a subclass can override an element in a base class, but a child scope cannot otherwise override an element in a base scope. I've also done a good bit of refactoring, though; notably, AST#evaluate now takes named arguments, and I changed the 'name' parameter to 'type' in all of the Component classes (this was all internal, but was confusing as it was). I also removed the need for the autonaming stuff -- it's now acceptable for components not to have names, and everything behaves correctly. I haven't yet removed the autoname code, though; I'll do that on the next commit. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@952 980ebf18-57e1-0310-9a29-db15c13687c0
* Switching setclass to use object_ids instead of class names, and adding some ↵luke2006-02-272-8/+12
| | | | | | comments. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@951 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing scopes and AST so that definitions and classes are looked for in the ↵luke2006-02-274-90/+75
| | | | | | scopes, instead of in a global list git-svn-id: https://reductivelabs.com/svn/puppet/trunk@950 980ebf18-57e1-0310-9a29-db15c13687c0
* Generate an error if the pattern for an import statement matches no file.lutter2006-02-232-22/+32
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@928 980ebf18-57e1-0310-9a29-db15c13687c0