Comment 12 for bug 1091007

Revision history for this message
Samuel Merritt (torgomatic) wrote :

Hm, sounds like there may be a couple of different use cases here.

For running Swift under a different user or in a different location, I think making the location of swift.conf configurable is a reasonable idea. Probably an environment variable is the way to go there, because otherwise you wind up needing a config file to find your config file.

For using swift.common.ring.Ring outside of Swift, I think a better way to go is to modify the Ring class to be able to take a prefix and a suffix at instantiation time and use those instead of the defaults.

That is, something like:

    ring = Ring('/path/to/file', ring_name='object', hash_path_prefix="Two peanuts vere...", hash_path_suffix="...und von vas assaulted... peanut.")

That'd need a little bit of plumbing work to get the prefix into hash_path, but nothing too awful.