)]}'
{"manila/api/v2/share_types.py":[{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"6cfa36d60bbe2cbf7847f1316a046c6a96221059","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        else:"},{"line_number":126,"context_line":"            filters[\u0027is_public\u0027] \u003d True"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        if (req.api_version_request \u003e\u003d"},{"line_number":129,"context_line":"                api_version.APIVersionRequest(\"2.43\")):"},{"line_number":130,"context_line":"            extra_specs \u003d req.params.get(\u0027extra_specs\u0027)"},{"line_number":131,"context_line":"            if extra_specs:"},{"line_number":132,"context_line":"                filters[\u0027extra_specs\u0027] \u003d ast.literal_eval(extra_specs)"},{"line_number":133,"context_line":"        limited_types \u003d share_types.get_all_types("},{"line_number":134,"context_line":"            context, search_opts\u003dfilters).values()"},{"line_number":135,"context_line":"        return list(limited_types)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_18fe686a","line":132,"range":{"start_line":128,"start_character":8,"end_line":132,"end_character":70},"updated":"2018-01-19 02:55:55.000000000","message":"Do we have to check if the \u0027extra_specs\u0027 key is not supported by the microversion smaller than \"2.43\"\nmicroversionhttps://review.openstack.org/#/c/452158/36/manila/api/v2/quota_sets.py@81","commit_id":"321abafd8191e4c16bd52427169dc5d71f982759"},{"author":{"_account_id":25456,"name":"junboli","email":"junbo85.li@gmail.com","username":"junboli"},"change_message_id":"a5d2108d92582dabec6dafa9671b4731341f37b0","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        else:"},{"line_number":126,"context_line":"            filters[\u0027is_public\u0027] \u003d True"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        if (req.api_version_request \u003e\u003d"},{"line_number":129,"context_line":"                api_version.APIVersionRequest(\"2.43\")):"},{"line_number":130,"context_line":"            extra_specs \u003d req.params.get(\u0027extra_specs\u0027)"},{"line_number":131,"context_line":"            if extra_specs:"},{"line_number":132,"context_line":"                filters[\u0027extra_specs\u0027] \u003d ast.literal_eval(extra_specs)"},{"line_number":133,"context_line":"        limited_types \u003d share_types.get_all_types("},{"line_number":134,"context_line":"            context, search_opts\u003dfilters).values()"},{"line_number":135,"context_line":"        return list(limited_types)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df7087c5_4a054410","line":132,"range":{"start_line":128,"start_character":8,"end_line":132,"end_character":70},"in_reply_to":"7f96bb07_18fe686a","updated":"2018-03-23 09:27:47.000000000","message":"Yes, right, we need this kind of exception here.","commit_id":"321abafd8191e4c16bd52427169dc5d71f982759"}],"manila/share/share_types.py":[{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"16b0c374d51dbefbfbc00edd6dcfb6554e545883","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        type_args[\u0027required_extra_specs\u0027] \u003d required_extra_specs"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    search_vars \u003d search_opts.get(\u0027extra_specs\u0027)"},{"line_number":95,"context_line":"    if search_vars:"},{"line_number":96,"context_line":"        LOG.debug(\"Searching by: %s\", search_vars)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        def _check_extra_specs_match(share_type, searchdict):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_8ec94bad","line":95,"range":{"start_line":95,"start_character":7,"end_line":95,"end_character":18},"updated":"2018-01-16 03:31:42.000000000","message":"Why you just check the search_vars?  How about if the search_vars is equal to None, but the search_opts still have values, maybe still have name or something else in search_opts in the future? If you only check the search_vars, it cannot filter other values if the search_vars is equal to None.","commit_id":"321abafd8191e4c16bd52427169dc5d71f982759"},{"author":{"_account_id":25456,"name":"junboli","email":"junbo85.li@gmail.com","username":"junboli"},"change_message_id":"496928aeabdfd9a779155ed758fe840587706989","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        type_args[\u0027required_extra_specs\u0027] \u003d required_extra_specs"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    search_vars \u003d search_opts.get(\u0027extra_specs\u0027)"},{"line_number":95,"context_line":"    if search_vars:"},{"line_number":96,"context_line":"        LOG.debug(\"Searching by: %s\", search_vars)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        def _check_extra_specs_match(share_type, searchdict):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_dd7aa7ef","line":95,"range":{"start_line":95,"start_character":7,"end_line":95,"end_character":18},"in_reply_to":"7f96bb07_8ec94bad","updated":"2018-01-16 05:58:22.000000000","message":"Hello, zhongjun, if search_vars is None, that means we have no extra_specs\nto filter for the type list from DB, if we have \"name\" or other options added\nin the future, we can pop those from search_opts and add them in variable\nfilters and then filter type list from db, with that results, do the second\nfilter to match search_vars.","commit_id":"321abafd8191e4c16bd52427169dc5d71f982759"},{"author":{"_account_id":25456,"name":"junboli","email":"junbo85.li@gmail.com","username":"junboli"},"change_message_id":"a5d2108d92582dabec6dafa9671b4731341f37b0","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        type_args[\u0027required_extra_specs\u0027] \u003d required_extra_specs"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    search_vars \u003d search_opts.get(\u0027extra_specs\u0027)"},{"line_number":95,"context_line":"    if search_vars:"},{"line_number":96,"context_line":"        LOG.debug(\"Searching by: %s\", search_vars)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        def _check_extra_specs_match(share_type, searchdict):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_931a596c","line":95,"range":{"start_line":95,"start_character":7,"end_line":95,"end_character":18},"in_reply_to":"7f96bb07_d578c9c4","updated":"2018-03-23 09:27:47.000000000","message":"Looks make sense, other filter options in search_opts should be empty search result.","commit_id":"321abafd8191e4c16bd52427169dc5d71f982759"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"6cfa36d60bbe2cbf7847f1316a046c6a96221059","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        type_args[\u0027required_extra_specs\u0027] \u003d required_extra_specs"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    search_vars \u003d search_opts.get(\u0027extra_specs\u0027)"},{"line_number":95,"context_line":"    if search_vars:"},{"line_number":96,"context_line":"        LOG.debug(\"Searching by: %s\", search_vars)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        def _check_extra_specs_match(share_type, searchdict):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_d578c9c4","line":95,"range":{"start_line":95,"start_character":7,"end_line":95,"end_character":18},"in_reply_to":"7f96bb07_dd7aa7ef","updated":"2018-01-19 02:55:55.000000000","message":"Hi junbo.li. If someone use the get_all_types function with (search_opts \u003d {\u0027extra_specs\u0027: ...,  \u0027something_else\u0027: ....}), you can not guarantee that the user entered exactly as you would like.  So if the search_opts value like that, the expect result would be {} (because the \u0027something_else\u0027 there isn\u0027t  ). but we will get some share_types. Because we ignore other values in the search_opts except \u0027extra_specs\u0027.  Or could we add another check about if there is another value in search_opts?","commit_id":"321abafd8191e4c16bd52427169dc5d71f982759"},{"author":{"_account_id":26567,"name":"kaufmann.smith","email":"kaufmann.smith@yahoo.com"},"change_message_id":"8c7e492332e61edd2be369e4be5fb2783953abd7","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    search_vars \u003d search_opts.get(\u0027extra_specs\u0027)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    if search_opts:"},{"line_number":100,"context_line":"        share_types \u003d {}"},{"line_number":101,"context_line":"    elif search_vars:"},{"line_number":102,"context_line":"        LOG.debug(\"Searching by: %s\", search_vars)"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bf659307_d63bbf99","line":100,"range":{"start_line":100,"start_character":8,"end_line":100,"end_character":24},"updated":"2018-03-26 01:45:16.000000000","message":"We need to return {} here, otherwise if search_vars is not empty, the results of share_types will be overriden.","commit_id":"f6f4cdb98194fc0444d4eac218d91ecd0550bf7d"},{"author":{"_account_id":25456,"name":"junboli","email":"junbo85.li@gmail.com","username":"junboli"},"change_message_id":"44904b2c738e3ed164595cf67be6c21c3908527d","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    search_vars \u003d search_opts.get(\u0027extra_specs\u0027)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    if search_opts:"},{"line_number":100,"context_line":"        share_types \u003d {}"},{"line_number":101,"context_line":"    elif search_vars:"},{"line_number":102,"context_line":"        LOG.debug(\"Searching by: %s\", search_vars)"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bf659307_36f9db7f","line":100,"range":{"start_line":100,"start_character":8,"end_line":100,"end_character":24},"in_reply_to":"bf659307_d63bbf99","updated":"2018-03-26 02:12:27.000000000","message":"Right, Thanks.","commit_id":"f6f4cdb98194fc0444d4eac218d91ecd0550bf7d"}]}
