)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"91ec93bc2152b87e4f9f1aacd996c180c477b33f","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The basic idea here is to replace the use of a single object ring in"},{"line_number":10,"context_line":"the Application class with a collection of object rings. The"},{"line_number":11,"context_line":"collection includes not only the Ring object itself but the policy"},{"line_number":12,"context_line":"name assocaited with it, the filename for the .gz and any other"},{"line_number":13,"context_line":"metadata associated with the policy that may be needed. When"},{"line_number":14,"context_line":"containers are created, a policy (thus a specific obj ring) is"},{"line_number":15,"context_line":"selected allowing apps to specify policy at container creation time"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3ae8d1ca_02d80752","line":12,"updated":"2014-05-29 14:41:55.000000000","message":"assocaited \u003d associated","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"91ec93bc2152b87e4f9f1aacd996c180c477b33f","unresolved":false,"context_lines":[{"line_number":36,"context_line":"  create a policy 0 even if not specified"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"- The policy with \u0027default\u003dyes\u0027 is the one used for new container"},{"line_number":39,"context_line":"  creation. T allows the admin to specify which policy is used without"},{"line_number":40,"context_line":"  forcing the application to add the metadata."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"This commit simply introduces storage policies and the loading"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3ae8d1ca_42b92fe8","line":39,"updated":"2014-05-29 14:41:55.000000000","message":"T \u003d This","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0cab714e95624ec4fcdf92dcb11e042ea59c98dd","unresolved":false,"context_lines":[{"line_number":36,"context_line":"  create a policy 0 even if not specified"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"- The policy with \u0027default\u003dyes\u0027 is the one used for new container"},{"line_number":39,"context_line":"  creation. T allows the admin to specify which policy is used without"},{"line_number":40,"context_line":"  forcing the application to add the metadata."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"This commit simply introduces storage policies and the loading"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3ae8d1ca_30a46256","line":39,"in_reply_to":"3ae8d1ca_42b92fe8","updated":"2014-05-29 18:31:14.000000000","message":"Done","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ca946d7d134f15c42c021a0c1309a9de6af3677d","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The basic idea here is to replace the use of a single object ring in"},{"line_number":10,"context_line":"the Application class with a collection of object rings. The"},{"line_number":11,"context_line":"collection includes not only the Ring object itself but the policy"},{"line_number":12,"context_line":"name assocaited with it, the filename for the .gz and any other"},{"line_number":13,"context_line":"metadata associated with the policy that may be needed. When"},{"line_number":14,"context_line":"containers are created, a policy (thus a specific obj ring) is"},{"line_number":15,"context_line":"selected allowing apps to specify policy at container creation time"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1ae5cdf2_a04f9991","line":12,"updated":"2014-05-30 15:50:07.000000000","message":"nano-nit: s/assocaited/associated/","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e00b11919338881822c984c56d02cefc892a0583","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The basic idea here is to replace the use of a single object ring in"},{"line_number":10,"context_line":"the Application class with a collection of object rings. The"},{"line_number":11,"context_line":"collection includes not only the Ring object itself but the policy"},{"line_number":12,"context_line":"name assocaited with it, the filename for the .gz and any other"},{"line_number":13,"context_line":"metadata associated with the policy that may be needed. When"},{"line_number":14,"context_line":"containers are created, a policy (thus a specific obj ring) is"},{"line_number":15,"context_line":"selected allowing apps to specify policy at container creation time"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1ae5cdf2_41516d61","line":12,"in_reply_to":"1ae5cdf2_a04f9991","updated":"2014-05-30 22:02:32.000000000","message":"Done","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"d118b2999389b00c0156118b4b60549c04ac1cb6","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Expose storage policies in /info"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Also updates SAIO makerings script and swift.conf to tie in with"},{"line_number":49,"context_line":"the docs and create a 2nd policy as part of the SAIO install."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"DocImpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"1ae5cdf2_3e714a0c","line":48,"updated":"2014-06-13 14:21:21.000000000","message":"This patch does not appear to update the SAIO side of the house.","commit_id":"0fa15b2c26325e7daa595fa3923df2a2f0d7e71c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"627cc5d3716ff018f43677f2c780aea8df63220a","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Expose storage policies in /info"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Also updates SAIO makerings script and swift.conf to tie in with"},{"line_number":49,"context_line":"the docs and create a 2nd policy as part of the SAIO install."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"DocImpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"1ae5cdf2_dca6850e","line":48,"in_reply_to":"1ae5cdf2_3e714a0c","updated":"2014-06-13 17:45:31.000000000","message":"Done","commit_id":"0fa15b2c26325e7daa595fa3923df2a2f0d7e71c"}],"doc/source/development_saio.rst":[{"author":{"_account_id":917,"name":"Chuck Thier","email":"cthier@gmail.com","username":"cthier"},"change_message_id":"d21549b525686b880c4e0c58aaa998db8324b8b8","unresolved":false,"context_lines":[{"line_number":473,"context_line":"        Reassigned 1024 (100.00%) partitions. Balance is now 0.00."},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"  #. Read more about Storage Policies and your SAIO :doc:`policies_saio`"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"  #. Verify the unit tests run::"},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"        $HOME/swift/.unittests"}],"source_content_type":"text/x-rst","patch_set":3,"id":"1ae5cdf2_4117d6a3","line":476,"updated":"2014-05-29 22:39:13.000000000","message":"Need to add the container-reconciler.conf stuff","commit_id":"8b9a03e18841eb4da52ba46fd3e528e111b1c449"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"319a561cf5f4896664e49676f2e840e22f784910","unresolved":false,"context_lines":[{"line_number":473,"context_line":"        Reassigned 1024 (100.00%) partitions. Balance is now 0.00."},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"  #. Read more about Storage Policies and your SAIO :doc:`policies_saio`"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"  #. Verify the unit tests run::"},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"        $HOME/swift/.unittests"}],"source_content_type":"text/x-rst","patch_set":3,"id":"1ae5cdf2_8ff825e7","line":476,"in_reply_to":"1ae5cdf2_4117d6a3","updated":"2014-05-30 03:45:53.000000000","message":"it\u0027s in with the reconciler change for whatever reason","commit_id":"8b9a03e18841eb4da52ba46fd3e528e111b1c449"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ca946d7d134f15c42c021a0c1309a9de6af3677d","unresolved":false,"context_lines":[{"line_number":447,"context_line":""},{"line_number":448,"context_line":"        .. literalinclude:: /../saio/bin/remakerings"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"     You can expect the ouptut from this command to produce the following (note"},{"line_number":451,"context_line":"     that 2 object rings are created in order to test storage policies in the"},{"line_number":452,"context_line":"     SAIO environment however they map to the same nodes)::"},{"line_number":453,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"1ae5cdf2_fb123057","line":450,"updated":"2014-05-30 15:50:07.000000000","message":"nit s/ouptut/output/","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e00b11919338881822c984c56d02cefc892a0583","unresolved":false,"context_lines":[{"line_number":447,"context_line":""},{"line_number":448,"context_line":"        .. literalinclude:: /../saio/bin/remakerings"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"     You can expect the ouptut from this command to produce the following (note"},{"line_number":451,"context_line":"     that 2 object rings are created in order to test storage policies in the"},{"line_number":452,"context_line":"     SAIO environment however they map to the same nodes)::"},{"line_number":453,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"1ae5cdf2_c1cc9d38","line":450,"in_reply_to":"1ae5cdf2_fb123057","updated":"2014-05-30 22:02:32.000000000","message":"Done","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"}],"etc/swift.conf-sample":[{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"3282a5c8ad5cd3325faba6a904c194d7d78ece17","unresolved":false,"context_lines":[{"line_number":21,"context_line":"# to understand how to process the data.  For example purposes, \u0027replication\u0027"},{"line_number":22,"context_line":"# is called out explicitly below."},{"line_number":23,"context_line":"#[storage-policy:0]"},{"line_number":24,"context_line":"#name \u003d chicken"},{"line_number":25,"context_line":"#type \u003d replication"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"# the following declares a policy called \u0027turkey\u0027 and uses replication by"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"3ae8d1ca_3040e255","line":24,"updated":"2014-05-29 18:19:48.000000000","message":"I would agree that having different examples of policy names is a good thing, but in this situation I think it can be confusing.\n\nIf I\u0027m a user looking at the policies saio guide and looking at this conf. file at the same time, I\u0027d prefer if names were the same.\n\nMaybe chicken and turkey can be used in the saio guide and just use gold and silver in the policies overview??","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0cab714e95624ec4fcdf92dcb11e042ea59c98dd","unresolved":false,"context_lines":[{"line_number":21,"context_line":"# to understand how to process the data.  For example purposes, \u0027replication\u0027"},{"line_number":22,"context_line":"# is called out explicitly below."},{"line_number":23,"context_line":"#[storage-policy:0]"},{"line_number":24,"context_line":"#name \u003d chicken"},{"line_number":25,"context_line":"#type \u003d replication"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"# the following declares a policy called \u0027turkey\u0027 and uses replication by"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"3ae8d1ca_feff2b65","line":24,"in_reply_to":"3ae8d1ca_3040e255","updated":"2014-05-29 18:31:14.000000000","message":"Done","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":917,"name":"Chuck Thier","email":"cthier@gmail.com","username":"cthier"},"change_message_id":"d21549b525686b880c4e0c58aaa998db8324b8b8","unresolved":false,"context_lines":[{"line_number":22,"context_line":"# is called out explicitly below."},{"line_number":23,"context_line":"#[storage-policy:0]"},{"line_number":24,"context_line":"#name \u003d gold"},{"line_number":25,"context_line":"#type \u003d replication"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"# the following declares a policy called \u0027silver\u0027 and uses replication by"},{"line_number":28,"context_line":"# default, the number of replicas will be determined by how the ring is built."}],"source_content_type":"application/octet-stream","patch_set":3,"id":"1ae5cdf2_a176dad6","line":25,"updated":"2014-05-29 22:39:13.000000000","message":"Just a note to make sure the type stuff gets removed","commit_id":"8b9a03e18841eb4da52ba46fd3e528e111b1c449"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"319a561cf5f4896664e49676f2e840e22f784910","unresolved":false,"context_lines":[{"line_number":22,"context_line":"# is called out explicitly below."},{"line_number":23,"context_line":"#[storage-policy:0]"},{"line_number":24,"context_line":"#name \u003d gold"},{"line_number":25,"context_line":"#type \u003d replication"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"# the following declares a policy called \u0027silver\u0027 and uses replication by"},{"line_number":28,"context_line":"# default, the number of replicas will be determined by how the ring is built."}],"source_content_type":"application/octet-stream","patch_set":3,"id":"1ae5cdf2_4fee1d24","line":25,"in_reply_to":"1ae5cdf2_a176dad6","updated":"2014-05-30 03:45:53.000000000","message":"Done","commit_id":"8b9a03e18841eb4da52ba46fd3e528e111b1c449"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"926b17ea13730c048d95b8b8755064157e218a09","unresolved":false,"context_lines":[{"line_number":14,"context_line":"# specified in the section header and is used internally.  Policy 0 is always"},{"line_number":15,"context_line":"# used for legacy containers and can be given a name for use in metadata"},{"line_number":16,"context_line":"# however the ring file name will always be \u0027object\u0027 for backwards"},{"line_number":17,"context_line":"# compatibility.  The name is optional for policy 0.  A default policy is used"},{"line_number":18,"context_line":"# when creating new containers and no policy is specified, any policy can be"},{"line_number":19,"context_line":"# marked as default."},{"line_number":20,"context_line":"#[storage-policy:0]"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"1ae5cdf2_194b6c2c","line":17,"updated":"2014-05-30 13:31:51.000000000","message":"Perhaps: \"The name is optional for policy 0.\" -\u003e \"The name is optional for policy 0, but will default to \u0027Policy-0\u0027.\"","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e00b11919338881822c984c56d02cefc892a0583","unresolved":false,"context_lines":[{"line_number":14,"context_line":"# specified in the section header and is used internally.  Policy 0 is always"},{"line_number":15,"context_line":"# used for legacy containers and can be given a name for use in metadata"},{"line_number":16,"context_line":"# however the ring file name will always be \u0027object\u0027 for backwards"},{"line_number":17,"context_line":"# compatibility.  The name is optional for policy 0.  A default policy is used"},{"line_number":18,"context_line":"# when creating new containers and no policy is specified, any policy can be"},{"line_number":19,"context_line":"# marked as default."},{"line_number":20,"context_line":"#[storage-policy:0]"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"1ae5cdf2_61fca93f","line":17,"in_reply_to":"1ae5cdf2_194b6c2c","updated":"2014-05-30 22:02:32.000000000","message":"Done","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"926b17ea13730c048d95b8b8755064157e218a09","unresolved":false,"context_lines":[{"line_number":16,"context_line":"# however the ring file name will always be \u0027object\u0027 for backwards"},{"line_number":17,"context_line":"# compatibility.  The name is optional for policy 0.  A default policy is used"},{"line_number":18,"context_line":"# when creating new containers and no policy is specified, any policy can be"},{"line_number":19,"context_line":"# marked as default."},{"line_number":20,"context_line":"#[storage-policy:0]"},{"line_number":21,"context_line":"#name \u003d gold"},{"line_number":22,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":4,"id":"1ae5cdf2_992cdc4c","line":19,"updated":"2014-05-30 13:31:51.000000000","message":"Perhaps: \", any policy can be marked as default.\" -\u003e \"; any policy can be marked as default, but \u0027storage-policy:0\u0027 will be the default if none is specified.\"","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e00b11919338881822c984c56d02cefc892a0583","unresolved":false,"context_lines":[{"line_number":16,"context_line":"# however the ring file name will always be \u0027object\u0027 for backwards"},{"line_number":17,"context_line":"# compatibility.  The name is optional for policy 0.  A default policy is used"},{"line_number":18,"context_line":"# when creating new containers and no policy is specified, any policy can be"},{"line_number":19,"context_line":"# marked as default."},{"line_number":20,"context_line":"#[storage-policy:0]"},{"line_number":21,"context_line":"#name \u003d gold"},{"line_number":22,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":4,"id":"1ae5cdf2_01ee8588","line":19,"in_reply_to":"1ae5cdf2_992cdc4c","updated":"2014-05-30 22:02:32.000000000","message":"Done","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"592c11a3139bc5e97659478689a2055e0ccb22e9","unresolved":false,"context_lines":[{"line_number":25,"context_line":"# the following declares a policy called \u0027silver\u0027 and uses replication by"},{"line_number":26,"context_line":"# default, the number of replicas will be determined by how the ring is built."},{"line_number":27,"context_line":"# In this example the \u0027silver\u0027 policy could have a lower or higher # of"},{"line_number":28,"context_line":"# replicas than the \u0027gold\u0027 policy above. The ring filename will be"},{"line_number":29,"context_line":"# \u0027object-1\u0027."},{"line_number":30,"context_line":"# You may only specifiy one storage policy section as the default.  If"},{"line_number":31,"context_line":"# you changed this config to specify \u0027silver\u0027 as the default, when a new"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"1ae5cdf2_a3ec432b","line":28,"updated":"2014-06-05 17:28:19.000000000","message":"the reference to gold policy was removed, need to update this line","commit_id":"28961a464bc358d6e0d993bb9faaace24bcc97c5"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"592c11a3139bc5e97659478689a2055e0ccb22e9","unresolved":false,"context_lines":[{"line_number":27,"context_line":"# In this example the \u0027silver\u0027 policy could have a lower or higher # of"},{"line_number":28,"context_line":"# replicas than the \u0027gold\u0027 policy above. The ring filename will be"},{"line_number":29,"context_line":"# \u0027object-1\u0027."},{"line_number":30,"context_line":"# You may only specifiy one storage policy section as the default.  If"},{"line_number":31,"context_line":"# you changed this config to specify \u0027silver\u0027 as the default, when a new"},{"line_number":32,"context_line":"# container is created w/o a policy specified, it will get the \u0027silver\u0027"},{"line_number":33,"context_line":"# policy because it is specified as the default however if a legacy"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"1ae5cdf2_a3d3635e","line":30,"updated":"2014-06-05 17:28:19.000000000","message":"specify","commit_id":"28961a464bc358d6e0d993bb9faaace24bcc97c5"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"592c11a3139bc5e97659478689a2055e0ccb22e9","unresolved":false,"context_lines":[{"line_number":32,"context_line":"# container is created w/o a policy specified, it will get the \u0027silver\u0027"},{"line_number":33,"context_line":"# policy because it is specified as the default however if a legacy"},{"line_number":34,"context_line":"# container is accessed (one created with a pre-policy version of swift)"},{"line_number":35,"context_line":"# and no policy is specified, policy 0 will be used (gold)"},{"line_number":36,"context_line":"#[storage-policy:1]"},{"line_number":37,"context_line":"#name \u003d silver"},{"line_number":38,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":6,"id":"1ae5cdf2_63e6bb45","line":35,"updated":"2014-06-05 17:28:19.000000000","message":"update the reference to gold here.","commit_id":"28961a464bc358d6e0d993bb9faaace24bcc97c5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5efbe09220ba8df34eebabdea9c6f30fc291917d","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"# the following section would declare a policy called \u0027silver\u0027, the number of"},{"line_number":29,"context_line":"# replicas will be determined by how the ring is built.  In this example the"},{"line_number":30,"context_line":"# \u0027silver\u0027 policy could have a lower or higher # of replicas than the \u0027gold\u0027"},{"line_number":31,"context_line":"# policy above.  The ring filename will be \u0027object-1\u0027.  You may only specify"},{"line_number":32,"context_line":"# one storage policy section as the default.  If you changed this section to"},{"line_number":33,"context_line":"# specify \u0027silver\u0027 as the default, when a client created a new container w/o a"}],"source_content_type":"application/octet-stream","patch_set":7,"id":"1ae5cdf2_0a38a7d1","line":30,"updated":"2014-06-05 17:46:12.000000000","message":"this reference to gold is removed in my latest change set, there was other comments on patch set 6 that were already addressed.","commit_id":"18157c884dff384e4b29d9bce47457a76e3bc870"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1a23df3f3380f4f8d0c86e3e52377aeb885156db","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# a per container basis.  Names are case-insensitive.  The policy index is"},{"line_number":14,"context_line":"# specified in the section header and is used internally.  The policy with"},{"line_number":15,"context_line":"# index 0 is always used for legacy containers and can be given a name for use"},{"line_number":16,"context_line":"# in metadata however the ring file name will always be \u0027object\u0027 for backwards"},{"line_number":17,"context_line":"# compatibility.  If no policies are defined a policy with index 0 will be"},{"line_number":18,"context_line":"# automatically created for backwards compatibility and given the name"},{"line_number":19,"context_line":"# Policy-0.  A default policy is used when creating new containers when no"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"1ae5cdf2_a6787a2c","line":16,"updated":"2014-06-09 15:59:32.000000000","message":"nit:  the file name is \u0027object.ring.gz\u0027","commit_id":"12991ad79f71d3334fbe89ba95409140d01807f5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5ceebdb72cd4c53193faeaa6369d7e38afbc5681","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# a per container basis.  Names are case-insensitive.  The policy index is"},{"line_number":14,"context_line":"# specified in the section header and is used internally.  The policy with"},{"line_number":15,"context_line":"# index 0 is always used for legacy containers and can be given a name for use"},{"line_number":16,"context_line":"# in metadata however the ring file name will always be \u0027object\u0027 for backwards"},{"line_number":17,"context_line":"# compatibility.  If no policies are defined a policy with index 0 will be"},{"line_number":18,"context_line":"# automatically created for backwards compatibility and given the name"},{"line_number":19,"context_line":"# Policy-0.  A default policy is used when creating new containers when no"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"1ae5cdf2_949c3ac2","line":16,"in_reply_to":"1ae5cdf2_a6787a2c","updated":"2014-06-11 06:24:49.000000000","message":"Done","commit_id":"12991ad79f71d3334fbe89ba95409140d01807f5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1a23df3f3380f4f8d0c86e3e52377aeb885156db","unresolved":false,"context_lines":[{"line_number":19,"context_line":"# Policy-0.  A default policy is used when creating new containers when no"},{"line_number":20,"context_line":"# policy is specified in the request.  If no other policies are defined the"},{"line_number":21,"context_line":"# policy with index 0 will be declared the default.  If multiple policies are"},{"line_number":22,"context_line":"# defined you must defined a policy with index 0 and you must specify a"},{"line_number":23,"context_line":"# default.  It is recommend you always define a section for storage-policy:0."},{"line_number":24,"context_line":"[storage-policy:0]"},{"line_number":25,"context_line":"name \u003d Policy-0"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"1ae5cdf2_2609ca95","line":22,"updated":"2014-06-09 15:59:32.000000000","message":"nit: s/must defined/must define/","commit_id":"12991ad79f71d3334fbe89ba95409140d01807f5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5ceebdb72cd4c53193faeaa6369d7e38afbc5681","unresolved":false,"context_lines":[{"line_number":19,"context_line":"# Policy-0.  A default policy is used when creating new containers when no"},{"line_number":20,"context_line":"# policy is specified in the request.  If no other policies are defined the"},{"line_number":21,"context_line":"# policy with index 0 will be declared the default.  If multiple policies are"},{"line_number":22,"context_line":"# defined you must defined a policy with index 0 and you must specify a"},{"line_number":23,"context_line":"# default.  It is recommend you always define a section for storage-policy:0."},{"line_number":24,"context_line":"[storage-policy:0]"},{"line_number":25,"context_line":"name \u003d Policy-0"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"1ae5cdf2_745c0e1a","line":22,"in_reply_to":"1ae5cdf2_2609ca95","updated":"2014-06-11 06:24:49.000000000","message":"Done","commit_id":"12991ad79f71d3334fbe89ba95409140d01807f5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1a23df3f3380f4f8d0c86e3e52377aeb885156db","unresolved":false,"context_lines":[{"line_number":20,"context_line":"# policy is specified in the request.  If no other policies are defined the"},{"line_number":21,"context_line":"# policy with index 0 will be declared the default.  If multiple policies are"},{"line_number":22,"context_line":"# defined you must defined a policy with index 0 and you must specify a"},{"line_number":23,"context_line":"# default.  It is recommend you always define a section for storage-policy:0."},{"line_number":24,"context_line":"[storage-policy:0]"},{"line_number":25,"context_line":"name \u003d Policy-0"},{"line_number":26,"context_line":"default \u003d yes"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"1ae5cdf2_46ab3689","line":23,"updated":"2014-06-09 15:59:32.000000000","message":"nit: s/recommend/recommended/","commit_id":"12991ad79f71d3334fbe89ba95409140d01807f5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5ceebdb72cd4c53193faeaa6369d7e38afbc5681","unresolved":false,"context_lines":[{"line_number":20,"context_line":"# policy is specified in the request.  If no other policies are defined the"},{"line_number":21,"context_line":"# policy with index 0 will be declared the default.  If multiple policies are"},{"line_number":22,"context_line":"# defined you must defined a policy with index 0 and you must specify a"},{"line_number":23,"context_line":"# default.  It is recommend you always define a section for storage-policy:0."},{"line_number":24,"context_line":"[storage-policy:0]"},{"line_number":25,"context_line":"name \u003d Policy-0"},{"line_number":26,"context_line":"default \u003d yes"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"1ae5cdf2_f4a73e09","line":23,"in_reply_to":"1ae5cdf2_46ab3689","updated":"2014-06-11 06:24:49.000000000","message":"Done","commit_id":"12991ad79f71d3334fbe89ba95409140d01807f5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1a23df3f3380f4f8d0c86e3e52377aeb885156db","unresolved":false,"context_lines":[{"line_number":28,"context_line":"# the following section would declare a policy called \u0027silver\u0027, the number of"},{"line_number":29,"context_line":"# replicas will be determined by how the ring is built.  In this example the"},{"line_number":30,"context_line":"# \u0027silver\u0027 policy could have a lower or higher # of replicas than the"},{"line_number":31,"context_line":"# \u0027Policy-0\u0027 policy above.  The ring filename will be \u0027object-1\u0027.  You may"},{"line_number":32,"context_line":"# only specify one storage policy section as the default.  If you changed this"},{"line_number":33,"context_line":"# section to specify \u0027silver\u0027 as the default, when a client created a new"},{"line_number":34,"context_line":"# container w/o a policy specified, it will get the \u0027silver\u0027 policy because"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"1ae5cdf2_46b096dd","line":31,"updated":"2014-06-09 15:59:32.000000000","message":"nit: ditto the filename is actually \u0027object-1.ring.gz\u0027","commit_id":"12991ad79f71d3334fbe89ba95409140d01807f5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5ceebdb72cd4c53193faeaa6369d7e38afbc5681","unresolved":false,"context_lines":[{"line_number":28,"context_line":"# the following section would declare a policy called \u0027silver\u0027, the number of"},{"line_number":29,"context_line":"# replicas will be determined by how the ring is built.  In this example the"},{"line_number":30,"context_line":"# \u0027silver\u0027 policy could have a lower or higher # of replicas than the"},{"line_number":31,"context_line":"# \u0027Policy-0\u0027 policy above.  The ring filename will be \u0027object-1\u0027.  You may"},{"line_number":32,"context_line":"# only specify one storage policy section as the default.  If you changed this"},{"line_number":33,"context_line":"# section to specify \u0027silver\u0027 as the default, when a client created a new"},{"line_number":34,"context_line":"# container w/o a policy specified, it will get the \u0027silver\u0027 policy because"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"1ae5cdf2_d4a242fb","line":31,"in_reply_to":"1ae5cdf2_46b096dd","updated":"2014-06-11 06:24:49.000000000","message":"Done","commit_id":"12991ad79f71d3334fbe89ba95409140d01807f5"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"d118b2999389b00c0156118b4b60549c04ac1cb6","unresolved":false,"context_lines":[{"line_number":21,"context_line":"# policy with index 0 will be declared the default.  If multiple policies are"},{"line_number":22,"context_line":"# defined you must define a policy with index 0 and you must specify a"},{"line_number":23,"context_line":"# default.  It is recommended you always define a section for"},{"line_number":24,"context_line":"# storage-policy:0."},{"line_number":25,"context_line":"[storage-policy:0]"},{"line_number":26,"context_line":"name \u003d Policy-0"},{"line_number":27,"context_line":"default \u003d yes"}],"source_content_type":"application/octet-stream","patch_set":9,"id":"1ae5cdf2_7e9bd217","line":24,"updated":"2014-06-13 14:21:21.000000000","message":"Are there probe or functional tests that show that all \"musts\" are enforced properly?","commit_id":"0fa15b2c26325e7daa595fa3923df2a2f0d7e71c"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"d118b2999389b00c0156118b4b60549c04ac1cb6","unresolved":false,"context_lines":[{"line_number":36,"context_line":"# this config has specified it as the default.  However if a legacy container"},{"line_number":37,"context_line":"# (one created with a pre-policy version of swift) is accessed, it is known"},{"line_number":38,"context_line":"# implicitly to be assigned to the policy with index 0 as opposed to the"},{"line_number":39,"context_line":"# current default."},{"line_number":40,"context_line":"#[storage-policy:1]"},{"line_number":41,"context_line":"#name \u003d silver"},{"line_number":42,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":9,"id":"1ae5cdf2_1ea72e51","line":39,"updated":"2014-06-13 14:21:21.000000000","message":"The last sentence here might warrant inclusion in the administrator\u0027s guide, or an upgrade section there-in.","commit_id":"0fa15b2c26325e7daa595fa3923df2a2f0d7e71c"}],"swift/common/storage_policy.py":[{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"264ff78ca6d03978cfd0e50b1025b74207dd1859","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from swift.common.ring import Ring"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"POLICY \u003d \u0027X-Storage-Policy\u0027"},{"line_number":23,"context_line":"POLICY_INDEX \u003d \u0027X-Backend-Storage-Policy-Index\u0027"},{"line_number":24,"context_line":"VALID_TYPES \u003d ["},{"line_number":25,"context_line":"    \u0027replication\u0027,"},{"line_number":26,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ae8d1ca_b577a03a","line":23,"updated":"2014-05-28 23:57:00.000000000","message":"minor nit, and just to record it here...\n\nAnyone else think the global names here are confusion and should be eg POLICY_HEADER or POLICY_BACKEND_HEADER?\n\nI can be fine with either for now.","commit_id":"2fbf8ea4942c2b2dad2ec32548aa15a0b7c21a84"},{"author":{"_account_id":995,"name":"David Goetz","email":"david.goetz@rackspace.com","username":"david-goetz"},"change_message_id":"78777d564bea5cf303894ed45485cc870558dc43","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    is known via the Collection\u0027s get_object_ring method, but it may be"},{"line_number":65,"context_line":"    over-ridden via object_ring kwarg at create time for testing."},{"line_number":66,"context_line":"    \"\"\""},{"line_number":67,"context_line":"    def __init__(self, idx, name\u003d\u0027\u0027, is_default\u003dFalse,"},{"line_number":68,"context_line":"                 policy_type\u003dDEFAULT_TYPE, object_ring\u003dNone):"},{"line_number":69,"context_line":"        try:"},{"line_number":70,"context_line":"            self.idx \u003d int(idx)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ae8d1ca_8f161754","line":67,"updated":"2014-05-28 22:55:45.000000000","message":"why default to \u0027\u0027 and then raise an error? shouldn\u0027t defaults be valid? why not: \n\ndef __init__(self, idx, name,","commit_id":"2fbf8ea4942c2b2dad2ec32548aa15a0b7c21a84"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"076bc40773c84df031a4670328ecddf141025191","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    is known via the Collection\u0027s get_object_ring method, but it may be"},{"line_number":65,"context_line":"    over-ridden via object_ring kwarg at create time for testing."},{"line_number":66,"context_line":"    \"\"\""},{"line_number":67,"context_line":"    def __init__(self, idx, name\u003d\u0027\u0027, is_default\u003dFalse,"},{"line_number":68,"context_line":"                 policy_type\u003dDEFAULT_TYPE, object_ring\u003dNone):"},{"line_number":69,"context_line":"        try:"},{"line_number":70,"context_line":"            self.idx \u003d int(idx)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ae8d1ca_9a6d7335","line":67,"in_reply_to":"3ae8d1ca_8f161754","updated":"2014-05-28 23:12:56.000000000","message":"It simplifies error handling in parse_storage_policies IMHO.\n\nIf the section doesn\u0027t include a name you\u0027d get a TypeError trying to call the function without enough args instead of the PolicyError when trying to create the instance.  You could obviously catch and handle both errors, but it\u0027d probably be harder to say if you\u0027re catching the TypeError you think you are then just making an invalid default and handling the error same as all the other PolicyErrors?","commit_id":"2fbf8ea4942c2b2dad2ec32548aa15a0b7c21a84"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"17881ddaf5e1b616a4973f3a100d7126a5357a8a","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    is known via the Collection\u0027s get_object_ring method, but it may be"},{"line_number":65,"context_line":"    over-ridden via object_ring kwarg at create time for testing."},{"line_number":66,"context_line":"    \"\"\""},{"line_number":67,"context_line":"    def __init__(self, idx, name\u003d\u0027\u0027, is_default\u003dFalse,"},{"line_number":68,"context_line":"                 policy_type\u003dDEFAULT_TYPE, object_ring\u003dNone):"},{"line_number":69,"context_line":"        try:"},{"line_number":70,"context_line":"            self.idx \u003d int(idx)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ae8d1ca_5559fcfc","line":67,"in_reply_to":"3ae8d1ca_9a6d7335","updated":"2014-05-28 23:32:41.000000000","message":"OH, would it be better if it was name\u003dNone?!","commit_id":"2fbf8ea4942c2b2dad2ec32548aa15a0b7c21a84"},{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"264ff78ca6d03978cfd0e50b1025b74207dd1859","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        self.name \u003d name"},{"line_number":78,"context_line":"        self.is_default \u003d config_true_value(is_default)"},{"line_number":79,"context_line":"        if policy_type not in VALID_TYPES:"},{"line_number":80,"context_line":"            raise PolicyError(\u0027Invalid type\u0027, idx)"},{"line_number":81,"context_line":"        self.policy_type \u003d policy_type"},{"line_number":82,"context_line":"        self.ring_name \u003d \u0027object\u0027"},{"line_number":83,"context_line":"        if self.idx \u003e 0:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ae8d1ca_b5c9607b","line":80,"updated":"2014-05-28 23:57:00.000000000","message":"can we include the valid types here? or at least \u0027%s is not a valid type\u0027 % policy_type.\n\nMakes error messages (eg from swift-init) more helpful","commit_id":"2fbf8ea4942c2b2dad2ec32548aa15a0b7c21a84"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ff572fa2c98c7e59d82c1be68c75703d61a1eabe","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        self.name \u003d name"},{"line_number":78,"context_line":"        self.is_default \u003d config_true_value(is_default)"},{"line_number":79,"context_line":"        if policy_type not in VALID_TYPES:"},{"line_number":80,"context_line":"            raise PolicyError(\u0027Invalid type\u0027, idx)"},{"line_number":81,"context_line":"        self.policy_type \u003d policy_type"},{"line_number":82,"context_line":"        self.ring_name \u003d \u0027object\u0027"},{"line_number":83,"context_line":"        if self.idx \u003e 0:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ae8d1ca_63a55fb4","line":80,"in_reply_to":"3ae8d1ca_b5c9607b","updated":"2014-05-29 04:36:28.000000000","message":"Done","commit_id":"2fbf8ea4942c2b2dad2ec32548aa15a0b7c21a84"},{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"264ff78ca6d03978cfd0e50b1025b74207dd1859","unresolved":false,"context_lines":[{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def get_policy_info(self):"},{"line_number":213,"context_line":"        \"\"\""},{"line_number":214,"context_line":"        Build info about policies for the /Info endpoint"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        :returns: list of dicts containing relevant policy information"},{"line_number":217,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3ae8d1ca_352f10f8","line":214,"updated":"2014-05-28 23:57:00.000000000","message":"s/Info/info/","commit_id":"2fbf8ea4942c2b2dad2ec32548aa15a0b7c21a84"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ff572fa2c98c7e59d82c1be68c75703d61a1eabe","unresolved":false,"context_lines":[{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def get_policy_info(self):"},{"line_number":213,"context_line":"        \"\"\""},{"line_number":214,"context_line":"        Build info about policies for the /Info endpoint"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        :returns: list of dicts containing relevant policy information"},{"line_number":217,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3ae8d1ca_e3908f50","line":214,"in_reply_to":"3ae8d1ca_352f10f8","updated":"2014-05-29 04:36:28.000000000","message":"Done","commit_id":"2fbf8ea4942c2b2dad2ec32548aa15a0b7c21a84"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"1bb8b3dab0838fab990593a6fef24eefdc9d7b90","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        * no more than 1 policy can be declared default"},{"line_number":245,"context_line":"        * only supported types are allowed"},{"line_number":246,"context_line":"        * if no type is provided, \u0027replication\u0027 is the default"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    \"\"\""},{"line_number":249,"context_line":"    policies \u003d []"},{"line_number":250,"context_line":"    for section in conf.sections():"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ae8d1ca_284a6bc5","line":247,"updated":"2014-05-28 15:39:29.000000000","message":"Something with doc comment is causing the following Sphinx warning:\n\n/home/gholt/swift/swift/common/storage_policy.py:docstring of swift.common.storage_policy.parse_storage_policies:8: ERROR: Unexpected indentation.","commit_id":"2fbf8ea4942c2b2dad2ec32548aa15a0b7c21a84"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"66b876861cc13bc338e7f900def2873778f3cd1c","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        * no more than 1 policy can be declared default"},{"line_number":245,"context_line":"        * only supported types are allowed"},{"line_number":246,"context_line":"        * if no type is provided, \u0027replication\u0027 is the default"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    \"\"\""},{"line_number":249,"context_line":"    policies \u003d []"},{"line_number":250,"context_line":"    for section in conf.sections():"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ae8d1ca_d4d519ba","line":247,"in_reply_to":"3ae8d1ca_284a6bc5","updated":"2014-05-28 21:05:58.000000000","message":"Done","commit_id":"2fbf8ea4942c2b2dad2ec32548aa15a0b7c21a84"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"076bc40773c84df031a4670328ecddf141025191","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                                  \u0027storage-policy section %r\u0027 % ("},{"line_number":272,"context_line":"                                      config_option, section))"},{"line_number":273,"context_line":"            policy_options[policy_option] \u003d value"},{"line_number":274,"context_line":"        policy \u003d StoragePolicy(policy_index, **policy_options)"},{"line_number":275,"context_line":"        policies.append(policy)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    return StoragePolicyCollection(policies)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ae8d1ca_fa4917b8","line":274,"updated":"2014-05-28 23:12:56.000000000","message":"I guess here is where you\u0027d have to trap/translate the TypeError, maybe like parsing the err_string, or checking if \u0027name\u0027 in policy_options... meh","commit_id":"2fbf8ea4942c2b2dad2ec32548aa15a0b7c21a84"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"91ec93bc2152b87e4f9f1aacd996c180c477b33f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2010-2012 OpenStack, LLC."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_35cffbb1","line":1,"updated":"2014-05-29 14:41:55.000000000","message":"Still don\u0027t know the OpenStack copyright message policy, but the year range is definitely off.","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0cab714e95624ec4fcdf92dcb11e042ea59c98dd","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2010-2012 OpenStack, LLC."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_30bb8273","line":1,"in_reply_to":"3ae8d1ca_35cffbb1","updated":"2014-05-29 18:31:14.000000000","message":"Done","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"91ec93bc2152b87e4f9f1aacd996c180c477b33f","unresolved":false,"context_lines":[{"line_number":23,"context_line":"POLICY_INDEX \u003d \u0027X-Backend-Storage-Policy-Index\u0027"},{"line_number":24,"context_line":"VALID_TYPES \u003d ("},{"line_number":25,"context_line":"    \u0027replication\u0027,"},{"line_number":26,"context_line":")"},{"line_number":27,"context_line":"DEFAULT_TYPE \u003d VALID_TYPES[0]"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_35145bf4","line":26,"updated":"2014-05-29 14:41:55.000000000","message":"Should this be a list so future/maybe-external code can append to it? Or is it deliberately a tuple to try to protect it?","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0cab714e95624ec4fcdf92dcb11e042ea59c98dd","unresolved":false,"context_lines":[{"line_number":23,"context_line":"POLICY_INDEX \u003d \u0027X-Backend-Storage-Policy-Index\u0027"},{"line_number":24,"context_line":"VALID_TYPES \u003d ("},{"line_number":25,"context_line":"    \u0027replication\u0027,"},{"line_number":26,"context_line":")"},{"line_number":27,"context_line":"DEFAULT_TYPE \u003d VALID_TYPES[0]"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_50780ec4","line":26,"in_reply_to":"3ae8d1ca_35145bf4","updated":"2014-05-29 18:31:14.000000000","message":"funny it was a list, and I thought a tuple will be leaner - honestly I have no idea how types are going to play out - the entire idea seems pre-mature to me.  I turned it back to a list.","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"91ec93bc2152b87e4f9f1aacd996c180c477b33f","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    def load_ring(self, swift_dir):"},{"line_number":98,"context_line":"        if self.object_ring:"},{"line_number":99,"context_line":"            return"},{"line_number":100,"context_line":"        self.object_ring \u003d Ring(swift_dir, ring_name\u003dself.ring_name)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"class StoragePolicyCollection(object):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_d5efb785","line":100,"updated":"2014-05-29 14:41:55.000000000","message":"Couldn\u0027t self.object_ring be made an @property that loads itself when accessed instead of outside code having to do the check and load?","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bd950c36ec90262d7c7cba4b5706302a6024d035","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    def load_ring(self, swift_dir):"},{"line_number":98,"context_line":"        if self.object_ring:"},{"line_number":99,"context_line":"            return"},{"line_number":100,"context_line":"        self.object_ring \u003d Ring(swift_dir, ring_name\u003dself.ring_name)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"class StoragePolicyCollection(object):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_2ab5d5cc","line":100,"updated":"2014-05-29 17:01:05.000000000","message":"I see an unhandled exception here when using a storage policy that has no ring.\n\nhttp://paste.openstack.org/show/82068/\n\nI guess that needs to be caught somewhere and turned into a 412 Precondition Failed?\n\nI\u0027m assuming the lack of object ring cannot be detected when the rings are parsed because of comment about lazy loading? Is there any point during startup that could come back and try to load the rings, catch errors and exit?","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"4e5644a25e25da19ee6e88ca86c957ef2c07b958","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    def load_ring(self, swift_dir):"},{"line_number":98,"context_line":"        if self.object_ring:"},{"line_number":99,"context_line":"            return"},{"line_number":100,"context_line":"        self.object_ring \u003d Ring(swift_dir, ring_name\u003dself.ring_name)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"class StoragePolicyCollection(object):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_39144d43","line":100,"in_reply_to":"3ae8d1ca_130bf025","updated":"2014-05-29 18:41:55.000000000","message":"Oh! I totally missed the swift_dir thing, duh. Thanks!","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"8ebb9fda79694dae712b001e71600c4c82a5773b","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    def load_ring(self, swift_dir):"},{"line_number":98,"context_line":"        if self.object_ring:"},{"line_number":99,"context_line":"            return"},{"line_number":100,"context_line":"        self.object_ring \u003d Ring(swift_dir, ring_name\u003dself.ring_name)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"class StoragePolicyCollection(object):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_cdc80b25","line":100,"in_reply_to":"3ae8d1ca_2ab5d5cc","updated":"2014-05-29 17:19:30.000000000","message":"you would get the same thing today, w/o policies, if you tried to run without a ring","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0cab714e95624ec4fcdf92dcb11e042ea59c98dd","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    def load_ring(self, swift_dir):"},{"line_number":98,"context_line":"        if self.object_ring:"},{"line_number":99,"context_line":"            return"},{"line_number":100,"context_line":"        self.object_ring \u003d Ring(swift_dir, ring_name\u003dself.ring_name)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"class StoragePolicyCollection(object):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_130bf025","line":100,"in_reply_to":"3ae8d1ca_d5efb785","updated":"2014-05-29 18:31:14.000000000","message":"I tried making it a property - but you need swift_dir to be paramaterized to load it.  I guess we could make swift_dir the default, but all the daemons would still need to call load_ring before accessing the property because the swift_dir is configurable.\n\nUnless you had something more clever in mind?","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"91ec93bc2152b87e4f9f1aacd996c180c477b33f","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        return self.by_index[key]"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def __iter__(self):"},{"line_number":140,"context_line":"        return self.by_index.itervalues()"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _validate_policies(self, policies):"},{"line_number":143,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_35037b74","line":140,"updated":"2014-05-29 14:41:55.000000000","message":"For Python 3 reasons, I think you have to use .values() here. Shouldn\u0027t be too horrible for Python 2 as I doubt anyone is going to have so many policies as to make it noticeably slower.","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0cab714e95624ec4fcdf92dcb11e042ea59c98dd","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        return self.by_index[key]"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def __iter__(self):"},{"line_number":140,"context_line":"        return self.by_index.itervalues()"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _validate_policies(self, policies):"},{"line_number":143,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_53149843","line":140,"in_reply_to":"3ae8d1ca_35037b74","updated":"2014-05-29 18:31:14.000000000","message":"well, yeah i guess itervalues is gone in py3 - but in py2 i need to say iter(self.by_index.values()) since we\u0027re in __iter__ :P","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bd950c36ec90262d7c7cba4b5706302a6024d035","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        # If a 0 policy wasn\u0027t explicitly given, or nothing was"},{"line_number":164,"context_line":"        # provided, create the 0 policy now"},{"line_number":165,"context_line":"        if 0 not in self.by_index:"},{"line_number":166,"context_line":"            self.add_policy(StoragePolicy(0, \u0027Policy_0\u0027, False))"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        # if needed, specify default of policy 0"},{"line_number":169,"context_line":"        if not self.default:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_cd756b99","line":166,"updated":"2014-05-29 17:01:05.000000000","message":"Need to check that Policy_0 hasn\u0027t been used by a config\u0027d policy. Or make it a reserved name that cannot be set in config.\n\nI managed to create two policies with name Policy_0 by leaving out index 0 in swift.conf and using Policy_0 as the name for index 3.","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0cab714e95624ec4fcdf92dcb11e042ea59c98dd","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        # If a 0 policy wasn\u0027t explicitly given, or nothing was"},{"line_number":164,"context_line":"        # provided, create the 0 policy now"},{"line_number":165,"context_line":"        if 0 not in self.by_index:"},{"line_number":166,"context_line":"            self.add_policy(StoragePolicy(0, \u0027Policy_0\u0027, False))"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        # if needed, specify default of policy 0"},{"line_number":169,"context_line":"        if not self.default:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_537d781b","line":166,"in_reply_to":"3ae8d1ca_2dedef8b","updated":"2014-05-29 18:31:14.000000000","message":"Done","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"8ebb9fda79694dae712b001e71600c4c82a5773b","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        # If a 0 policy wasn\u0027t explicitly given, or nothing was"},{"line_number":164,"context_line":"        # provided, create the 0 policy now"},{"line_number":165,"context_line":"        if 0 not in self.by_index:"},{"line_number":166,"context_line":"            self.add_policy(StoragePolicy(0, \u0027Policy_0\u0027, False))"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        # if needed, specify default of policy 0"},{"line_number":169,"context_line":"        if not self.default:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_2dedef8b","line":166,"in_reply_to":"3ae8d1ca_cd756b99","updated":"2014-05-29 17:19:30.000000000","message":"you sneaky bastard :)  I\u0027m not going to touch these patches til clay gives the word but yeah we thought of doing something different here anyways as the name isn\u0027t very good and when we do we should definitely make it reserved","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"91ec93bc2152b87e4f9f1aacd996c180c477b33f","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        Get the ring object to use to handle a request based on its policy."},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        :policy_idx: policy index as defined in swift.conf"},{"line_number":200,"context_line":"        :policy_idx: swift_dir used by the caller"},{"line_number":201,"context_line":"        :returns: appropriate ring object"},{"line_number":202,"context_line":"        \"\"\""},{"line_number":203,"context_line":"        if policy_idx is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_b54a2baa","line":200,"updated":"2014-05-29 14:41:55.000000000","message":"policy_idx \u003d swift_dir","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0cab714e95624ec4fcdf92dcb11e042ea59c98dd","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        Get the ring object to use to handle a request based on its policy."},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        :policy_idx: policy index as defined in swift.conf"},{"line_number":200,"context_line":"        :policy_idx: swift_dir used by the caller"},{"line_number":201,"context_line":"        :returns: appropriate ring object"},{"line_number":202,"context_line":"        \"\"\""},{"line_number":203,"context_line":"        if policy_idx is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_d390a845","line":200,"in_reply_to":"3ae8d1ca_b54a2baa","updated":"2014-05-29 18:31:14.000000000","message":"Done","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"91ec93bc2152b87e4f9f1aacd996c180c477b33f","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            if pol.is_default:"},{"line_number":227,"context_line":"                policy_entry[\u0027default\u0027] \u003d pol.is_default"},{"line_number":228,"context_line":"            policy_info.append(policy_entry)"},{"line_number":229,"context_line":"        return policy_info"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"def parse_storage_policies(conf):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_9559af5c","line":229,"updated":"2014-05-29 14:41:55.000000000","message":"Probably be good to have an additional option here, say \"hidden\", that hides a policy from /info -- could be useful for beta policies, etc.. Yes, something else the deployer writes (probably protective middleware) should be what actually restricts a certain policy\u0027s usage, but not listing it for everyone seems desirable as well.","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"8ebb9fda79694dae712b001e71600c4c82a5773b","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            if pol.is_default:"},{"line_number":227,"context_line":"                policy_entry[\u0027default\u0027] \u003d pol.is_default"},{"line_number":228,"context_line":"            policy_info.append(policy_entry)"},{"line_number":229,"context_line":"        return policy_info"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"def parse_storage_policies(conf):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_ad8f3fcb","line":229,"in_reply_to":"3ae8d1ca_9559af5c","updated":"2014-05-29 17:19:30.000000000","message":"yeah, there\u0027s a pending patch that \"hides\" deprecated policies so we could add your suggestion once that lands, I think it makes sense.","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bd950c36ec90262d7c7cba4b5706302a6024d035","unresolved":false,"context_lines":[{"line_number":252,"context_line":"    \"\"\""},{"line_number":253,"context_line":"    policies \u003d []"},{"line_number":254,"context_line":"    for section in conf.sections():"},{"line_number":255,"context_line":"        if not section.startswith(\u0027storage-policy\u0027):"},{"line_number":256,"context_line":"            continue"},{"line_number":257,"context_line":"        try:"},{"line_number":258,"context_line":"            policy_prefix, policy_index \u003d section.split(\u0027:\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_445f7772","line":255,"updated":"2014-05-29 17:01:05.000000000","message":"why not include the training colon here? - removes need for test at line 261, and allows future config sections to use names like [storage-policy-whatever]","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"8ebb9fda79694dae712b001e71600c4c82a5773b","unresolved":false,"context_lines":[{"line_number":252,"context_line":"    \"\"\""},{"line_number":253,"context_line":"    policies \u003d []"},{"line_number":254,"context_line":"    for section in conf.sections():"},{"line_number":255,"context_line":"        if not section.startswith(\u0027storage-policy\u0027):"},{"line_number":256,"context_line":"            continue"},{"line_number":257,"context_line":"        try:"},{"line_number":258,"context_line":"            policy_prefix, policy_index \u003d section.split(\u0027:\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_cdbd6b6a","line":255,"in_reply_to":"3ae8d1ca_445f7772","updated":"2014-05-29 17:19:30.000000000","message":"no reason I can recall","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0cab714e95624ec4fcdf92dcb11e042ea59c98dd","unresolved":false,"context_lines":[{"line_number":252,"context_line":"    \"\"\""},{"line_number":253,"context_line":"    policies \u003d []"},{"line_number":254,"context_line":"    for section in conf.sections():"},{"line_number":255,"context_line":"        if not section.startswith(\u0027storage-policy\u0027):"},{"line_number":256,"context_line":"            continue"},{"line_number":257,"context_line":"        try:"},{"line_number":258,"context_line":"            policy_prefix, policy_index \u003d section.split(\u0027:\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_f3992420","line":255,"in_reply_to":"3ae8d1ca_cdbd6b6a","updated":"2014-05-29 18:31:14.000000000","message":"There was a couple of tests that had to be removed [storage-policy] and [storage-policyx:] where we raised InvalidSection and now we just ignore them.  But none of these will catch [storage-polciy:1] which is probably the most likely typo - so i\u0027m fine changing it.\n\nDone.","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"91ec93bc2152b87e4f9f1aacd996c180c477b33f","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"class StoragePolicySingleton(object):"},{"line_number":285,"context_line":"    \"\"\""},{"line_number":286,"context_line":"    An instance of this class is the primary interfaces to storage policies"},{"line_number":287,"context_line":"    exposed as a module level global named POLICIES.   This global references"},{"line_number":288,"context_line":"    wraps _POLICIES who is normally instantiated by parsing swift.conf and"},{"line_number":289,"context_line":"    will result in an instance of StoragePolicyCollection."}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_f82aea7c","line":286,"updated":"2014-05-29 14:41:55.000000000","message":"interfaces \u003d interface","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0cab714e95624ec4fcdf92dcb11e042ea59c98dd","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"class StoragePolicySingleton(object):"},{"line_number":285,"context_line":"    \"\"\""},{"line_number":286,"context_line":"    An instance of this class is the primary interfaces to storage policies"},{"line_number":287,"context_line":"    exposed as a module level global named POLICIES.   This global references"},{"line_number":288,"context_line":"    wraps _POLICIES who is normally instantiated by parsing swift.conf and"},{"line_number":289,"context_line":"    will result in an instance of StoragePolicyCollection."}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_53b1f88d","line":286,"in_reply_to":"3ae8d1ca_ada65f51","updated":"2014-05-29 18:31:14.000000000","message":"Done","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"8ebb9fda79694dae712b001e71600c4c82a5773b","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"class StoragePolicySingleton(object):"},{"line_number":285,"context_line":"    \"\"\""},{"line_number":286,"context_line":"    An instance of this class is the primary interfaces to storage policies"},{"line_number":287,"context_line":"    exposed as a module level global named POLICIES.   This global references"},{"line_number":288,"context_line":"    wraps _POLICIES who is normally instantiated by parsing swift.conf and"},{"line_number":289,"context_line":"    will result in an instance of StoragePolicyCollection."}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_ada65f51","line":286,"in_reply_to":"3ae8d1ca_f82aea7c","updated":"2014-05-29 17:19:30.000000000","message":"doh!","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"91ec93bc2152b87e4f9f1aacd996c180c477b33f","unresolved":false,"context_lines":[{"line_number":284,"context_line":"class StoragePolicySingleton(object):"},{"line_number":285,"context_line":"    \"\"\""},{"line_number":286,"context_line":"    An instance of this class is the primary interfaces to storage policies"},{"line_number":287,"context_line":"    exposed as a module level global named POLICIES.   This global references"},{"line_number":288,"context_line":"    wraps _POLICIES who is normally instantiated by parsing swift.conf and"},{"line_number":289,"context_line":"    will result in an instance of StoragePolicyCollection."},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_18595636","line":287,"updated":"2014-05-29 14:41:55.000000000","message":"references \u003d reference","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0cab714e95624ec4fcdf92dcb11e042ea59c98dd","unresolved":false,"context_lines":[{"line_number":284,"context_line":"class StoragePolicySingleton(object):"},{"line_number":285,"context_line":"    \"\"\""},{"line_number":286,"context_line":"    An instance of this class is the primary interfaces to storage policies"},{"line_number":287,"context_line":"    exposed as a module level global named POLICIES.   This global references"},{"line_number":288,"context_line":"    wraps _POLICIES who is normally instantiated by parsing swift.conf and"},{"line_number":289,"context_line":"    will result in an instance of StoragePolicyCollection."},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_93ab801c","line":287,"in_reply_to":"3ae8d1ca_0d6f53fe","updated":"2014-05-29 18:31:14.000000000","message":"Done","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"8ebb9fda79694dae712b001e71600c4c82a5773b","unresolved":false,"context_lines":[{"line_number":284,"context_line":"class StoragePolicySingleton(object):"},{"line_number":285,"context_line":"    \"\"\""},{"line_number":286,"context_line":"    An instance of this class is the primary interfaces to storage policies"},{"line_number":287,"context_line":"    exposed as a module level global named POLICIES.   This global references"},{"line_number":288,"context_line":"    wraps _POLICIES who is normally instantiated by parsing swift.conf and"},{"line_number":289,"context_line":"    will result in an instance of StoragePolicyCollection."},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_0d6f53fe","line":287,"in_reply_to":"3ae8d1ca_18595636","updated":"2014-05-29 17:19:30.000000000","message":"doh! doh!","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":995,"name":"David Goetz","email":"david.goetz@rackspace.com","username":"david-goetz"},"change_message_id":"19823828c2e56f9bd7cc9aed33cef8a04fd5372f","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                    self.policy_type)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def load_ring(self, swift_dir):"},{"line_number":106,"context_line":"        if self.object_ring:"},{"line_number":107,"context_line":"            return"},{"line_number":108,"context_line":"        self.object_ring \u003d Ring(swift_dir, ring_name\u003dself.ring_name)"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_fee31d31","line":106,"updated":"2014-05-29 21:14:21.000000000","message":"so it doesn\u0027t load the ring until a request is made to that storage policy? wouldn\u0027t it be better to load them on swift.proxy.init ? seems weird to load that file in response to a user request. \n\nAlso- if the ring isn\u0027t there when you do the request you get a 500 back.\n\nNo such file or directory: \u0027/etc/swift/object-1.ring.gz","commit_id":"8b9a03e18841eb4da52ba46fd3e528e111b1c449"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"319a561cf5f4896664e49676f2e840e22f784910","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                    self.policy_type)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def load_ring(self, swift_dir):"},{"line_number":106,"context_line":"        if self.object_ring:"},{"line_number":107,"context_line":"            return"},{"line_number":108,"context_line":"        self.object_ring \u003d Ring(swift_dir, ring_name\u003dself.ring_name)"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_2fd0f152","line":106,"in_reply_to":"1ae5cdf2_fee31d31","updated":"2014-05-30 03:45:53.000000000","message":"yeah that sucked, fixed\n\nDone.","commit_id":"8b9a03e18841eb4da52ba46fd3e528e111b1c449"},{"author":{"_account_id":917,"name":"Chuck Thier","email":"cthier@gmail.com","username":"cthier"},"change_message_id":"d21549b525686b880c4e0c58aaa998db8324b8b8","unresolved":false,"context_lines":[{"line_number":156,"context_line":"            if int(policy) in self.by_index:"},{"line_number":157,"context_line":"                raise PolicyError(\u0027Duplicate index %s conflicts with %s\u0027 % ("},{"line_number":158,"context_line":"                    policy, self.get_by_index(int(policy))))"},{"line_number":159,"context_line":"            if policy.name in self.by_name:"},{"line_number":160,"context_line":"                raise PolicyError(\u0027Duplicate name %s conflicts with %s\u0027 % ("},{"line_number":161,"context_line":"                    policy, self.get_by_name(policy.name)))"},{"line_number":162,"context_line":"            if policy.is_default:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_84d64cc4","line":159,"updated":"2014-05-29 22:39:13.000000000","message":"policy names should not be case sensitive","commit_id":"8b9a03e18841eb4da52ba46fd3e528e111b1c449"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"319a561cf5f4896664e49676f2e840e22f784910","unresolved":false,"context_lines":[{"line_number":156,"context_line":"            if int(policy) in self.by_index:"},{"line_number":157,"context_line":"                raise PolicyError(\u0027Duplicate index %s conflicts with %s\u0027 % ("},{"line_number":158,"context_line":"                    policy, self.get_by_index(int(policy))))"},{"line_number":159,"context_line":"            if policy.name in self.by_name:"},{"line_number":160,"context_line":"                raise PolicyError(\u0027Duplicate name %s conflicts with %s\u0027 % ("},{"line_number":161,"context_line":"                    policy, self.get_by_name(policy.name)))"},{"line_number":162,"context_line":"            if policy.is_default:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_15e4243a","line":159,"in_reply_to":"1ae5cdf2_84d64cc4","updated":"2014-05-30 03:45:53.000000000","message":"Done","commit_id":"8b9a03e18841eb4da52ba46fd3e528e111b1c449"},{"author":{"_account_id":917,"name":"Chuck Thier","email":"cthier@gmail.com","username":"cthier"},"change_message_id":"d21549b525686b880c4e0c58aaa998db8324b8b8","unresolved":false,"context_lines":[{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        :param name: name of the policy"},{"line_number":191,"context_line":"        :returns: storage policy, or None"},{"line_number":192,"context_line":"        \"\"\""},{"line_number":193,"context_line":"        return self.by_name.get(name)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def get_by_index(self, index):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_44652444","line":192,"updated":"2014-05-29 22:39:13.000000000","message":"I think the storage policy names should not be case sensitive.","commit_id":"8b9a03e18841eb4da52ba46fd3e528e111b1c449"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"319a561cf5f4896664e49676f2e840e22f784910","unresolved":false,"context_lines":[{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        :param name: name of the policy"},{"line_number":191,"context_line":"        :returns: storage policy, or None"},{"line_number":192,"context_line":"        \"\"\""},{"line_number":193,"context_line":"        return self.by_name.get(name)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def get_by_index(self, index):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_d592bc9e","line":192,"in_reply_to":"1ae5cdf2_44652444","updated":"2014-05-30 03:45:53.000000000","message":"Done","commit_id":"8b9a03e18841eb4da52ba46fd3e528e111b1c449"},{"author":{"_account_id":917,"name":"Chuck Thier","email":"cthier@gmail.com","username":"cthier"},"change_message_id":"d21549b525686b880c4e0c58aaa998db8324b8b8","unresolved":false,"context_lines":[{"line_number":217,"context_line":"            policy_idx \u003d 0"},{"line_number":218,"context_line":"        else:"},{"line_number":219,"context_line":"            # makes it easier for callers to just pass in a header value"},{"line_number":220,"context_line":"            policy_idx \u003d int(policy_idx)"},{"line_number":221,"context_line":"        policy \u003d self.get_by_index(policy_idx)"},{"line_number":222,"context_line":"        if not policy:"},{"line_number":223,"context_line":"            raise ValueError(\"No policy with index %d\" % policy_idx)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_84bbac71","line":220,"updated":"2014-05-29 22:39:13.000000000","message":"Maybe handle the above in get_by_index?  It already checks if the index is none, so that isn\u0027t needed really.","commit_id":"8b9a03e18841eb4da52ba46fd3e528e111b1c449"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"319a561cf5f4896664e49676f2e840e22f784910","unresolved":false,"context_lines":[{"line_number":217,"context_line":"            policy_idx \u003d 0"},{"line_number":218,"context_line":"        else:"},{"line_number":219,"context_line":"            # makes it easier for callers to just pass in a header value"},{"line_number":220,"context_line":"            policy_idx \u003d int(policy_idx)"},{"line_number":221,"context_line":"        policy \u003d self.get_by_index(policy_idx)"},{"line_number":222,"context_line":"        if not policy:"},{"line_number":223,"context_line":"            raise ValueError(\"No policy with index %d\" % policy_idx)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_8fd665c4","line":220,"in_reply_to":"1ae5cdf2_84bbac71","updated":"2014-05-30 03:45:53.000000000","message":"funny story, it already is - this code is not needed, removed.\n\nDone.","commit_id":"8b9a03e18841eb4da52ba46fd3e528e111b1c449"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"caf17cdf2e015f8e97ce0957acac4e1f09ee37ff","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":2,"context_line":"# you may not use this file except in compliance with the License."},{"line_number":3,"context_line":"# You may obtain a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_2f929a57","line":1,"updated":"2014-05-30 14:20:28.000000000","message":"should this have a copyright notice?","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e00b11919338881822c984c56d02cefc892a0583","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":2,"context_line":"# you may not use this file except in compliance with the License."},{"line_number":3,"context_line":"# You may obtain a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_a195d1e5","line":1,"in_reply_to":"1ae5cdf2_2f929a57","updated":"2014-05-30 22:02:32.000000000","message":"notmyname says I don\u0027t need one.","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"926b17ea13730c048d95b8b8755064157e218a09","unresolved":false,"context_lines":[{"line_number":21,"context_line":"POLICY \u003d \u0027X-Storage-Policy\u0027"},{"line_number":22,"context_line":"POLICY_INDEX \u003d \u0027X-Backend-Storage-Policy-Index\u0027"},{"line_number":23,"context_line":"LEGACY_POLICY_NAME \u003d \u0027Policy-0\u0027"},{"line_number":24,"context_line":"VALID_CHARATERS \u003d \u0027-\u0027 + string.letters + string.digits"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class PolicyError(ValueError):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_d9b4a4f4","line":24,"updated":"2014-05-30 13:31:51.000000000","message":"\"VALID_CHARATERS\" -\u003e \"VALID_CHARACTERS\" or \"VALID_CHARS\"","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ca946d7d134f15c42c021a0c1309a9de6af3677d","unresolved":false,"context_lines":[{"line_number":21,"context_line":"POLICY \u003d \u0027X-Storage-Policy\u0027"},{"line_number":22,"context_line":"POLICY_INDEX \u003d \u0027X-Backend-Storage-Policy-Index\u0027"},{"line_number":23,"context_line":"LEGACY_POLICY_NAME \u003d \u0027Policy-0\u0027"},{"line_number":24,"context_line":"VALID_CHARATERS \u003d \u0027-\u0027 + string.letters + string.digits"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class PolicyError(ValueError):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_812b8c81","line":24,"updated":"2014-05-30 15:50:07.000000000","message":"nit: s/CHARATERS/CHARACTERS/","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e00b11919338881822c984c56d02cefc892a0583","unresolved":false,"context_lines":[{"line_number":21,"context_line":"POLICY \u003d \u0027X-Storage-Policy\u0027"},{"line_number":22,"context_line":"POLICY_INDEX \u003d \u0027X-Backend-Storage-Policy-Index\u0027"},{"line_number":23,"context_line":"LEGACY_POLICY_NAME \u003d \u0027Policy-0\u0027"},{"line_number":24,"context_line":"VALID_CHARATERS \u003d \u0027-\u0027 + string.letters + string.digits"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class PolicyError(ValueError):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_4186cdba","line":24,"in_reply_to":"1ae5cdf2_812b8c81","updated":"2014-05-30 22:02:32.000000000","message":"oh come on - that\u0027s not a nit - it\u0027s a freaking variable name it needs to be fixed.  :P\n\nDone.","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ca946d7d134f15c42c021a0c1309a9de6af3677d","unresolved":false,"context_lines":[{"line_number":55,"context_line":"class StoragePolicy(object):"},{"line_number":56,"context_line":"    \"\"\""},{"line_number":57,"context_line":"    Represents a storage policy."},{"line_number":58,"context_line":"    Not meant to be instantiated directly; use get_storage_policies()."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    The object_ring property is lazy loaded once the service\u0027s swift_dir"},{"line_number":61,"context_line":"    is known via the Collection\u0027s get_object_ring method, but it may be"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_41aa6471","line":58,"updated":"2014-05-30 15:50:07.000000000","message":"I can\u0027t see get_storage_policies() - should it be reload_storage_policies() ?","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e00b11919338881822c984c56d02cefc892a0583","unresolved":false,"context_lines":[{"line_number":55,"context_line":"class StoragePolicy(object):"},{"line_number":56,"context_line":"    \"\"\""},{"line_number":57,"context_line":"    Represents a storage policy."},{"line_number":58,"context_line":"    Not meant to be instantiated directly; use get_storage_policies()."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    The object_ring property is lazy loaded once the service\u0027s swift_dir"},{"line_number":61,"context_line":"    is known via the Collection\u0027s get_object_ring method, but it may be"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_f7579700","line":58,"in_reply_to":"1ae5cdf2_41aa6471","updated":"2014-05-30 22:02:32.000000000","message":"Done","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ca946d7d134f15c42c021a0c1309a9de6af3677d","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                              \u0027reliably contain any characters not in %r. \u0027"},{"line_number":78,"context_line":"                              \u0027Invalid name %r\u0027 % (VALID_CHARATERS, name))"},{"line_number":79,"context_line":"        if name.upper() \u003d\u003d LEGACY_POLICY_NAME.upper() and self.idx !\u003d 0:"},{"line_number":80,"context_line":"            msg \u003d \u0027The name %s is reserved for Policy 0. Invalid name %r\u0027 % ("},{"line_number":81,"context_line":"                LEGACY_POLICY_NAME, name)"},{"line_number":82,"context_line":"            raise PolicyError(msg, idx)"},{"line_number":83,"context_line":"        self.name \u003d name"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_6174c09c","line":80,"updated":"2014-05-30 15:50:07.000000000","message":"nit: s/reserved for Policy 0/reserved for policy index 0/ might be clearer\n\nBut +1 for adding the check :)","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e00b11919338881822c984c56d02cefc892a0583","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                              \u0027reliably contain any characters not in %r. \u0027"},{"line_number":78,"context_line":"                              \u0027Invalid name %r\u0027 % (VALID_CHARATERS, name))"},{"line_number":79,"context_line":"        if name.upper() \u003d\u003d LEGACY_POLICY_NAME.upper() and self.idx !\u003d 0:"},{"line_number":80,"context_line":"            msg \u003d \u0027The name %s is reserved for Policy 0. Invalid name %r\u0027 % ("},{"line_number":81,"context_line":"                LEGACY_POLICY_NAME, name)"},{"line_number":82,"context_line":"            raise PolicyError(msg, idx)"},{"line_number":83,"context_line":"        self.name \u003d name"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_7790e795","line":80,"in_reply_to":"1ae5cdf2_6174c09c","updated":"2014-05-30 22:02:32.000000000","message":"Done","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ca946d7d134f15c42c021a0c1309a9de6af3677d","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        self.by_index \u003d {}"},{"line_number":125,"context_line":"        self._validate_policies(pols)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def add_policy(self, policy):"},{"line_number":128,"context_line":"        # keep them indexed for quicker lookups"},{"line_number":129,"context_line":"        self.by_name[policy.name.upper()] \u003d policy"},{"line_number":130,"context_line":"        self.by_index[int(policy)] \u003d policy"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_0174dccd","line":127,"updated":"2014-05-30 15:50:07.000000000","message":"should this be _add_policy - don\u0027t ever want anyone to add a policy without going through the validation code.\n\nOr, should lines 154-166 be moved into this method?","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2e55c55bd8fb797b34540d3e9b99405ec2226330","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        self.by_index \u003d {}"},{"line_number":125,"context_line":"        self._validate_policies(pols)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def add_policy(self, policy):"},{"line_number":128,"context_line":"        # keep them indexed for quicker lookups"},{"line_number":129,"context_line":"        self.by_name[policy.name.upper()] \u003d policy"},{"line_number":130,"context_line":"        self.by_index[int(policy)] \u003d policy"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_cd7e8ce4","line":127,"in_reply_to":"1ae5cdf2_0174dccd","updated":"2014-05-30 22:51:25.000000000","message":"Done","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ca946d7d134f15c42c021a0c1309a9de6af3677d","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        for policy in policies:"},{"line_number":154,"context_line":"            if int(policy) in self.by_index:"},{"line_number":155,"context_line":"                raise PolicyError(\u0027Duplicate index %s conflicts with %s\u0027 % ("},{"line_number":156,"context_line":"                    policy, self.get_by_index(int(policy))))"},{"line_number":157,"context_line":"            if policy.name.upper() in self.by_name:"},{"line_number":158,"context_line":"                raise PolicyError(\u0027Duplicate name %s conflicts with %s\u0027 % ("},{"line_number":159,"context_line":"                    policy, self.get_by_name(policy.name)))"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_819aac12","line":156,"updated":"2014-05-30 15:50:07.000000000","message":"I don\u0027t think this can happen due to config parser ignoring duplicate sections. BUT no harm in belt and braces checking - one day a policy might be passed in from somewhere other than the parser. However, in that vein, - should we also future-proof by  checking isinstanceof(policy, StoragePolicy) since there are a bunch of validation checks that are relied upon in the StoragePolicy __init__ ?","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e00b11919338881822c984c56d02cefc892a0583","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        for policy in policies:"},{"line_number":154,"context_line":"            if int(policy) in self.by_index:"},{"line_number":155,"context_line":"                raise PolicyError(\u0027Duplicate index %s conflicts with %s\u0027 % ("},{"line_number":156,"context_line":"                    policy, self.get_by_index(int(policy))))"},{"line_number":157,"context_line":"            if policy.name.upper() in self.by_name:"},{"line_number":158,"context_line":"                raise PolicyError(\u0027Duplicate name %s conflicts with %s\u0027 % ("},{"line_number":159,"context_line":"                    policy, self.get_by_name(policy.name)))"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_1715e3f0","line":156,"in_reply_to":"1ae5cdf2_819aac12","updated":"2014-05-30 22:02:32.000000000","message":"In tests we pass policies in that didn\u0027t come a conf file - so it\u0027s nice to have the check.  But I think isinstance would violate python\u0027s preference for duck typing.","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ca946d7d134f15c42c021a0c1309a9de6af3677d","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        \"\"\""},{"line_number":208,"context_line":"        Get the ring object to use to handle a request based on its policy."},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        :policy_idx: policy index as defined in swift.conf"},{"line_number":211,"context_line":"        :swift_dir: swift_dir used by the caller"},{"line_number":212,"context_line":"        :returns: appropriate ring object"},{"line_number":213,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_96c74b12","line":210,"updated":"2014-05-30 15:50:07.000000000","message":":param policy_idx:\nnit: doc could be made consistent with get_by_index doc, including comment that None is treated a 0.","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e00b11919338881822c984c56d02cefc892a0583","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        \"\"\""},{"line_number":208,"context_line":"        Get the ring object to use to handle a request based on its policy."},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        :policy_idx: policy index as defined in swift.conf"},{"line_number":211,"context_line":"        :swift_dir: swift_dir used by the caller"},{"line_number":212,"context_line":"        :returns: appropriate ring object"},{"line_number":213,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_f7ddd743","line":210,"in_reply_to":"1ae5cdf2_96c74b12","updated":"2014-05-30 22:02:32.000000000","message":"Done","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ca946d7d134f15c42c021a0c1309a9de6af3677d","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        Get the ring object to use to handle a request based on its policy."},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        :policy_idx: policy index as defined in swift.conf"},{"line_number":211,"context_line":"        :swift_dir: swift_dir used by the caller"},{"line_number":212,"context_line":"        :returns: appropriate ring object"},{"line_number":213,"context_line":"        \"\"\""},{"line_number":214,"context_line":"        policy \u003d self.get_by_index(policy_idx)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_96bcab6e","line":211,"updated":"2014-05-30 15:50:07.000000000","message":":param swift_dir:","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e00b11919338881822c984c56d02cefc892a0583","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        Get the ring object to use to handle a request based on its policy."},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        :policy_idx: policy index as defined in swift.conf"},{"line_number":211,"context_line":"        :swift_dir: swift_dir used by the caller"},{"line_number":212,"context_line":"        :returns: appropriate ring object"},{"line_number":213,"context_line":"        \"\"\""},{"line_number":214,"context_line":"        policy \u003d self.get_by_index(policy_idx)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_17e32308","line":211,"in_reply_to":"1ae5cdf2_96bcab6e","updated":"2014-05-30 22:02:32.000000000","message":"Done","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"926b17ea13730c048d95b8b8755064157e218a09","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        * policy indexes must be unique"},{"line_number":254,"context_line":"        * policy names are required"},{"line_number":255,"context_line":"        * policy names are case insensitive"},{"line_number":256,"context_line":"        * policy names but contain only letters, digits or a dash"},{"line_number":257,"context_line":"        * policy names must be unique"},{"line_number":258,"context_line":"        * no more than 1 policy can be declared default"},{"line_number":259,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_39790830","line":256,"updated":"2014-05-30 13:31:51.000000000","message":"\"but\" -\u003e \"must\"","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ca946d7d134f15c42c021a0c1309a9de6af3677d","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        * policy indexes must be unique"},{"line_number":254,"context_line":"        * policy names are required"},{"line_number":255,"context_line":"        * policy names are case insensitive"},{"line_number":256,"context_line":"        * policy names but contain only letters, digits or a dash"},{"line_number":257,"context_line":"        * policy names must be unique"},{"line_number":258,"context_line":"        * no more than 1 policy can be declared default"},{"line_number":259,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_d6447376","line":256,"updated":"2014-05-30 15:50:07.000000000","message":"add: * policy name \u0027Policy-0\u0027 can only be used with index 0","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e00b11919338881822c984c56d02cefc892a0583","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        * policy indexes must be unique"},{"line_number":254,"context_line":"        * policy names are required"},{"line_number":255,"context_line":"        * policy names are case insensitive"},{"line_number":256,"context_line":"        * policy names but contain only letters, digits or a dash"},{"line_number":257,"context_line":"        * policy names must be unique"},{"line_number":258,"context_line":"        * no more than 1 policy can be declared default"},{"line_number":259,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_979c936b","line":256,"in_reply_to":"1ae5cdf2_d6447376","updated":"2014-05-30 22:02:32.000000000","message":"Done","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ca946d7d134f15c42c021a0c1309a9de6af3677d","unresolved":false,"context_lines":[{"line_number":288,"context_line":"    \"\"\""},{"line_number":289,"context_line":"    An instance of this class is the primary interface to storage policies"},{"line_number":290,"context_line":"    exposed as a module level global named POLICIES.   This global reference"},{"line_number":291,"context_line":"    wraps _POLICIES who is normally instantiated by parsing swift.conf and"},{"line_number":292,"context_line":"    will result in an instance of StoragePolicyCollection."},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    You should never patch this instance directly, instead patch the module"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_762c7fac","line":291,"updated":"2014-05-30 15:50:07.000000000","message":"nit s/who/which/","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e00b11919338881822c984c56d02cefc892a0583","unresolved":false,"context_lines":[{"line_number":288,"context_line":"    \"\"\""},{"line_number":289,"context_line":"    An instance of this class is the primary interface to storage policies"},{"line_number":290,"context_line":"    exposed as a module level global named POLICIES.   This global reference"},{"line_number":291,"context_line":"    wraps _POLICIES who is normally instantiated by parsing swift.conf and"},{"line_number":292,"context_line":"    will result in an instance of StoragePolicyCollection."},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    You should never patch this instance directly, instead patch the module"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_f78237ff","line":291,"in_reply_to":"1ae5cdf2_762c7fac","updated":"2014-05-30 22:02:32.000000000","message":"Done","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":917,"name":"Chuck Thier","email":"cthier@gmail.com","username":"cthier"},"change_message_id":"c6e219f093c2e1b6f5e5670e442087b139d1ebb2","unresolved":false,"context_lines":[{"line_number":326,"context_line":"# parse configuration and setup singleton"},{"line_number":327,"context_line":"_POLICIES \u003d None"},{"line_number":328,"context_line":"reload_storage_policies()"},{"line_number":329,"context_line":"POLICIES \u003d StoragePolicySingleton()"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_4e0c3f43","line":329,"updated":"2014-05-30 18:17:27.000000000","message":"After looking through the code, it seems a little weird that we are getting policies through this list.  Seems like there should instead be a function like get_storage_policy() that is called everywhere to get the storage policy.","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e00b11919338881822c984c56d02cefc892a0583","unresolved":false,"context_lines":[{"line_number":326,"context_line":"# parse configuration and setup singleton"},{"line_number":327,"context_line":"_POLICIES \u003d None"},{"line_number":328,"context_line":"reload_storage_policies()"},{"line_number":329,"context_line":"POLICIES \u003d StoragePolicySingleton()"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_1704037a","line":329,"in_reply_to":"1ae5cdf2_4e0c3f43","updated":"2014-05-30 22:02:32.000000000","message":"well sometimes you iterate over all policies, or get them by index or name, or you just need the policy\u0027s ring...\n\nWe could replace the Singleton into a bag of functions - but the StoragePolicyCollection interface has been around for a while - I\u0027m not that keen on changing it.","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"a8b2eff92eb4fea7b55ce78b3bfe53f9d037f140","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        return_string \u003d base"},{"line_number":48,"context_line":"    else:"},{"line_number":49,"context_line":"        if POLICIES.get_by_index(policy_idx) is None:"},{"line_number":50,"context_line":"            raise PolicyError(\"No policy with index %r\" % policy_idx)"},{"line_number":51,"context_line":"        return_string \u003d base + \"-%d\" % int(policy_idx)"},{"line_number":52,"context_line":"    return return_string"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_250aa48a","line":50,"updated":"2014-06-01 02:58:38.000000000","message":"PolicyError adds its own index, so this is a double-print","commit_id":"a9f5b01ada112e464bb06596b78f5bfbab9c803d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"d6bf316fe02a2d36f61065bc90a2b402bbc4f680","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        return_string \u003d base"},{"line_number":48,"context_line":"    else:"},{"line_number":49,"context_line":"        if POLICIES.get_by_index(policy_idx) is None:"},{"line_number":50,"context_line":"            raise PolicyError(\"No policy with index %r\" % policy_idx)"},{"line_number":51,"context_line":"        return_string \u003d base + \"-%d\" % int(policy_idx)"},{"line_number":52,"context_line":"    return return_string"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_b86dce34","line":50,"in_reply_to":"1ae5cdf2_250aa48a","updated":"2014-06-02 15:43:15.000000000","message":"only if pass it in as arg","commit_id":"a9f5b01ada112e464bb06596b78f5bfbab9c803d"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"79e8e0486c099a6d0222d220c9cf41f490910050","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        self.name \u003d name"},{"line_number":87,"context_line":"        self.is_deprecated \u003d config_true_value(is_deprecated)"},{"line_number":88,"context_line":"        # deprecation takes precedence over default"},{"line_number":89,"context_line":"        self.is_default \u003d config_true_value(is_default) and \\"},{"line_number":90,"context_line":"            not self.is_deprecated"},{"line_number":91,"context_line":"        self.ring_name \u003d \u0027object\u0027"},{"line_number":92,"context_line":"        if self.idx \u003e 0:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_63dc71e5","line":89,"updated":"2014-06-02 21:43:37.000000000","message":"wondering if we should at least log this as a warning. It would probably be an admin config error to set a policy as deprecated and default. My main concern is that if the user makes this mistake, we will automatically pick another default policy again without any notice or warning (besides documentation)","commit_id":"a9f5b01ada112e464bb06596b78f5bfbab9c803d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8956ce23fe4e4acab17c5490c38b94ebed54c4cb","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        self.name \u003d name"},{"line_number":87,"context_line":"        self.is_deprecated \u003d config_true_value(is_deprecated)"},{"line_number":88,"context_line":"        # deprecation takes precedence over default"},{"line_number":89,"context_line":"        self.is_default \u003d config_true_value(is_default) and \\"},{"line_number":90,"context_line":"            not self.is_deprecated"},{"line_number":91,"context_line":"        self.ring_name \u003d \u0027object\u0027"},{"line_number":92,"context_line":"        if self.idx \u003e 0:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_19b6bafa","line":89,"in_reply_to":"1ae5cdf2_63dc71e5","updated":"2014-06-02 22:47:30.000000000","message":"so this is mostly done, the bit about you must specify a default requires us pulling out a bunch of doc that says the default is 0 if not specified - so i haven\u0027t done that yet.","commit_id":"a9f5b01ada112e464bb06596b78f5bfbab9c803d"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"a8b2eff92eb4fea7b55ce78b3bfe53f9d037f140","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        :param index: numeric index of the storage policy"},{"line_number":220,"context_line":"        :returns: storage policy, or None if no such policy"},{"line_number":221,"context_line":"        \"\"\""},{"line_number":222,"context_line":"        # makes it easier for callers to just pass in a header value"},{"line_number":223,"context_line":"        index \u003d int(index) if index else 0"},{"line_number":224,"context_line":"        return self.by_index.get(index)"},{"line_number":225,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_c403b90d","line":222,"updated":"2014-06-01 02:58:38.000000000","message":"and then clients get response 500 (and traceback) instead of 400 if they supply a bad value?","commit_id":"a9f5b01ada112e464bb06596b78f5bfbab9c803d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"d6bf316fe02a2d36f61065bc90a2b402bbc4f680","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        :param index: numeric index of the storage policy"},{"line_number":220,"context_line":"        :returns: storage policy, or None if no such policy"},{"line_number":221,"context_line":"        \"\"\""},{"line_number":222,"context_line":"        # makes it easier for callers to just pass in a header value"},{"line_number":223,"context_line":"        index \u003d int(index) if index else 0"},{"line_number":224,"context_line":"        return self.by_index.get(index)"},{"line_number":225,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_184a42ac","line":222,"in_reply_to":"1ae5cdf2_c403b90d","updated":"2014-06-02 15:43:15.000000000","message":"clients can\u0027t send X-Backend-Storage-Policy-Index - all callers to this method should come from internal input.","commit_id":"a9f5b01ada112e464bb06596b78f5bfbab9c803d"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"592c11a3139bc5e97659478689a2055e0ccb22e9","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        policy_info \u003d []"},{"line_number":252,"context_line":"        for pol in self:"},{"line_number":253,"context_line":"            # delete from /info if deprecated"},{"line_number":254,"context_line":"            if pol.is_deprecated:"},{"line_number":255,"context_line":"                continue"},{"line_number":256,"context_line":"            policy_entry \u003d {}"},{"line_number":257,"context_line":"            policy_entry[\u0027name\u0027] \u003d pol.name"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_e382cbc6","line":254,"updated":"2014-06-05 17:28:19.000000000","message":"i\u0027m a little concerned about removing the deprecated from /info. how could an admin get a list of all deprecated containers? would they have to look at the /etc/swift/swift.conf file? trying to think of a scenario where admins think it would be important for it to be part of /info","commit_id":"28961a464bc358d6e0d993bb9faaace24bcc97c5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1a23df3f3380f4f8d0c86e3e52377aeb885156db","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                              \u0027Invalid config\u0027, self.idx)"},{"line_number":92,"context_line":"        self.ring_name \u003d \u0027object\u0027"},{"line_number":93,"context_line":"        if self.idx \u003e 0:"},{"line_number":94,"context_line":"            self.ring_name +\u003d \u0027-%d\u0027 % self.idx"},{"line_number":95,"context_line":"        self.object_ring \u003d object_ring"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def __int__(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_9ac02e7e","line":94,"updated":"2014-06-09 15:59:32.000000000","message":"micro-nit: would be neat if this code could be shared with get_policy_string() somehow (realise the latter also has test for existence so would need a refactoring).","commit_id":"12991ad79f71d3334fbe89ba95409140d01807f5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5ceebdb72cd4c53193faeaa6369d7e38afbc5681","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                              \u0027Invalid config\u0027, self.idx)"},{"line_number":92,"context_line":"        self.ring_name \u003d \u0027object\u0027"},{"line_number":93,"context_line":"        if self.idx \u003e 0:"},{"line_number":94,"context_line":"            self.ring_name +\u003d \u0027-%d\u0027 % self.idx"},{"line_number":95,"context_line":"        self.object_ring \u003d object_ring"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def __int__(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_54e4723b","line":94,"in_reply_to":"1ae5cdf2_9ac02e7e","updated":"2014-06-11 06:24:49.000000000","message":"Done","commit_id":"12991ad79f71d3334fbe89ba95409140d01807f5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1a23df3f3380f4f8d0c86e3e52377aeb885156db","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        return iter(self.by_index.values())"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def _validate_policies(self, policies):"},{"line_number":173,"context_line":"        \"\"\""},{"line_number":174,"context_line":"        :param policies: list of policies (modified here)"},{"line_number":175,"context_line":"        \"\"\""},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_9ad033f9","line":173,"updated":"2014-06-09 15:59:32.000000000","message":"nit: \"(modified here)\" - not sure what this means - the list object passed in isn\u0027t modified.","commit_id":"12991ad79f71d3334fbe89ba95409140d01807f5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5ceebdb72cd4c53193faeaa6369d7e38afbc5681","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        return iter(self.by_index.values())"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def _validate_policies(self, policies):"},{"line_number":173,"context_line":"        \"\"\""},{"line_number":174,"context_line":"        :param policies: list of policies (modified here)"},{"line_number":175,"context_line":"        \"\"\""},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_5452b2de","line":173,"in_reply_to":"1ae5cdf2_9ad033f9","updated":"2014-06-11 06:24:49.000000000","message":"Hold over when we used to do things like set a policy to default, now we only do that if the list of policies is empty and we had to create a Policy-0\n\nI just removed the comment.","commit_id":"12991ad79f71d3334fbe89ba95409140d01807f5"}],"test/unit/__init__.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ca946d7d134f15c42c021a0c1309a9de6af3677d","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    if isinstance(thing_or_policies, storage_policy.StoragePolicyCollection):"},{"line_number":54,"context_line":"        return PatchPolicies(thing_or_policies)"},{"line_number":55,"context_line":"    elif isinstance(thing_or_policies, Iterable):"},{"line_number":56,"context_line":"        return PatchPolicies(thing_or_policies)"},{"line_number":57,"context_line":"    else:"},{"line_number":58,"context_line":"        # it\u0027s a thing!"},{"line_number":59,"context_line":"        return PatchPolicies(default_policies)(thing_or_policies)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_c07ca575","line":56,"updated":"2014-05-30 15:50:07.000000000","message":"nit: I think you can pass a tuple as 2nd arg to isinstance and collapse this to one \u0027if\u0027","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e00b11919338881822c984c56d02cefc892a0583","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    if isinstance(thing_or_policies, storage_policy.StoragePolicyCollection):"},{"line_number":54,"context_line":"        return PatchPolicies(thing_or_policies)"},{"line_number":55,"context_line":"    elif isinstance(thing_or_policies, Iterable):"},{"line_number":56,"context_line":"        return PatchPolicies(thing_or_policies)"},{"line_number":57,"context_line":"    else:"},{"line_number":58,"context_line":"        # it\u0027s a thing!"},{"line_number":59,"context_line":"        return PatchPolicies(default_policies)(thing_or_policies)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_7749c7cf","line":56,"in_reply_to":"1ae5cdf2_c07ca575","updated":"2014-05-30 22:02:32.000000000","message":"Done","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"}],"test/unit/common/test_storage_policies.py":[{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"91ec93bc2152b87e4f9f1aacd996c180c477b33f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2010-2012 OpenStack, LLC."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_584cbe42","line":1,"updated":"2014-05-29 14:41:55.000000000","message":"Year range is off.","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0cab714e95624ec4fcdf92dcb11e042ea59c98dd","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2010-2012 OpenStack, LLC."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_530d783d","line":1,"in_reply_to":"3ae8d1ca_584cbe42","updated":"2014-05-29 18:31:14.000000000","message":"Done","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"91ec93bc2152b87e4f9f1aacd996c180c477b33f","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                         StoragePolicy(1, \u0027one\u0027, True),"},{"line_number":86,"context_line":"                         StoragePolicy(2, \u0027two\u0027, True)]"},{"line_number":87,"context_line":"        self.assertRaises(ValueError, StoragePolicyCollection,"},{"line_number":88,"context_line":"                          test_policies)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        # no defualt specified"},{"line_number":91,"context_line":"        test_policies \u003d [StoragePolicy(0, \u0027zero\u0027, False),"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_1884f60a","line":88,"updated":"2014-05-29 14:41:55.000000000","message":"It\u0027s a little confusing when PolicyError is raised and when ValueError or something else is raised. I kind of expected PolicyError to be raised whenever anything was wrong with the policy configuration, but this test and others show my assumption was wrong. Is it just me? Did I miss a docstring explaining things?","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0cab714e95624ec4fcdf92dcb11e042ea59c98dd","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                         StoragePolicy(1, \u0027one\u0027, True),"},{"line_number":86,"context_line":"                         StoragePolicy(2, \u0027two\u0027, True)]"},{"line_number":87,"context_line":"        self.assertRaises(ValueError, StoragePolicyCollection,"},{"line_number":88,"context_line":"                          test_policies)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        # no defualt specified"},{"line_number":91,"context_line":"        test_policies \u003d [StoragePolicy(0, \u0027zero\u0027, False),"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_3e143343","line":88,"in_reply_to":"3ae8d1ca_1884f60a","updated":"2014-05-29 18:31:14.000000000","message":"PolicyError was added after some of these tests were written and it subclasses ValueError - I\u0027ll try to get the tests all catching the higher order exception.\n\nAlthough this function *does* actually raise a ValueError because I guess it\u0027s not really a configuration error... idk i *could* raise PolicyError i guess - no one traps it, it\u0027s sort of defensive.\n\nDone","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"3282a5c8ad5cd3325faba6a904c194d7d78ece17","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                         StoragePolicy(1, \u0027one\u0027, True),"},{"line_number":86,"context_line":"                         StoragePolicy(2, \u0027two\u0027, True)]"},{"line_number":87,"context_line":"        self.assertRaises(ValueError, StoragePolicyCollection,"},{"line_number":88,"context_line":"                          test_policies)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        # no defualt specified"},{"line_number":91,"context_line":"        test_policies \u003d [StoragePolicy(0, \u0027zero\u0027, False),"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_de2a6f7d","line":88,"in_reply_to":"3ae8d1ca_1884f60a","updated":"2014-05-29 18:19:48.000000000","message":"agreed. was expecting the code in _validate_policies to raise PolicyError here..","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"3282a5c8ad5cd3325faba6a904c194d7d78ece17","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        self.assertRaises(ValueError, StoragePolicyCollection,"},{"line_number":88,"context_line":"                          test_policies)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        # no defualt specified"},{"line_number":91,"context_line":"        test_policies \u003d [StoragePolicy(0, \u0027zero\u0027, False),"},{"line_number":92,"context_line":"                         StoragePolicy(1, \u0027one\u0027, False),"},{"line_number":93,"context_line":"                         StoragePolicy(2, \u0027two\u0027, False)]"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_735a7451","line":90,"updated":"2014-05-29 18:19:48.000000000","message":"default","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bd950c36ec90262d7c7cba4b5706302a6024d035","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        else:"},{"line_number":150,"context_line":"            self.fail(\u0027%r did not raise %s\u0027 % (message, exc_class.__name__))"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def test_parse_storage_policies(self):"},{"line_number":153,"context_line":"        bad_conf \u003d self._conf(\"\"\""},{"line_number":154,"context_line":"        [storage-policy:x]"},{"line_number":155,"context_line":"        name \u003d zero"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_44b5b7cb","line":152,"updated":"2014-05-29 17:01:05.000000000","message":"test missing for section named [storage-policy:] raises \u0027Invalid index\u0027\n\nand maybe ditto for [storage-policy:-1]","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0cab714e95624ec4fcdf92dcb11e042ea59c98dd","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        else:"},{"line_number":150,"context_line":"            self.fail(\u0027%r did not raise %s\u0027 % (message, exc_class.__name__))"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def test_parse_storage_policies(self):"},{"line_number":153,"context_line":"        bad_conf \u003d self._conf(\"\"\""},{"line_number":154,"context_line":"        [storage-policy:x]"},{"line_number":155,"context_line":"        name \u003d zero"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_ded7cf21","line":152,"in_reply_to":"3ae8d1ca_44b5b7cb","updated":"2014-05-29 18:31:14.000000000","message":"Done","commit_id":"ab2537435261be49424f0b330a6878ed68340366"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ca946d7d134f15c42c021a0c1309a9de6af3677d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"1ae5cdf2_1c1d1f67","updated":"2014-05-30 15:50:07.000000000","message":"To be consistent with convention this should be renamed test_storage_policy.py","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2e55c55bd8fb797b34540d3e9b99405ec2226330","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"1ae5cdf2_6d2018f8","in_reply_to":"1ae5cdf2_1c1d1f67","updated":"2014-05-30 22:51:25.000000000","message":"Done","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ca946d7d134f15c42c021a0c1309a9de6af3677d","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        self.assertRaises(PolicyError, StoragePolicyCollection,"},{"line_number":88,"context_line":"                          test_policies)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        # no defualt specified"},{"line_number":91,"context_line":"        test_policies \u003d [StoragePolicy(0, \u0027zero\u0027, False),"},{"line_number":92,"context_line":"                         StoragePolicy(1, \u0027one\u0027, False),"},{"line_number":93,"context_line":"                         StoragePolicy(2, \u0027two\u0027, False)]"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_01093c31","line":90,"updated":"2014-05-30 15:50:07.000000000","message":"nit s/defualt/default","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e00b11919338881822c984c56d02cefc892a0583","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        self.assertRaises(PolicyError, StoragePolicyCollection,"},{"line_number":88,"context_line":"                          test_policies)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        # no defualt specified"},{"line_number":91,"context_line":"        test_policies \u003d [StoragePolicy(0, \u0027zero\u0027, False),"},{"line_number":92,"context_line":"                         StoragePolicy(1, \u0027one\u0027, False),"},{"line_number":93,"context_line":"                         StoragePolicy(2, \u0027two\u0027, False)]"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_7720e7f7","line":90,"in_reply_to":"1ae5cdf2_01093c31","updated":"2014-05-30 22:02:32.000000000","message":"Done","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ca946d7d134f15c42c021a0c1309a9de6af3677d","unresolved":false,"context_lines":[{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def test_validate_policy_params(self):"},{"line_number":132,"context_line":"        StoragePolicy(0, \u0027name\u0027)  # sanity"},{"line_number":133,"context_line":"        # bougs indexes"},{"line_number":134,"context_line":"        self.assertRaises(PolicyError, StoragePolicy, \u0027x\u0027, \u0027name\u0027)"},{"line_number":135,"context_line":"        self.assertRaises(PolicyError, StoragePolicy, -1, \u0027name\u0027)"},{"line_number":136,"context_line":"        # missing name"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_1b48bc2c","line":133,"updated":"2014-05-30 15:50:07.000000000","message":"nano-nit: bogus","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e00b11919338881822c984c56d02cefc892a0583","unresolved":false,"context_lines":[{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def test_validate_policy_params(self):"},{"line_number":132,"context_line":"        StoragePolicy(0, \u0027name\u0027)  # sanity"},{"line_number":133,"context_line":"        # bougs indexes"},{"line_number":134,"context_line":"        self.assertRaises(PolicyError, StoragePolicy, \u0027x\u0027, \u0027name\u0027)"},{"line_number":135,"context_line":"        self.assertRaises(PolicyError, StoragePolicy, -1, \u0027name\u0027)"},{"line_number":136,"context_line":"        # missing name"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_b7798ffe","line":133,"in_reply_to":"1ae5cdf2_1b48bc2c","updated":"2014-05-30 22:02:32.000000000","message":"Done","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ca946d7d134f15c42c021a0c1309a9de6af3677d","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        # missing name"},{"line_number":137,"context_line":"        self.assertRaises(PolicyError, StoragePolicy, 1, \u0027\u0027)"},{"line_number":138,"context_line":"        # name with underscore"},{"line_number":139,"context_line":"        self.assertRaises(PolicyError, StoragePolicy, 1, \u0027name_foo\u0027)"},{"line_number":140,"context_line":"        # non-zero Policy-0"},{"line_number":141,"context_line":"        self.assertRaises(PolicyError, StoragePolicy, 1, \u0027policy-0\u0027)"},{"line_number":142,"context_line":"        # weird names"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_bb0fc8e0","line":139,"updated":"2014-05-30 15:50:07.000000000","message":"could be included with weird names below","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e00b11919338881822c984c56d02cefc892a0583","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        # missing name"},{"line_number":137,"context_line":"        self.assertRaises(PolicyError, StoragePolicy, 1, \u0027\u0027)"},{"line_number":138,"context_line":"        # name with underscore"},{"line_number":139,"context_line":"        self.assertRaises(PolicyError, StoragePolicy, 1, \u0027name_foo\u0027)"},{"line_number":140,"context_line":"        # non-zero Policy-0"},{"line_number":141,"context_line":"        self.assertRaises(PolicyError, StoragePolicy, 1, \u0027policy-0\u0027)"},{"line_number":142,"context_line":"        # weird names"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_57ff6b34","line":139,"in_reply_to":"1ae5cdf2_bb0fc8e0","updated":"2014-05-30 22:02:32.000000000","message":"Done","commit_id":"82f4f2f1997d1ca144c4343be1811a566dbb430c"}],"test/unit/common/test_storage_policy.py":[{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"592c11a3139bc5e97659478689a2055e0ccb22e9","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        # deprecating old default makes policy 0 the default"},{"line_number":115,"context_line":"        test_policies \u003d [StoragePolicy(0, \u0027zero\u0027, False),"},{"line_number":116,"context_line":"                         StoragePolicy(1, \u0027one\u0027, False, is_deprecated\u003dTrue),"},{"line_number":117,"context_line":"                         StoragePolicy(2, \u0027two\u0027, False)]"},{"line_number":118,"context_line":"        policies \u003d StoragePolicyCollection(test_policies)"},{"line_number":119,"context_line":"        self.assertEquals(policies.default, test_policies[0])"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_4300df33","line":116,"updated":"2014-06-05 17:28:19.000000000","message":"I think you intended SP \u0027one\u0027 to be True for default, no?","commit_id":"28961a464bc358d6e0d993bb9faaace24bcc97c5"}],"test/unit/proxy/test_server.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1a23df3f3380f4f8d0c86e3e52377aeb885156db","unresolved":false,"context_lines":[{"line_number":5933,"context_line":""},{"line_number":5934,"context_line":"@patch_policies([StoragePolicy(0, \u0027migrated\u0027),"},{"line_number":5935,"context_line":"                 StoragePolicy(1, \u0027ernie\u0027, True),"},{"line_number":5936,"context_line":"                 StoragePolicy(3, \u0027bert\u0027)])"},{"line_number":5937,"context_line":"class TestSwiftInfo(unittest.TestCase):"},{"line_number":5938,"context_line":"    def setUp(self):"},{"line_number":5939,"context_line":"        utils._swift_info \u003d {}"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_0b1217b4","line":5936,"updated":"2014-06-09 15:59:32.000000000","message":"for completeness should there be a deprecated policy in the list and a test that it isn\u0027t in the info?","commit_id":"12991ad79f71d3334fbe89ba95409140d01807f5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5ceebdb72cd4c53193faeaa6369d7e38afbc5681","unresolved":false,"context_lines":[{"line_number":5933,"context_line":""},{"line_number":5934,"context_line":"@patch_policies([StoragePolicy(0, \u0027migrated\u0027),"},{"line_number":5935,"context_line":"                 StoragePolicy(1, \u0027ernie\u0027, True),"},{"line_number":5936,"context_line":"                 StoragePolicy(3, \u0027bert\u0027)])"},{"line_number":5937,"context_line":"class TestSwiftInfo(unittest.TestCase):"},{"line_number":5938,"context_line":"    def setUp(self):"},{"line_number":5939,"context_line":"        utils._swift_info \u003d {}"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_7466cebc","line":5936,"in_reply_to":"1ae5cdf2_0b1217b4","updated":"2014-06-11 06:24:49.000000000","message":"Done","commit_id":"12991ad79f71d3334fbe89ba95409140d01807f5"}]}
