)]}'
{"ironicclient/common/http.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"cdb8859fc580325080d0cbf710c3ca5aa268a64d","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            curl.append(\u0027-d \\\u0027%s\\\u0027\u0027 % kwargs[\u0027body\u0027])"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        curl.append(\u0027%s%s\u0027 % (self.endpoint.rstrip(\u0027/\u0027).rstrip(API_VERSION),"},{"line_number":105,"context_line":"                              url))"},{"line_number":106,"context_line":"        LOG.debug(\u0027 \u0027.join(curl))"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_3d008001","line":105,"updated":"2014-11-25 03:26:54.000000000","message":"this works, but I was wondering whether it was worth adding a new member variable to self in the init phase and using that here, eg self.endpoint_trimmed \u003d ...  In case something else uses the endpoint \u0027incorrectly\u0027 too.\n\nI notice that the trimmed path is saved in self.connection_params, but the scheme isn\u0027t. Well, the scheme string isn\u0027t; I suppose you could figure it out base one the _class value.\n\nI guess I\u0027m not fond of doing the same \u0027trim\u0027 operation in two different places.","commit_id":"026f3b6d7fee7bf4077706ff4c13cb063d73f557"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"d4f77f0b9d7a7b91c566c62f4f423634656f63b8","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            curl.append(\u0027-d \\\u0027%s\\\u0027\u0027 % kwargs[\u0027body\u0027])"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        curl.append(\u0027%s%s\u0027 % (self.endpoint.rstrip(\u0027/\u0027).rstrip(API_VERSION),"},{"line_number":105,"context_line":"                              url))"},{"line_number":106,"context_line":"        LOG.debug(\u0027 \u0027.join(curl))"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_9765be1f","line":105,"in_reply_to":"5a890539_0970d3a2","updated":"2014-11-25 15:15:49.000000000","message":"Oh, so you mean add trimmed endpoint to not to trim every time. Will change that.","commit_id":"026f3b6d7fee7bf4077706ff4c13cb063d73f557"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"172845720290d582b27677c73bb62724ebd09a73","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            curl.append(\u0027-d \\\u0027%s\\\u0027\u0027 % kwargs[\u0027body\u0027])"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        curl.append(\u0027%s%s\u0027 % (self.endpoint.rstrip(\u0027/\u0027).rstrip(API_VERSION),"},{"line_number":105,"context_line":"                              url))"},{"line_number":106,"context_line":"        LOG.debug(\u0027 \u0027.join(curl))"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_ad10b04e","line":105,"in_reply_to":"5a890539_3d008001","updated":"2014-11-25 12:23:10.000000000","message":"If you suggest using self.endpoint_trimmed as get_connection_params argument and removing trimming from inside get_connection_params, I think it should not be done, as it is static method, and there will be no way to ensure endpoint correctness inside it (also, there are these tests: https://github.com/openstack/python-ironicclient/blob/master/ironicclient/tests/test_http.py#L174-L188, and 4 more from this file which will fail). So this way duplication won\u0027t be gone.\n\nAlthough I can add a simple function that will do trimming. What do you think?","commit_id":"026f3b6d7fee7bf4077706ff4c13cb063d73f557"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"dcbef2a758b253f617839bbce2ab8234e1864a46","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            curl.append(\u0027-d \\\u0027%s\\\u0027\u0027 % kwargs[\u0027body\u0027])"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        curl.append(\u0027%s%s\u0027 % (self.endpoint.rstrip(\u0027/\u0027).rstrip(API_VERSION),"},{"line_number":105,"context_line":"                              url))"},{"line_number":106,"context_line":"        LOG.debug(\u0027 \u0027.join(curl))"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_0970d3a2","line":105,"in_reply_to":"5a890539_ad10b04e","updated":"2014-11-25 14:18:34.000000000","message":"Oh sorry. I meant in the init, to add self.endpoint_trimmed \u003d .endpoint.rstrip(\u0027.\u0027).rstrip(...). If this log_curl_request gets called a lot, we\u0027d avoid doing this trimming all the time.\n\nIt could be used as the parameter to get_connection_params(), but as you said, you can\u0027t delete the trimming code from there.\n\nAdding a function to do the trimming would be nice!","commit_id":"026f3b6d7fee7bf4077706ff4c13cb063d73f557"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ee85dc447da134b4253b516a9c15f927037c5cbd","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        if \u0027body\u0027 in kwargs:"},{"line_number":106,"context_line":"            curl.append(\u0027-d \\\u0027%s\\\u0027\u0027 % kwargs[\u0027body\u0027])"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        curl.append(\u0027%s%s\u0027 % (self.endpoint_trimmed, url))"},{"line_number":109,"context_line":"        LOG.debug(\u0027 \u0027.join(curl))"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_d210345b","line":108,"updated":"2014-11-25 15:38:26.000000000","message":"The only thing I\u0027m not sure about is whether the url always starts with a \u0027\\\u0027.","commit_id":"8725881ddc48169396a0345d8082d1eaff42fa57"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"5e6eacf9eb1ad5b93de954da351a40c851f7acdb","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        if \u0027body\u0027 in kwargs:"},{"line_number":106,"context_line":"            curl.append(\u0027-d \\\u0027%s\\\u0027\u0027 % kwargs[\u0027body\u0027])"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        curl.append(\u0027%s%s\u0027 % (self.endpoint_trimmed, url))"},{"line_number":109,"context_line":"        LOG.debug(\u0027 \u0027.join(curl))"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_a84fa790","line":108,"updated":"2014-11-25 22:40:29.000000000","message":"might be better to join the url first with urlparse.urljoin then curl.append it.","commit_id":"8725881ddc48169396a0345d8082d1eaff42fa57"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"151b015d3ef78e23027afffde26bd684370c5af0","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        if \u0027body\u0027 in kwargs:"},{"line_number":106,"context_line":"            curl.append(\u0027-d \\\u0027%s\\\u0027\u0027 % kwargs[\u0027body\u0027])"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        curl.append(\u0027%s%s\u0027 % (self.endpoint_trimmed, url))"},{"line_number":109,"context_line":"        LOG.debug(\u0027 \u0027.join(curl))"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_d03d6bbc","line":108,"in_reply_to":"5a890539_a84fa790","updated":"2014-11-26 11:40:12.000000000","message":"Done","commit_id":"8725881ddc48169396a0345d8082d1eaff42fa57"}]}
