summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util/config.rb
Commit message (Collapse)AuthorAgeFilesLines
* Renaming the 'Puppet::Util::Config' class toLuke Kanies2007-09-221-1223/+0
| | | | | | | '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".
* An intermediate commit so I can start working on a differentLuke Kanies2007-09-201-1/+1
| | | | | | | | branch. The file recursion code actually works for the first time in a painful while, but there are still some quirks and design issues to resolve, particularly around creating implicit resources that then fail (i.e., the behaviour of the create_implicit_resource method in Configuration).
* This is basically another intermediate commit. I feel likeLuke Kanies2007-09-171-11/+7
| | | | | | | | | | | | | | | | | | | | I've gone too far down the rabbit hole to turn back now, but the code is clearly getting more centralized around the Configuration class, which is the goal. Things are currently a bit muddy between recursion, dynamic resource generation, transactions, and the configuration, and I don't expect to be able to clear it up much until we rewrite all of the tests for the Transaction class, since that is when we'll actually be setting its behaviour. At this point, Files (which are currently the only resources that generate other resources) are responsible for adding their edges to the relationship graph. This puts them knowing more than I would like about how the relationship graph works, but it'll have to do for now. There are still failing tests, but files seem to work again. Now to go through the rest of the tests and make them work.
* The whole system now uses Configuration objects instead ofLuke Kanies2007-09-151-90/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 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.
* Making a couple of small bugfixes in the configuration subsystemLuke Kanies2007-08-271-1/+1
|
* Multiple environment support now works, and I have even tested it in real ↵Luke Kanies2007-08-261-14/+31
| | | | life. This commit is mostly a bug-fix commit, resulting from the difference between real-life testing and unit testing.
* Modules are now tested with spec, and they now can handle ↵Luke Kanies2007-08-251-17/+1
| | | | environment-specific module paths.
* The config class now has support for add an environment to its search path. ↵Luke Kanies2007-08-241-7/+8
| | | | Now I just need to go through the whole system and use the search path in addition to the parameter name itself.
* I have added basic support for a search path, altho not yet with any ability ↵Luke Kanies2007-08-241-129/+149
| | | | to manipulate it. All config tests pass in both the old tests and the new ones, so it is time to add the hooks for manipulating the search path.
* Adding some rspec tests for Config.rb, because I am planning on ↵Luke Kanies2007-08-231-39/+82
| | | | significantly changing its internals and the current tests, I think, will be harder to migrate than just writing rspec tests from scratch.
* Added shortname support to config.rb and refactored addargsMichael V. O'Brien2007-08-141-11/+48
|
* Fixing #735 -- gen_config now uses a single heading, matching the name of ↵luke2007-08-041-1/+4
| | | | | | the process git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2743 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #734. The problem was that when I switched how the configs were ↵luke2007-08-031-1/+5
| | | | | | parsed, I managed to lose the ability to keep values set on the cli from being overridden by values set in config files. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2738 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #206 and #422. Executables will still look for the deprecated config ↵luke2007-05-061-17/+159
| | | | | | files and load them using the old parse method, but they now prefer a single configuration file, and files can set parameters (owner, mode, group) in brackets on the same line. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2464 980ebf18-57e1-0310-9a29-db15c13687c0
* One last try at getting the config and mode stuff working. The tests were ↵luke2007-03-081-6/+4
| | | | | | passing because "mode" is a valid config option in the tests, but not in the real configuration. So, now the Config class correctly only tries to set the meta params if they are valid options, otherwise they get skipped. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2272 980ebf18-57e1-0310-9a29-db15c13687c0
* Looks like [2265] was not a complete solution -- it resulted in failures ↵luke2007-03-081-5/+8
| | | | | | when the config set modes via integers. Everything is working now, and tested more completely. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2268 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #489. I was unnecessarily converting to octal in config.rbluke2007-03-081-1/+3
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2265 980ebf18-57e1-0310-9a29-db15c13687c0
* Merging the webserver_portability branch from version 2182 to version 2258.luke2007-03-061-10/+8
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2259 980ebf18-57e1-0310-9a29-db15c13687c0
* Change Puppet.name to Puppet.execname so rails 1.2 won't freak out.shadoi2007-02-161-2/+2
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2202 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #484. Moving unit tests at the same time.luke2007-02-081-1/+8
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2181 980ebf18-57e1-0310-9a29-db15c13687c0
* Moving some of the stand-alone classes into the util/ subdirectory, to clean ↵luke2007-02-071-0/+959
up the top-level namespace a bit. This is a lot of file modifications, but most of them just change class names and file paths. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2178 980ebf18-57e1-0310-9a29-db15c13687c0