summaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
...
| * Added a force option to ensure the change is always applied, and call augeas ↵Bryan Kearney2009-03-041-91/+121
| | | | | | | | twice to reduce the chance that data is lost
| * Backport the fix for #1835Bryan Kearney2009-03-041-0/+80
| |
| * First cut at the not running if augeas does not change any of the ↵Bryan Kearney2009-03-041-9/+16
| | | | | | | | underlieing files
| * Fixing #1991 - ldap booleans get converted to booleansLuke Kanies2009-03-051-0/+20
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
| * Fixing #2013 - prefetching had a mismatch between type and titleLuke Kanies2009-03-041-0/+15
| | | | | | | | | | | | | | | | | | The ParsedFile types seem to be the main one that suffers from this, but the transactions were using the resource titles, not names, so resources were often not getting prefetched correctly. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Fixing every failing test I can find on the build server.Luke Kanies2009-02-2814-7/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All but one of these tests is fixed by: * Stubbing Puppet.settings.use * Adding /usr/sbin to PATH The only other one was the package integration test, which stupidly assumed a default was specified in the test. The fix here is twofold: Remove that assumption (the test is now 'pending' if no default is available), and add a default for Ubuntu. (The default is in the test, not the default package provider - that is, it's testing the default package provider, thus it can't rely on that information.) Signed-off-by: Luke Kanies <luke@madstop.com>
| * Make puppetd --waitforcert option behave as documented:Paul Lathrop2009-02-281-0/+13
| | | | | | | | | | | | | | | | "You can turn off waiting for certificates by specifying a time of 0." Also add a test to ensure we catch any future regression of this behavior. Signed-off-by: Paul Lathrop <paul@tertiusfamily.net>
| * Using the FileCollection where appropriate.Luke Kanies2009-02-285-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit just replaces the :file and :line accessors with the use of the new FileCollection Lookup module. This should mean that we've normalized all file names in a given process, which *might* have drastic RAM improvements. For initial simplicity, I've gone with a single global collection of file names, but it's built so it's easy to use individual file collections instead. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Adding a FileCollection and a lookup module for it.Luke Kanies2009-02-282-0/+86
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fix #2107 - flatten resource references arrays properlyBrice Figureau2009-03-271-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resource parameters of the form [Res[a], Res[a,b]] ends being evaluated as [Res[a], [ Res[a], Res[b] ] This last form was not flattened when transfomed into RAL type, which in turn prevented the sub array to be converted in regular resource references. Thus the type was choking when encountering those native parser references instead of usual resource reference. The fix consists in flattening array of references before transformation to trans objects for RAL. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Fix #2101 - fix recurselimit == 0 bad behaviourBrice Figureau2009-03-271-3/+3
| | | | | | | | | | | | | | After the fix for #1469, recurselimit = 0 was considered as an infinite recursion which is the reverse of what it was before. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Fix #1469 - Add an option to recurse only on remote sideBrice Figureau2009-03-202-22/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using recurse and a source, if the client side has many files it can take a lot of CPU/memory to checksum the whole client hierarchy. The idea is that it is not necessary to recurse on the client side if all we want is to manage the files that are sourced from the server. This changeset adds the "remote" recurse value which prevents recursing on the client side when a source is present. Since it also is necessary to limit the remote side recursion a new File{} parameter has been added called "recurselimit". Moreover, the Filetset API is changing to allow the new recurselimit parameter, and passing the recursion depth limit in the recurse parameter as an integer is now deprecated and not supported anymore. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Forbidding REST clients to set the node or IPLuke Kanies2009-03-202-0/+20
| | | | | | | | | | | | | | | | This is done for security reasons - if a client is unauthenticated, we don't want them to be able to just configure their own authentication information. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing #1557 - Environments are now in REST URIsLuke Kanies2009-03-2014-125/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit includes multiple, related changes, all in one commit because the whole thing was necessary to reach a functional tree again: * The URI starts with the environment, so: /production/certificate/foo /development/file_content/path/to/your/file * All REST handling is done by a single instance mounted at / for webrick and Mongrel, rather than having individual instances mounted at, say, /certificate. * All REST URI translation is done by an API module. Currently only the 'v1' module exists with no support for additional modules, but it's well-separated and will be easy to expand as we need it. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding explicit optional attribute to indirection requestsLuke Kanies2009-03-201-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, any option that had a setter was treated as an attribute, but now we're specifying the list of attributes settable via options. We also have a to_hash method that will take all of the options and all of those attributes and join them back into a hash. This method is used by the REST Handler module, since it uses the indirection request internally. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding a model accessor to the Request classLuke Kanies2009-03-201-0/+17
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Requests now use default environment when none is specifiedLuke Kanies2009-03-201-0/+4
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Moving the REST API functions into a moduleLuke Kanies2009-03-203-107/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | This module is now used by the client and server side, rather than having a Handler module that's 90% server functionality but also used by the client. While we don't automatically get api choice from this, it at least provides a pattern for how we'll handle API development over time. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Using the Handler for the REST api on both sides of the connectionLuke Kanies2009-03-202-240/+80
| | | | | | | | | | | | | | | | | | | | Things are actually in a broken state here because we've got a conflict between how the two sides do their work and some extraction needs to get done. This commit is just a stopping-point so I can do the necessary refactoring. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding REST::Handler methods for converting between indirection and urisLuke Kanies2009-03-202-0/+105
| | | | | | | | | | | | | | | | | | | | This is the first main phase to having a common module for handling the REST api - this Handler module will be included by all of the web server REST modules and the Indirector Request class, so there's a common place that understands how the URI consists. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding environment support to the REST URILuke Kanies2009-03-202-10/+28
| | | | | | | | | | | | Also adding it to the Indirection Request. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Moving the query_string method to RequestLuke Kanies2009-03-202-78/+82
| | | | | | | | | | | | | | | | It required a request instance and didn't use the REST class it was in, so it makes more sense in the Request class. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding tests for the REST query string usageLuke Kanies2009-03-201-5/+21
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fix #1088 - part2 - Add rspec testsBrice Figureau2009-03-142-37/+202
| | | | | | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Fixing #1949 - relationships now use attributes instead of a labelLuke Kanies2009-03-102-37/+34
| | | | | | | | | | | | | | | | | | | | | | This was important because the use of the label to store attributes was a holdover from the GRATR library, and if we didn't cease its use before we switched to RESTful catalogs, then we'd be stuck with the @label instance variable forever, essentially. Now we can add and remove variables however we please. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Correctly handling numerical REST argumentsLuke Kanies2009-03-102-0/+22
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Not passing file sources on to child filesLuke Kanies2009-03-101-1/+1
| | | | | | | | | | | | | | This was sometimes causing files to get converted to directories. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Correctly handling non-string checksumsLuke Kanies2009-03-101-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | Content is now returning the checksum rather than the actual content, and the method of creating the full checksum wasn't correctly handling timestamps, which aren't strings and can't be the right side of a String + call. I've opened #2064 as a better long-term fix. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Passing checksums around instead of file contentsLuke Kanies2009-03-051-48/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This switches the file's 'content' parameter to always use checksums, rather than always using content but switching to checksums whenever necessary. This greatly simplifies all the logging requirements (so that content doesn't show up in logs), but also simplifies insync comparisons, and much more. In the process, I found that the code was pulling down file content more often than was necessary, and fixing that cut 40% off of the time of a very small transaction. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Moving default fileserving mount creation to the Configuration classLuke Kanies2009-03-052-12/+15
| | | | | | | | | | | | | | | | | | | | It was previously in the parser, but the parser is only created if the fileserver.conf exists, so the default mounts weren't made if the file didn't exist. This is a bit less encapsulation, but not much. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing #2028 - Better failures when a cert is found with no keyLuke Kanies2009-02-281-1/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that the server had a certificate for the client. Initially the client just didn't have a key, because it assumed that if it had a certificate then it had a key. Upon fixing it to create the key, the key then did not match the found certificate. This commit fixes both of those: The key is always found before the certificate, and when the certificate is found it's verified against the private key and an exception is thrown if they don't match. It's always a failure, so this just makes the failure more informative. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixed #1849 - Ruby 1.9 portability: `when' doesn't like colons, replace with ↵James Turnbull2009-02-263-16/+16
| | | | | | | | semicolons
* | Fixing #1904 - aliases are no longer inherited by child filesLuke Kanies2009-02-201-2/+2
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Merge branch '0.24.x'Luke Kanies2009-02-201-0/+25
|\| | | | | | | | | | | Conflicts: lib/puppet/type/file/content.rb spec/unit/type/file/content.rb
| * Fixing #1871 once and for all - contents are never printedLuke Kanies2009-02-181-0/+30
| | | | | | | | | | | | | | | | | | They were still being printed in noop mode. The fix was to use is_to_s and should_to_s methods, rather than 'change_to_s'. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Correctly handling URI escaping throughout the REST processLuke Kanies2009-02-195-61/+43
| | | | | | | | | | | | | | | | | | | | This means, at the least, that we can now serve files via REST when they have spaces and other weird characters in their names. This involves a small change to many files. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Refactoring how the Settings file is parsedLuke Kanies2009-02-193-89/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | The goal of this refactor was to use a cached attribute for the LoadedFile instance we use to monitor whether the file needs reparsing. We were getting tests that affected later tests because they were holding on to LoadedFile stubs, somehow. The other main change here is that the Settings#parse method now knows how to look up its own file path. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Relying on 'should_parse_config' in the 'puppet' applicationLuke Kanies2009-02-191-10/+0
| | | | | | | | | | | | | | | | There was some redundancy here, as the app was marked as needing to parse the config, but then the setup hook manually parsed it. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Providing better indirection authorization errorsLuke Kanies2009-02-191-0/+8
| | | | | | | | | | | | | | The errors now include the indirection and key, or the full URI used. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding pluginsyncing support to the IndirectorLuke Kanies2009-02-1917-821/+671
| | | | | | | | | | | | | | | | | | This switches away from the use of terminii for each type of fileserving - it goes back to the traditional fileserving method, and is much cleaner and simpler as a result. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Moving Request and Fileset integration into Fileset.Luke Kanies2009-02-192-22/+39
| | | | | | | | | | | | | | It was previously in a helper module, TerminusHelper. I hope to actually remove that module entirely. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Switching the ModuleFiles Indirection terminus to the new Module/Env apiLuke Kanies2009-02-192-34/+46
| | | | | | | | | | | | Again, much cleaner and simpler. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Migrating the old FileServer to the new Module/Environment codeLuke Kanies2009-02-191-4/+1
| | | | | | | | | | | | | | The interface is *much* cleaner, and I'd removed one of the methods used in this code. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Using the Environments to handle a lot of Module searchingLuke Kanies2009-02-181-81/+55
| | | | | | | | | | | | | | | | | | | | Since Environments now know how to look for modules, a lot of the Module code was able to be pushed into them. Also moving some of the tests to instance-level tests, rather than just testing the class-level interfaces. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Environments now use their own modulepath method.Luke Kanies2009-02-181-3/+3
| | | | | | | | | | | | They were previously still using just the variable itself. Signed-off-by: Luke Kanies <luke@madstop.com>
* | The 'Environment' class can now calculate its modulepath.Luke Kanies2009-02-181-0/+42
| | | | | | | | | | | | | | | | | | | | | | This includes adding PUPPETLIB from the shell environment. I'm moving responsibility for this from the Module class, because nearly every method in Puppet::Module accepted 'environment' as its argument, which is a good sign that it's on the wrong class. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Added support for finding modules from an environmentLuke Kanies2009-02-181-0/+38
| | | | | | | | | | | | | | | | This uses the environment to search for the modules, rather than relying on the Puppet::Module class to know how to handle environments. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding support for finding all modules in a given path.Luke Kanies2009-02-181-0/+87
| | | | | | | | | | | | | | | | This 'each_module' method will be used by environments to find all or a given module, and will likely eventually be used internally, too. Signed-off-by: Luke Kanies <luke@madstop.com>
* | reformatting the environment testsLuke Kanies2009-02-181-15/+15
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Supporting multiple paths for searching for files.Luke Kanies2009-02-181-18/+22
| | | | | | | | | | | | | | This is, once again, used for plugins, which needs to search across multiple modules' plugin directories. Signed-off-by: Luke Kanies <luke@madstop.com>