Skip to content

Instantly share code, notes, and snippets.

@clayg
Created May 19, 2016 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clayg/9aef468776d410a52e37bb40b9745590 to your computer and use it in GitHub Desktop.
Save clayg/9aef468776d410a52e37bb40b9745590 to your computer and use it in GitHub Desktop.
In [1]: from swift.common.storage_policy import POLICIES
In [2]: p = POLICIES[1]
In [3]: p
Out[3]: ECStoragePolicy(1, ['ec'], is_default=False, is_deprecated=False, policy_type='erasure_coding'), EC config(ec_type=liberasurecode_rs_vand, ec_segment_size=1048576, ec_ndata=4, ec_nparity=2)
In [7]: p.load_ring('/etc/swift')
In [9]: p.object_ring.get_part_nodes(457293)
Out[9]: []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment