summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | The whole system now uses Configuration objects instead ofLuke Kanies2007-09-1512-320/+315
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2212-236/+297
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-216-68/+71
| | | | | | | | | | | | | | | | | | | | 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-214-4/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-212-21/+20
| | | | | | | | | | | | | | | | | | | | 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-213-88/+11
| | | | | | | | | | | | | | | | | | | | to add a few more specs, though.
* | | | | 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-207-15/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pass given the redesign that Rick implemented. This was mostly a question of fixing the method names and the mocks.
* | | | | Merge branch 'indirection' of http://git.rickbradley.com/puppet into indirectionLuke Kanies2007-09-201-43/+97
|\ \ \ \ \
| * | | | | 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".
* | | | | | Merge branch 'indirection' of http://git.rickbradley.com/puppet into indirectionLuke Kanies2007-09-172-7/+28
|\| | | | | | |/ / / / |/| | | |
| * | | | Updates to indirection stuffs. Making a better spec and migrating to it.Rick Bradley2007-09-172-7/+28
| | | | |
* | | | | Removing the completely obsolete passwd2puppet and the obsolete component.rbLuke Kanies2007-09-131-224/+0
|/ / / /
* | | | Moving the resource container behaviour to the Configuration object, rather ↵Luke Kanies2007-09-123-28/+27
| | | | | | | | | | | | | | | | than the base PGraph class. I expect I will just do away with PGraph, but for now, I am at least going to keep configuration-related code in that class.
* | | | Adding a to_graph method to TransBuckets, so that the buckets can directly ↵Luke Kanies2007-09-124-6/+79
| | | | | | | | | | | | | | | | generate a graph, rather than having to first convert to RAL types and then have them convert to a graph. This allows us to make it so components do not need a @children array at all. This was all done because I am having the "already a parent of" problem again, and I have gotten far enough that it is relatively easy to just make this problem go away once and for all.
* | | | Another intermediate commit. The node and fact classes are now functional ↵Luke Kanies2007-09-1212-175/+188
| | | | | | | | | | | | | | | | 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.
* | | | Refactoring the feature support so it loads libraries when a feature is ↵Luke Kanies2007-09-111-22/+31
| | | | | | | | | | | | | | | | asked about, rather than when it is defined.
* | | | The Node handler is now obsolete. Node searching is handled through the ↵Luke Kanies2007-09-117-371/+134
| | | | | | | | | | | | | | | | 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-119-28/+482
|/ / /
* | / Renaming the instance loader method to "instance_load". It was previously ↵Luke Kanies2007-09-104-4/+4
| |/ |/| | | | | autoload, which could class with Kernel.autoload.
* | Merge branch 'master' of http://northstarlabs.net/git/puppetLuke Kanies2007-09-101-1/+1
|\ \
| * | Fixed hdiutil syntax for ticket 812Jeffrey J McCune2007-09-101-1/+1
| |/
* / Removing extraneous logging from the node handlerLuke Kanies2007-09-101-1/+1
|/
* *Finally* fixing the tests that were failing around users and groups. The ↵Luke Kanies2007-09-073-19/+15
| | | | problem was that the autoload tests were somehow clearing all loaded classes, including the providers. This is fixed now.
* Fixing some failed tests. Mostly cleanup. Next is to make all of the user ↵Luke Kanies2007-09-072-4/+10
| | | | tests pass again, dammit.
* Fixing #801 -- resources that have changes when running in noop mode do not ↵Luke Kanies2007-09-071-1/+10
| | | | record that they were checked, so that they will be scheduled on the next run. This is a somewhat murky solution, but considering that no one had submitted this bug before, I expect it will not hit many people.
* Fixing some broken tests in the master client, and adding a test for #800 ↵Luke Kanies2007-09-063-11/+8
| | | | but it is unfortunately disabled because we cannot realistically fix it using the current design. It will be easy after the REST refactor, though.
* Fixing #795 -- configuration elements now make sure all file paths are fully ↵Luke Kanies2007-09-061-1/+5
| | | | qualified by prepending the wd to unqualified path names.
* Fixing #802 -- tags are now applied before parent classes are evaluated, so ↵Luke Kanies2007-09-062-3/+6
| | | | parent classes can use tagged() to test if a node is a member of a subclass.
* Fixing #807. The exception handling should more closely resemble how it ↵Luke Kanies2007-09-062-7/+16
| | | | used to be done.
* Renaming some ast resource classes and files so they make a lot more sense.Luke Kanies2007-09-067-22/+22
|
* Fixing #806. Resources correctly look up their fully qualified definition ↵Luke Kanies2007-09-064-20/+34
| | | | type, just like resource references do, which causes the resource and reference to again agree on the full name of a given defined type.
* 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.
* Flipped the switch so that compiles now return a Configuration instance ↵Luke Kanies2007-09-044-9/+21
| | | | instead of pre-extracting the configuration.
* Successfully modified all tests and code so that all language tests pass ↵Luke Kanies2007-09-046-65/+38
| | | | again. This is the majority of the work necessary to make the separate "configuration" object work.
* We now have a real configuration object, as a subclass of GRATR::Digraph, ↵Luke Kanies2007-09-0432-535/+237
| | | | that has a resource graph including resources for the container objects like classes and nodes. It is apparently functional, but I have not gone through all of the other tests to fix them yet. That is next.
* More refactoring. I have removed a few more extraneous methods from Scope, ↵Luke Kanies2007-09-036-68/+53
| | | | mostly just pointing directly to the compile, and I have begun (but commented out) the move to having resources to model each of the classes and nodes, in addition to the definitions. This will, again, enable a real Configuration object, and it will enable class versioning and similar features.
* Removing the Scope#setresource method, since it was essentially redundant. ↵Luke Kanies2007-09-032-18/+3
| | | | The work is done in either AST::ResourceDef#evaluate or Compile#store_resource.
* Doing a small amount of refactoring, toward being able to use Parser ↵Luke Kanies2007-09-035-90/+92
| | | | resources to evaluate classes and nodes, not just definitions. This will hopefully simplify some of the parsing work, and it will enable the use of a Configuration object that more completely models a configuration.
* Deleting old documentation that somehow made it back into the tree in the ↵Luke Kanies2007-09-018-15/+243
| | | | switch to git, and refactoring the evaluate_classes method on the compile object so I can use resources as intermediaries, thus making classes do late-binding evaluation.
* Renaming the file containing all of the configuration defaults to ↵Luke Kanies2007-08-282-1/+1
| | | | "defaults.rb", since I am going to create a separate "configuration" top-level directory to contain all of the classes related to managing the configuration for a given node.
* Making a couple of small bugfixes in the configuration subsystemLuke Kanies2007-08-273-3/+8
|
* Adding support for providing a diff when files are being changed. Currently ↵Luke Kanies2007-08-277-19/+121
| | | | uses a local diff binary, but could easily be changed to use the ruby diff/lcs library. Modified puppet and puppetd to automatically show file diffs when in noop mode, but can otherwise be enabled using --show_diff. This only works when running interactively, because the diffs are printed on stdout.
* Multiple environment support now works, and I have even tested it in real ↵Luke Kanies2007-08-264-17/+45
| | | | life. This commit is mostly a bug-fix commit, resulting from the difference between real-life testing and unit testing.
* The fileserver now uses an environment-specific module path. I also made ↵Luke Kanies2007-08-266-22/+56
| | | | various bug fixes around the network tree.