)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"eb004c73d45cd8288d70535376a08efce26b7c86","unresolved":false,"context_lines":[{"line_number":13,"context_line":"to get OpenStack administrator access."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This fix solves this problem by stripping auth token when logging"},{"line_number":16,"context_line":"response. This fix also strip X-Auth-Token in request headers."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Ibda3c1069a5a2d7af27bf95c7cef97bc103b5cde"},{"line_number":19,"context_line":"Closes-Bug: 1320098"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"1ae5cdf2_702f5a3f","line":16,"updated":"2014-06-05 18:20:52.000000000","message":"This commit message is really confusing. This patch only drops X-Auth-Token in request headers for *logging*. You need to mention it is only related to logging.","commit_id":"6e811b5a3419d94827cab1169921d47e1168e7d8"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"4ca9659a8e99319e8f970145a298108432115e13","unresolved":false,"context_lines":[{"line_number":13,"context_line":"to get OpenStack administrator access."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This fix solves this problem by stripping auth token when logging"},{"line_number":16,"context_line":"response. This fix also strip X-Auth-Token in request headers."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Ibda3c1069a5a2d7af27bf95c7cef97bc103b5cde"},{"line_number":19,"context_line":"Closes-Bug: 1320098"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"1ae5cdf2_bf0e068a","line":16,"in_reply_to":"1ae5cdf2_702f5a3f","updated":"2014-06-06 02:10:53.000000000","message":"Will address in next patch.","commit_id":"6e811b5a3419d94827cab1169921d47e1168e7d8"}],"neutronclient/client.py":[{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"f331fe945c758740a41cd45a9ab109a3ff954895","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        else:"},{"line_number":179,"context_line":"            return kwargs"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def _strip_token(self, body):"},{"line_number":182,"context_line":"        if body:"},{"line_number":183,"context_line":"            try:"},{"line_number":184,"context_line":"                body_dict \u003d json.loads(body)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_933cd9c9","line":181,"updated":"2014-05-20 13:57:31.000000000","message":"Need to add unit test for this.","commit_id":"87ca8f23f9d0bb674b08e8e49aede99f3186a712"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"fcd75c8671e444d92373a80d27148d5a4681f8e0","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        else:"},{"line_number":179,"context_line":"            return kwargs"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def _strip_token(self, body):"},{"line_number":182,"context_line":"        if body:"},{"line_number":183,"context_line":"            try:"},{"line_number":184,"context_line":"                body_dict \u003d json.loads(body)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_2ee39ad9","line":181,"in_reply_to":"7adec928_933cd9c9","updated":"2014-05-20 14:44:20.000000000","message":"will check how to do this in next patch.","commit_id":"87ca8f23f9d0bb674b08e8e49aede99f3186a712"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"f06de502e126619544a46de8466e699294ab6f9b","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            return kwargs"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def _strip_token(self, body):"},{"line_number":182,"context_line":"        if body:"},{"line_number":183,"context_line":"            try:"},{"line_number":184,"context_line":"                body_dict \u003d json.loads(body)"},{"line_number":185,"context_line":"            #stop the stripping process if body cannot be loaded to dict"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_538171f9","line":182,"updated":"2014-05-20 14:10:24.000000000","message":"I agree, a unit test should be added for this.","commit_id":"87ca8f23f9d0bb674b08e8e49aede99f3186a712"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"f331fe945c758740a41cd45a9ab109a3ff954895","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            #stop the stripping process if body cannot be loaded to dict"},{"line_number":186,"context_line":"            except Exception:"},{"line_number":187,"context_line":"                return body"},{"line_number":188,"context_line":"            if body_dict.get(\u0027access\u0027, {}).get(\u0027token\u0027, {}).get(\u0027id\u0027, None):"},{"line_number":189,"context_line":"                body_dict[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027] \u003d \u0027REDACTED\u0027"},{"line_number":190,"context_line":"                return json.dumps(body_dict)"},{"line_number":191,"context_line":"        return body"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_58e7d0ab","line":188,"updated":"2014-05-20 13:57:31.000000000","message":"The None is not necessary: use get(\u0027id\u0027) instead of get(\u0027id\u0027, None).","commit_id":"87ca8f23f9d0bb674b08e8e49aede99f3186a712"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"fcd75c8671e444d92373a80d27148d5a4681f8e0","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            #stop the stripping process if body cannot be loaded to dict"},{"line_number":186,"context_line":"            except Exception:"},{"line_number":187,"context_line":"                return body"},{"line_number":188,"context_line":"            if body_dict.get(\u0027access\u0027, {}).get(\u0027token\u0027, {}).get(\u0027id\u0027, None):"},{"line_number":189,"context_line":"                body_dict[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027] \u003d \u0027REDACTED\u0027"},{"line_number":190,"context_line":"                return json.dumps(body_dict)"},{"line_number":191,"context_line":"        return body"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_ced95623","line":188,"in_reply_to":"7adec928_58e7d0ab","updated":"2014-05-20 14:44:20.000000000","message":"will address in next patch.","commit_id":"87ca8f23f9d0bb674b08e8e49aede99f3186a712"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"26db229cacab4c3e03d87537534e0d59a51a038a","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        if self.log_credentials:"},{"line_number":148,"context_line":"            log_kargs \u003d kargs"},{"line_number":149,"context_line":"        else:"},{"line_number":150,"context_line":"            log_kargs \u003d self._strip_credentials(kargs)"},{"line_number":151,"context_line":"            log_kargs \u003d self._strip_token_from_headers(log_kargs)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        utils.http_log_req(_logger, args, log_kargs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ae8d1ca_c0455371","line":150,"updated":"2014-05-28 20:45:20.000000000","message":"we could have perhaps avoided the intermediate assignment here","commit_id":"ed5f6e9eab5d0f4dacabb01e2eb52377582ced0c"},{"author":{"_account_id":8622,"name":"Feng Ju","email":"jufeng@cn.ibm.com","username":"jufeng"},"change_message_id":"7ed3692e5c1f4b2e8a8223ec2cbdfe42bdaf8423","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        if self.log_credentials:"},{"line_number":148,"context_line":"            log_kargs \u003d kargs"},{"line_number":149,"context_line":"        else:"},{"line_number":150,"context_line":"            log_kargs \u003d self._strip_credentials(kargs)"},{"line_number":151,"context_line":"            log_kargs \u003d self._strip_token_from_headers(log_kargs)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        utils.http_log_req(_logger, args, log_kargs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_a5e4f40d","line":150,"in_reply_to":"3ae8d1ca_c0455371","updated":"2014-05-31 03:46:59.000000000","message":"Hi Sumit, It seems intermediate assignment here is more readable. If you insist, I will remove it.","commit_id":"ed5f6e9eab5d0f4dacabb01e2eb52377582ced0c"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"502b1d1926e56124df9e3ae00cae68ee4f5cf5c0","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                 password\u003dNone, auth_url\u003dNone,"},{"line_number":54,"context_line":"                 token\u003dNone, region_name\u003dNone, timeout\u003dNone,"},{"line_number":55,"context_line":"                 endpoint_url\u003dNone, insecure\u003dFalse,"},{"line_number":56,"context_line":"                 endpoint_type\u003d\u0027publicURL\u0027,"},{"line_number":57,"context_line":"                 auth_strategy\u003d\u0027keystone\u0027, ca_cert\u003dNone, log_credentials\u003dFalse,"},{"line_number":58,"context_line":"                 service_type\u003d\u0027network\u0027,"},{"line_number":59,"context_line":"                 **kwargs):"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_4d1a65c7","line":56,"updated":"2014-06-17 12:45:40.000000000","message":"credentials should never be logged, so log_credentials should be removed entirely as part of this change.","commit_id":"47ddbecfec25af333db25b23dcdb21e371df1634"},{"author":{"_account_id":8622,"name":"Feng Ju","email":"jufeng@cn.ibm.com","username":"jufeng"},"change_message_id":"089bb859ed574049b43b812a3e01f74b8a401f27","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                 password\u003dNone, auth_url\u003dNone,"},{"line_number":54,"context_line":"                 token\u003dNone, region_name\u003dNone, timeout\u003dNone,"},{"line_number":55,"context_line":"                 endpoint_url\u003dNone, insecure\u003dFalse,"},{"line_number":56,"context_line":"                 endpoint_type\u003d\u0027publicURL\u0027,"},{"line_number":57,"context_line":"                 auth_strategy\u003d\u0027keystone\u0027, ca_cert\u003dNone, log_credentials\u003dFalse,"},{"line_number":58,"context_line":"                 service_type\u003d\u0027network\u0027,"},{"line_number":59,"context_line":"                 **kwargs):"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_61753731","line":56,"in_reply_to":"1ae5cdf2_4d1a65c7","updated":"2014-06-18 10:23:01.000000000","message":"Done","commit_id":"47ddbecfec25af333db25b23dcdb21e371df1634"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"502b1d1926e56124df9e3ae00cae68ee4f5cf5c0","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        if self.log_credentials:"},{"line_number":101,"context_line":"            log_kargs \u003d kargs"},{"line_number":102,"context_line":"        else:"},{"line_number":103,"context_line":"            log_kargs \u003d self._hash_password_from_body(kargs)"},{"line_number":104,"context_line":"            log_kargs \u003d self._hash_token_from_headers(log_kargs)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        utils.http_log_req(_logger, args, log_kargs)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_c822e3a2","line":103,"updated":"2014-06-17 12:45:40.000000000","message":"a simpler and better solution than hashing the password in a token-get request would be to do what glanceclient does... use keystoneclient to get a token (not specifying debug) and it will not print the token-get request/response so there is no need to hash things in that request/response.","commit_id":"47ddbecfec25af333db25b23dcdb21e371df1634"},{"author":{"_account_id":8622,"name":"Feng Ju","email":"jufeng@cn.ibm.com","username":"jufeng"},"change_message_id":"089bb859ed574049b43b812a3e01f74b8a401f27","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        if self.log_credentials:"},{"line_number":101,"context_line":"            log_kargs \u003d kargs"},{"line_number":102,"context_line":"        else:"},{"line_number":103,"context_line":"            log_kargs \u003d self._hash_password_from_body(kargs)"},{"line_number":104,"context_line":"            log_kargs \u003d self._hash_token_from_headers(log_kargs)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        utils.http_log_req(_logger, args, log_kargs)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_41767b40","line":103,"in_reply_to":"1ae5cdf2_c822e3a2","updated":"2014-06-18 10:23:01.000000000","message":"Thanks, will address in new commit.","commit_id":"47ddbecfec25af333db25b23dcdb21e371df1634"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"e7648b5be92dff67e837ec988287db50c1790bc1","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            # connection exception (it is excepted in the upper layers of code)"},{"line_number":115,"context_line":"            _logger.debug(\"throwing ConnectionFailed : %s\", e)"},{"line_number":116,"context_line":"            raise exceptions.ConnectionFailed(reason\u003de)"},{"line_number":117,"context_line":"        if self.log_credentials:"},{"line_number":118,"context_line":"            log_body \u003d body"},{"line_number":119,"context_line":"        else:"},{"line_number":120,"context_line":"            log_body \u003d self._hash_token_from_body(body)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_25d28834","line":117,"updated":"2014-06-17 15:32:29.000000000","message":"Should this block (and the one on lines 100-104) be shortened to something like:\nif not self.log_credentials:\n   body \u003d self._hash_token_from_body(body)","commit_id":"47ddbecfec25af333db25b23dcdb21e371df1634"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"502b1d1926e56124df9e3ae00cae68ee4f5cf5c0","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        if self.log_credentials:"},{"line_number":118,"context_line":"            log_body \u003d body"},{"line_number":119,"context_line":"        else:"},{"line_number":120,"context_line":"            log_body \u003d self._hash_token_from_body(body)"},{"line_number":121,"context_line":"        utils.http_log_resp(_logger, resp, log_body)"},{"line_number":122,"context_line":"        status_code \u003d self.get_status_code(resp)"},{"line_number":123,"context_line":"        if status_code \u003d\u003d 401:"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_e824ff0f","line":120,"updated":"2014-06-17 12:45:40.000000000","message":"a simpler and better solution than hashing the token in a token-get response would be to do what glanceclient does... use keystoneclient to get a token (not specifying debug) and it will not print the token-get request/response so there is no need to hash things in that request/response.","commit_id":"47ddbecfec25af333db25b23dcdb21e371df1634"},{"author":{"_account_id":8622,"name":"Feng Ju","email":"jufeng@cn.ibm.com","username":"jufeng"},"change_message_id":"089bb859ed574049b43b812a3e01f74b8a401f27","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        if self.log_credentials:"},{"line_number":118,"context_line":"            log_body \u003d body"},{"line_number":119,"context_line":"        else:"},{"line_number":120,"context_line":"            log_body \u003d self._hash_token_from_body(body)"},{"line_number":121,"context_line":"        utils.http_log_resp(_logger, resp, log_body)"},{"line_number":122,"context_line":"        status_code \u003d self.get_status_code(resp)"},{"line_number":123,"context_line":"        if status_code \u003d\u003d 401:"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_e198676c","line":120,"in_reply_to":"1ae5cdf2_e824ff0f","updated":"2014-06-18 10:23:01.000000000","message":"Thanks, will address in new commit.","commit_id":"47ddbecfec25af333db25b23dcdb21e371df1634"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"e7648b5be92dff67e837ec988287db50c1790bc1","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                return body"},{"line_number":163,"context_line":"            if body_dict.get(\u0027access\u0027, {}).get(\u0027token\u0027, {}).get(\u0027id\u0027):"},{"line_number":164,"context_line":"                token_id \u003d body_dict[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027]"},{"line_number":165,"context_line":"                Hashed_token_id \u003d self._hash_credential(token_id)"},{"line_number":166,"context_line":"                body_dict[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027] \u003d Hashed_token_id"},{"line_number":167,"context_line":"                return json.dumps(body_dict)"},{"line_number":168,"context_line":"        return body"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_6199e578","line":165,"updated":"2014-06-17 15:32:29.000000000","message":"Hashed_token_id -\u003e hashed_token_id","commit_id":"47ddbecfec25af333db25b23dcdb21e371df1634"},{"author":{"_account_id":8622,"name":"Feng Ju","email":"jufeng@cn.ibm.com","username":"jufeng"},"change_message_id":"089bb859ed574049b43b812a3e01f74b8a401f27","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                return body"},{"line_number":163,"context_line":"            if body_dict.get(\u0027access\u0027, {}).get(\u0027token\u0027, {}).get(\u0027id\u0027):"},{"line_number":164,"context_line":"                token_id \u003d body_dict[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027]"},{"line_number":165,"context_line":"                Hashed_token_id \u003d self._hash_credential(token_id)"},{"line_number":166,"context_line":"                body_dict[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027] \u003d Hashed_token_id"},{"line_number":167,"context_line":"                return json.dumps(body_dict)"},{"line_number":168,"context_line":"        return body"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_a1b57fd1","line":165,"in_reply_to":"1ae5cdf2_6199e578","updated":"2014-06-18 10:23:01.000000000","message":"removed","commit_id":"47ddbecfec25af333db25b23dcdb21e371df1634"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"e7648b5be92dff67e837ec988287db50c1790bc1","unresolved":false,"context_lines":[{"line_number":163,"context_line":"            if body_dict.get(\u0027access\u0027, {}).get(\u0027token\u0027, {}).get(\u0027id\u0027):"},{"line_number":164,"context_line":"                token_id \u003d body_dict[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027]"},{"line_number":165,"context_line":"                Hashed_token_id \u003d self._hash_credential(token_id)"},{"line_number":166,"context_line":"                body_dict[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027] \u003d Hashed_token_id"},{"line_number":167,"context_line":"                return json.dumps(body_dict)"},{"line_number":168,"context_line":"        return body"},{"line_number":169,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_a18a0d18","line":166,"updated":"2014-06-17 15:32:29.000000000","message":"Hashed_token_id -\u003e hashed_token_id","commit_id":"47ddbecfec25af333db25b23dcdb21e371df1634"},{"author":{"_account_id":8622,"name":"Feng Ju","email":"jufeng@cn.ibm.com","username":"jufeng"},"change_message_id":"089bb859ed574049b43b812a3e01f74b8a401f27","unresolved":false,"context_lines":[{"line_number":163,"context_line":"            if body_dict.get(\u0027access\u0027, {}).get(\u0027token\u0027, {}).get(\u0027id\u0027):"},{"line_number":164,"context_line":"                token_id \u003d body_dict[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027]"},{"line_number":165,"context_line":"                Hashed_token_id \u003d self._hash_credential(token_id)"},{"line_number":166,"context_line":"                body_dict[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027] \u003d Hashed_token_id"},{"line_number":167,"context_line":"                return json.dumps(body_dict)"},{"line_number":168,"context_line":"        return body"},{"line_number":169,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_c1b8cbc9","line":166,"in_reply_to":"1ae5cdf2_a18a0d18","updated":"2014-06-18 10:23:01.000000000","message":"removed","commit_id":"47ddbecfec25af333db25b23dcdb21e371df1634"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"7df335b56e396b7fd1957176fc807ab15381467c","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                 token\u003dNone, region_name\u003dNone, timeout\u003dNone,"},{"line_number":53,"context_line":"                 endpoint_url\u003dNone, insecure\u003dFalse,"},{"line_number":54,"context_line":"                 endpoint_type\u003d\u0027publicURL\u0027,"},{"line_number":55,"context_line":"                 auth_strategy\u003d\u0027keystone\u0027, ca_cert\u003dNone, log_credentials\u003dFalse,"},{"line_number":56,"context_line":"                 service_type\u003d\u0027network\u0027,"},{"line_number":57,"context_line":"                 **kwargs):"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"1ae5cdf2_616424b3","side":"PARENT","line":55,"updated":"2014-06-27 00:16:00.000000000","message":"log_credentials must remain as a position arg even it is does nothing for compatibility","commit_id":"1bce6e437e2dd1fa5de6fc2ccdd0ee8ac3f44d18"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"08b3616db30f82621dd3b3885c9a508a52c898c5","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                 token\u003dNone, region_name\u003dNone, timeout\u003dNone,"},{"line_number":53,"context_line":"                 endpoint_url\u003dNone, insecure\u003dFalse,"},{"line_number":54,"context_line":"                 endpoint_type\u003d\u0027publicURL\u0027,"},{"line_number":55,"context_line":"                 auth_strategy\u003d\u0027keystone\u0027, ca_cert\u003dNone, log_credentials\u003dFalse,"},{"line_number":56,"context_line":"                 service_type\u003d\u0027network\u0027,"},{"line_number":57,"context_line":"                 **kwargs):"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"dab895d6_0d3181ec","side":"PARENT","line":55,"in_reply_to":"1ae5cdf2_55151e3b","updated":"2014-06-29 05:40:14.000000000","message":"+1. log_credential is only used internally in neutron client so I don\u0027t think we need it for compatibility.","commit_id":"1bce6e437e2dd1fa5de6fc2ccdd0ee8ac3f44d18"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"931bc52077f6884a7fcd90695b8ab8d61a4f6c1f","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                 token\u003dNone, region_name\u003dNone, timeout\u003dNone,"},{"line_number":53,"context_line":"                 endpoint_url\u003dNone, insecure\u003dFalse,"},{"line_number":54,"context_line":"                 endpoint_type\u003d\u0027publicURL\u0027,"},{"line_number":55,"context_line":"                 auth_strategy\u003d\u0027keystone\u0027, ca_cert\u003dNone, log_credentials\u003dFalse,"},{"line_number":56,"context_line":"                 service_type\u003d\u0027network\u0027,"},{"line_number":57,"context_line":"                 **kwargs):"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"1ae5cdf2_55151e3b","side":"PARENT","line":55,"in_reply_to":"1ae5cdf2_616424b3","updated":"2014-06-27 04:00:49.000000000","message":"I see the same discussion several times. IMO HTTPClient is an internal interface in neutronclient and it looks no problem in general.\n\nHowever, in this case I don\u0027t see any reason \u0027log_credential\u0027 parameter needs to be added before service_type.","commit_id":"1bce6e437e2dd1fa5de6fc2ccdd0ee8ac3f44d18"}],"neutronclient/tests/unit/test_auth.py":[{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"32d10d78198bd701d0adb72b1333574de4010635","unresolved":false,"context_lines":[{"line_number":449,"context_line":"    def test_strip_token_from_log(self):"},{"line_number":450,"context_line":"        def verify_no_token(body):"},{"line_number":451,"context_line":"            return (\u0027REDACTED\u0027 in body) and ("},{"line_number":452,"context_line":"                KS_TOKEN_RESULT[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027] not in body)"},{"line_number":453,"context_line":""},{"line_number":454,"context_line":"        self.mox.StubOutWithMock(self.client, \"request\")"},{"line_number":455,"context_line":"        self.mox.StubOutWithMock(utils, \"http_log_resp\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_dccf10b2","line":452,"updated":"2014-05-22 12:04:52.000000000","message":"The code sets the following: \nbody_dict[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027] \u003d \u0027REDACTED\u0027\n\nTherefore, I understand the first check, but could you provide some insight on why the KS_TOKEN_RESULT would be modified to not have this element in it?\n\nI think I\u0027m just not quite following it 100%.","commit_id":"580fa9e550522c87b5e1ce783ae6c0f0406028b6"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"90be95af98762083bd07fe0b12ef62f4390ca385","unresolved":false,"context_lines":[{"line_number":449,"context_line":"    def test_strip_token_from_log(self):"},{"line_number":450,"context_line":"        def verify_no_token(body):"},{"line_number":451,"context_line":"            return (\u0027REDACTED\u0027 in body) and ("},{"line_number":452,"context_line":"                KS_TOKEN_RESULT[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027] not in body)"},{"line_number":453,"context_line":""},{"line_number":454,"context_line":"        self.mox.StubOutWithMock(self.client, \"request\")"},{"line_number":455,"context_line":"        self.mox.StubOutWithMock(utils, \"http_log_resp\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"5adbc538_ea17c04f","line":452,"in_reply_to":"5adbc538_f547b31b","updated":"2014-05-26 13:03:27.000000000","message":"Ah, of course.","commit_id":"580fa9e550522c87b5e1ce783ae6c0f0406028b6"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"d9d8f01768e1fb96bc59b3c9dfd428e5559b14c4","unresolved":false,"context_lines":[{"line_number":449,"context_line":"    def test_strip_token_from_log(self):"},{"line_number":450,"context_line":"        def verify_no_token(body):"},{"line_number":451,"context_line":"            return (\u0027REDACTED\u0027 in body) and ("},{"line_number":452,"context_line":"                KS_TOKEN_RESULT[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027] not in body)"},{"line_number":453,"context_line":""},{"line_number":454,"context_line":"        self.mox.StubOutWithMock(self.client, \"request\")"},{"line_number":455,"context_line":"        self.mox.StubOutWithMock(utils, \"http_log_resp\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_ce62cfd7","line":452,"in_reply_to":"7adec928_4b123cb5","updated":"2014-05-23 11:44:29.000000000","message":"It does.  The only remaining concern I have (though this may be similar with the other tests in this file) are that nothing ensures that this verify method was actually called.\n\nYou could provide that insurance by making a variable called \u0027verify_method_invoked \u003d False\u0027, setting it to True in the verify_no_token method, and then running a self.assertTrue at the end of the method.\n\nThat gives you a level of guarantee that this method was invoked, and adds some protection in case the underlying methods ever change their structure.\n\nGiven that no other methods do it, I don\u0027t see it as a strict requirement.  So I won\u0027t -1, but I really would like to see that it a next iteration if possible.","commit_id":"580fa9e550522c87b5e1ce783ae6c0f0406028b6"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"40672bc6da04debeffa8e0e542b077eb87e41d5b","unresolved":false,"context_lines":[{"line_number":449,"context_line":"    def test_strip_token_from_log(self):"},{"line_number":450,"context_line":"        def verify_no_token(body):"},{"line_number":451,"context_line":"            return (\u0027REDACTED\u0027 in body) and ("},{"line_number":452,"context_line":"                KS_TOKEN_RESULT[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027] not in body)"},{"line_number":453,"context_line":""},{"line_number":454,"context_line":"        self.mox.StubOutWithMock(self.client, \"request\")"},{"line_number":455,"context_line":"        self.mox.StubOutWithMock(utils, \"http_log_resp\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"5adbc538_f547b31b","line":452,"in_reply_to":"7adec928_ce62cfd7","updated":"2014-05-26 03:00:04.000000000","message":"Drew, I think mox.Func in line 465 and the cleanup verifyall() already makes sure verify_no_token is called. Do you think any cases that it may not be called?","commit_id":"580fa9e550522c87b5e1ce783ae6c0f0406028b6"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"7f84bd8fb6287eee459dcc28ea3fcbe079c3cdc9","unresolved":false,"context_lines":[{"line_number":449,"context_line":"    def test_strip_token_from_log(self):"},{"line_number":450,"context_line":"        def verify_no_token(body):"},{"line_number":451,"context_line":"            return (\u0027REDACTED\u0027 in body) and ("},{"line_number":452,"context_line":"                KS_TOKEN_RESULT[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027] not in body)"},{"line_number":453,"context_line":""},{"line_number":454,"context_line":"        self.mox.StubOutWithMock(self.client, \"request\")"},{"line_number":455,"context_line":"        self.mox.StubOutWithMock(utils, \"http_log_resp\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_4b123cb5","line":452,"in_reply_to":"7adec928_dccf10b2","updated":"2014-05-23 02:40:11.000000000","message":"Drew, dict KS_TOKEN_RESULT is not modified here. the function at line 450 is to check the third param body passed to http_log_resp at line 465 does not contain the token id in KS_TOKEN_RESULT. This verification can work because the token id in body to log has been stripped in client.py in this patch.\n\nHope this can help with your question.","commit_id":"580fa9e550522c87b5e1ce783ae6c0f0406028b6"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"e5ad09c8f7a0b850343c98df570846fab2efffa0","unresolved":false,"context_lines":[{"line_number":463,"context_line":""},{"line_number":464,"context_line":"        utils.http_log_resp(mox.IgnoreArg(), mox.IgnoreArg(),"},{"line_number":465,"context_line":"                            mox.Func(verify_no_token))"},{"line_number":466,"context_line":"        self.client.request("},{"line_number":467,"context_line":"            mox.IsA(str), mox.IsA(str), headers\u003dmox.IsA(dict)"},{"line_number":468,"context_line":"        ).AndReturn((res200, \u0027\u0027))"},{"line_number":469,"context_line":"        utils.http_log_resp(mox.IgnoreArg(), mox.IgnoreArg(), \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_2b017006","line":466,"updated":"2014-05-23 03:06:38.000000000","message":"What is the purpose of the second request?","commit_id":"580fa9e550522c87b5e1ce783ae6c0f0406028b6"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"d540f0e1dfe0b2ff051017cd72c626f102bb3866","unresolved":false,"context_lines":[{"line_number":463,"context_line":""},{"line_number":464,"context_line":"        utils.http_log_resp(mox.IgnoreArg(), mox.IgnoreArg(),"},{"line_number":465,"context_line":"                            mox.Func(verify_no_token))"},{"line_number":466,"context_line":"        self.client.request("},{"line_number":467,"context_line":"            mox.IsA(str), mox.IsA(str), headers\u003dmox.IsA(dict)"},{"line_number":468,"context_line":"        ).AndReturn((res200, \u0027\u0027))"},{"line_number":469,"context_line":"        utils.http_log_resp(mox.IgnoreArg(), mox.IgnoreArg(), \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_eed5d6b7","line":466,"in_reply_to":"7adec928_2b017006","updated":"2014-05-23 03:51:39.000000000","message":"Mohammad, the first request happens in \nself.authenticate_and_fetch_endpoint_url() of do_request function. And the second is the request to fetch resource. That\u0027s why we mock first request to return token and the second request not. This is really a simulation of the real neutron client process. Other test cases in this module do this as well.","commit_id":"580fa9e550522c87b5e1ce783ae6c0f0406028b6"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"26db229cacab4c3e03d87537534e0d59a51a038a","unresolved":false,"context_lines":[{"line_number":481,"context_line":"        self.mox.ReplayAll()"},{"line_number":482,"context_line":""},{"line_number":483,"context_line":"        self.client.do_request(\u0027/resource\u0027, \u0027GET\u0027)"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":""},{"line_number":486,"context_line":"class CLITestAuthKeystoneWithId(CLITestAuthKeystone):"},{"line_number":487,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3ae8d1ca_660ad822","line":484,"updated":"2014-05-28 20:45:20.000000000","message":"nit: for full coverage, can we also add a UT for the case where \"body cannot be loaded to dict\"?","commit_id":"ed5f6e9eab5d0f4dacabb01e2eb52377582ced0c"},{"author":{"_account_id":8622,"name":"Feng Ju","email":"jufeng@cn.ibm.com","username":"jufeng"},"change_message_id":"7ed3692e5c1f4b2e8a8223ec2cbdfe42bdaf8423","unresolved":false,"context_lines":[{"line_number":481,"context_line":"        self.mox.ReplayAll()"},{"line_number":482,"context_line":""},{"line_number":483,"context_line":"        self.client.do_request(\u0027/resource\u0027, \u0027GET\u0027)"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":""},{"line_number":486,"context_line":"class CLITestAuthKeystoneWithId(CLITestAuthKeystone):"},{"line_number":487,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_65e3cc07","line":484,"in_reply_to":"3ae8d1ca_660ad822","updated":"2014-05-31 03:46:59.000000000","message":"Done","commit_id":"ed5f6e9eab5d0f4dacabb01e2eb52377582ced0c"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"9ac1ee89de0a0a9636be7280032f8cedeecfcb4b","unresolved":false,"context_lines":[{"line_number":502,"context_line":""},{"line_number":503,"context_line":"        self.mox.ReplayAll()"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"        # The TypeError ocurres at get_token in client.py becuase"},{"line_number":506,"context_line":"        # json.loads(resp_body) in _authenticate_keystone in clien.py"},{"line_number":507,"context_line":"        # just pass the json.loads ValueError, and return the string"},{"line_number":508,"context_line":"        # resp_body."}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_f391589b","line":505,"updated":"2014-06-01 04:08:37.000000000","message":"if you post another patch, please fix the typo: occures -\u003e occurs","commit_id":"36883aa4072ddaf38f6bbbf8d412c9db4ab22614"}]}
