)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"02a7b755a94cd679e1db57458cea697d88f75e35","unresolved":false,"context_lines":[{"line_number":7,"context_line":"EC: Add support for policy types, \u0027erasure_coding\u0027 policy"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch extends the StoragePolicy class for non-replication storage"},{"line_number":10,"context_line":"policies, the first candidate being \"erasure coding\"."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Changes:"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"baada198_fb8864e9","line":10,"updated":"2014-07-01 13:08:26.000000000","message":"the first one (not candidate)","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":5189,"name":"Yuan Zhou","email":"dunk007@gmail.com","username":"yuan-zhou"},"change_message_id":"2fa7b818c078eee75e8d31334ad62de68d8515c3","unresolved":false,"context_lines":[{"line_number":22,"context_line":"   - \"ECStoragePolicy\":"},{"line_number":23,"context_line":"     . Erasure Coding policy"},{"line_number":24,"context_line":"     . policy_type \u003d \u0027erasure_coding\u0027"},{"line_number":25,"context_line":"     . Private member variables"},{"line_number":26,"context_line":"       ec_type (EC backend),"},{"line_number":27,"context_line":"       ec_num_data_fragments (number of fragments original"},{"line_number":28,"context_line":"         data split into after erasure coding operation),"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"baada198_a73f8224","line":25,"updated":"2014-07-02 13:13:47.000000000","message":"do we need to have the EC_SEGMENT_SIZE as a configurable parameter? This might be helpful to performance. during the hackathon, we have some discussion on this.\n\nfrom pyeclib\u0027s design perspective, there exists different \u0027drivers\u0027, like jerausre, isal, or some other vender specific driver. do we need to have another parameter here to allow some differentiation, like ec_driver \u003d isal?","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"b5ae692a1551e45e373975fe2db874dc98844dfe","unresolved":false,"context_lines":[{"line_number":22,"context_line":"   - \"ECStoragePolicy\":"},{"line_number":23,"context_line":"     . Erasure Coding policy"},{"line_number":24,"context_line":"     . policy_type \u003d \u0027erasure_coding\u0027"},{"line_number":25,"context_line":"     . Private member variables"},{"line_number":26,"context_line":"       ec_type (EC backend),"},{"line_number":27,"context_line":"       ec_num_data_fragments (number of fragments original"},{"line_number":28,"context_line":"         data split into after erasure coding operation),"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"baada198_e146874e","line":25,"in_reply_to":"baada198_a73f8224","updated":"2014-07-03 20:48:36.000000000","message":"Yes, this is coming up in the PUT path patch.  EC_SEGMENT_SIZE will be added to constraints section of swift.conf.\n\nFor drivers, pyeclib embeds the driver name in ec_type.  For instance, \u0027rs_vand\u0027 vs \u0027rs_vand_isa_l\u0027 with the default being jerasure.","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"02a7b755a94cd679e1db57458cea697d88f75e35","unresolved":false,"context_lines":[{"line_number":26,"context_line":"       ec_type (EC backend),"},{"line_number":27,"context_line":"       ec_num_data_fragments (number of fragments original"},{"line_number":28,"context_line":"         data split into after erasure coding operation),"},{"line_number":29,"context_line":"       ec_num_parity_fragments (number of redundant parity"},{"line_number":30,"context_line":"         fragments generated during erasure coding)"},{"line_number":31,"context_line":"     . Private methods"},{"line_number":32,"context_line":"       EC specific metadata and ring validator methods."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"baada198_9b4a0882","line":29,"updated":"2014-07-01 13:08:26.000000000","message":"nix the word redundant","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"02a7b755a94cd679e1db57458cea697d88f75e35","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":" - Swift will use PyECLib, a Python Erasure Coding library,"},{"line_number":35,"context_line":"   for erasure coding operations. This patch adds PyECLib to"},{"line_number":36,"context_line":"   Swift requirements.txt (https://bitbucket.org/kmgreen2/pyeclib/)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":" - Add test cases for"},{"line_number":39,"context_line":"   - \u0027policy_type\u0027 StoragePolicy member"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"baada198_51620fd9","line":36,"updated":"2014-07-01 13:08:26.000000000","message":"maybe mention that pyeclib is already an approved requirement","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"}],"etc/swift.conf-sample":[{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"02a7b755a94cd679e1db57458cea697d88f75e35","unresolved":false,"context_lines":[{"line_number":41,"context_line":"#name \u003d silver"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"#"},{"line_number":44,"context_line":"# the following declares a policy named \u0027deepfreeze10-4\u0027 which uses"},{"line_number":45,"context_line":"# \u0027erasure_coding\u0027 for data reliability. Swift uses PyECLib (a Python Erasure"},{"line_number":46,"context_line":"# coding library API) library API for encode/decode functions.  Before you"},{"line_number":47,"context_line":"# uncomment this section to enable \u0027erasure_coding\u0027 policies, please make"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"baada198_fecf72ae","line":44,"updated":"2014-07-01 13:08:26.000000000","message":"should mention that this 10:4 is simply an example","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"a397f21cac761a793fdd24468478c151dcb2f61f","unresolved":false,"context_lines":[{"line_number":41,"context_line":"#name \u003d silver"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"#"},{"line_number":44,"context_line":"# the following declares a policy named \u0027deepfreeze10-4\u0027 which uses"},{"line_number":45,"context_line":"# \u0027erasure_coding\u0027 for data reliability. Swift uses PyECLib (a Python Erasure"},{"line_number":46,"context_line":"# coding library API) library API for encode/decode functions.  Before you"},{"line_number":47,"context_line":"# uncomment this section to enable \u0027erasure_coding\u0027 policies, please make"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"baada198_aaee9489","line":44,"in_reply_to":"baada198_fecf72ae","updated":"2014-07-01 15:19:14.000000000","message":"Done","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"02a7b755a94cd679e1db57458cea697d88f75e35","unresolved":false,"context_lines":[{"line_number":47,"context_line":"# uncomment this section to enable \u0027erasure_coding\u0027 policies, please make"},{"line_number":48,"context_line":"# sure you have PyECLib installed."},{"line_number":49,"context_line":"#"},{"line_number":50,"context_line":"# PyECLib can be downloaded from:"},{"line_number":51,"context_line":"#    https://bitbucket.org/kmgreen2/pyeclib"},{"line_number":52,"context_line":"# Also on PyPi:"},{"line_number":53,"context_line":"#    https://pypi.python.org/pypi/PyECLib"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"baada198_5ee77e40","line":50,"updated":"2014-07-01 13:08:26.000000000","message":"not sure how I feel about these download locations here in the comment, I almost think we\u0027d be better off pointing to the docs for details on installing pyeclib and then include, well, details on how to install (not just locations) and also info what you will likely run into if/when you forget to install.","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"b30e8e544915d73567ed7096009c380b8e13211e","unresolved":false,"context_lines":[{"line_number":47,"context_line":"# uncomment this section to enable \u0027erasure_coding\u0027 policies, please make"},{"line_number":48,"context_line":"# sure you have PyECLib installed."},{"line_number":49,"context_line":"#"},{"line_number":50,"context_line":"# PyECLib can be downloaded from:"},{"line_number":51,"context_line":"#    https://bitbucket.org/kmgreen2/pyeclib"},{"line_number":52,"context_line":"# Also on PyPi:"},{"line_number":53,"context_line":"#    https://pypi.python.org/pypi/PyECLib"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"baada198_b77dd4b3","line":50,"in_reply_to":"baada198_000f5f31","updated":"2014-07-03 03:02:51.000000000","message":"Actually it was the URLs, somehow those feel like they belong in docs with the other detail","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"a397f21cac761a793fdd24468478c151dcb2f61f","unresolved":false,"context_lines":[{"line_number":47,"context_line":"# uncomment this section to enable \u0027erasure_coding\u0027 policies, please make"},{"line_number":48,"context_line":"# sure you have PyECLib installed."},{"line_number":49,"context_line":"#"},{"line_number":50,"context_line":"# PyECLib can be downloaded from:"},{"line_number":51,"context_line":"#    https://bitbucket.org/kmgreen2/pyeclib"},{"line_number":52,"context_line":"# Also on PyPi:"},{"line_number":53,"context_line":"#    https://pypi.python.org/pypi/PyECLib"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"baada198_000f5f31","line":50,"in_reply_to":"baada198_5ee77e40","updated":"2014-07-01 15:19:14.000000000","message":"I went for as much detail as possible. :)  This should change as we move to real docs like you suggested.  I assume the urls themselves wasn\u0027t your concern, the detail was?","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"02a7b755a94cd679e1db57458cea697d88f75e35","unresolved":false,"context_lines":[{"line_number":53,"context_line":"#    https://pypi.python.org/pypi/PyECLib"},{"line_number":54,"context_line":"#"},{"line_number":55,"context_line":"# To help with the choice of an Erasure Coding (EC) scheme, PyECLib ships with"},{"line_number":56,"context_line":"# a companion configuration tool (pyeclib/tools/pyeclib_conf_tool.py) which"},{"line_number":57,"context_line":"# will allows you to performance benchmark of available/supported EC backends."},{"line_number":58,"context_line":"# The tool also creates a sample swift config entry similar to the one below."},{"line_number":59,"context_line":"#"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"baada198_be0a5ad0","line":56,"updated":"2014-07-01 13:08:26.000000000","message":"Again, I think a teaser here is good but what the tool does and how it works, with some examples, should be in the docs and referenced here.  I don\u0027t think we need full blown docs just yet but at least some sections to cover the changes as we go (build up the docs this time instead of writing them all at the end)","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"a397f21cac761a793fdd24468478c151dcb2f61f","unresolved":false,"context_lines":[{"line_number":53,"context_line":"#    https://pypi.python.org/pypi/PyECLib"},{"line_number":54,"context_line":"#"},{"line_number":55,"context_line":"# To help with the choice of an Erasure Coding (EC) scheme, PyECLib ships with"},{"line_number":56,"context_line":"# a companion configuration tool (pyeclib/tools/pyeclib_conf_tool.py) which"},{"line_number":57,"context_line":"# will allows you to performance benchmark of available/supported EC backends."},{"line_number":58,"context_line":"# The tool also creates a sample swift config entry similar to the one below."},{"line_number":59,"context_line":"#"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"baada198_00267fb7","line":56,"in_reply_to":"baada198_be0a5ad0","updated":"2014-07-01 15:19:14.000000000","message":"This was more of a light \"reminder\" than a \"teaser\"  ;)","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":11608,"name":"Eric Lambert","email":"eric.d.lambert@gmail.com","username":"elambert"},"change_message_id":"ae72b4b2023cc645d73b706a6d46aabf1f03e7cb","unresolved":false,"context_lines":[{"line_number":54,"context_line":"#"},{"line_number":55,"context_line":"# To help with the choice of an Erasure Coding (EC) scheme, PyECLib ships with"},{"line_number":56,"context_line":"# a companion configuration tool (pyeclib/tools/pyeclib_conf_tool.py) which"},{"line_number":57,"context_line":"# will allows you to performance benchmark of available/supported EC backends."},{"line_number":58,"context_line":"# The tool also creates a sample swift config entry similar to the one below."},{"line_number":59,"context_line":"#"},{"line_number":60,"context_line":"#[storage-policy:2]"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"baada198_a439fdd8","line":57,"updated":"2014-07-03 20:45:34.000000000","message":"This sentence is bit needs to be grammatically refactored perhaps something like \"...which will allow you to run performance benchmarks against all of the available EC backends\"","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"b5ae692a1551e45e373975fe2db874dc98844dfe","unresolved":false,"context_lines":[{"line_number":54,"context_line":"#"},{"line_number":55,"context_line":"# To help with the choice of an Erasure Coding (EC) scheme, PyECLib ships with"},{"line_number":56,"context_line":"# a companion configuration tool (pyeclib/tools/pyeclib_conf_tool.py) which"},{"line_number":57,"context_line":"# will allows you to performance benchmark of available/supported EC backends."},{"line_number":58,"context_line":"# The tool also creates a sample swift config entry similar to the one below."},{"line_number":59,"context_line":"#"},{"line_number":60,"context_line":"#[storage-policy:2]"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"baada198_178ad969","line":57,"in_reply_to":"baada198_a439fdd8","updated":"2014-07-03 20:48:36.000000000","message":"Thanks for catching this Eric.  Part of the change is already made .. will change the rest per your suggestion.","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"7c3b49f4beec3e72687fbb86444429d97112dd70","unresolved":false,"context_lines":[{"line_number":41,"context_line":"#name \u003d silver"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"#"},{"line_number":44,"context_line":"# the following declares a storage policy of type \u0027erasure_coding\u0027 which uses"},{"line_number":45,"context_line":"# Erasure Coding for data reliability.  Erasure Coding techniques provide data"},{"line_number":46,"context_line":"# redundancy by breaking objects up into smaller \u0027fragments\u0027 (a process known"},{"line_number":47,"context_line":"# as \u0027encode\u0027).  The fragments are categorized as \u0027data\u0027 and \u0027parity\u0027 fragments"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"baada198_8d866764","line":44,"updated":"2014-07-08 17:19:55.000000000","message":"cool, I like this much better!","commit_id":"729a679991b0c64ff25a286ea9fdca35fc04f3f3"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"6ad9825810f8a7d617ad6009717aa46b4c44ecda","unresolved":false,"context_lines":[{"line_number":45,"context_line":"# Erasure Coding for data reliability.  Erasure Coding techniques provide data"},{"line_number":46,"context_line":"# redundancy by breaking objects up into smaller \u0027fragments\u0027 (a process known"},{"line_number":47,"context_line":"# as \u0027encode\u0027).  The fragments are categorized as \u0027data\u0027 and \u0027parity\u0027 fragments"},{"line_number":48,"context_line":"# and are stored in independent fault domains.  When a client requests the"},{"line_number":49,"context_line":"# object, it can be reconstructed by applying \u0027decode\u0027 operation on a minimal"},{"line_number":50,"context_line":"# subset of the total fragments.  The \u0027deepfreeze10-4\u0027 policy defined below is"},{"line_number":51,"context_line":"# a _sample_ configuration with 10 \u0027data\u0027 and 4 \u0027parity\u0027 fragments. \u0027ec_type\u0027"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"baada198_3139f7cf","line":48,"updated":"2014-07-30 18:18:08.000000000","message":"The \"independent fault domains\" is only accurate if the ring is setup accordingly - reading this someone might infer that they get this characteristic because of choosing the EC policy.  I\u0027d suggest we just replace \"are\" with \"can be\" and whip over to the user docs and add a TODO (or text) to explain how you\u0027d need #zones \u003d\u003d total # of fragments in order to for this to be true.","commit_id":"2da6f3c66d43e8d9810465e077b152c6c5e0ba88"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"0bb7cc9898f2a1295ecd92b7650f107d1173566c","unresolved":false,"context_lines":[{"line_number":57,"context_line":"# install PyECLib."},{"line_number":58,"context_line":"#"},{"line_number":59,"context_line":"# To help with the choice of an Erasure Coding (EC) scheme, PyECLib ships with"},{"line_number":60,"context_line":"# a companion configuration tool (pyeclib/tools/pyeclib_conf_tool.py) which"},{"line_number":61,"context_line":"# will allow you to run performance benchmarks against EC backends available"},{"line_number":62,"context_line":"# in PyECLib.  The tool also helps creates a sample swift config entry similar"},{"line_number":63,"context_line":"# to the one below."}],"source_content_type":"application/octet-stream","patch_set":8,"id":"baada198_585fce74","line":60,"updated":"2014-08-04 23:00:55.000000000","message":"Update comment - conf tool is moving to Swift","commit_id":"5da30cb59e19feafe152a750e59374ce93d22602"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"25fed9a7a6e0fb2766a7d5bc8dcceeb16a454c64","unresolved":false,"context_lines":[{"line_number":60,"context_line":"# a companion configuration tool (pyeclib/tools/pyeclib_conf_tool.py) which"},{"line_number":61,"context_line":"# will allow you to run performance benchmarks against EC backends available"},{"line_number":62,"context_line":"# in PyECLib.  The tool also helps creates a sample swift config entry similar"},{"line_number":63,"context_line":"# to the one below."},{"line_number":64,"context_line":"#"},{"line_number":65,"context_line":"#[storage-policy:2]"},{"line_number":66,"context_line":"#name \u003d deepfreeze10-4"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"baada198_dba74ea6","line":63,"updated":"2014-08-05 06:03:53.000000000","message":"Good suggestion but why don\u0027t you suggest selectable ec_types (e.g. flat_xor_3) somewhere to make users to find supported ec_types easily?","commit_id":"5da30cb59e19feafe152a750e59374ce93d22602"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"0bb7cc9898f2a1295ecd92b7650f107d1173566c","unresolved":false,"context_lines":[{"line_number":61,"context_line":"# will allow you to run performance benchmarks against EC backends available"},{"line_number":62,"context_line":"# in PyECLib.  The tool also helps creates a sample swift config entry similar"},{"line_number":63,"context_line":"# to the one below."},{"line_number":64,"context_line":"#"},{"line_number":65,"context_line":"#[storage-policy:2]"},{"line_number":66,"context_line":"#name \u003d deepfreeze10-4"},{"line_number":67,"context_line":"#type \u003d erasure_coding"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"baada198_989a4611","line":64,"updated":"2014-08-04 23:00:55.000000000","message":"Add comments around which ec policy parameters are required and the default values.","commit_id":"5da30cb59e19feafe152a750e59374ce93d22602"},{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"166fda52c77b8e0382d00199fd255b812f47dd1e","unresolved":false,"context_lines":[{"line_number":64,"context_line":"#"},{"line_number":65,"context_line":"#[storage-policy:2]"},{"line_number":66,"context_line":"#name \u003d deepfreeze10-4"},{"line_number":67,"context_line":"#type \u003d erasure_coding"},{"line_number":68,"context_line":"#ec_type \u003d rs_vand"},{"line_number":69,"context_line":"#ec_num_data_fragments \u003d 10"},{"line_number":70,"context_line":"#ec_num_parity_fragments \u003d 4"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"baada198_5ebed764","line":67,"updated":"2014-08-04 23:02:05.000000000","message":"change \"type\" to \"policy_type\" to make explicit and make parsing easier in storage_policy.py","commit_id":"5da30cb59e19feafe152a750e59374ce93d22602"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"0bb7cc9898f2a1295ecd92b7650f107d1173566c","unresolved":false,"context_lines":[{"line_number":65,"context_line":"#[storage-policy:2]"},{"line_number":66,"context_line":"#name \u003d deepfreeze10-4"},{"line_number":67,"context_line":"#type \u003d erasure_coding"},{"line_number":68,"context_line":"#ec_type \u003d rs_vand"},{"line_number":69,"context_line":"#ec_num_data_fragments \u003d 10"},{"line_number":70,"context_line":"#ec_num_parity_fragments \u003d 4"},{"line_number":71,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":8,"id":"baada198_18a55647","line":68,"updated":"2014-08-04 23:00:55.000000000","message":"Update ec_type sample to reflect recent PyECLib enum changes.","commit_id":"5da30cb59e19feafe152a750e59374ce93d22602"}],"requirements.txt":[{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"0bb7cc9898f2a1295ecd92b7650f107d1173566c","unresolved":false,"context_lines":[{"line_number":5,"context_line":"pastedeploy\u003e\u003d1.3.3"},{"line_number":6,"context_line":"simplejson\u003e\u003d2.0.9"},{"line_number":7,"context_line":"xattr\u003e\u003d0.4"},{"line_number":8,"context_line":"pyeclib\u003e\u003d0.9.2"}],"source_content_type":"text/plain","patch_set":8,"id":"baada198_be49b333","line":8,"updated":"2014-08-04 23:00:55.000000000","message":"Add a version cap","commit_id":"5da30cb59e19feafe152a750e59374ce93d22602"},{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"06c9461b5230a63d87937ddd907be09a40b84209","unresolved":false,"context_lines":[{"line_number":5,"context_line":"pastedeploy\u003e\u003d1.3.3"},{"line_number":6,"context_line":"simplejson\u003e\u003d2.0.9"},{"line_number":7,"context_line":"xattr\u003e\u003d0.4"},{"line_number":8,"context_line":"pyeclib\u003e\u003d0.9.2"}],"source_content_type":"text/plain","patch_set":10,"id":"baada198_0448e988","line":8,"updated":"2014-08-08 21:10:42.000000000","message":"still needs a version cap before being merged to master, but that probably also needs a change in global-requirements first","commit_id":"ef81d2ff1f1fc50bbe651c495d5fef6667ea6f48"}],"swift/common/storage_policy.py":[{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"02a7b755a94cd679e1db57458cea697d88f75e35","unresolved":false,"context_lines":[{"line_number":26,"context_line":"POLICY_INDEX \u003d \u0027X-Backend-Storage-Policy-Index\u0027"},{"line_number":27,"context_line":"LEGACY_POLICY_NAME \u003d \u0027Policy-0\u0027"},{"line_number":28,"context_line":"VALID_CHARS \u003d \u0027-\u0027 + string.letters + string.digits"},{"line_number":29,"context_line":"VALID_TYPES \u003d ["},{"line_number":30,"context_line":"    \u0027replication\u0027,"},{"line_number":31,"context_line":"    \u0027erasure_coding\u0027,"},{"line_number":32,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_5e769e3f","line":29,"updated":"2014-07-01 13:08:26.000000000","message":"I guess another option here would be to do away with type and use isInstance later in code paths where we need to make decisions based on Policy (and something like ec_type as a config option could be used to classify a policy as EC when parsing)","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"a397f21cac761a793fdd24468478c151dcb2f61f","unresolved":false,"context_lines":[{"line_number":26,"context_line":"POLICY_INDEX \u003d \u0027X-Backend-Storage-Policy-Index\u0027"},{"line_number":27,"context_line":"LEGACY_POLICY_NAME \u003d \u0027Policy-0\u0027"},{"line_number":28,"context_line":"VALID_CHARS \u003d \u0027-\u0027 + string.letters + string.digits"},{"line_number":29,"context_line":"VALID_TYPES \u003d ["},{"line_number":30,"context_line":"    \u0027replication\u0027,"},{"line_number":31,"context_line":"    \u0027erasure_coding\u0027,"},{"line_number":32,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_406a371b","line":29,"in_reply_to":"baada198_5e769e3f","updated":"2014-07-01 15:19:14.000000000","message":"I tried using isInstance() before (would have been particularly useful in the quorum_size() patch) but couldn\u0027t make it look as clean.  Since we are saying \"erasure_coding\" is the \"first\" policy type, so just went ahead and added what we had working before. \n\nI am open to going to going back to isInstance() here.","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"02a7b755a94cd679e1db57458cea697d88f75e35","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        self.is_deprecated \u003d config_true_value(is_deprecated)"},{"line_number":101,"context_line":"        self.is_default \u003d config_true_value(is_default)"},{"line_number":102,"context_line":"        if policy_type not in VALID_TYPES:"},{"line_number":103,"context_line":"            raise PolicyError(\u0027Invalid type\u0027, idx)"},{"line_number":104,"context_line":"        self.policy_type \u003d policy_type"},{"line_number":105,"context_line":"        if self.is_deprecated and self.is_default:"},{"line_number":106,"context_line":"            raise PolicyError(\u0027Deprecated policy can not be default.  \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_fb17844f","line":103,"updated":"2014-07-01 13:08:26.000000000","message":"missing test coverage here (raise PolicyError line)","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"a397f21cac761a793fdd24468478c151dcb2f61f","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        self.is_deprecated \u003d config_true_value(is_deprecated)"},{"line_number":101,"context_line":"        self.is_default \u003d config_true_value(is_default)"},{"line_number":102,"context_line":"        if policy_type not in VALID_TYPES:"},{"line_number":103,"context_line":"            raise PolicyError(\u0027Invalid type\u0027, idx)"},{"line_number":104,"context_line":"        self.policy_type \u003d policy_type"},{"line_number":105,"context_line":"        if self.is_deprecated and self.is_default:"},{"line_number":106,"context_line":"            raise PolicyError(\u0027Deprecated policy can not be default.  \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_c0cc8738","line":103,"in_reply_to":"baada198_fb17844f","updated":"2014-07-01 15:19:14.000000000","message":"Done","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"02a7b755a94cd679e1db57458cea697d88f75e35","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        self.object_ring \u003d Ring(swift_dir, ring_name\u003dself.ring_name)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"class ReplicationStoragePolicy(StoragePolicy):"},{"line_number":135,"context_line":"    \"\"\""},{"line_number":136,"context_line":"    Represents a storage policy of type \u0027replication\u0027.  Default storage policy"},{"line_number":137,"context_line":"    class unless otherwise overridden from swift.conf."}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_be097a97","line":134,"updated":"2014-07-01 13:08:26.000000000","message":"Whether we decide to use the type element or not, either way we can reconsider using the word \u0027replication\u0027 in here since the central focus for defining a policy may not be its durability policy.  Maybe call this class (or its type) StandradStoragePolicy? (was thinking default that that could get very confusing w/the word default in policy declaration)","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"02a7b755a94cd679e1db57458cea697d88f75e35","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                              % self.name)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def __repr__(self):"},{"line_number":201,"context_line":"        return \"%s, EC config(ec_type\u003d%s, ec_ndata\u003d%d, ec_nparity\u003d%d)\" % ("},{"line_number":202,"context_line":"               StoragePolicy.__repr__(self),"},{"line_number":203,"context_line":"               self.ec_type, self.ec_ndata, self.ec_nparity)"},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_fe0e9233","line":201,"updated":"2014-07-01 13:08:26.000000000","message":"missing test coverage","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"a397f21cac761a793fdd24468478c151dcb2f61f","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                              % self.name)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def __repr__(self):"},{"line_number":201,"context_line":"        return \"%s, EC config(ec_type\u003d%s, ec_ndata\u003d%d, ec_nparity\u003d%d)\" % ("},{"line_number":202,"context_line":"               StoragePolicy.__repr__(self),"},{"line_number":203,"context_line":"               self.ec_type, self.ec_ndata, self.ec_nparity)"},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_c06807f8","line":201,"in_reply_to":"baada198_fe0e9233","updated":"2014-07-01 15:19:14.000000000","message":"Done","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"02a7b755a94cd679e1db57458cea697d88f75e35","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        return self._ec_nparity"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    @property"},{"line_number":218,"context_line":"    def ec_driver(self):"},{"line_number":219,"context_line":"        return self._pyeclib_driver"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_3e100a4e","line":218,"updated":"2014-07-01 13:08:26.000000000","message":"missing test coverage","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"a397f21cac761a793fdd24468478c151dcb2f61f","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        return self._ec_nparity"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    @property"},{"line_number":218,"context_line":"    def ec_driver(self):"},{"line_number":219,"context_line":"        return self._pyeclib_driver"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_e06d0b06","line":218,"in_reply_to":"baada198_3e100a4e","updated":"2014-07-01 15:19:14.000000000","message":"Done","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"02a7b755a94cd679e1db57458cea697d88f75e35","unresolved":false,"context_lines":[{"line_number":369,"context_line":"            policy.load_ring(swift_dir)"},{"line_number":370,"context_line":"        return policy.object_ring"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"    # FIXME add EC policy info support?"},{"line_number":373,"context_line":"    def get_policy_info(self):"},{"line_number":374,"context_line":"        \"\"\""},{"line_number":375,"context_line":"        Build info about policies for the /info endpoint"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_ded1cece","line":372,"updated":"2014-07-01 13:08:26.000000000","message":"IMHO yes we\u0027d want the rest of the EC parms reported in /info as well","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"02a7b755a94cd679e1db57458cea697d88f75e35","unresolved":false,"context_lines":[{"line_number":410,"context_line":"            \u0027type\u0027: \u0027policy_type\u0027,"},{"line_number":411,"context_line":"        }"},{"line_number":412,"context_line":"        config_to_ecpolicy_option_map \u003d {"},{"line_number":413,"context_line":"            # ECStoragePolicy Specific options"},{"line_number":414,"context_line":"            \u0027ec_type\u0027: \u0027ec_type\u0027,"},{"line_number":415,"context_line":"            \u0027ec_num_data_fragments\u0027: \u0027ec_ndata\u0027,"},{"line_number":416,"context_line":"            \u0027ec_num_parity_fragments\u0027: \u0027ec_nparity\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_dee8ee7e","line":413,"updated":"2014-07-01 13:08:26.000000000","message":"why didn\u0027t you just add these to the dict above?","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"b30e8e544915d73567ed7096009c380b8e13211e","unresolved":false,"context_lines":[{"line_number":410,"context_line":"            \u0027type\u0027: \u0027policy_type\u0027,"},{"line_number":411,"context_line":"        }"},{"line_number":412,"context_line":"        config_to_ecpolicy_option_map \u003d {"},{"line_number":413,"context_line":"            # ECStoragePolicy Specific options"},{"line_number":414,"context_line":"            \u0027ec_type\u0027: \u0027ec_type\u0027,"},{"line_number":415,"context_line":"            \u0027ec_num_data_fragments\u0027: \u0027ec_ndata\u0027,"},{"line_number":416,"context_line":"            \u0027ec_num_parity_fragments\u0027: \u0027ec_nparity\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_57b1d88d","line":413,"in_reply_to":"baada198_6682f450","updated":"2014-07-03 03:02:51.000000000","message":"OK, cool","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"a397f21cac761a793fdd24468478c151dcb2f61f","unresolved":false,"context_lines":[{"line_number":410,"context_line":"            \u0027type\u0027: \u0027policy_type\u0027,"},{"line_number":411,"context_line":"        }"},{"line_number":412,"context_line":"        config_to_ecpolicy_option_map \u003d {"},{"line_number":413,"context_line":"            # ECStoragePolicy Specific options"},{"line_number":414,"context_line":"            \u0027ec_type\u0027: \u0027ec_type\u0027,"},{"line_number":415,"context_line":"            \u0027ec_num_data_fragments\u0027: \u0027ec_ndata\u0027,"},{"line_number":416,"context_line":"            \u0027ec_num_parity_fragments\u0027: \u0027ec_nparity\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_6682f450","line":413,"in_reply_to":"baada198_dee8ee7e","updated":"2014-07-01 15:19:14.000000000","message":"Didn\u0027t think it was a good idea to mix ECStoragePolicy options with the base options .. useful in case we decide to move subclass specific options parsing to another routine?","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"02a7b755a94cd679e1db57458cea697d88f75e35","unresolved":false,"context_lines":[{"line_number":429,"context_line":"            policy_options[policy_option] \u003d value"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        # assume replication policy by default"},{"line_number":432,"context_line":"        policyclass \u003d ReplicationStoragePolicy"},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"        # check policy_type if specified"},{"line_number":435,"context_line":"        if \u0027policy_type\u0027 in policy_options.keys():"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_3ead6a32","line":432,"updated":"2014-07-01 13:08:26.000000000","message":"Just for readability I\u0027d get rid of policyclass and give the upcoming if and else and then either set policy \u003d ECStoragePolocy or policy \u003d ReplicationStoragePolicy","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"a397f21cac761a793fdd24468478c151dcb2f61f","unresolved":false,"context_lines":[{"line_number":429,"context_line":"            policy_options[policy_option] \u003d value"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        # assume replication policy by default"},{"line_number":432,"context_line":"        policyclass \u003d ReplicationStoragePolicy"},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"        # check policy_type if specified"},{"line_number":435,"context_line":"        if \u0027policy_type\u0027 in policy_options.keys():"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_66d03451","line":432,"in_reply_to":"baada198_3ead6a32","updated":"2014-07-01 15:19:14.000000000","message":"Forgot this was Python.  :)","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"1fc71a41d10e89662b019356274fb256a338fa13","unresolved":false,"context_lines":[{"line_number":29,"context_line":"VALID_TYPES \u003d ["},{"line_number":30,"context_line":"    \u0027replication\u0027,"},{"line_number":31,"context_line":"    \u0027erasure_coding\u0027,"},{"line_number":32,"context_line":"]"},{"line_number":33,"context_line":"DEFAULT_POLICY_TYPE \u003d VALID_TYPES[0]"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_583584d9","line":32,"updated":"2014-07-11 01:44:55.000000000","message":"Seeing as we are using variables (so they can be easily changed etc) I wonder if it would be cleaner to do something like:\n\n  VALID_TYPES \u003d (                                                                    \n      REPL_POLICY_TYPE,                                                                    \n      EC_POLICY_TYPE,                                                                      \n  ) \u003d (                                                                               \n      \u0027replication\u0027,                                                                  \n      \u0027erasure_coding\u0027                                                                \n  ) \n\nNow you can use REPL_POLICY_TYPE and EC_POLICY_TYPE in the code below.","commit_id":"729a679991b0c64ff25a286ea9fdca35fc04f3f3"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"669ac342be855d8836d8df435e731d813c0e3935","unresolved":false,"context_lines":[{"line_number":29,"context_line":"VALID_TYPES \u003d ["},{"line_number":30,"context_line":"    \u0027replication\u0027,"},{"line_number":31,"context_line":"    \u0027erasure_coding\u0027,"},{"line_number":32,"context_line":"]"},{"line_number":33,"context_line":"DEFAULT_POLICY_TYPE \u003d VALID_TYPES[0]"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_8b018808","line":32,"in_reply_to":"baada198_583584d9","updated":"2014-07-11 03:31:32.000000000","message":"Totally agree.  Why didn\u0027t I think about this being a C programmer at heart?  :)  Thanks Matt","commit_id":"729a679991b0c64ff25a286ea9fdca35fc04f3f3"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"7c3b49f4beec3e72687fbb86444429d97112dd70","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        self.is_deprecated \u003d config_true_value(is_deprecated)"},{"line_number":101,"context_line":"        self.is_default \u003d config_true_value(is_default)"},{"line_number":102,"context_line":"        if policy_type not in VALID_TYPES:"},{"line_number":103,"context_line":"            # FIXME - should we throw an exception to prevent users from"},{"line_number":104,"context_line":"            # using the StoragePolicy class directly?"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"            # unless we instantiate a storage policy with StoragePolicy"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_6de83317","line":103,"updated":"2014-07-08 17:19:55.000000000","message":"I think its a good idea just to keep things clean","commit_id":"729a679991b0c64ff25a286ea9fdca35fc04f3f3"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"669ac342be855d8836d8df435e731d813c0e3935","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        self.is_deprecated \u003d config_true_value(is_deprecated)"},{"line_number":101,"context_line":"        self.is_default \u003d config_true_value(is_default)"},{"line_number":102,"context_line":"        if policy_type not in VALID_TYPES:"},{"line_number":103,"context_line":"            # FIXME - should we throw an exception to prevent users from"},{"line_number":104,"context_line":"            # using the StoragePolicy class directly?"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"            # unless we instantiate a storage policy with StoragePolicy"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_8e2fd687","line":103,"in_reply_to":"baada198_6de83317","updated":"2014-07-11 03:31:32.000000000","message":"peluse, I assume you mean not throw an exception.  The point here was if we never allowed use to instantiate StoragePolicy() directly, we\u0027d never have a case where policy_type is invalid .. we\u0027d never pass a policy_type to the policy subclass __init__()","commit_id":"729a679991b0c64ff25a286ea9fdca35fc04f3f3"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"85e7611d2ab9b26c07b9901b5f5305b435d96805","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        self.is_deprecated \u003d config_true_value(is_deprecated)"},{"line_number":101,"context_line":"        self.is_default \u003d config_true_value(is_default)"},{"line_number":102,"context_line":"        if policy_type not in VALID_TYPES:"},{"line_number":103,"context_line":"            # FIXME - should we throw an exception to prevent users from"},{"line_number":104,"context_line":"            # using the StoragePolicy class directly?"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"            # unless we instantiate a storage policy with StoragePolicy"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_a493bd59","line":103,"in_reply_to":"baada198_8e2fd687","updated":"2014-07-11 18:17:39.000000000","message":"sorry, no I mean to throw the exception - IMHO that\u0027s cleaner for the reasons you state :)","commit_id":"729a679991b0c64ff25a286ea9fdca35fc04f3f3"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"fe98f0e5a0bca0889901bcf895bf6681920e4f81","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"            # unless we instantiate a storage policy with StoragePolicy"},{"line_number":107,"context_line":"            # base class and force a policy_type, we should not get here"},{"line_number":108,"context_line":"            raise PolicyError(\u0027Invalid type\u0027, idx)"},{"line_number":109,"context_line":"        self.policy_type \u003d policy_type"},{"line_number":110,"context_line":"        if self.is_deprecated and self.is_default:"},{"line_number":111,"context_line":"            raise PolicyError(\u0027Deprecated policy can not be default.  \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_9c9df3be","line":108,"updated":"2014-07-14 18:53:11.000000000","message":"should use policy_type here","commit_id":"729a679991b0c64ff25a286ea9fdca35fc04f3f3"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"1fc71a41d10e89662b019356274fb256a338fa13","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        super(ReplicationStoragePolicy, self).__init__("},{"line_number":152,"context_line":"            idx, name, is_default, is_deprecated, object_ring,"},{"line_number":153,"context_line":"            policy_type\u003d\u0027replication\u0027)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"class ECStoragePolicy(StoragePolicy):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_985d5c18","line":153,"updated":"2014-07-11 01:44:55.000000000","message":"If you used a variable for the policy types you can change it here.\n\n  policy_type\u003dREPL_POLICY_TYPE)","commit_id":"729a679991b0c64ff25a286ea9fdca35fc04f3f3"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"669ac342be855d8836d8df435e731d813c0e3935","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        super(ReplicationStoragePolicy, self).__init__("},{"line_number":152,"context_line":"            idx, name, is_default, is_deprecated, object_ring,"},{"line_number":153,"context_line":"            policy_type\u003d\u0027replication\u0027)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"class ECStoragePolicy(StoragePolicy):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_ee577200","line":153,"in_reply_to":"baada198_985d5c18","updated":"2014-07-11 03:31:32.000000000","message":"Done","commit_id":"729a679991b0c64ff25a286ea9fdca35fc04f3f3"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"1fc71a41d10e89662b019356274fb256a338fa13","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        super(ECStoragePolicy, self).__init__("},{"line_number":169,"context_line":"            idx, name, is_default, is_deprecated, object_ring,"},{"line_number":170,"context_line":"            policy_type\u003d\u0027erasure_coding\u0027)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        ## Validate erasure_coding policy specific members"},{"line_number":173,"context_line":"        # ec_type is one of the EC implementations supported by PyEClib"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_98b47c36","line":170,"updated":"2014-07-11 01:44:55.000000000","message":"As above:\n\n  policy_type\u003dEC_POLICY_TYPE)","commit_id":"729a679991b0c64ff25a286ea9fdca35fc04f3f3"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"669ac342be855d8836d8df435e731d813c0e3935","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        super(ECStoragePolicy, self).__init__("},{"line_number":169,"context_line":"            idx, name, is_default, is_deprecated, object_ring,"},{"line_number":170,"context_line":"            policy_type\u003d\u0027erasure_coding\u0027)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        ## Validate erasure_coding policy specific members"},{"line_number":173,"context_line":"        # ec_type is one of the EC implementations supported by PyEClib"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_2e416a39","line":170,"in_reply_to":"baada198_98b47c36","updated":"2014-07-11 03:31:32.000000000","message":"Done","commit_id":"729a679991b0c64ff25a286ea9fdca35fc04f3f3"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"7c3b49f4beec3e72687fbb86444429d97112dd70","unresolved":false,"context_lines":[{"line_number":169,"context_line":"            idx, name, is_default, is_deprecated, object_ring,"},{"line_number":170,"context_line":"            policy_type\u003d\u0027erasure_coding\u0027)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        ## Validate erasure_coding policy specific members"},{"line_number":173,"context_line":"        # ec_type is one of the EC implementations supported by PyEClib"},{"line_number":174,"context_line":"        if ec_type is None:"},{"line_number":175,"context_line":"            raise PolicyError(\u0027Missing ec_type\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_4de36f33","line":172,"updated":"2014-07-08 17:19:55.000000000","message":"extra #","commit_id":"729a679991b0c64ff25a286ea9fdca35fc04f3f3"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"669ac342be855d8836d8df435e731d813c0e3935","unresolved":false,"context_lines":[{"line_number":169,"context_line":"            idx, name, is_default, is_deprecated, object_ring,"},{"line_number":170,"context_line":"            policy_type\u003d\u0027erasure_coding\u0027)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        ## Validate erasure_coding policy specific members"},{"line_number":173,"context_line":"        # ec_type is one of the EC implementations supported by PyEClib"},{"line_number":174,"context_line":"        if ec_type is None:"},{"line_number":175,"context_line":"            raise PolicyError(\u0027Missing ec_type\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_0ea906df","line":172,"in_reply_to":"baada198_4de36f33","updated":"2014-07-11 03:31:32.000000000","message":"Done","commit_id":"729a679991b0c64ff25a286ea9fdca35fc04f3f3"},{"author":{"_account_id":5189,"name":"Yuan Zhou","email":"dunk007@gmail.com","username":"yuan-zhou"},"change_message_id":"269caea9f622238c4903ab1c73797f804f78392d","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        # ec_type is one of the EC implementations supported by PyEClib"},{"line_number":174,"context_line":"        if ec_type is None:"},{"line_number":175,"context_line":"            raise PolicyError(\u0027Missing ec_type\u0027)"},{"line_number":176,"context_line":"        self._ec_type \u003d ec_type"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        # Define _ec_ndata as the number of EC data fragments"},{"line_number":179,"context_line":"        # Accessible as the property \"ec_ndata\""}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_d8bfd45e","line":176,"updated":"2014-07-11 02:27:23.000000000","message":"is it possible to do a validation on ec_type that supported by pyeclib? I guess there might be some issue after more drivers got merged in pyeclib. \nsomething like: \n\nif ec_type not in pyeclib.ec_iface.EC_Supported_Type\n    raise PolicyError(\u0027Invalidate EC type\u0027, ec_type)","commit_id":"729a679991b0c64ff25a286ea9fdca35fc04f3f3"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"669ac342be855d8836d8df435e731d813c0e3935","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        # ec_type is one of the EC implementations supported by PyEClib"},{"line_number":174,"context_line":"        if ec_type is None:"},{"line_number":175,"context_line":"            raise PolicyError(\u0027Missing ec_type\u0027)"},{"line_number":176,"context_line":"        self._ec_type \u003d ec_type"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        # Define _ec_ndata as the number of EC data fragments"},{"line_number":179,"context_line":"        # Accessible as the property \"ec_ndata\""}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_4ef3fe9e","line":176,"in_reply_to":"baada198_d8bfd45e","updated":"2014-07-11 03:31:32.000000000","message":"yuanz, yes, I recently added this support to pyeclib.  ECDriver __init__ will throw an exception if the type is not supported:\n\nhttps://bitbucket.org/kmgreen2/pyeclib/src/dc2bf58d2148d451e003ce132691880070352ba1/src/python/pyeclib/ec_iface.py?at\u003dsplit-libec#cl-100\n\nThis check is at line 200 below","commit_id":"729a679991b0c64ff25a286ea9fdca35fc04f3f3"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"7c3b49f4beec3e72687fbb86444429d97112dd70","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            self._ec_nparity \u003d positive_int_value(ec_nparity)"},{"line_number":189,"context_line":"        except ValueError:"},{"line_number":190,"context_line":"            raise PolicyError(\u0027Invalid ec_num_parity_fragments\u0027, ec_nparity)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        ## Initialize PyECLib EC backend"},{"line_number":193,"context_line":"        # raises ECDriverError"},{"line_number":194,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_8d3bc79b","line":191,"updated":"2014-07-08 17:19:55.000000000","message":"either another extra # or you\u0027re doing this on purpose :)","commit_id":"729a679991b0c64ff25a286ea9fdca35fc04f3f3"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"669ac342be855d8836d8df435e731d813c0e3935","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            self._ec_nparity \u003d positive_int_value(ec_nparity)"},{"line_number":189,"context_line":"        except ValueError:"},{"line_number":190,"context_line":"            raise PolicyError(\u0027Invalid ec_num_parity_fragments\u0027, ec_nparity)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        ## Initialize PyECLib EC backend"},{"line_number":193,"context_line":"        # raises ECDriverError"},{"line_number":194,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_ce770e9e","line":191,"in_reply_to":"baada198_8d3bc79b","updated":"2014-07-11 03:31:32.000000000","message":"Haha I was using that as a code block boundary.  :) will remove thanks","commit_id":"729a679991b0c64ff25a286ea9fdca35fc04f3f3"},{"author":{"_account_id":5189,"name":"Yuan Zhou","email":"dunk007@gmail.com","username":"yuan-zhou"},"change_message_id":"269caea9f622238c4903ab1c73797f804f78392d","unresolved":false,"context_lines":[{"line_number":228,"context_line":"    \"\"\""},{"line_number":229,"context_line":"    def validate_ring_replica_count(self, replica_count):"},{"line_number":230,"context_line":"        # replica count check"},{"line_number":231,"context_line":"        if replica_count \u003c (self.ec_ndata + self.ec_nparity):"},{"line_number":232,"context_line":"            raise RingValidationError("},{"line_number":233,"context_line":"                \u0027EC ring does not appear to have enough replicas configured.\u0027"},{"line_number":234,"context_line":"                \u0027Got %d, need (%d + %d)\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_cb3aa097","line":231,"updated":"2014-07-11 02:27:23.000000000","message":"Can you explain a bit why don\u0027t use \u0027\u003d\u0027 here? I thought we should have 14 replicas ring if we want to use 10+4 scheme.\n\nUsing bigger ring than n_data+n_parity means there are some primary nodes should be empty, this will bring more complexity in Get/EC-reconstructor.","commit_id":"729a679991b0c64ff25a286ea9fdca35fc04f3f3"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"669ac342be855d8836d8df435e731d813c0e3935","unresolved":false,"context_lines":[{"line_number":228,"context_line":"    \"\"\""},{"line_number":229,"context_line":"    def validate_ring_replica_count(self, replica_count):"},{"line_number":230,"context_line":"        # replica count check"},{"line_number":231,"context_line":"        if replica_count \u003c (self.ec_ndata + self.ec_nparity):"},{"line_number":232,"context_line":"            raise RingValidationError("},{"line_number":233,"context_line":"                \u0027EC ring does not appear to have enough replicas configured.\u0027"},{"line_number":234,"context_line":"                \u0027Got %d, need (%d + %d)\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_ce9e2eb8","line":231,"in_reply_to":"baada198_cb3aa097","updated":"2014-07-11 03:31:32.000000000","message":"yuanz, this is to make sure that we have \"at least\" ec_ndata + ec_nparity replicas configured, no?","commit_id":"729a679991b0c64ff25a286ea9fdca35fc04f3f3"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"6ad9825810f8a7d617ad6009717aa46b4c44ecda","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        self.is_deprecated \u003d config_true_value(is_deprecated)"},{"line_number":107,"context_line":"        self.is_default \u003d config_true_value(is_default)"},{"line_number":108,"context_line":"        if policy_type not in VALID_TYPES:"},{"line_number":109,"context_line":"            # unless we try to instantiate a storage policy with StoragePolicy"},{"line_number":110,"context_line":"            # base class and force a policy_type, we should not get here"},{"line_number":111,"context_line":"            raise PolicyError(\u0027Invalid type\u0027, policy_type)"},{"line_number":112,"context_line":"        self.policy_type \u003d policy_type"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_9129e33c","line":109,"updated":"2014-07-30 18:18:08.000000000","message":"I\u0027d just delete this comment, it is likely to cause more confusion than anything else","commit_id":"2da6f3c66d43e8d9810465e077b152c6c5e0ba88"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"6ad9825810f8a7d617ad6009717aa46b4c44ecda","unresolved":false,"context_lines":[{"line_number":129,"context_line":"             self.is_default, self.is_deprecated, self.policy_type)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    @staticmethod"},{"line_number":132,"context_line":"    def from_conf(policy_type, policy_conf):"},{"line_number":133,"context_line":"        \"\"\""},{"line_number":134,"context_line":"        Factory method to create StoragePolicy objects from a config (dict)"},{"line_number":135,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_6c8b98c0","line":132,"updated":"2014-07-30 18:18:08.000000000","message":"maybe change the order of the parms and have policy_type optional default to DEFAULT_POLICY_TYPE since we default there anyway.  No big improvement but might clean up the test code a little (just a thought)","commit_id":"2da6f3c66d43e8d9810465e077b152c6c5e0ba88"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"2b40437c7124248876c332958e62a9f8cd769702","unresolved":false,"context_lines":[{"line_number":336,"context_line":"                                  \u0027section for policy index 0 in order \u0027"},{"line_number":337,"context_line":"                                  \u0027to define multiple policies\u0027)"},{"line_number":338,"context_line":"            self._add_policy("},{"line_number":339,"context_line":"                ReplicationStoragePolicy(0, name\u003dLEGACY_POLICY_NAME))"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"        # at least one policy must be enabled"},{"line_number":342,"context_line":"        enabled_policies \u003d [p for p in self if not p.is_deprecated]"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_500d70e7","line":339,"updated":"2014-07-31 07:22:25.000000000","message":"This is just a question not an issue, are we ever going to allow EC as default or will it always be replication if nothing else is specified?","commit_id":"2da6f3c66d43e8d9810465e077b152c6c5e0ba88"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"2b40437c7124248876c332958e62a9f8cd769702","unresolved":false,"context_lines":[{"line_number":439,"context_line":"            \u0027ec_num_parity_fragments\u0027: \u0027ec_nparity\u0027,"},{"line_number":440,"context_line":"        }"},{"line_number":441,"context_line":"        config_to_policy_option_map \u003d dict(config_to_ecpolicy_option_map,"},{"line_number":442,"context_line":"                                           **config_to_policy_option_map)"},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"        # assume DEFAULT policy type"},{"line_number":445,"context_line":"        policy_type \u003d DEFAULT_POLICY_TYPE"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_9079c832","line":442,"updated":"2014-07-31 07:22:25.000000000","message":"You are defining 2 dictionaries and then joining them.. I see no other reference to the second (ecpolicy one), if your just going to join them, why not just define them as one?","commit_id":"2da6f3c66d43e8d9810465e077b152c6c5e0ba88"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"0bb7cc9898f2a1295ecd92b7650f107d1173566c","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        # raises ECDriverError"},{"line_number":211,"context_line":"        try:"},{"line_number":212,"context_line":"            self.pyeclib_driver \u003d \\"},{"line_number":213,"context_line":"                ECDriver(\"pyeclib.core.ECPyECLibDriver\","},{"line_number":214,"context_line":"                         k\u003dself._ec_ndata,"},{"line_number":215,"context_line":"                         m\u003dself._ec_nparity,"},{"line_number":216,"context_line":"                         ec_type\u003dself._ec_type)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_febecbad","line":213,"updated":"2014-08-04 23:00:55.000000000","message":"Get rid of ECPyECLibDriver class name argument (make it default in PyECLib)","commit_id":"5da30cb59e19feafe152a750e59374ce93d22602"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"0bb7cc9898f2a1295ecd92b7650f107d1173566c","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                         k\u003dself._ec_ndata,"},{"line_number":215,"context_line":"                         m\u003dself._ec_nparity,"},{"line_number":216,"context_line":"                         ec_type\u003dself._ec_type)"},{"line_number":217,"context_line":"        except (ECPyECLibException, ECDriverError):"},{"line_number":218,"context_line":"            raise PolicyError(\"Exception creating erasure_coding policy %s.\\"},{"line_number":219,"context_line":"                               Please check policy configuration (swift.conf)\""},{"line_number":220,"context_line":"                              % self.name)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_becff355","line":217,"updated":"2014-08-04 23:00:55.000000000","message":"Handle the exceptions separately","commit_id":"5da30cb59e19feafe152a750e59374ce93d22602"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"0bb7cc9898f2a1295ecd92b7650f107d1173566c","unresolved":false,"context_lines":[{"line_number":236,"context_line":"    def ec_nparity(self):"},{"line_number":237,"context_line":"        return self._ec_nparity"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    def validate_ring_replica_count(self, replica_count):"},{"line_number":240,"context_line":"        \"\"\""},{"line_number":241,"context_line":"        EC specific validation"},{"line_number":242,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_1e3fff22","line":239,"updated":"2014-08-04 23:00:55.000000000","message":"Move this to constructor.  Look up replica_count in object_ring.","commit_id":"5da30cb59e19feafe152a750e59374ce93d22602"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"0bb7cc9898f2a1295ecd92b7650f107d1173566c","unresolved":false,"context_lines":[{"line_number":430,"context_line":"            \u0027deprecated\u0027: \u0027is_deprecated\u0027,"},{"line_number":431,"context_line":"            \u0027type\u0027: \u0027policy_type\u0027,"},{"line_number":432,"context_line":"        }"},{"line_number":433,"context_line":"        config_to_ecpolicy_option_map \u003d {"},{"line_number":434,"context_line":"            # ECStoragePolicy Specific options"},{"line_number":435,"context_line":"            \u0027ec_type\u0027: \u0027ec_type\u0027,"},{"line_number":436,"context_line":"            \u0027ec_num_data_fragments\u0027: \u0027ec_ndata\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_be529365","line":433,"updated":"2014-08-04 23:00:55.000000000","message":"Combine into one dictionary","commit_id":"5da30cb59e19feafe152a750e59374ce93d22602"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"0bb7cc9898f2a1295ecd92b7650f107d1173566c","unresolved":false,"context_lines":[{"line_number":452,"context_line":"                                      config_option, section))"},{"line_number":453,"context_line":"            # we don\u0027t pass policy_type as one of args for policy"},{"line_number":454,"context_line":"            # store for local decision"},{"line_number":455,"context_line":"            if config_option \u003d\u003d \u0027type\u0027:"},{"line_number":456,"context_line":"                policy_type \u003d value"},{"line_number":457,"context_line":"            else:"},{"line_number":458,"context_line":"                policy_options[policy_option] \u003d value"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_fe8debd4","line":455,"updated":"2014-08-04 23:00:55.000000000","message":"Rename to \u0027policy_type\u0027","commit_id":"5da30cb59e19feafe152a750e59374ce93d22602"}],"swift/common/utils.py":[{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"02a7b755a94cd679e1db57458cea697d88f75e35","unresolved":false,"context_lines":[{"line_number":279,"context_line":""},{"line_number":280,"context_line":"def positive_int_value(param):"},{"line_number":281,"context_line":"    \"\"\""},{"line_number":282,"context_line":"    Returns value as a positive int or raises ValueError otherwise."},{"line_number":283,"context_line":"    \"\"\""},{"line_number":284,"context_line":"    try:"},{"line_number":285,"context_line":"        value \u003d int(param)"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_1eafc6e4","line":282,"updated":"2014-07-01 13:08:26.000000000","message":"Looks you you followed the format of the comment above, but the ...\"or otherwise\" comment should be deleted and this should end with: (might as well fix the one above too while you\u0027re here)\n\n:raises ValueError: if...","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"a397f21cac761a793fdd24468478c151dcb2f61f","unresolved":false,"context_lines":[{"line_number":279,"context_line":""},{"line_number":280,"context_line":"def positive_int_value(param):"},{"line_number":281,"context_line":"    \"\"\""},{"line_number":282,"context_line":"    Returns value as a positive int or raises ValueError otherwise."},{"line_number":283,"context_line":"    \"\"\""},{"line_number":284,"context_line":"    try:"},{"line_number":285,"context_line":"        value \u003d int(param)"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_4065d7df","line":282,"in_reply_to":"baada198_1eafc6e4","updated":"2014-07-01 15:19:14.000000000","message":"Heh.  You have a great eye :) for these.  Done.","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":11608,"name":"Eric Lambert","email":"eric.d.lambert@gmail.com","username":"elambert"},"change_message_id":"ae72b4b2023cc645d73b706a6d46aabf1f03e7cb","unresolved":false,"context_lines":[{"line_number":282,"context_line":"    Returns value as a positive int or raises ValueError otherwise."},{"line_number":283,"context_line":"    \"\"\""},{"line_number":284,"context_line":"    try:"},{"line_number":285,"context_line":"        value \u003d int(param)"},{"line_number":286,"context_line":"        assert value \u003e 0"},{"line_number":287,"context_line":"    except (TypeError, ValueError, AssertionError):"},{"line_number":288,"context_line":"        # Handle: TypeError for \u0027None\u0027, ValueError for non-int strings"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_84607902","line":285,"updated":"2014-07-03 20:45:34.000000000","message":"I dont know how pedantic we want to be about this but since the int() function will truncate as floating point value calling positive_int_value(3.14) will not result in an exception","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"5dce16eeecf0f76eb69417dbb5a446c325d61a3c","unresolved":false,"context_lines":[{"line_number":282,"context_line":"    Returns value as a positive int or raises ValueError otherwise."},{"line_number":283,"context_line":"    \"\"\""},{"line_number":284,"context_line":"    try:"},{"line_number":285,"context_line":"        value \u003d int(param)"},{"line_number":286,"context_line":"        assert value \u003e 0"},{"line_number":287,"context_line":"    except (TypeError, ValueError, AssertionError):"},{"line_number":288,"context_line":"        # Handle: TypeError for \u0027None\u0027, ValueError for non-int strings"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_47eb9f12","line":285,"in_reply_to":"baada198_779875c0","updated":"2014-07-08 16:44:44.000000000","message":"Done","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"b5ae692a1551e45e373975fe2db874dc98844dfe","unresolved":false,"context_lines":[{"line_number":282,"context_line":"    Returns value as a positive int or raises ValueError otherwise."},{"line_number":283,"context_line":"    \"\"\""},{"line_number":284,"context_line":"    try:"},{"line_number":285,"context_line":"        value \u003d int(param)"},{"line_number":286,"context_line":"        assert value \u003e 0"},{"line_number":287,"context_line":"    except (TypeError, ValueError, AssertionError):"},{"line_number":288,"context_line":"        # Handle: TypeError for \u0027None\u0027, ValueError for non-int strings"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_779875c0","line":285,"in_reply_to":"baada198_84607902","updated":"2014-07-03 20:48:36.000000000","message":"That\u0027s certainly a missing test case!  :)  Thanks.","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"6064ee68d75e180c0bf7940d5170857cdf408459","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        # Handle: TypeError for \u0027None\u0027, ValueError for non-int strings"},{"line_number":293,"context_line":"        # and AssertionError for values \u003c\u003d 0"},{"line_number":294,"context_line":"        raise ValueError(\u0027Must be an integer \u003e 0, not \"%s\".\u0027 % param)"},{"line_number":295,"context_line":"    return value"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"def noop_libc_function(*args):"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_3c514762","line":295,"updated":"2014-07-14 19:05:59.000000000","message":"You could pretty easily write this in terms of config_auto_int_value and then just raise ValueError if non-positive. I think that\u0027d make the control flow less confusing.\n\nWhen I see someone catching AssertionError it makes me nervous :)","commit_id":"e2c47187b32952e24a210b62ab0cb495e152c6fb"}],"test/unit/common/test_storage_policy.py":[{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"02a7b755a94cd679e1db57458cea697d88f75e35","unresolved":false,"context_lines":[{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def test_validate_policies_types(self):"},{"line_number":198,"context_line":"        # default of replication chosen, erasure_coding for EC policy"},{"line_number":199,"context_line":"        test_policies \u003d [StoragePolicy(0, \u0027zero\u0027, True),"},{"line_number":200,"context_line":"                         StoragePolicy(1, \u0027one\u0027, False),"},{"line_number":201,"context_line":"                         StoragePolicy(2, \u0027two\u0027, False),"},{"line_number":202,"context_line":"                         ReplicationStoragePolicy(3, \u0027three\u0027, False),"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_3e09ea31","line":199,"updated":"2014-07-01 13:08:26.000000000","message":"using StoragePolicy, even though its only test code, I think isn\u0027t something we should do.  A global replace either ReplicationStoragePolicy (or whatever we name it) I think would be better","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"a397f21cac761a793fdd24468478c151dcb2f61f","unresolved":false,"context_lines":[{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def test_validate_policies_types(self):"},{"line_number":198,"context_line":"        # default of replication chosen, erasure_coding for EC policy"},{"line_number":199,"context_line":"        test_policies \u003d [StoragePolicy(0, \u0027zero\u0027, True),"},{"line_number":200,"context_line":"                         StoragePolicy(1, \u0027one\u0027, False),"},{"line_number":201,"context_line":"                         StoragePolicy(2, \u0027two\u0027, False),"},{"line_number":202,"context_line":"                         ReplicationStoragePolicy(3, \u0027three\u0027, False),"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_4048772d","line":199,"in_reply_to":"baada198_3e09ea31","updated":"2014-07-01 15:19:14.000000000","message":"Yes, thanks for bringing this up .. I was not sure if we should have base StoragePolicy tests at all either, but left this as is to start with.  I agree with you, but let\u0027s await comments from other folks.","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"b30e8e544915d73567ed7096009c380b8e13211e","unresolved":false,"context_lines":[{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def test_validate_policies_types(self):"},{"line_number":198,"context_line":"        # default of replication chosen, erasure_coding for EC policy"},{"line_number":199,"context_line":"        test_policies \u003d [StoragePolicy(0, \u0027zero\u0027, True),"},{"line_number":200,"context_line":"                         StoragePolicy(1, \u0027one\u0027, False),"},{"line_number":201,"context_line":"                         StoragePolicy(2, \u0027two\u0027, False),"},{"line_number":202,"context_line":"                         ReplicationStoragePolicy(3, \u0027three\u0027, False),"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_d732480f","line":199,"in_reply_to":"baada198_4048772d","updated":"2014-07-03 03:02:51.000000000","message":"sounds like a plan, I\u0027d prefer no code use StoragePolicy directly but I can\u0027t give a good reason why :)","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"5dce16eeecf0f76eb69417dbb5a446c325d61a3c","unresolved":false,"context_lines":[{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def test_validate_policies_types(self):"},{"line_number":198,"context_line":"        # default of replication chosen, erasure_coding for EC policy"},{"line_number":199,"context_line":"        test_policies \u003d [StoragePolicy(0, \u0027zero\u0027, True),"},{"line_number":200,"context_line":"                         StoragePolicy(1, \u0027one\u0027, False),"},{"line_number":201,"context_line":"                         StoragePolicy(2, \u0027two\u0027, False),"},{"line_number":202,"context_line":"                         ReplicationStoragePolicy(3, \u0027three\u0027, False),"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_a448a788","line":199,"in_reply_to":"baada198_d732480f","updated":"2014-07-08 16:44:44.000000000","message":"I went ahead with this change btw.  It makes sense to me.","commit_id":"e40fa61eeb5a52ca193f980ef5e6bd3c96d40656"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"669ac342be855d8836d8df435e731d813c0e3935","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        # FIXME - should we throw an exception to prevent users from"},{"line_number":227,"context_line":"        # using the StoragePolicy class directly?"},{"line_number":228,"context_line":"        self.assertRaisesWithMessage(PolicyError, \u0027Invalid type\u0027,"},{"line_number":229,"context_line":"                                     StoragePolicy, 1, \u0027one\u0027,"},{"line_number":230,"context_line":"                                     policy_type\u003d\u0027invalid type\u0027)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def test_names_are_normalized(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_ae601a36","line":229,"updated":"2014-07-11 03:31:32.000000000","message":"I am using the \"StoragePolicy\" class here directly - I am thinking of using a test subclass like ExampleStoragePolicy(StoragePolicy) .. not sure if this is a must but will try in the next rev","commit_id":"729a679991b0c64ff25a286ea9fdca35fc04f3f3"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"85e7611d2ab9b26c07b9901b5f5305b435d96805","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        # FIXME - should we throw an exception to prevent users from"},{"line_number":227,"context_line":"        # using the StoragePolicy class directly?"},{"line_number":228,"context_line":"        self.assertRaisesWithMessage(PolicyError, \u0027Invalid type\u0027,"},{"line_number":229,"context_line":"                                     StoragePolicy, 1, \u0027one\u0027,"},{"line_number":230,"context_line":"                                     policy_type\u003d\u0027invalid type\u0027)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def test_names_are_normalized(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_44e581da","line":229,"in_reply_to":"baada198_ae601a36","updated":"2014-07-11 18:17:39.000000000","message":"I\u0027d say there are a few ways to handle it but as long as you don\u0027t add functional code for test purposes then you\u0027re good","commit_id":"729a679991b0c64ff25a286ea9fdca35fc04f3f3"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"8f90d0d980a845a1629d7044189e937b2d0b3aa2","unresolved":false,"context_lines":[{"line_number":10,"context_line":"# implied."},{"line_number":11,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":12,"context_line":"# limitations under the License."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"\"\"\" Tests for swift.common.storage_policies \"\"\""},{"line_number":15,"context_line":"import unittest"},{"line_number":16,"context_line":"import StringIO"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_8152d20f","line":13,"updated":"2014-08-04 23:00:40.000000000","message":"Note:  add fakeRing and validate new EC class validation of data+fragment numbers (to ring)","commit_id":"5da30cb59e19feafe152a750e59374ce93d22602"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"0bb7cc9898f2a1295ecd92b7650f107d1173566c","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from swift.common.exceptions import RingValidationError"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class ExampleStoragePolicy(StoragePolicy):"},{"line_number":30,"context_line":"    \"\"\""},{"line_number":31,"context_line":"    Test StoragePolicy class - the only user at the moment is"},{"line_number":32,"context_line":"    test_validate_policies_type_invalid()"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_fe524b34","line":29,"updated":"2014-08-04 23:00:55.000000000","message":"rename as \"FakeStoragePolicy\"","commit_id":"5da30cb59e19feafe152a750e59374ce93d22602"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"0bb7cc9898f2a1295ecd92b7650f107d1173566c","unresolved":false,"context_lines":[{"line_number":667,"context_line":"        type \u003d erasure_coding"},{"line_number":668,"context_line":"        ec_type \u003d rs_vand"},{"line_number":669,"context_line":"        ec_num_data_fragments \u003d 10"},{"line_number":670,"context_line":"        ec_num_parity_fragments \u003d -4"},{"line_number":671,"context_line":"        \"\"\")"},{"line_number":672,"context_line":""},{"line_number":673,"context_line":"        self.assertRaisesWithMessage(PolicyError,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_81a012f4","line":670,"updated":"2014-08-04 23:00:55.000000000","message":"s/-4/0","commit_id":"5da30cb59e19feafe152a750e59374ce93d22602"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"8f90d0d980a845a1629d7044189e937b2d0b3aa2","unresolved":false,"context_lines":[{"line_number":734,"context_line":"        self.assertEquals(test_policy.ec_type, \u0027rs_vand\u0027)"},{"line_number":735,"context_line":"        self.assertEquals(test_policy.ec_ndata, 10)"},{"line_number":736,"context_line":"        self.assertEquals(test_policy.ec_nparity, 4)"},{"line_number":737,"context_line":"        self.assertRaisesWithMessage(RingValidationError,"},{"line_number":738,"context_line":"                                     \u0027EC ring does not appear to have enough \u0027"},{"line_number":739,"context_line":"                                     \u0027replicas configured.\u0027,"},{"line_number":740,"context_line":"                                     test_policy.validate_ring_replica_count,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_c1dbea7a","line":737,"updated":"2014-08-04 23:00:40.000000000","message":"see note above and also avoid use of word \u0027replica\u0027","commit_id":"5da30cb59e19feafe152a750e59374ce93d22602"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"0bb7cc9898f2a1295ecd92b7650f107d1173566c","unresolved":false,"context_lines":[{"line_number":736,"context_line":"        self.assertEquals(test_policy.ec_nparity, 4)"},{"line_number":737,"context_line":"        self.assertRaisesWithMessage(RingValidationError,"},{"line_number":738,"context_line":"                                     \u0027EC ring does not appear to have enough \u0027"},{"line_number":739,"context_line":"                                     \u0027replicas configured.\u0027,"},{"line_number":740,"context_line":"                                     test_policy.validate_ring_replica_count,"},{"line_number":741,"context_line":"                                     10)"},{"line_number":742,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_015082d3","line":739,"updated":"2014-08-04 23:00:55.000000000","message":"s/replicas/nodes","commit_id":"5da30cb59e19feafe152a750e59374ce93d22602"}]}
