)]}'
{"cinder/db/sqlalchemy/api.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"add00b7b9de83322fcb6ad88d1555dba72fce399","unresolved":false,"context_lines":[{"line_number":459,"context_line":"    return metadata_refs"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"def _dict_with_extra_specs(context, inst_type_query):"},{"line_number":463,"context_line":"    \"\"\"Convert type query result to dict with extra_spec and rate_limit."},{"line_number":464,"context_line":""},{"line_number":465,"context_line":"    Takes a volume type query returned by sqlalchemy and returns it"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_ef059e13","line":462,"updated":"2015-08-20 18:57:46.000000000","message":"We should change this name now to something more meaningful since we won\u0027t always be returning extra_specs.","commit_id":"4f18a090e84b2e0c4054ef2f95723eb9b7f58411"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"52806537dd3eef7d654ddc7cf669fb711bf19f00","unresolved":false,"context_lines":[{"line_number":459,"context_line":"    return metadata_refs"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"def _dict_with_extra_specs(context, inst_type_query):"},{"line_number":463,"context_line":"    \"\"\"Convert type query result to dict with extra_spec and rate_limit."},{"line_number":464,"context_line":""},{"line_number":465,"context_line":"    Takes a volume type query returned by sqlalchemy and returns it"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_4714f14b","line":462,"in_reply_to":"fa1b9901_d400b104","updated":"2015-08-25 16:30:03.000000000","message":"Well, the name says \"with_extra_specs\" and sometimes you just don\u0027t get them.  But ok, you could argue that it\u0027s with extra specs when you are allowed to get them.","commit_id":"4f18a090e84b2e0c4054ef2f95723eb9b7f58411"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"a297e6022af1167dffe4a0cc1193b878695bbe38","unresolved":false,"context_lines":[{"line_number":459,"context_line":"    return metadata_refs"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"def _dict_with_extra_specs(context, inst_type_query):"},{"line_number":463,"context_line":"    \"\"\"Convert type query result to dict with extra_spec and rate_limit."},{"line_number":464,"context_line":""},{"line_number":465,"context_line":"    Takes a volume type query returned by sqlalchemy and returns it"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_d400b104","line":462,"in_reply_to":"fa1b9901_ef059e13","updated":"2015-08-25 16:17:56.000000000","message":"IMO the method is the same, it just does a context check now to make sure the caller has permissions.  I think the name is still valid.","commit_id":"4f18a090e84b2e0c4054ef2f95723eb9b7f58411"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"add00b7b9de83322fcb6ad88d1555dba72fce399","unresolved":false,"context_lines":[{"line_number":464,"context_line":""},{"line_number":465,"context_line":"    Takes a volume type query returned by sqlalchemy and returns it"},{"line_number":466,"context_line":"    as a dictionary, converting the extra_specs entry from a list"},{"line_number":467,"context_line":"    of dicts:"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    \u0027extra_specs\u0027 : [{\u0027key\u0027: \u0027k1\u0027, \u0027value\u0027: \u0027v1\u0027, ...}, ...]"},{"line_number":470,"context_line":"    to a single dict:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_afe006ce","line":467,"updated":"2015-08-20 18:57:46.000000000","message":"It should be added something about including extra_specs for admins only","commit_id":"4f18a090e84b2e0c4054ef2f95723eb9b7f58411"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"a297e6022af1167dffe4a0cc1193b878695bbe38","unresolved":false,"context_lines":[{"line_number":464,"context_line":""},{"line_number":465,"context_line":"    Takes a volume type query returned by sqlalchemy and returns it"},{"line_number":466,"context_line":"    as a dictionary, converting the extra_specs entry from a list"},{"line_number":467,"context_line":"    of dicts:"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    \u0027extra_specs\u0027 : [{\u0027key\u0027: \u0027k1\u0027, \u0027value\u0027: \u0027v1\u0027, ...}, ...]"},{"line_number":470,"context_line":"    to a single dict:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_87052912","line":467,"in_reply_to":"fa1b9901_afe006ce","updated":"2015-08-25 16:17:56.000000000","message":"Agreed, I will update the docstring","commit_id":"4f18a090e84b2e0c4054ef2f95723eb9b7f58411"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"add00b7b9de83322fcb6ad88d1555dba72fce399","unresolved":false,"context_lines":[{"line_number":472,"context_line":"    \"\"\""},{"line_number":473,"context_line":"    inst_type_dict \u003d dict(inst_type_query)"},{"line_number":474,"context_line":"    if not is_admin_context(context):"},{"line_number":475,"context_line":"        inst_type_dict.pop(\u0027extra_specs\u0027, None)"},{"line_number":476,"context_line":"    else:"},{"line_number":477,"context_line":"        extra_specs \u003d {x[\u0027key\u0027]: x[\u0027value\u0027]"},{"line_number":478,"context_line":"                       for x in inst_type_query[\u0027extra_specs\u0027]}"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_2fe1562d","line":475,"updated":"2015-08-20 18:57:46.000000000","message":"It\u0027s weird that we do a pop with a default value instead of\n del inst_type_dict[\u0027extra_specs\u0027]\n\nIf it\u0027s a real possibility that extra_specs key is not there we should fix line 478 to do \n inst_type_query.get(\u0027extra_spects, [])","commit_id":"4f18a090e84b2e0c4054ef2f95723eb9b7f58411"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"a297e6022af1167dffe4a0cc1193b878695bbe38","unresolved":false,"context_lines":[{"line_number":472,"context_line":"    \"\"\""},{"line_number":473,"context_line":"    inst_type_dict \u003d dict(inst_type_query)"},{"line_number":474,"context_line":"    if not is_admin_context(context):"},{"line_number":475,"context_line":"        inst_type_dict.pop(\u0027extra_specs\u0027, None)"},{"line_number":476,"context_line":"    else:"},{"line_number":477,"context_line":"        extra_specs \u003d {x[\u0027key\u0027]: x[\u0027value\u0027]"},{"line_number":478,"context_line":"                       for x in inst_type_query[\u0027extra_specs\u0027]}"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_e74c2544","line":475,"in_reply_to":"fa1b9901_2fe1562d","updated":"2015-08-25 16:17:56.000000000","message":"I guess I don\u0027t know why it\u0027s \"weird\" as you say?  It works, it\u0027s reliable and I don\u0027t think there\u0027s any confusion on what the code does.  That being said, if this is really a problem I\u0027m happy to look at changing to your suggestion.  I\u0027m not sure I understand why it\u0027s *better*, pop with a default may be slightly slower but I don\u0027t think it\u0027s \"wrong\" by any means.","commit_id":"4f18a090e84b2e0c4054ef2f95723eb9b7f58411"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"52806537dd3eef7d654ddc7cf669fb711bf19f00","unresolved":false,"context_lines":[{"line_number":472,"context_line":"    \"\"\""},{"line_number":473,"context_line":"    inst_type_dict \u003d dict(inst_type_query)"},{"line_number":474,"context_line":"    if not is_admin_context(context):"},{"line_number":475,"context_line":"        inst_type_dict.pop(\u0027extra_specs\u0027, None)"},{"line_number":476,"context_line":"    else:"},{"line_number":477,"context_line":"        extra_specs \u003d {x[\u0027key\u0027]: x[\u0027value\u0027]"},{"line_number":478,"context_line":"                       for x in inst_type_query[\u0027extra_specs\u0027]}"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_07011938","line":475,"in_reply_to":"fa1b9901_e74c2544","updated":"2015-08-25 16:30:03.000000000","message":"It\u0027s weird because we access it directly (without a get on line 478)","commit_id":"4f18a090e84b2e0c4054ef2f95723eb9b7f58411"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"2fbaef86c023e9080e5f8a0b346a0c6ffb462978","unresolved":false,"context_lines":[{"line_number":2334,"context_line":""},{"line_number":2335,"context_line":""},{"line_number":2336,"context_line":"@require_context"},{"line_number":2337,"context_line":"def volume_type_get_all(context, inactive\u003dFalse, filters\u003dNone):"},{"line_number":2338,"context_line":"    \"\"\"Returns a dict describing all volume_types with name as key.\"\"\""},{"line_number":2339,"context_line":"    filters \u003d filters or {}"},{"line_number":2340,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_27069d1c","line":2337,"updated":"2015-08-25 16:14:14.000000000","message":"Why don\u0027t we put the context check here and avoid all this query fetching and filtering all together instead of putting it inside of _dict_with_extra_specs ?","commit_id":"4f18a090e84b2e0c4054ef2f95723eb9b7f58411"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"b7cd362b82bcba0d84dd030b22d39c83e2ace474","unresolved":false,"context_lines":[{"line_number":2334,"context_line":""},{"line_number":2335,"context_line":""},{"line_number":2336,"context_line":"@require_context"},{"line_number":2337,"context_line":"def volume_type_get_all(context, inactive\u003dFalse, filters\u003dNone):"},{"line_number":2338,"context_line":"    \"\"\"Returns a dict describing all volume_types with name as key.\"\"\""},{"line_number":2339,"context_line":"    filters \u003d filters or {}"},{"line_number":2340,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_e7fae5bc","line":2337,"in_reply_to":"fa1b9901_27069d1c","updated":"2015-08-25 16:19:12.000000000","message":"because non-admins are allowed and require the ability to get all volume-types.  The only thing that\u0027s admin only is the extra-specs.","commit_id":"4f18a090e84b2e0c4054ef2f95723eb9b7f58411"}]}
