summaryrefslogtreecommitdiffstats
path: root/lib/puppet/indirector.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fixing a bunch of warningsLuke Kanies2009-06-031-4/+4
| | | | | | This commit should have no functional effect. Signed-off-by: Luke Kanies <luke@madstop.com>
* Using the FormatHandler in indirected classes automatically.Luke Kanies2008-07-291-0/+2
| | | | | | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com> Changing the FormatHandler#render method to render_to Signed-off-by: Luke Kanies <luke@madstop.com> Adding the ability for the format handler to query supported formats. Signed-off-by: Luke Kanies <luke@madstop.com>
* Moved the request creation into the IndirectionLuke Kanies2008-04-101-4/+9
| | | | | | class instead of the Indirector module. Also, added an 'expire' method to the indirector, so there's an easy way to expire cached instances.
* Intermediate commit.Luke Kanies2008-04-081-28/+21
| | | | | | | | | | | | | | | | | This commit adds a Request instance into the indirection, pushing it all the way to the terminus instances. It's a big commit because it requires modifying every terminus class. There are still some thorny design issues. In particular, who should be responsible for making the request object? I've tried having both the indirection class and the Indirector module creating it, and both have their issues. Also, the Catalog class previously allowed passing Node instances directly to the find method, which is now no longer possible because the Request class would treat the node as the instance being found. We need the request class to have two modes, one when it's passed an instance and one when it's passed a key.
* I'm working on making file serving work in the indirector now, so ILuke Kanies2007-10-181-11/+1
| | | | | | | | | | | | | | | added two abilities to the indirections: Models can specify a module to extend the indirection instance with, and indirections will use a :select_terminus method, if it's available, to select the terminus to use for finding. (It's currently only used for finding, not destroying or saving.) The upshot is that a model can have a module that handles terminus selection for it, and then extend its indirection with that module. This will allow me to use the local terminus when the protocol is 'file' and the REST terminus when the protocol is 'puppet'. It should also open the door for other protocols if they become available.
* Adding version handling through most of the indirection work.Luke Kanies2007-10-121-0/+4
| | | | | | This counts as the first commit where configuration compiling actually uses the caching correctly according to the application model.
* Adding support for versions and freshness-checkingLuke Kanies2007-10-061-0/+4
| | | | | | to the indirection layers. This should hopefully enable the different application models we need in our different executables.
* This commit is focused on getting the 'puppet' executableLuke Kanies2007-10-051-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Adding the integration tests to the Rakefile for spec,Luke Kanies2007-10-041-0/+8
| | | | | | fixing the integration tests, and extending the Classmethods for the indirector so that indirected classes can set the terminus class and cache class.
* Taking a first stab at moving configuration compilingLuke Kanies2007-09-231-1/+1
| | | | | | | | | | | | | | | 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.
* All indirections are working, and they have allLuke Kanies2007-09-221-1/+1
| | | | | | | | | | | | | | | | | been migrated over to the new organization. Where we would have previously had an 'ldap' node terminus at puppet/indirector/node/ldap.rb, we would not have it at puppet/indirector/ldap/node.rb, and it would be a subclass of puppet/indirector/ldap.rb. These are called terminus classes, and there are now three categories of them: The base class itself, abstract classes that provide most of the functionality (e.g., the ldap and yaml classes), and the classes themselves that implement the functionality for a given model like Node or Facts. The base terminus class handles auto-loading any of these classes from disk.
* It looks like the new indirection setup is complete.Luke Kanies2007-09-211-48/+0
| | | | I only need to port the node indirection termini over.
* Moving the Puppet::Indirector::Terminus class into itsLuke Kanies2007-09-211-21/+1
| | | | own file and adding a spec for it.
* Adding a couple more tests to the indirector, talking aboutLuke Kanies2007-09-211-2/+0
| | | | | | terminus registration. I am about to change how loading is handled, so that individual termini are declared as normal Ruby classes.
* The indirector specs now all pass. I think I needLuke Kanies2007-09-211-86/+9
| | | | to add a few more specs, though.
* Fixing all existing spec tests so that they nowLuke Kanies2007-09-201-6/+11
| | | | | | pass given the redesign that Rick implemented. This was mostly a question of fixing the method names and the mocks.
* More spec and indirector updates.Rick Bradley2007-09-201-0/+2
|
* Reworking the Indirector code. Continuing to fight the classgen and ↵Rick Bradley2007-09-191-43/+95
| | | | instance_loader "utilities".
* Updates to indirection stuffs. Making a better spec and migrating to it.Rick Bradley2007-09-171-6/+27
|
* Another intermediate commit. The node and fact classes are now functional ↵Luke Kanies2007-09-121-44/+25
| | | | and are used instead of the network handlers, which have been removed. There are some failing tests as a result, but I want to get this code committed before I massage the rest of the system to make it work again.
* Doing an intermediate commit so rick can look at the work I have done so far.Luke Kanies2007-09-111-24/+85
|
* A small change to the indirector, moving it to a module instead of a class. ↵Luke Kanies2007-09-061-64/+19
| | | | I still do not really know how i will use it, though.
* Adding my indirector class before i rewrite it. I am probably not going to ↵Luke Kanies2007-09-061-0/+121
keep any of this, but i wanted to store a copy before i got much further.