summaryrefslogtreecommitdiffstats
path: root/lib/puppet/indirector
Commit message (Collapse)AuthorAgeFilesLines
* Translating the report handler to an indirected model.Luke Kanies2007-10-131-0/+49
| | | | | | | | | | | I've provided backward compatibility with the old handler. The only terminus type that currently exists for reports is the 'code' terminus, which is used to process reports in the style of the old handler. At some point, we should likely switch at least some of these report types (e.g., 'store') to terminus types.
* Adding version handling through most of the indirection work.Luke Kanies2007-10-122-8/+18
| | | | | | This counts as the first commit where configuration compiling actually uses the caching correctly according to the application model.
* Merge branch 'master' of git://michaelobrien.info/puppet into michaelLuke Kanies2007-10-095-55/+123
|\
| * All tests should now pass again.Luke Kanies2007-10-085-13/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Adding support for versions and freshness-checkingLuke Kanies2007-10-062-12/+46
| | | | | | | | | | | | to the indirection layers. This should hopefully enable the different application models we need in our different executables.
| * 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.
* | Merge branch 'master' of git://reductivelabs.com/puppet into routingRick Bradley2007-10-052-35/+39
|\|
| * Adding another test to the ldap node source -- we makeLuke Kanies2007-10-041-2/+5
| | | | | | | | | | sure we throw an appropriate exception if a parent is specified but we cannot find it.
| * Switching the indirection from using settings for configurationLuke Kanies2007-10-041-33/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to requiring explicit configuration. This means that if you as an application developer want to use a different indirection terminus then you have to specify it; something like: Puppet::Node.terminus_class = :ldap Caches use the same kind of configuration: Puppet::Node.cache_class = :memory Accordingly, I've removed the existing setting definitions from the defaults.rb.
* | Added partial spec for the serving of REST information, as well as some ↵Rick Bradley2007-10-032-0/+14
|/ | | | client-side REST terminus behavior.
* Adding more indirection termini, mostly focused on cachingLuke Kanies2007-09-253-0/+31
| | | | information in yaml.
* Adding cache support to indirection. If you haveLuke Kanies2007-09-251-1/+31
| | | | | a '<indirection>_cache' setting, then the indirection will use the value there as the name of the cache.
* I changed the Terminus class to switch camelcaseLuke Kanies2007-09-241-2/+4
| | | | | to underscore-separated words, e.g., FactStore becomes fact_store.
* Taking a first stab at moving configuration compilingLuke Kanies2007-09-232-0/+177
| | | | | | | | | | | | | | | 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.
* Adding a "memory" node terminus, which willLuke Kanies2007-09-232-0/+29
| | | | | | be used by 'puppet' and the Cfengine 'module_puppet', since they need to set up the node specially with classes and other weird things.
* Adding my first integration test, verifying thatLuke Kanies2007-09-231-3/+1
| | | | | | | | | | | checksum interaction behaves as I expect when interacting with the file terminus. I've also changed how files and checksums behave a bit. Files now create model instances with the content as the only argument during initialization, and checksums now calculate their checksums rather than having them passed in.
* Adding the first version of checksum support, which willLuke Kanies2007-09-222-9/+58
| | | | acquire the behaviour of FileBuckets.
* Renaming the 'Puppet::Util::Config' class toLuke Kanies2007-09-222-3/+3
| | | | | | | 'Puppet::Util::Settings'. This is to clear up confusion caused by the fact that we now have a 'Configuration' class to model host configurations, or any set of resources as a "configuration".
* Adding the base file terminus. This will, at the least,Luke Kanies2007-09-221-0/+40
| | | | | be used as the back end for filebuckets and the certificate authority.
* Merge branch 'configurations' into indirectionLuke Kanies2007-09-221-1/+1
|\ | | | | | | | | | | | | | | | | Conflicts: lib/puppet/defaults.rb lib/puppet/indirector/facts/yaml.rb spec/unit/indirector/indirection.rb spec/unit/indirector/indirector.rb
| * The whole system now uses Configuration objects instead ofLuke Kanies2007-09-151-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ever converting the Transportable objects into a tree of components and then converting that into a graph. This is a significant step, and drastically simplifies the model of how to use a configuration. The old code might have looked something like this: file = Puppet::Type.create :path => "/whatever", ... comp = Puppet::Type.create :name => :whatever comp.push file transaction = comp.evaluate transaction.evaluate The new code looks like this: file = Puppet::Type.create :path => "/whatever", ... config = Puppet::Node::Configuration.new config.add_resource file config.apply I did not really intend to do this much refactoring, but I found I could not use a Configuration object to do work without refactoring a lot of the system. The primary problem was that the Client::Master and the Config classes determined how the transactions behaved; when I moved to using a Configuration, this distinction was lost, which meant that configurations were often needing to create other configurations, which resulted in a whole lot of infinite recursion (e.g., Config objects that create directories for Puppet use Configuration objects -- yes, I'm s/Config/Settings/g soon -- and these Configuration objects would need to create directories). Not everything is fixed, but it's very close. I am clearly over the hump, though, so I wanted to get a commit in.
* | Adding the last tests for the ldap node terminus. I managedLuke Kanies2007-09-222-13/+53
| | | | | | | | to forget the tests around the main find() method.
* | All indirections are working, and they have allLuke Kanies2007-09-2210-234/+295
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-214-19/+64
| | | | | | | | I only need to port the node indirection termini over.
* | Adding automatic association between terminus subclasses andLuke Kanies2007-09-213-41/+30
| | | | | | | | | | | | the indirection they're working with. It looks like I'll be moving terminus registration to the indirection rather than the top-level Indirector.
* | Adding the first top-level terminus (yaml). It worksLuke Kanies2007-09-213-1/+73
| | | | | | | | | | | | | | | | | | | | | | and is tested, so now it is time to migrate the Facts YAML Terminus to use the <terminus>/<indirection> file structure instead of <indirection>/<terminus>. In this case, that means that I am moving the functionality in lib/puppet/indirector/facts/yaml.rb to lib/puppet/indirector/yaml/facts.rb, and the class in that new file will subclass Puppet::Indirector::Yaml.
* | Moving the Puppet::Indirector::Terminus class into itsLuke Kanies2007-09-211-0/+19
| | | | | | | | own file and adding a spec for it.
* | The unit tests for the newly-resurrected indirection classLuke Kanies2007-09-201-19/+28
| | | | | | | | now work; all we need do is fix the indirector module tests.
* | Fixing all existing spec tests so that they nowLuke Kanies2007-09-204-5/+5
| | | | | | | | | | | | pass given the redesign that Rick implemented. This was mostly a question of fixing the method names and the mocks.
* | Updates to indirection stuffs. Making a better spec and migrating to it.Rick Bradley2007-09-171-1/+1
|/
* Another intermediate commit. The node and fact classes are now functional ↵Luke Kanies2007-09-125-30/+136
| | | | 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.
* The Node handler is now obsolete. Node searching is handled through the ↵Luke Kanies2007-09-113-9/+21
| | | | indirector. I have not yet added the tests for the node handlers themselves, which is next.
* Doing an intermediate commit so rick can look at the work I have done so far.Luke Kanies2007-09-114-0/+240