summaryrefslogtreecommitdiffstats
path: root/lib/puppet/file_serving
Commit message (Collapse)AuthorAgeFilesLines
...
* Deduplicating slashes in the fileserving codeLuke Kanies2008-11-041-2/+2
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Merge branch '0.24.x' Removed the 'after' blocks that call Type.clear,Luke Kanies2008-10-172-5/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | since that method is deprecated. Conflicts: CHANGELOG bin/puppetca lib/puppet/file_serving/fileset.rb lib/puppet/network/xmlrpc/client.rb lib/puppet/type/file/selcontext.rb spec/unit/file_serving/metadata.rb spec/unit/type/file.rb
| * Fix metadata class for cases when checksum_type setPaul Nasrat2008-09-301-3/+3
| |
| * Fix ticket 1596 in new fileset code, use tmpdir in fileserver tests.Paul Nasrat2008-09-301-1/+1
| |
| * Make fileserver use fileset for recursion and handle dangling links by ↵Paul Nasrat2008-09-301-1/+1
| | | | | | | | ignoring them fixing #1544
* | Fixing filesets to allow nil ignore values.Luke Kanies2008-08-281-0/+2
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing FileServing::Base so that it can recurse on a single file.Luke Kanies2008-08-271-1/+1
| | | | | | | | | | | | | | It was throwing exceptions if you tried to use it on a file instead of a directory. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing the terminus helper so it correctly catches options passed from ↵Luke Kanies2008-08-261-1/+10
| | | | | | | | | | | | clients via REST. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding a "source" attribute to fileserving instances.Luke Kanies2008-08-261-0/+4
| | | | | | | | | | | | | | This will be used to cache the source that was used to retrieve the instance. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding automatic attribute collection to the new fileserving code.Luke Kanies2008-08-264-2/+4
| | | | | | | | | | | | | | | | | | | | | | Basically, this just includes a consistent method for collecting info (either content or metadata) and then calls that method when returning instances via the indirector. It's such a large commit mostly because of small changes in the normal code and large changes in the testing to accomodate those small changes. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding the content writer to the content class.Luke Kanies2008-08-261-1/+3
| | | | | | | | | | | | | | Also choosing a fully qualified fake name when creating content instances from raw content. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing the rest backends for webrick and mongrel so the get the whole ↵Luke Kanies2008-08-261-1/+15
| | | | | | | | | | | | | | | | | | request key. Also adding the Content work necessary to demonstrate that this is actually required. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Refactoring how files in FileServing are named.Luke Kanies2008-08-263-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, they retained some concept of the URI used to find them, and this uri was the primary key for the FileServing instances. This key was unfortunately completely useless, as evidenced by the fact that it was never used except to test that it worked. I've modified the FileServing instances (through modifying the Base class) to use their local path as their key, and they no longer care about the URI at all. This commit is mostly about fixing the code that interacts with the instances to use this new API. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Finishing the rename of FileBase => Base.Luke Kanies2008-08-261-0/+76
| | | | | | | | | | | | | | | | | | | | | | Git did something really strange, in that it apparently didn't add the new base.rb files even though I used 'git mv'. Also fixing some other failing tests I hadn't previously tracked down because of the magical tuple of autotest's suckiness and my laziness. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Renaming FileServing::FileBase to FileServing::Base.Luke Kanies2008-08-263-83/+14
| | | | | | | | | | | | | | | | Also fixing a set of tests I broke last night. I'm looking at replacing autotest with rspactor, because my FSEvents hack to autotest means it's harder for me to rerun autotest. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Removing the yaml conversion code from FileContent.Luke Kanies2008-08-261-8/+0
| | | | | | | | | | | | | | | | Also fixing some integration tests that were failing because of the change to the terminus selection code for file serving. Signed-off-by: Luke Kanies <luke@madstop.com>
* | FileServing Configurations now expect unqualified files.Luke Kanies2008-08-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | This fits in with the fact that the indirection requests split URIs and set the request key to an unqualified path rather than a fully-qualified path. The whole system is unqualified end-to-end, now, except when you're specifically asking for a full, local file name. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing the fileserving terminus selection hook.Luke Kanies2008-08-261-22/+23
| | | | | | | | | | | | | | It now uses the fact that the indirection request does URI parsing, rather than doing the parsing on its own. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Merge branch '0.24.x' into mergingLuke Kanies2008-07-291-4/+4
|\| | | | | | | | | | | Conflicts: test/ral/type/filesources.rb
| * Fixed all of the fileserving termini so they use indirection requests.Luke Kanies2008-07-181-4/+4
| | | | | | | | | | | | | | | | This looks like a much larger commit than it is -- it doesn't change any behaviour at all, it just adds some integration tests (which expose the problem) and then switches from an ad-hoc api to a request-based api. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Using the new Cacher class for handling cached data.Luke Kanies2008-05-132-23/+15
|/ | | | | This provides a single, global bit for determining whether a given piece of cached data is still valid.
* Fixing the tests that were failing because of the useLuke Kanies2008-04-081-2/+4
| | | | of the indirection request object.
* Removing unused code from the file_serving/metadata class.Luke Kanies2008-04-081-9/+0
|
* Found all instances of methods where split() is used withoutLuke Kanies2008-03-211-2/+4
| | | | | | | | | | any local variables and added a local variable -- see http://snurl.com/21zf8. My own testing showed that this caused memory growth to level off at a reasonable level. Note that the link above says the problem is only with class methods, but my own testing showed that it's any method that meets these criteria. This is not a functional change, but should hopefully be the last nail in the coffin of #1131.
* Fixing #1093 -- 0.23.2 clients are again compatibleLuke Kanies2008-02-281-0/+1
| | | | | with 0.24.x servers. :ignore links is now equivalent to :manage links.
* Somewhat refactored fileserving so that it no longer cachesLuke Kanies2008-02-232-14/+44
| | | | | | | | | | any objects, nor does it use Puppet's RAL resources. In the process, I fixed #894 (you can now copy links) and refactored other classes as necessary. Mostly it was fixing tests. This is a squashed commit of a temporary branch, fwiw, and it also includes any fixes to the tests that were necessary to get all tests passing again.
* File serving should work now, both recursive andLuke Kanies2007-10-244-16/+47
| | | | | | | | | | | | | | single files, across modules, local file system, and the traditional file server. This work revolves around making sure that the termini produce functional file instances, meaning that they know how to find their content or metadata, which largely comes down to setting their paths correctly. I also created a new terminus base class for the local filesystem, since there was so much common code between content and metadata.
* Renaming the FileServing TerminusSelector module to IndirectionHooks,Luke Kanies2007-10-223-5/+5
| | | | because I'm going to add some hooks for transforming returned objects.
* Renaming the :local termini for metadata and contentLuke Kanies2007-10-221-2/+2
| | | | to :file.
* Link handling is now in the file serving classes.Luke Kanies2007-10-223-25/+74
| | | | | | | | | | 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-222-2/+17
| | | | | | | 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/+138
| | | | | | | 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.
* Adding authorization hooks to the file_server andLuke Kanies2007-10-212-3/+18
| | | | | | | | | | | | | 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-201-3/+3
| | | | tests accordingly.
* File serving now works. I've tested a couple of ways toLuke Kanies2007-10-195-84/+24
| | | | | | | | | | | | | | | | 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.
* I've now split the file-serving termini into two separate types (inLuke Kanies2007-10-184-35/+60
| | | | | | | | | | | | | | | | 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-182-2/+3
| | | | the TerminusSelector module to the File Metadata indirection.
* I'm working on making file serving work in the indirector now, so ILuke Kanies2007-10-182-1/+28
| | | | | | | | | | | | | | | 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-182-2/+2
| | | | | | 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-183-196/+237
| | | | | | 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 the first pass at modifying file servingLuke Kanies2007-10-174-0/+524
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.