Comment 10 for bug 1091007

Revision history for this message
Sergio Rubio (rubiojr) wrote :

Hey folks, bitten by this too.

Trying to use the Ring class from outside Swift and I need to either patch Swift or create /etc/swift/swift.conf as stated above.

[9349][rubiojr.napoleon] cat test.py
from swift.common.ring import Ring

Ring('.', ring_name = 'object')

[~/tmp/pyfoo]
[9349][rubiojr.napoleon] python test.py
Error: [swift-hash]: both swift_hash_path_suffix and swift_hash_path_prefix are missing from /etc/swift/swift.conf

Let me know if a simple patch to encapsulate the code in common/constraints.py and common/utils.py to read the config from a configurable path would help to move things forward.