summaryrefslogtreecommitdiffstats
path: root/lib/puppet/indirector/code/configuration.rb
Commit message (Collapse)AuthorAgeFilesLines
* Reorganizing the file structure for indirection terminus types.Luke Kanies2007-10-151-174/+0
| | | | | | | | | | | | | | | | | | | | | | | | Previously, for example, the configuration terminus that was a subclass of 'code' would have been stored at lib/puppet/indirector/code/configuration and would have had to have been named 'configuration'. Now, the subclass can be named however the author prefers, and it must be stored at lib/puppet/indirector/configuration/<name>.rb, where <name> is the name you've chosen for the terminus type. The name only matters insomuch as it is used to load the file from disk and find the appropriate class when asked. The additional restriction is that the class constant for the terminus type must have its name as the last word, and the indirection must be the second to last word. Thus, in our example, we can choose any class constant that ends with Configuration::Code; given that there's only one Configuration class at this point, it makes the most sense to define the class as Puppet::Node::Configuration::Code. This is somewhat awkward, because of the class's location on disk, but the only other real option is to autogenerate a Puppet::Indirector::Configuration class constant, which is, I think, uglier.
* Adding version handling through most of the indirection work.Luke Kanies2007-10-121-8/+12
| | | | | | This counts as the first commit where configuration compiling actually uses the caching correctly according to the application model.
* All tests should now pass again.Luke Kanies2007-10-081-3/+7
| | | | | | | | | | | | | | This is the first real pass towards using caching. The `puppet` executable actually uses the indirection work, instead of handlers and such (and man! is it cleaner). Most of this work was a result of trying to get the client-side story working, with correct yaml caching of configurations, which means this commit also covers converting configurations to yaml, which was a much bigger PITA than it needed to be. I still need to write integration tests, and I also need to cover the server-side story of a normal configuration retrieval.
* Removing obsolete commentLuke Kanies2007-10-051-3/+0
|
* Adding a :code setting for specifying code to runLuke Kanies2007-10-051-15/+1
| | | | | | | | instead of a manifest, and removing all of the ambiguity around whether an interpreter gets its own file specified or uses the central setting. Most of the changes are around fixing existing tests to use this new system.
* This commit is focused on getting the 'puppet' executableLuke Kanies2007-10-051-24/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | to work. As a result, it involves a lot of integration-level testing, and a lot of small design changes to make the code actually work. In particular, indirections can now have default termini, so that configurations and facts default to their code terminus Also, I've removed the ability to manually control whether ast nodes are used. I might need to add it back in later, but if so it will be in the form of a global setting, rather than the previous system of passing it through 10 different classes. Instead, the parser detects whether there are AST nodes defined and requires them if so or ignores them if not. About 75 tests are still failing in the main set of tests, but it's going to be a long slog to get them working -- there are significant design issues around them, as most of the failures are a result of tests trying to emulate both the client and server sides of a connection, which normally would have different fact termini but in this case must have the same terminus just because they're in the same process and are global. The next step, then, is to figure that process out, thus finding a way to make this all work.
* Taking a first stab at moving configuration compilingLuke Kanies2007-09-231-0/+171
into the indirection system. There are still quite a few unanswered questions, the two most notable being embodied in unimplemented tests in the Configuration Code terminus. This also requires changing the behaviour in a few places. In particular, 'puppet' and the 'module_puppet' cfengine module need to store a Node object in memory with the appropriate classes, since that's now the only way to communicate with the compiler. That integration work has not yet been done, partially because the old configuration handler (which the soon-to-be-deprecated master handler now uses) still exists.