summaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | Link handling is now in the file serving classes.Luke Kanies2007-10-2210-55/+268
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was done by putting all of the functionality in the Content and Metadata class (actually, in a new base class for them). There are still some issues, and there need to be integration tests between the :local (soon to be renamed :file) termini for these classes.
* | | | | | | Adding searchability to the fileserving termini, using theLuke Kanies2007-10-226-33/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | new Fileset class. The tests aren't the cleanest, in that there is still a good bit of duplication in them, but it's what we got.
* | | | | | | Adding a Fileset class for managing sets of files. ThisLuke Kanies2007-10-221-0/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is the new server-side for file recursion, and I'll next be hooking it to the fileserving 'search' methods. This is basically a mechanism for abstracting that search functionality into a single class.
* | | | | | | Merge branch 'master' of git://michaelobrien.info/puppet into michaelLuke Kanies2007-10-221-0/+116
|\ \ \ \ \ \ \
| * | | | | | | Partial work done for ssl certificates.Michael V. O'Brien2007-10-191-0/+116
| | | | | | | |
* | | | | | | | Adding authorization hooks to the file_server andLuke Kanies2007-10-217-41/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | module_files indirection terminus types. Both hooks use the fileserver configuration, but the module_files hook only uses the 'modules' mount. Also moved all responsibility for knowing whether to use the 'modules' terminus type to the terminus selector; it was previously spread between that and the file_server terminus, which made some things annoyingly complicated. This normalizes the deprecation notices and the logic about how we make these decisions.
* | | | | | | | Renaming the 'mounts' terminus to 'file_server', and renamingLuke Kanies2007-10-209-55/+53
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | tests accordingly.
* | | | | | | File serving now works. I've tested a couple of ways toLuke Kanies2007-10-1913-223/+422
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use it, and added integration tests at the most important hook points. This provides the final class structure for all of these classes, but a lot of the class names are pretty bad, so I'm planning on going through all of them (especially the file_server stuff) and renaming. The functionality is all here for finding files, though (finally). Once the classes are renamed, I'll be adding searching ability (which will enable the recursive file copies) and then adding the link management and enabling ignoring files.
* | | | | | Adding this test stub that's been sittingLuke Kanies2007-10-181-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | around in my repository for a while.
* | | | | | I've now split the file-serving termini into two separate types (inLuke Kanies2007-10-1815-25/+434
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | addition to Rest): A local terminus that just uses direct file paths, and a mounts terminus that uses the file server to figure out what the path should be. It looks like it also makes sense to split the 'mounts' terminus further, so there is a 'modules' terminus used to look files up in the terminus. I've added some integration tests to verify that everything is hooked together correctly. Lastly, I added a directory for shared behaviours. There's a ton of duplication in this setup, because the Content and Metadata classes behave almost but not quite identically across the board.
* | | | | | Fixing all of the classes that I just renamed, and addingLuke Kanies2007-10-183-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | the TerminusSelector module to the File Metadata indirection.
* | | | | | Renaming the file serving indirection termini to matchLuke Kanies2007-10-182-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | the standards I set in the TerminusSelector.
* | | | | | I'm working on making file serving work in the indirector now, so ILuke Kanies2007-10-186-34/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | added two abilities to the indirections: Models can specify a module to extend the indirection instance with, and indirections will use a :select_terminus method, if it's available, to select the terminus to use for finding. (It's currently only used for finding, not destroying or saving.) The upshot is that a model can have a module that handles terminus selection for it, and then extend its indirection with that module. This will allow me to use the local terminus when the protocol is 'file' and the REST terminus when the protocol is 'puppet'. It should also open the door for other protocols if they become available.
* | | | | | Renaming the file_serving/{content,metadata} indirectionsLuke Kanies2007-10-186-2/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | so that they make more sense in the REST API, and creating stub tests for the indirection termini. Now it's on to create the rest of the tests for them.
* | | | | | This is the first mostly functional commit of theLuke Kanies2007-10-185-46/+387
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | new file serving structure. The next step is to hook it up to the indirection so we can start writing integration tests to see if we can actually serve up files.
* | | | | | Adding spec stubs for authorization in the indirectionLuke Kanies2007-10-171-16/+50
| | | | | |
* | | | | | Adding the first pass at modifying file servingLuke Kanies2007-10-174-0/+322
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to work with indirection. I've split the fileserver handler into four pieces: Mount (which so far I've just copied wholesale), Configuration (responsible for reading the configuration file and determining what's allowed), Metadata (retrieves information about the files), and Content (retrieves the actual file content). I haven't added the indirection tests yet, and the configuration tests are still all stubs.
* | | | | Reorganizing the file structure for indirection terminus types.Luke Kanies2007-10-1527-207/+210
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, for example, the configuration terminus that was a subclass of 'code' would have been stored at lib/puppet/indirector/code/configuration and would have had to have been named 'configuration'. Now, the subclass can be named however the author prefers, and it must be stored at lib/puppet/indirector/configuration/<name>.rb, where <name> is the name you've chosen for the terminus type. The name only matters insomuch as it is used to load the file from disk and find the appropriate class when asked. The additional restriction is that the class constant for the terminus type must have its name as the last word, and the indirection must be the second to last word. Thus, in our example, we can choose any class constant that ends with Configuration::Code; given that there's only one Configuration class at this point, it makes the most sense to define the class as Puppet::Node::Configuration::Code. This is somewhat awkward, because of the class's location on disk, but the only other real option is to autogenerate a Puppet::Indirector::Configuration class constant, which is, I think, uglier.
* | | | Translating the report handler to an indirected model.Luke Kanies2007-10-134-0/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-123-11/+67
| | | | | | | | | | | | | | | | | | | | | | | | This counts as the first commit where configuration compiling actually uses the caching correctly according to the application model.
* | | | Fixing some small spec failures resulting from test fixes.Luke Kanies2007-10-101-3/+3
| | | | | | | | | | | | | | | | | | | | The problem was in how TransObjects were converted to RAL resources. (Committed while flying over Arkansas.)
* | | | Merge branch 'master' of git://michaelobrien.info/puppet into michaelLuke Kanies2007-10-0912-164/+506
|\ \ \ \ | |/ / / |/| | / | | |/ | |/|
| * | All tests should now pass again.Luke Kanies2007-10-084-19/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-063-41/+184
| |/ | | | | | | | | | | to the indirection layers. This should hopefully enable the different application models we need in our different executables.
| * Adding a :code setting for specifying code to runLuke Kanies2007-10-053-51/+13
| | | | | | | | | | | | | | | | 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.
| * Making "null" the default node source, so nodes are at least created easilyLuke Kanies2007-10-051-6/+7
| |
| * This commit is focused on getting the 'puppet' executableLuke Kanies2007-10-056-28/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Adding the integration tests to the Rakefile for spec,Luke Kanies2007-10-044-37/+44
| | | | | | | | | | | | fixing the integration tests, and extending the Classmethods for the indirector so that indirected classes can set the terminus class and cache class.
* | Homing in on a clean separation of concerns for a low-coupling, ↵Rick Bradley2007-10-062-10/+64
| | | | | | | | high-cohesion "server" model that will handle REST and/or XMLRPC on webrick and/or mongrel.
* | Moving the webrick/mongrel "servers" over to HTTPServer module instead of ↵Rick Bradley2007-10-051-15/+60
| | | | | | | | Server. Using Server as the master class for client connections. Server (former RESTServer) will instantiate the appropriate subclass based upon Puppet configurator setting. There are now tests broken in the network section which I can't seem to figure out yet. Not a happy place to be.
* | Merge branch 'master' of git://reductivelabs.com/puppet into routingRick Bradley2007-10-052-52/+67
|\|
| * Adding another test to the ldap node source -- we makeLuke Kanies2007-10-041-1/+10
| | | | | | | | | | sure we throw an appropriate exception if a parent is specified but we cannot find it.
| * Fixing some terminology so some ldap tests are easier to read.Luke Kanies2007-10-041-3/+3
| |
| * Switching the indirection from using settings for configurationLuke Kanies2007-10-041-48/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Minor tweaks.Rick Bradley2007-10-041-6/+6
| |
* | Allow for multiple REST servers to be active; some terminology changes in ↵Rick Bradley2007-10-041-48/+56
| | | | | | | | spec; fleshing out more behavior, implementing.
* | Added .listening to REST server, handle listen states and transitions.Rick Bradley2007-10-041-4/+39
| |
* | Spec'd a reset() method for clearing out known routes. Uses the unregister ↵Rick Bradley2007-10-041-0/+16
| | | | | | | | method so that any hooks there will be run. Probably a violation of YAGNI, but I'm willing to suffer it :-)
* | Updating first portion of the Network RESTServer spec with example code, ↵Rick Bradley2007-10-041-2/+42
| | | | | | | | getting the added examples to pass.
* | Merge branch 'master' of git://reductivelabs.com/puppet into routingRick Bradley2007-10-041-0/+3
|\|
| * Fixing tests for the Configuration object, since ILuke Kanies2007-10-041-0/+3
| | | | | | | | added the any_failed? test to Transactions.
* | Merge branch 'master' of git://reductivelabs.com/puppet into routingRick Bradley2007-10-044-25/+63
|\|
| * Fixing #817, mostly using the patch by DavidS. I couldLuke Kanies2007-10-031-0/+19
| | | | | | | | | | not directly use the patch because I have refactored too much.
| * Removing the Id tags from all of the filesLuke Kanies2007-10-031-1/+0
| |
| * Fixing #813 -- empty configurations again work.Luke Kanies2007-10-031-0/+17
| |
| * Fixing #814 -- when files are missing, the exceptions shouldLuke Kanies2007-10-031-24/+27
| | | | | | | | now be more reasonable.
* | Merge branch 'master' of git://reductivelabs.com/puppet into routingRick Bradley2007-10-031-9/+42
|\|
| * Adding more behaviours to the Puppet::Module spec,Luke Kanies2007-10-031-9/+42
| | | | | | | | | | | | | | and fixing some bugs in the process. Specifically, modules were no longer correctly handling fully qualified files, and they do so once again.
* | Interpreting "hidden" class from spec drafts as a REST Controller. This ↵Rick Bradley2007-10-031-0/+14
| | | | | | | | name, functionality, and/or location in the tree is subject to change, but it's down now somewhere so we can move forward on it.
* | Added partial spec for the serving of REST information, as well as some ↵Rick Bradley2007-10-033-0/+80
|/ | | | client-side REST terminus behavior.