aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/storage.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-08-11 22:54:11 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-08-11 22:54:11 -0500
commitba4858c5b4f639d0438b7a6d53a7a731424a430d (patch)
tree69ad17bc78d0b188fd6c9e75d40e4e390ca318fd /mediagoblin/storage.py
parent07934b442f7cd3abae18eecdf533de004f88e6b1 (diff)
parent788272f30034fb2f917496197e317226d21aad2e (diff)
downloadmediagoblin-ba4858c5b4f639d0438b7a6d53a7a731424a430d.tar.lz
mediagoblin-ba4858c5b4f639d0438b7a6d53a7a731424a430d.tar.xz
mediagoblin-ba4858c5b4f639d0438b7a6d53a7a731424a430d.zip
Merge branch 'master' into processing
Conflicts: mediagoblin/db/migrations.py
Diffstat (limited to 'mediagoblin/storage.py')
-rw-r--r--mediagoblin/storage.py31
1 files changed, 22 insertions, 9 deletions
diff --git a/mediagoblin/storage.py b/mediagoblin/storage.py
index 88c748ce..3968fa29 100644
--- a/mediagoblin/storage.py
+++ b/mediagoblin/storage.py
@@ -290,16 +290,29 @@ class MountStorage(StorageInterface):
"""
Experimental "Mount" virtual Storage Interface
- This isn't an interface to some real storage, instead
- it's a redirecting interface, that redirects requests
- to other "StorageInterface"s.
- For example, requests for ["store1", "a"] to first
- storage with the path ["a"], etc.
+ This isn't an interface to some real storage, instead it's a
+ redirecting interface, that redirects requests to other
+ "StorageInterface"s.
+
+ For example, say you have the paths:
+
+ 1. ['user_data', 'cwebber', 'avatar.jpg']
+ 2. ['user_data', 'elrond', 'avatar.jpg']
+ 3. ['media_entries', '34352f304c3f4d0ad8ad0f043522b6f2', 'thumb.jpg']
+
+ You could mount media_entries under CloudFileStorage and user_data
+ under BasicFileStorage. Then 1 would be passed to
+ BasicFileStorage under the path ['cwebber', 'avatar.jpg'] and 3
+ would be passed to CloudFileStorage under
+ ['34352f304c3f4d0ad8ad0f043522b6f2', 'thumb.jpg'].
+
+ In other words, this is kind of like mounting /home/ and /etc/
+ under different filesystems on your operating system... but with
+ mediagoblin filestorages :)
- To set this up, you currently need to call the mount()
- method with the target path and a backend, that shall
- be available under that target path.
- You have to mount things in a sensible order,
+ To set this up, you currently need to call the mount() method with
+ the target path and a backend, that shall be available under that
+ target path. You have to mount things in a sensible order,
especially you can't mount ["a", "b"] before ["a"].
"""
def __init__(self, **kwargs):