summaryrefslogtreecommitdiffstats
path: root/spec/unit
Commit message (Collapse)AuthorAgeFilesLines
...
* | Removing obsolete code and tests for the agent.Luke Kanies2009-02-061-163/+0
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Converting the catalog as neededLuke Kanies2009-02-062-26/+61
| | | | | | | | | | | | | | Converting to a Resource catalog for transmission, then converting to a RAL catalog on the client. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding REST support for facts and catalogs.Luke Kanies2009-02-062-0/+22
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding better error-handling to format renderingLuke Kanies2009-02-061-0/+45
| | | | | | | | | | | | | | We now always get the format name and the method that failed. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Resetting SSL cache terminii to nil when only using the caLuke Kanies2009-02-061-0/+8
| | | | | | | | | | | | | | | | This is important because puppetmasterd changes its configurations a couple of times, and we need to disable any previously-created caches. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Allowing the Indirection cache to be reset to nilLuke Kanies2009-02-061-2/+3
| | | | | | | | | | | | Otherwise we couldn't disable a cache once configured. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Moving the Agent locking code to a module.Luke Kanies2009-02-062-28/+94
| | | | | | | | | | | | | | Also cleaning up the lock usage by yielding to a block when a lock is attained. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Cleaning up SSL instances that can't be savedLuke Kanies2009-02-061-0/+23
| | | | | | | | | | | | | | | | | | | | | | If the SSL Host couldn't save a CSR or key, it would still keep them in memory; this meant that, for instance, a CSR that couldn't be saved to the server was never resent. This commit removes in-memory instances that couldn't be saved, thus forcing regeneration. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Only caching saved resources when the main save worksLuke Kanies2009-02-061-1/+11
| | | | | | | | | | | | | | This way you don't have data cached that couldn't be saved to the main repository. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Moving classfile-writing to the CatalogLuke Kanies2009-02-062-6/+32
| | | | | | | | | | | | | | | | This work was done by the Agent class before, but it's really related to the catalog, so that's where it is now. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Refactoring how the Facter integration worksLuke Kanies2009-02-063-42/+99
| | | | | | | | | | | | | | | | I moved all of the extra Fact modifications into the Facts class, and then moved the calls of those new methods into the Facter terminus. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Reformatting tests for factsLuke Kanies2009-02-061-30/+32
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Moving fact and plugin handling into modulesLuke Kanies2009-02-064-232/+421
| | | | | | | | | | | | | | | | | | | | This doesn't change functionality, it just simplifies the agent class. I've also started the work to get the catalog handling done using REST/the Indirector. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding Puppet client facts to Facter facts.Luke Kanies2009-02-061-0/+17
| | | | | | | | | | | | | | This work was previously done in the Master client class. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Clarifying how node names are used during catalog compilationLuke Kanies2009-02-061-50/+65
| | | | | | | | | | | | | | | | | | | | | | We now use any passed in node (used by bin/puppet), then any authenticated node info (e.g., the cert name), then any passed in information (usually the host name). The third option will never be used in Puppet's architecture, but simplifies using the API for other users. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Reformatting Indirector catalog compiler testsLuke Kanies2009-02-061-119/+121
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Renmaing Puppet::Network::Client::Master to Puppet::AgentLuke Kanies2009-02-061-23/+17
| | | | | | | | | | | | | | | | | | Made minor changes, including removing the parent class. The functionality hasn't changed yet -- that comes in later patches -- but all but a couple of the older tests pass. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Revert "Adding the first bits of an Agent class."Luke Kanies2009-02-061-117/+0
| | | | | | | | This reverts commit bbd99cc87a775732f2fed3686962647a5c30c5b8.
* | Revert "This is work that I've decided not to keep"Luke Kanies2009-02-063-238/+42
| | | | | | | | This reverts commit f57a5e88229578747dde2c90af3a696ad0172e72.
* | This is work that I've decided not to keepLuke Kanies2009-02-063-42/+238
| | | | | | | | | | | | | | so I'm just applying it here so it continues to show up in the history in case I ever want to look at it again. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding a new Agent::Downloader class for downloading files.Luke Kanies2009-02-061-0/+182
| | | | | | | | | | | | This will handling downloading facts and plugins. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding the first bits of an Agent class.Luke Kanies2009-02-061-0/+117
| | | | | | | | | | | | | | This class replaces the existing, all-knowing Client::Master class, and it will hopefully be more reasonable in scope. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding support for skipping cached indirection instances.Luke Kanies2009-02-062-1/+16
| | | | | | | | | | | | | | This will allow the soon-to-be-created Agent class to skip cached catalogs when desired. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing #1914 - 'undef' relationship metaparameters do not stackLuke Kanies2009-02-061-0/+9
| | | | | | | | | | | | | | | | This allows you to specify that a metaparameter is undef inside a definition and keep any parameters from being inherited from the parent. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fix Bug #1629Francois Deppierraz2009-01-131-0/+64
| | | | | | | | | | A refactoring of ssh_authorized_key parsed provider was needed and tests were improved. flush method has been split for clarity.
* | Fix #1835 : Add whitespace/quote parsing toBryan Kearney2009-01-131-76/+156
| |
* | Merge commit 'masterzen/tickets/1834'Luke Kanies2008-12-304-5/+7
|\ \
| * | Fix #1834 part2 - Fix tests when no railsBrice Figureau2008-12-203-4/+5
| | | | | | | | | | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * | Fix #1834 part1 - Fix tempfile failing testsBrice Figureau2008-12-201-1/+2
| | | | | | | | | | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | | Fix #1829 - Add puppet function versioncmp to compare versionsBrice Figureau2008-12-271-0/+29
| | | | | | | | | | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | | Fix #1828 - Scope.number? wasn't strict enough and could produce wrong resultsBrice Figureau2008-12-271-0/+14
| | | | | | | | | | | | | | | | | | | | | Some invalid numbers were treated as numbers and conversion to Integer was failing returning 0 (for instance 0.24.7). Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | | Fix #1807 - make Puppet::Util::Package.versioncmp a module functionBrice Figureau2008-12-271-0/+21
| | | | | | | | | | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | | Merge branch '0.24.x'James Turnbull2008-12-275-12/+237
|\ \ \ | |/ / |/| / | |/ | | Conflicts: CHANGELOG
| * Not using a temporary file when locking files for writing.Luke Kanies2008-12-151-37/+6
| | | | | | | | | | | | | | | | | | | | The temporary file was not actually useful, because we could never really get atomic renames, for annoying, complicated reasons. This hopefully finally fixes #1812. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Issue 1804 VDev with the same devices should be in syncAndrew Shafer2008-12-152-3/+106
| | | | | | | | | | Added VDev and MultiVDev properties to the ZPool type to handle logic Vdevs with the same devices are now in sync even if the order changes
| * Fixing #1812 (hopefully) - adding read and write locks to yaml.Luke Kanies2008-12-121-7/+14
| | | | | | | | | | | | | | | | It's obviously not really possible to test that this fixes it, but I'm confident that the locks work, and now we're using them, so it *should*. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Preparing to fix #1812 - Moving locking code to a moduleLuke Kanies2008-12-122-2/+148
| | | | | | | | | | | | | | This moves the locking code out of Puppet::Util into a separate module, to make the code cleaner. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing #1729 - puppetmasterd can now read certs at startupLuke Kanies2008-12-183-30/+69
| | | | | | | | | | | | | | | | | | | | The main aspect of this solution is to create a site-wide Puppet::SSL::Host instance to cache ssl key and certificate, so that by the time we've switched UIDs, we've got the key and cert in memory. Then webrick just uses that, rather than creating a new Host instance. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Canonicalizing Setting section names to symbols.Luke Kanies2008-12-181-0/+5
| | | | | | | | | | | | | | | | | | I thought I was already using symbols everywhere so it didn't matter, but there are a few places (e.g., the process name) where they were strings, and that made things not work so much. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing all of the test/ tests I broke in previous dev.Luke Kanies2008-12-182-8/+18
| | | | | | | | | | | | | | | | | | Most of these are straightforward changes to the tests, but a couple required small refactorings (e.g., References can now be created with Puppet::Type instances, and they know how to extract the type/title from them). Signed-off-by: Luke Kanies <luke@madstop.com>
* | Deprecating the Puppet::Type.create.Luke Kanies2008-12-1826-176/+176
| | | | | | | | | | | | | | This method is no longer necessary; you can use the normal 'new' class method. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Deprecating 'Puppet.type'; replacing all instances with Puppet::Type.typeLuke Kanies2008-12-189-21/+21
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Finishing the work to use Puppet::Resource instead of TransObjectLuke Kanies2008-12-186-36/+131
| | | | | | | | | | | | | | | | | | | | | | | | This was a complicated project because TransObject had made its way into too many classes. The usage by Util::Settings was particularly nefarious. Refactoring and fixing this exposed some other issues. The main complication, though, was the extent to which the Puppet::Type class depended on TransObject. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding name/namevar abstraction to Puppet::Resource.Luke Kanies2008-12-181-1/+49
| | | | | | | | | | | | | | This hopefully provides a single place to manage this complexity, and I'll be using it to simplify Puppet::Type. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Supporting a nil expirer on cacher objects.Luke Kanies2008-12-181-0/+15
| | | | | | | | | | | | | | | | | | | | This works for those classes like Puppet::Type that use an expirer that isn't always present (they use their catalog as an expirer). The behaviour is now that if there is no expirer, expire() is a no-op and all data is considered expired all the time, so it's always fresh. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Setting resource defaults immediately.Luke Kanies2008-12-181-0/+10
| | | | | | | | | | | | | | This makes it easier for later parameters to depend on the values of earlier parameters. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Refactoring the Settings class to use Puppet::ResourceLuke Kanies2008-12-181-142/+272
| | | | | | | | | | | | | | It also now uses the Catalog instead of the recursive TransObject stuff. Signed-off-by: Luke Kanies <luke@madstop.com>
* | TransObject is nearly deprecated now.Luke Kanies2008-12-185-98/+185
| | | | | | | | | | | | | | | | | | This is all of the plumbing work, the only real thing left to do is to fix the Settings class so that it uses Puppet::Resource instances instead of TransObject and TransBucket. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Simplifying the initialization interface for ReferencesLuke Kanies2008-12-181-0/+10
| | | | | | | | | | | | | | | | | | You previously had to call new(nil, "Foo[bar]") if you just had the resource reference as a string. Now you can call new("Foo[bar]"), but the old behaviour works, too. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Replacing TransObject usage with Puppet::ResourceLuke Kanies2008-12-182-0/+125
| | | | | | | | | | | | | | | | | | This completely reorganizes how RAL resources are initialized, and in the process I was able to remove a lot of code (I removed other apparently obsolete code at the same time). Signed-off-by: Luke Kanies <luke@madstop.com>