)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"64b6645cbe34f62d6a01698e74af078eae5ea9d1","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     fengzhr \u003cfengzhr@awcloud.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-06-21 09:12:23 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix the bug of filter image with \"protected\""},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When trying to filter images by \"Protected: yes\", it always"},{"line_number":10,"context_line":"shows result of the filter \"Protected: no\". The reason is that when"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"5f201791_850d2940","line":7,"updated":"2017-06-21 14:57:07.000000000","message":"change to something like:\n\nAdd \u0027protected\u0027 filter to image-list call","commit_id":"d7d1fca49c6778b7e1117d569b0e0e3b2f38a2e1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"a601a49e1502fa33cebdacdb5bcacf0dd903c817","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     fengzhr \u003cfengzhr@awcloud.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-06-21 09:12:23 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix the bug of filter image with \"protected\""},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When trying to filter images by \"Protected: yes\", it always"},{"line_number":10,"context_line":"shows result of the filter \"Protected: no\". The reason is that when"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"5f201791_c5f20107","line":7,"updated":"2017-06-21 14:46:21.000000000","message":"change to something like:\n\nAdd \u0027protected\u0027 filter to image-list call","commit_id":"d7d1fca49c6778b7e1117d569b0e0e3b2f38a2e1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"64b6645cbe34f62d6a01698e74af078eae5ea9d1","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix the bug of filter image with \"protected\""},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When trying to filter images by \"Protected: yes\", it always"},{"line_number":10,"context_line":"shows result of the filter \"Protected: no\". The reason is that when"},{"line_number":11,"context_line":"query image with glanceclient, the filters are string."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ie90d952edddd3f69b3f489f056ff506e63f96376"},{"line_number":14,"context_line":"Closes-Bug: #1674246"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"5f201791_650a0d27","line":11,"range":{"start_line":9,"start_character":0,"end_line":11,"end_character":54},"updated":"2017-06-21 14:57:07.000000000","message":"change to:\n\nImplements v2 API image-list filtering on the \u0027protected\u0027 property following the spec:\n\nhttps://git.openstack.org/cgit/openstack/glance-specs/tree/specs/pike/approved/glance/add-protected-filter.rst\n\nThe \u0027protected\u0027 query string parameter accepts one of \u0027true\u0027, \u0027false\u0027.  Any other value raises a 400 with an appropriate message.\n\nSee the discussion on https://review.openstack.org/#/c/451560/ for why this implementation strategy was chosen.","commit_id":"d7d1fca49c6778b7e1117d569b0e0e3b2f38a2e1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"a601a49e1502fa33cebdacdb5bcacf0dd903c817","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix the bug of filter image with \"protected\""},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When trying to filter images by \"Protected: yes\", it always"},{"line_number":10,"context_line":"shows result of the filter \"Protected: no\". The reason is that when"},{"line_number":11,"context_line":"query image with glanceclient, the filters are string."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ie90d952edddd3f69b3f489f056ff506e63f96376"},{"line_number":14,"context_line":"Closes-Bug: #1674246"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"5f201791_c50e81e4","line":11,"range":{"start_line":9,"start_character":0,"end_line":11,"end_character":54},"updated":"2017-06-21 14:46:21.000000000","message":"change to:\n\nImplements v2 API image-list filtering on the \u0027protected\u0027 property following the spec:\n\nhttps://git.openstack.org/cgit/openstack/glance-specs/tree/specs/pike/approved/glance/add-protected-filter.rst\n\nThe \u0027protected\u0027 query string parameter accepts one of \u0027true\u0027, \u0027false\u0027.  Any other value raises a 400 with an appropriate message.\n\nSee the discussion on https://review.openstack.org/#/c/451560/ for why this implementation strategy was chosen.","commit_id":"d7d1fca49c6778b7e1117d569b0e0e3b2f38a2e1"}],"glance/api/v2/images.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"8eb9147d46304f69172b434be199e450e4ba090f","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        protected \u003d filters.pop(\u0027protected\u0027, None)"},{"line_number":102,"context_line":"        if protected is not None:"},{"line_number":103,"context_line":"            # ensure the type of protected is boolean"},{"line_number":104,"context_line":"            if protected in (\u0027true\u0027, \u0027True\u0027, True):"},{"line_number":105,"context_line":"                filters[\u0027protected\u0027] \u003d True"},{"line_number":106,"context_line":"            elif protected in (\u0027false\u0027, \u0027False\u0027, False):"},{"line_number":107,"context_line":"                filters[\u0027protected\u0027] \u003d False"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_ed148750","line":104,"updated":"2017-03-27 15:52:59.000000000","message":"I think you ought to investigate using oslo_utils.strutils.bool_from_string instead of doing this by hand.  Note that what you\u0027ve got here isn\u0027t going to fix the bug that\u0027s been filed, because if someone passes \u0027yes\u0027, you\u0027re going to just throw away the \u0027protected\u0027 filter since there\u0027s no \u0027else\u0027 clause here.","commit_id":"0010c13377c4224abbec355391be2b6eb1a6ca42"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"321dbd7bf52644df6bcbbbfde6391e94ef40978d","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from oslo_log import log as logging"},{"line_number":21,"context_line":"from oslo_serialization import jsonutils as json"},{"line_number":22,"context_line":"from oslo_utils import encodeutils"},{"line_number":23,"context_line":"from oslo_utils.strutils import bool_from_string"},{"line_number":24,"context_line":"import six"},{"line_number":25,"context_line":"from six.moves import http_client as http"},{"line_number":26,"context_line":"import six.moves.urllib.parse as urlparse"}],"source_content_type":"text/x-python","patch_set":5,"id":"ffe62b97_05450243","line":23,"range":{"start_line":23,"start_character":32,"end_line":23,"end_character":48},"updated":"2017-03-28 18:28:45.000000000","message":"Please import only the module and not the object.","commit_id":"935090c3caf6c1dc34b8ee02e06fa430ce494c0e"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"321dbd7bf52644df6bcbbbfde6391e94ef40978d","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        filters[\u0027deleted\u0027] \u003d False"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        protected \u003d filters.pop(\u0027protected\u0027, None)"},{"line_number":103,"context_line":"        if protected is not None:"},{"line_number":104,"context_line":"            # ensure the type of protected is boolean"},{"line_number":105,"context_line":"            filters[\u0027protected\u0027] \u003d bool_from_string(protected)"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ffe62b97_b0a7b6bd","line":103,"range":{"start_line":103,"start_character":8,"end_line":103,"end_character":33},"updated":"2017-03-28 18:28:45.000000000","message":"The call to strutils.bool_from_string() with the defaults will take care of the \u0027None\u0027. i.e., it will set it to False for None.\n\nhttps://github.com/openstack/oslo.utils/blob/master/oslo_utils/strutils.py#L113","commit_id":"935090c3caf6c1dc34b8ee02e06fa430ce494c0e"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"e8718ea24dbeb1684c460d30c7ec954a8fcef786","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        filters[\u0027deleted\u0027] \u003d False"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        protected \u003d filters.pop(\u0027protected\u0027, None)"},{"line_number":103,"context_line":"        if protected is not None:"},{"line_number":104,"context_line":"            # ensure the type of protected is boolean"},{"line_number":105,"context_line":"            filters[\u0027protected\u0027] \u003d bool_from_string(protected)"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ffe62b97_b1057813","line":103,"range":{"start_line":103,"start_character":8,"end_line":103,"end_character":33},"in_reply_to":"ffe62b97_b0a7b6bd","updated":"2017-03-28 20:19:00.000000000","message":"Good point, but I think the idea here is that if \u0027protected\u0027 is None, then we shouldn\u0027t add the filter at all since it wasn\u0027t among the filters specified by the user.  If we don\u0027t do this check, then images with protected\u003d\u003dTrue won\u0027t show up in the image list unless you specifically ask for them, which would break the API contract.\n\nSo I think we need to do this check.","commit_id":"935090c3caf6c1dc34b8ee02e06fa430ce494c0e"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"67fa51efa89839998f3c81a195b4770356c597c7","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        filters[\u0027deleted\u0027] \u003d False"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        protected \u003d filters.pop(\u0027protected\u0027, None)"},{"line_number":103,"context_line":"        if protected is not None:"},{"line_number":104,"context_line":"            # ensure the type of protected is boolean"},{"line_number":105,"context_line":"            filters[\u0027protected\u0027] \u003d bool_from_string(protected)"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ffe62b97_86afd57b","line":103,"range":{"start_line":103,"start_character":8,"end_line":103,"end_character":33},"in_reply_to":"ffe62b97_b1057813","updated":"2017-03-28 21:07:00.000000000","message":"Brian, I understand. We should probably not set it to None in L102. \nInstead do something like:\n\n  if \u0027protected\u0027 in filters:\n      filters[\u0027protected\u0027] \u003d bool_from_string(filters.pop(\u0027protected\u0027))\n\nThis will avoid confusions with None value.\n* If the filter is not set by an user, we wont reset it at all.\n* If it is set, (and has been set to None or anything else by an user) we will let oslo\u0027s strutils to handle the str to bool.","commit_id":"935090c3caf6c1dc34b8ee02e06fa430ce494c0e"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"321dbd7bf52644df6bcbbbfde6391e94ef40978d","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        protected \u003d filters.pop(\u0027protected\u0027, None)"},{"line_number":103,"context_line":"        if protected is not None:"},{"line_number":104,"context_line":"            # ensure the type of protected is boolean"},{"line_number":105,"context_line":"            filters[\u0027protected\u0027] \u003d bool_from_string(protected)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if limit is None:"},{"line_number":108,"context_line":"            limit \u003d CONF.limit_param_default"}],"source_content_type":"text/x-python","patch_set":5,"id":"ffe62b97_3093a65d","line":105,"range":{"start_line":105,"start_character":35,"end_line":105,"end_character":51},"updated":"2017-03-28 18:28:45.000000000","message":"strutils.bool_from_string","commit_id":"935090c3caf6c1dc34b8ee02e06fa430ce494c0e"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"67fa51efa89839998f3c81a195b4770356c597c7","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        protected \u003d filters.pop(\u0027protected\u0027, None)"},{"line_number":103,"context_line":"        if protected is not None:"},{"line_number":104,"context_line":"            # ensure the type of protected is boolean"},{"line_number":105,"context_line":"            filters[\u0027protected\u0027] \u003d bool_from_string(protected)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if limit is None:"},{"line_number":108,"context_line":"            limit \u003d CONF.limit_param_default"}],"source_content_type":"text/x-python","patch_set":5,"id":"ffe62b97_e38c53d8","line":105,"range":{"start_line":105,"start_character":35,"end_line":105,"end_character":51},"in_reply_to":"ffe62b97_23935b5d","updated":"2017-03-28 21:07:00.000000000","message":"To preserve the current behaviour (example: have protected\u003dwhatever return images with protected as False) and at the same time resolve this bug (accept and serve protected\u003dtrue | yes), the way the current PS uses bool_from_string() should do I guess.\nAny other value except True, \u0027t\u0027,\u0027true\u0027, \u0027on\u0027, \u0027y\u0027, \u0027yes\u0027, or \u00271\u0027 will return images with protected as False.","commit_id":"935090c3caf6c1dc34b8ee02e06fa430ce494c0e"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"e8718ea24dbeb1684c460d30c7ec954a8fcef786","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        protected \u003d filters.pop(\u0027protected\u0027, None)"},{"line_number":103,"context_line":"        if protected is not None:"},{"line_number":104,"context_line":"            # ensure the type of protected is boolean"},{"line_number":105,"context_line":"            filters[\u0027protected\u0027] \u003d bool_from_string(protected)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if limit is None:"},{"line_number":108,"context_line":"            limit \u003d CONF.limit_param_default"}],"source_content_type":"text/x-python","patch_set":5,"id":"ffe62b97_23935b5d","line":105,"range":{"start_line":105,"start_character":35,"end_line":105,"end_character":51},"in_reply_to":"ffe62b97_3093a65d","updated":"2017-03-28 20:19:00.000000000","message":"I was having second thoughts about this, but the current (broken) behavior is that if you pass anything at all as the value of \u0027protected\u0027 in a query string, i.e.,\nGET v2/images?protected\u003dwhatever\nGlance will return only images with \u0027protected\u0027 \u003d\u003d False (even when you call GET v2/images?protected\u003dtrue, which is why the bug was filed).\n\nSo this will preserve that behavior.  The alternative is to use strict\u003dTrue with bool_from_string, but then we\u0027d have to catch the ValueError ... and calls like GET v2/images?protected\u003dnope will be rejected, whereas before they\u0027d work.  Just wanted to throw that out there.","commit_id":"935090c3caf6c1dc34b8ee02e06fa430ce494c0e"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"40668ce244f40aa8b2db85bd1e93631920fd02a5","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        if \u0027protected\u0027 in filters:"},{"line_number":103,"context_line":"            # ensure the type of protected is boolean"},{"line_number":104,"context_line":"            filters[\u0027protected\u0027] \u003d strutils.bool_from_string("},{"line_number":105,"context_line":"                filters.pop(\u0027protected\u0027))"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if limit is None:"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_2b618d3a","line":104,"updated":"2017-05-26 16:11:36.000000000","message":"The spec that was approved will only recognize the JSON string values for a boolean, that is, \u0027true\u0027 and \u0027false\u0027 in that exact case combination.  So you can\u0027t use strutils anymore.\n\nAlso, if there\u0027s a value for \u0027protected\u0027 that is NOT \u0027true\u0027 or \u0027false\u0027, you\u0027ll need to raise a 400 with a message, something like \"the only acceptable values for the \u0027protected\u0027 filter are \u0027true\u0027 and \u0027false\u0027\".","commit_id":"f4de6d6145d74be9c78d09c5e990bfb1589aef8b"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"c824544a967e73531d1d7273b5709a984fdbe6e4","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            filters \u003d {}"},{"line_number":99,"context_line":"        filters[\u0027deleted\u0027] \u003d False"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        protected \u003d filters.pop(\u0027protected\u0027, None)"},{"line_number":102,"context_line":"        if protected:"},{"line_number":103,"context_line":"            if protected in [\u0027true\u0027, \u0027false\u0027]:"},{"line_number":104,"context_line":"                # ensure the type of protected is boolean"}],"source_content_type":"text/x-python","patch_set":13,"id":"df140735_43236506","line":101,"range":{"start_line":101,"start_character":8,"end_line":101,"end_character":50},"updated":"2017-05-31 09:37:14.000000000","message":"what is the need of pop as value of protected will get overwritten at line #105","commit_id":"5dbd0b241ea0919db7333cd53a20e0d8530e9d8f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"78c152d228e84c437dcbd37a0dd898a3a76041e6","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            filters \u003d {}"},{"line_number":99,"context_line":"        filters[\u0027deleted\u0027] \u003d False"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        protected \u003d filters.pop(\u0027protected\u0027, None)"},{"line_number":102,"context_line":"        if protected:"},{"line_number":103,"context_line":"            if protected in [\u0027true\u0027, \u0027false\u0027]:"},{"line_number":104,"context_line":"                # ensure the type of protected is boolean"}],"source_content_type":"text/x-python","patch_set":13,"id":"df140735_b95a72f0","line":101,"range":{"start_line":101,"start_character":8,"end_line":101,"end_character":50},"in_reply_to":"df140735_43236506","updated":"2017-05-31 10:13:48.000000000","message":"just gone through specs written by brian and understood the need of removing the key from dict.","commit_id":"5dbd0b241ea0919db7333cd53a20e0d8530e9d8f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"a9b09139fb2f57979fe5cdbb71f524d5851cc24d","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            filters \u003d {}"},{"line_number":99,"context_line":"        filters[\u0027deleted\u0027] \u003d False"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        protected \u003d filters.pop(\u0027protected\u0027, None)"},{"line_number":102,"context_line":"        if protected:"},{"line_number":103,"context_line":"            if protected in [\u0027true\u0027, \u0027false\u0027]:"},{"line_number":104,"context_line":"                # ensure the type of protected is boolean"}],"source_content_type":"text/x-python","patch_set":13,"id":"df140735_19171ef0","line":101,"range":{"start_line":101,"start_character":8,"end_line":101,"end_character":50},"in_reply_to":"df140735_b95a72f0","updated":"2017-05-31 10:15:49.000000000","message":"still, no need to pop sorry for confusion.","commit_id":"5dbd0b241ea0919db7333cd53a20e0d8530e9d8f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"c824544a967e73531d1d7273b5709a984fdbe6e4","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                # ensure the type of protected is boolean"},{"line_number":105,"context_line":"                filters[\u0027protected\u0027] \u003d True if protected \u003d\u003d \u0027true\u0027 else False"},{"line_number":106,"context_line":"            else:"},{"line_number":107,"context_line":"                message \u003d _(\"The only acceptable values for the \u0027protected\u0027\""},{"line_number":108,"context_line":"                            \" filter are \u0027true\u0027 and \u0027false\u0027\")"},{"line_number":109,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmessage)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        if limit is None:"}],"source_content_type":"text/x-python","patch_set":13,"id":"df140735_c3f3f572","line":108,"range":{"start_line":107,"start_character":29,"end_line":108,"end_character":60},"updated":"2017-05-31 09:37:14.000000000","message":"IMO following message will be more helpful.\n\nInvalid value \u0027%s\u0027 for \u0027protected\u0027 filter. Valid values are \u0027true\u0027 or \u0027false\u0027.","commit_id":"5dbd0b241ea0919db7333cd53a20e0d8530e9d8f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"7c6de05dc81097ab1f7d73fa4c978688b475e32b","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            filters \u003d {}"},{"line_number":99,"context_line":"        filters[\u0027deleted\u0027] \u003d False"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        protected \u003d filters.get(\u0027protected\u0027, None)"},{"line_number":102,"context_line":"        if protected:"},{"line_number":103,"context_line":"            if protected in [\u0027true\u0027, \u0027false\u0027]:"},{"line_number":104,"context_line":"                # ensure the type of protected is boolean"}],"source_content_type":"text/x-python","patch_set":14,"id":"df140735_72f3d074","line":101,"range":{"start_line":101,"start_character":43,"end_line":101,"end_character":49},"updated":"2017-05-31 12:55:03.000000000","message":"nit: get method will return None if key is not present. No need to specify explicitly.","commit_id":"2a747ce94846138b6f2d2d3d76b121d4efdc8297"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"46e0d6b557c2b34d4f237269e0892a1b439a30b2","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                # ensure the type of protected is boolean"},{"line_number":105,"context_line":"                filters[\u0027protected\u0027] \u003d True if protected \u003d\u003d \u0027true\u0027 else False"},{"line_number":106,"context_line":"            else:"},{"line_number":107,"context_line":"                message \u003d _(\"Invalid value \u0027%s\u0027 for \u0027protected\u0027 filter.\""},{"line_number":108,"context_line":"                            \" Valid values are \u0027true\u0027 or \u0027false\u0027.\" % protected)"},{"line_number":109,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmessage)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        if limit is None:"}],"source_content_type":"text/x-python","patch_set":16,"id":"df140735_9c1d4011","line":108,"range":{"start_line":107,"start_character":26,"end_line":108,"end_character":79},"updated":"2017-06-01 05:02:11.000000000","message":"change it to \n_(\"Invalid value \u0027%s\u0027 for \u0027protected\u0027 filter.\"\n  \" Valid values are \u0027true\u0027 or \u0027false\u0027.\") % protected\n\npep8 error will be resolved","commit_id":"e9e93486bd265c007f8a2663e8da27d2328a6e89"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"34690b0ba133a95a8158efbd9cb238ab8ed441ad","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        if protected:"},{"line_number":103,"context_line":"            if protected in [\u0027true\u0027, \u0027false\u0027]:"},{"line_number":104,"context_line":"                # ensure the type of protected is boolean"},{"line_number":105,"context_line":"                filters[\u0027protected\u0027] \u003d True if protected \u003d\u003d \u0027true\u0027 else False"},{"line_number":106,"context_line":"            else:"},{"line_number":107,"context_line":"                message \u003d _(\"Invalid value \u0027%s\u0027 for \u0027protected\u0027 filter.\""},{"line_number":108,"context_line":"                            \" Valid values are \u0027true\u0027 or \u0027false\u0027.\") % protected"}],"source_content_type":"text/x-python","patch_set":17,"id":"df140735_1dff8e67","line":105,"updated":"2017-06-05 07:52:37.000000000","message":"\"filters[\u0027protected\u0027] \u003d protected \u003d\u003d \u0027true\u0027\" looks more canonical.","commit_id":"2d013cd3d422a42f59ac6723fa9e48cc48ecb109"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"564d05eeeab3c116dcba373516784fd2f18a3276","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            filters \u003d {}"},{"line_number":99,"context_line":"        filters[\u0027deleted\u0027] \u003d False"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        protected \u003d filters.get(\u0027protected\u0027)"},{"line_number":102,"context_line":"        if protected:"},{"line_number":103,"context_line":"            if protected in [\u0027true\u0027, \u0027false\u0027]:"},{"line_number":104,"context_line":"                # ensure the type of protected is boolean"}],"source_content_type":"text/x-python","patch_set":18,"id":"7f231b9d_35f0c390","line":101,"updated":"2017-06-12 12:51:30.000000000","message":"There are other places in glance where more things are treated as True - https://github.com/openstack/glance/blob/9cd6e2f839acf49c9a67f61123be7a1baf67aa4c/glance/registry/api/v1/images.py#L324-L331 it seems like this should follow similar logic.","commit_id":"6db0513b86f68bcfde6e2765006ef6ada4e9d0b3"},{"author":{"_account_id":17814,"name":"fengzhr","email":"fengzhr@awcloud.com","username":"space"},"change_message_id":"a76b07454102ad30052b501e9fe6e0fef659c9bf","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            filters \u003d {}"},{"line_number":99,"context_line":"        filters[\u0027deleted\u0027] \u003d False"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        protected \u003d filters.get(\u0027protected\u0027)"},{"line_number":102,"context_line":"        if protected:"},{"line_number":103,"context_line":"            if protected in [\u0027true\u0027, \u0027false\u0027]:"},{"line_number":104,"context_line":"                # ensure the type of protected is boolean"}],"source_content_type":"text/x-python","patch_set":18,"id":"7f231b9d_958a6967","line":101,"in_reply_to":"7f231b9d_35f0c390","updated":"2017-06-16 02:26:30.000000000","message":"Please review https://review.openstack.org/#/c/451560/. I need to follow it.","commit_id":"6db0513b86f68bcfde6e2765006ef6ada4e9d0b3"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"22d1241840efdabbfd419c9a5e6a7ec207fb63f1","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        filters[\u0027deleted\u0027] \u003d False"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        protected \u003d filters.get(\u0027protected\u0027)"},{"line_number":125,"context_line":"        if protected:"},{"line_number":126,"context_line":"            if protected in [\u0027true\u0027, \u0027false\u0027]:"},{"line_number":127,"context_line":"                # ensure the type of protected is boolean"},{"line_number":128,"context_line":"                filters[\u0027protected\u0027] \u003d protected \u003d\u003d \u0027true\u0027"}],"source_content_type":"text/x-python","patch_set":24,"id":"3f1d235d_2fc916ab","line":125,"range":{"start_line":125,"start_character":0,"end_line":125,"end_character":21},"updated":"2017-07-05 12:58:24.000000000","message":"Suggest\n\n if protected is not None\n\nElse a querystring containing `protected\u003d` (with no value) will be a no-op, which doesn\u0027t gel with the design statement.","commit_id":"425c469190032b88ffa7bc299014cc416a4ce914"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"22d1241840efdabbfd419c9a5e6a7ec207fb63f1","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        protected \u003d filters.get(\u0027protected\u0027)"},{"line_number":125,"context_line":"        if protected:"},{"line_number":126,"context_line":"            if protected in [\u0027true\u0027, \u0027false\u0027]:"},{"line_number":127,"context_line":"                # ensure the type of protected is boolean"},{"line_number":128,"context_line":"                filters[\u0027protected\u0027] \u003d protected \u003d\u003d \u0027true\u0027"},{"line_number":129,"context_line":"            else:"},{"line_number":130,"context_line":"                message \u003d _(\"Invalid value \u0027%s\u0027 for \u0027protected\u0027 filter.\""},{"line_number":131,"context_line":"                            \" Valid values are \u0027true\u0027 or \u0027false\u0027.\") % protected"},{"line_number":132,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmessage)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        if limit is None:"},{"line_number":135,"context_line":"            limit \u003d CONF.limit_param_default"}],"source_content_type":"text/x-python","patch_set":24,"id":"3f1d235d_ef4b1e28","line":132,"range":{"start_line":126,"start_character":0,"end_line":132,"end_character":67},"updated":"2017-07-05 12:58:24.000000000","message":"This may be prettier as\n\n if protected not in [\u0027true\u0027, \u0027false\u0027]:\n     raise ...\n filters[\u0027protected\u0027] \u003d ...","commit_id":"425c469190032b88ffa7bc299014cc416a4ce914"}],"glance/tests/functional/db/base.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"923d5725c46791214ad9337a6f845f5f905d193e","unresolved":false,"context_lines":[{"line_number":1990,"context_line":"        tasks \u003d self.db_api.task_get_all(self.adm_context)"},{"line_number":1991,"context_line":"        self.assertEqual(len(tasks), 2)"},{"line_number":1992,"context_line":""},{"line_number":1993,"context_line":""},{"line_number":1994,"context_line":"class TestVisibility(test_utils.BaseTestCase):"},{"line_number":1995,"context_line":"    def setUp(self):"},{"line_number":1996,"context_line":"        super(TestVisibility, self).setUp()"}],"source_content_type":"text/x-python","patch_set":22,"id":"5f201791_a49aa310","line":1993,"updated":"2017-06-28 12:31:23.000000000","message":"Looks like patch is not rebased properly or some issue with gerrit as test \u0027test_purge_fk_constraint_failure\u0027 [1] is not shown either on master (left side) and your patch.\n\n[1] https://github.com/openstack/glance/blob/master/glance/tests/functional/db/base.py#L1986","commit_id":"35f06acafc70665f2af5f9280f437cfefbc66d3e"}],"glance/tests/functional/v2/test_images.py":[{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"d5f855b455fa9919a001a229b3ee160f3c11696b","unresolved":false,"context_lines":[{"line_number":362,"context_line":"        self.assertIsNone(image[\u0027size\u0027])"},{"line_number":363,"context_line":"        self.assertIsNone(image[\u0027virtual_size\u0027])"},{"line_number":364,"context_line":"        self.assertEqual(\u0027bar\u0027, image[\u0027foo\u0027])"},{"line_number":365,"context_line":"        self.assertTrue(image[\u0027protected\u0027])"},{"line_number":366,"context_line":"        self.assertEqual(\u0027kernel\u0027, image[\u0027type\u0027])"},{"line_number":367,"context_line":"        self.assertTrue(image[\u0027created_at\u0027])"},{"line_number":368,"context_line":"        self.assertTrue(image[\u0027updated_at\u0027])"}],"source_content_type":"text/x-python","patch_set":18,"id":"df140735_aa26b715","line":365,"range":{"start_line":365,"start_character":19,"end_line":365,"end_character":23},"updated":"2017-06-07 15:13:16.000000000","message":"Hmm-m what am I missing? Why did this change?","commit_id":"6db0513b86f68bcfde6e2765006ef6ada4e9d0b3"},{"author":{"_account_id":17814,"name":"fengzhr","email":"fengzhr@awcloud.com","username":"space"},"change_message_id":"5637ecdb5b638e7bee0f19ef7bd0082fe52279b6","unresolved":false,"context_lines":[{"line_number":362,"context_line":"        self.assertIsNone(image[\u0027size\u0027])"},{"line_number":363,"context_line":"        self.assertIsNone(image[\u0027virtual_size\u0027])"},{"line_number":364,"context_line":"        self.assertEqual(\u0027bar\u0027, image[\u0027foo\u0027])"},{"line_number":365,"context_line":"        self.assertTrue(image[\u0027protected\u0027])"},{"line_number":366,"context_line":"        self.assertEqual(\u0027kernel\u0027, image[\u0027type\u0027])"},{"line_number":367,"context_line":"        self.assertTrue(image[\u0027created_at\u0027])"},{"line_number":368,"context_line":"        self.assertTrue(image[\u0027updated_at\u0027])"}],"source_content_type":"text/x-python","patch_set":18,"id":"7f231b9d_962a21e5","line":365,"range":{"start_line":365,"start_character":19,"end_line":365,"end_character":23},"in_reply_to":"df140735_aa26b715","updated":"2017-06-12 09:27:14.000000000","message":"In this test case we need two kinds of images, one with \u0027protected\u003dTrue\u0027, another with \u0027protected\u003dTrue\u0027. So I changed one of them.","commit_id":"6db0513b86f68bcfde6e2765006ef6ada4e9d0b3"}]}
