)]}'
{"glanceclient/common/http.py":[{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"bae0956c3417c71a72c07f7a6680b733184f2e0a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2012 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2Bpw%3D","line":1,"updated":"2014-01-20 06:47:31.000000000","message":"IBM copyright?","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":8107,"name":"Ya Hong Du","email":"du_yahong@126.com","username":"yahongdu"},"change_message_id":"a3659b4a3bd7ef151170b5c37b13f19b3d7d7274","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2012 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2Bm4%3D","line":1,"in_reply_to":"AAAAUH%2F%2B%2Bpw%3D","updated":"2014-01-20 08:55:51.000000000","message":"Done","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"bae0956c3417c71a72c07f7a6680b733184f2e0a","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        self.connection_kwargs \u003d self.get_connection_kwargs("},{"line_number":105,"context_line":"            self.endpoint_scheme, **kwargs)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def get_api_servers(self):"},{"line_number":108,"context_line":"        \"\"\""},{"line_number":109,"context_line":"        Shuffle a list of glance_api_servers from service catalog and return"},{"line_number":110,"context_line":"        an iterator that will cycle through the list, looping around to the"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2Bqs%3D","line":107,"updated":"2014-01-20 06:47:31.000000000","message":"who is the consumer of this method?","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":8107,"name":"Ya Hong Du","email":"du_yahong@126.com","username":"yahongdu"},"change_message_id":"a3659b4a3bd7ef151170b5c37b13f19b3d7d7274","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        self.connection_kwargs \u003d self.get_connection_kwargs("},{"line_number":105,"context_line":"            self.endpoint_scheme, **kwargs)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def get_api_servers(self):"},{"line_number":108,"context_line":"        \"\"\""},{"line_number":109,"context_line":"        Shuffle a list of glance_api_servers from service catalog and return"},{"line_number":110,"context_line":"        an iterator that will cycle through the list, looping around to the"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2Bgw%3D","line":107,"in_reply_to":"AAAAUH%2F%2B%2Bqs%3D","updated":"2014-01-20 08:55:51.000000000","message":"It seems that this method is useless for now. I will remove this method.","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"bae0956c3417c71a72c07f7a6680b733184f2e0a","unresolved":false,"context_lines":[{"line_number":125,"context_line":"            self.endpoint \u003d self._get_endpoint_url()"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def _get_endpoint_url(self):"},{"line_number":128,"context_line":"        url \u003d self.auth_url + \u0027/tokens/%s/endpoints\u0027 % self.auth_token"},{"line_number":129,"context_line":"        try:"},{"line_number":130,"context_line":"            resp, body \u003d self.json_request("},{"line_number":131,"context_line":"                \"GET\", url, headers\u003d{\u0027X-Auth-Token\u0027: self.auth_token})"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2BtM%3D","line":128,"updated":"2014-01-20 06:47:31.000000000","message":"(nit): How about using format()?","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":8107,"name":"Ya Hong Du","email":"du_yahong@126.com","username":"yahongdu"},"change_message_id":"a3659b4a3bd7ef151170b5c37b13f19b3d7d7274","unresolved":false,"context_lines":[{"line_number":125,"context_line":"            self.endpoint \u003d self._get_endpoint_url()"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def _get_endpoint_url(self):"},{"line_number":128,"context_line":"        url \u003d self.auth_url + \u0027/tokens/%s/endpoints\u0027 % self.auth_token"},{"line_number":129,"context_line":"        try:"},{"line_number":130,"context_line":"            resp, body \u003d self.json_request("},{"line_number":131,"context_line":"                \"GET\", url, headers\u003d{\u0027X-Auth-Token\u0027: self.auth_token})"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2BdM%3D","line":128,"in_reply_to":"AAAAUH%2F%2B%2BtM%3D","updated":"2014-01-20 08:55:51.000000000","message":"Done","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"2240ffcbbff0b995759dd7b9fbc3435d491f2efa","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 OpenStack Foundation"},{"line_number":2,"context_line":"# Copyright 2014 IBM Corp."},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a016987_5913d00d","line":2,"updated":"2015-05-17 23:18:47.000000000","message":"If we\u0027re even going to update this it should be\n\n    Copyright 2012-2015 OpenStack Foundation\n\nI don\u0027t think we allow corporate copyright statements any longer.","commit_id":"8f68ecacd977c9198260449bb6a4aa9b1e67a03f"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e1986fbdf0562cb6aa36a0e238b8de8306f1f1e7","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 OpenStack Foundation"},{"line_number":2,"context_line":"# Copyright 2014 IBM Corp."},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_71db2e7c","line":2,"updated":"2014-06-11 17:53:07.000000000","message":"Is that even legal to have 2 copyrights for the same year?","commit_id":"8f68ecacd977c9198260449bb6a4aa9b1e67a03f"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"2240ffcbbff0b995759dd7b9fbc3435d491f2efa","unresolved":false,"context_lines":[{"line_number":41,"context_line":"from glanceclient.common import utils"},{"line_number":42,"context_line":"from glanceclient import exc"},{"line_number":43,"context_line":"from glanceclient.openstack.common import strutils"},{"line_number":44,"context_line":"from glanceclient import service_catalog"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"try:"},{"line_number":47,"context_line":"    from eventlet import patcher"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a016987_39fb74c3","line":44,"updated":"2015-05-17 23:18:47.000000000","message":"Does keystoneclient not provide this functionality for us?","commit_id":"8f68ecacd977c9198260449bb6a4aa9b1e67a03f"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"2240ffcbbff0b995759dd7b9fbc3435d491f2efa","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            self.endpoints \u003d self.service_catalog.get_endpoint_url("},{"line_number":143,"context_line":"                attr\u003d\u0027region\u0027, filter_value\u003dself.region_name,"},{"line_number":144,"context_line":"                endpoint_type\u003dself.endpoint_type,"},{"line_number":145,"context_line":"                service_type\u003d\u0027image\u0027,"},{"line_number":146,"context_line":"                service_name\u003d\u0027glance\u0027)"},{"line_number":147,"context_line":"            self.endpoint \u003d self.endpoints[0]"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7a016987_19f678d7","line":145,"updated":"2015-05-17 23:18:47.000000000","message":"@Nikhil, I\u0027m fairly certain you\u0027re correct.","commit_id":"8f68ecacd977c9198260449bb6a4aa9b1e67a03f"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e1986fbdf0562cb6aa36a0e238b8de8306f1f1e7","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            self.endpoints \u003d self.service_catalog.get_endpoint_url("},{"line_number":143,"context_line":"                attr\u003d\u0027region\u0027, filter_value\u003dself.region_name,"},{"line_number":144,"context_line":"                endpoint_type\u003dself.endpoint_type,"},{"line_number":145,"context_line":"                service_type\u003d\u0027image\u0027,"},{"line_number":146,"context_line":"                service_name\u003d\u0027glance\u0027)"},{"line_number":147,"context_line":"            self.endpoint \u003d self.endpoints[0]"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_71240e0d","line":145,"updated":"2014-06-11 17:53:07.000000000","message":"Don\u0027t like the idea of hardcoding the service_type and service_name here.\n\nAlso, think that the standard would be to use service_type as \"Images\" and not \"image\". Not sure though, can you please confirm this?","commit_id":"8f68ecacd977c9198260449bb6a4aa9b1e67a03f"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e1986fbdf0562cb6aa36a0e238b8de8306f1f1e7","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            self.endpoint \u003d self.endpoints[0]"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def authenticate(self):"},{"line_number":150,"context_line":"        body \u003d {\u0027auth\u0027: {\u0027passwordCredentials\u0027: {\u0027username\u0027: self.username,"},{"line_number":151,"context_line":"                                                 \u0027password\u0027: self.password, }}}"},{"line_number":152,"context_line":"        if self.tenant_id:"},{"line_number":153,"context_line":"            body[\u0027auth\u0027][\u0027tenantId\u0027] \u003d self.tenant_id"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_11ae6a81","line":150,"updated":"2014-06-11 17:53:07.000000000","message":"We should add support for API credentials as well.","commit_id":"8f68ecacd977c9198260449bb6a4aa9b1e67a03f"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"2240ffcbbff0b995759dd7b9fbc3435d491f2efa","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        status_code \u003d resp.status"},{"line_number":160,"context_line":"        if status_code !\u003d 200:"},{"line_number":161,"context_line":"            raise exc.HTTPException"},{"line_number":162,"context_line":"            # raise exc.Unauthorized(code\u003dstatus_code)"},{"line_number":163,"context_line":"        self._extract_service_catalog(body)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a016987_f904bcc0","line":162,"updated":"2015-05-17 23:18:47.000000000","message":"Yes. Please remove this.","commit_id":"8f68ecacd977c9198260449bb6a4aa9b1e67a03f"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e1986fbdf0562cb6aa36a0e238b8de8306f1f1e7","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        status_code \u003d resp.status"},{"line_number":160,"context_line":"        if status_code !\u003d 200:"},{"line_number":161,"context_line":"            raise exc.HTTPException"},{"line_number":162,"context_line":"            # raise exc.Unauthorized(code\u003dstatus_code)"},{"line_number":163,"context_line":"        self._extract_service_catalog(body)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_d1dec210","line":162,"updated":"2014-06-11 17:53:07.000000000","message":"left over code in the comment.","commit_id":"8f68ecacd977c9198260449bb6a4aa9b1e67a03f"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"2240ffcbbff0b995759dd7b9fbc3435d491f2efa","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        kwargs[\u0027headers\u0027] \u003d self.encode_headers(kwargs[\u0027headers\u0027])"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        try:"},{"line_number":277,"context_line":"            if self.endpoint and self.endpoint_path:"},{"line_number":278,"context_line":"                # NOTE(yuyangbj): this method _http_request could either be"},{"line_number":279,"context_line":"                # called by API layer, or be called recursively with"},{"line_number":280,"context_line":"                # redirection. For example, url would be \u0027/v1/images/detail\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a016987_d9ffc0a8","line":277,"updated":"2015-05-17 23:18:47.000000000","message":"Or add some extra tests around this condition. Or both. :-)","commit_id":"8f68ecacd977c9198260449bb6a4aa9b1e67a03f"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e1986fbdf0562cb6aa36a0e238b8de8306f1f1e7","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        kwargs[\u0027headers\u0027] \u003d self.encode_headers(kwargs[\u0027headers\u0027])"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        try:"},{"line_number":277,"context_line":"            if self.endpoint and self.endpoint_path:"},{"line_number":278,"context_line":"                # NOTE(yuyangbj): this method _http_request could either be"},{"line_number":279,"context_line":"                # called by API layer, or be called recursively with"},{"line_number":280,"context_line":"                # redirection. For example, url would be \u0027/v1/images/detail\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_d7b792d6","line":277,"updated":"2014-06-11 17:53:07.000000000","message":"This does not seem obvious though, can you please ensure that all the cases are covered when you add the check for self.endpoint to not be None? (just a sanity double check)","commit_id":"8f68ecacd977c9198260449bb6a4aa9b1e67a03f"}],"glanceclient/service_catalog.py":[{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"bae0956c3417c71a72c07f7a6680b733184f2e0a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2012 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2Bwg%3D","line":1,"updated":"2014-01-20 06:47:31.000000000","message":"2014?","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":8107,"name":"Ya Hong Du","email":"du_yahong@126.com","username":"yahongdu"},"change_message_id":"a3659b4a3bd7ef151170b5c37b13f19b3d7d7274","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2012 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2Bc0%3D","line":1,"in_reply_to":"AAAAUH%2F%2B%2Bwg%3D","updated":"2014-01-20 08:55:51.000000000","message":"Done","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"bae0956c3417c71a72c07f7a6680b733184f2e0a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2012 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":5,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2Bwc%3D","line":2,"updated":"2014-01-20 06:47:31.000000000","message":"I do think you need an IBM copyright, right? :)","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":8107,"name":"Ya Hong Du","email":"du_yahong@126.com","username":"yahongdu"},"change_message_id":"a3659b4a3bd7ef151170b5c37b13f19b3d7d7274","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2012 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":5,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2Bcw%3D","line":2,"in_reply_to":"AAAAUH%2F%2B%2Bwc%3D","updated":"2014-01-20 08:55:51.000000000","message":"Done","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"bae0956c3417c71a72c07f7a6680b733184f2e0a","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    def url_for(self, attr\u003dNone, filter_value\u003dNone,"},{"line_number":29,"context_line":"                service_type\u003dNone, endpoint_type\u003d\u0027publicURL\u0027,"},{"line_number":30,"context_line":"                service_name\u003dNone):"},{"line_number":31,"context_line":"        \"\"\"Fetch the public URL from the Image service for"},{"line_number":32,"context_line":"        a particular endpoint attribute. If none given, return"},{"line_number":33,"context_line":"        the first. See tests for sample service catalog."},{"line_number":34,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2Bvo%3D","line":31,"updated":"2014-01-20 06:47:31.000000000","message":"Would you mind updating the method name as \u0027get_endpoint_url\u0027 or something more clear?","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":8107,"name":"Ya Hong Du","email":"du_yahong@126.com","username":"yahongdu"},"change_message_id":"a3659b4a3bd7ef151170b5c37b13f19b3d7d7274","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    def url_for(self, attr\u003dNone, filter_value\u003dNone,"},{"line_number":29,"context_line":"                service_type\u003dNone, endpoint_type\u003d\u0027publicURL\u0027,"},{"line_number":30,"context_line":"                service_name\u003dNone):"},{"line_number":31,"context_line":"        \"\"\"Fetch the public URL from the Image service for"},{"line_number":32,"context_line":"        a particular endpoint attribute. If none given, return"},{"line_number":33,"context_line":"        the first. See tests for sample service catalog."},{"line_number":34,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2BXk%3D","line":31,"in_reply_to":"AAAAUH%2F%2B%2Bvo%3D","updated":"2014-01-20 08:55:51.000000000","message":"Done","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"bae0956c3417c71a72c07f7a6680b733184f2e0a","unresolved":false,"context_lines":[{"line_number":29,"context_line":"                service_type\u003dNone, endpoint_type\u003d\u0027publicURL\u0027,"},{"line_number":30,"context_line":"                service_name\u003dNone):"},{"line_number":31,"context_line":"        \"\"\"Fetch the public URL from the Image service for"},{"line_number":32,"context_line":"        a particular endpoint attribute. If none given, return"},{"line_number":33,"context_line":"        the first. See tests for sample service catalog."},{"line_number":34,"context_line":"        \"\"\""},{"line_number":35,"context_line":"        matching_endpoints \u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2Bvc%3D","line":32,"updated":"2014-01-20 06:47:31.000000000","message":"I would like to see a well-format docstring. Thanks.","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":8107,"name":"Ya Hong Du","email":"du_yahong@126.com","username":"yahongdu"},"change_message_id":"a3659b4a3bd7ef151170b5c37b13f19b3d7d7274","unresolved":false,"context_lines":[{"line_number":29,"context_line":"                service_type\u003dNone, endpoint_type\u003d\u0027publicURL\u0027,"},{"line_number":30,"context_line":"                service_name\u003dNone):"},{"line_number":31,"context_line":"        \"\"\"Fetch the public URL from the Image service for"},{"line_number":32,"context_line":"        a particular endpoint attribute. If none given, return"},{"line_number":33,"context_line":"        the first. See tests for sample service catalog."},{"line_number":34,"context_line":"        \"\"\""},{"line_number":35,"context_line":"        matching_endpoints \u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2BSk%3D","line":32,"in_reply_to":"AAAAUH%2F%2B%2Bvc%3D","updated":"2014-01-20 08:55:51.000000000","message":"Done","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"bae0956c3417c71a72c07f7a6680b733184f2e0a","unresolved":false,"context_lines":[{"line_number":30,"context_line":"                service_name\u003dNone):"},{"line_number":31,"context_line":"        \"\"\"Fetch the public URL from the Image service for"},{"line_number":32,"context_line":"        a particular endpoint attribute. If none given, return"},{"line_number":33,"context_line":"        the first. See tests for sample service catalog."},{"line_number":34,"context_line":"        \"\"\""},{"line_number":35,"context_line":"        matching_endpoints \u003d []"},{"line_number":36,"context_line":"        if \u0027endpoints\u0027 in self.catalog:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2Bvs%3D","line":33,"updated":"2014-01-20 06:47:31.000000000","message":"Where is the \u0027tests\u0027?","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":8107,"name":"Ya Hong Du","email":"du_yahong@126.com","username":"yahongdu"},"change_message_id":"a3659b4a3bd7ef151170b5c37b13f19b3d7d7274","unresolved":false,"context_lines":[{"line_number":30,"context_line":"                service_name\u003dNone):"},{"line_number":31,"context_line":"        \"\"\"Fetch the public URL from the Image service for"},{"line_number":32,"context_line":"        a particular endpoint attribute. If none given, return"},{"line_number":33,"context_line":"        the first. See tests for sample service catalog."},{"line_number":34,"context_line":"        \"\"\""},{"line_number":35,"context_line":"        matching_endpoints \u003d []"},{"line_number":36,"context_line":"        if \u0027endpoints\u0027 in self.catalog:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2BKg%3D","line":33,"in_reply_to":"AAAAUH%2F%2B%2Bvs%3D","updated":"2014-01-20 08:55:51.000000000","message":"I will add the test.","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"bae0956c3417c71a72c07f7a6680b733184f2e0a","unresolved":false,"context_lines":[{"line_number":39,"context_line":"                if not filter_value or endpoint[attr] \u003d\u003d filter_value:"},{"line_number":40,"context_line":"                    matching_endpoints.append(endpoint)"},{"line_number":41,"context_line":"            if not matching_endpoints:"},{"line_number":42,"context_line":"                raise glanceclient.exc.EndpointNotFound()"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        # We don\u0027t always get a service catalog back ..."},{"line_number":45,"context_line":"        if \u0027serviceCatalog\u0027 not in self.catalog[\u0027access\u0027]:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2Bu8%3D","line":42,"updated":"2014-01-20 06:47:31.000000000","message":"glanceclient.exc.EndpointNotFound is deprecated, are you sure it\u0027s what you want?","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":8107,"name":"Ya Hong Du","email":"du_yahong@126.com","username":"yahongdu"},"change_message_id":"a3659b4a3bd7ef151170b5c37b13f19b3d7d7274","unresolved":false,"context_lines":[{"line_number":39,"context_line":"                if not filter_value or endpoint[attr] \u003d\u003d filter_value:"},{"line_number":40,"context_line":"                    matching_endpoints.append(endpoint)"},{"line_number":41,"context_line":"            if not matching_endpoints:"},{"line_number":42,"context_line":"                raise glanceclient.exc.EndpointNotFound()"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        # We don\u0027t always get a service catalog back ..."},{"line_number":45,"context_line":"        if \u0027serviceCatalog\u0027 not in self.catalog[\u0027access\u0027]:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2BLw%3D","line":42,"in_reply_to":"AAAAUH%2F%2B%2Bu8%3D","updated":"2014-01-20 08:55:51.000000000","message":"Thank you for the reminder. I will change the EndpointNotFound to InvalidEndpoint.","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"bae0956c3417c71a72c07f7a6680b733184f2e0a","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        if \u0027serviceCatalog\u0027 not in self.catalog[\u0027access\u0027]:"},{"line_number":46,"context_line":"            return None"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        # Full catalog ..."},{"line_number":49,"context_line":"        catalog \u003d self.catalog[\u0027access\u0027][\u0027serviceCatalog\u0027]"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        for service in catalog:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2Buo%3D","line":48,"updated":"2014-01-20 06:47:31.000000000","message":"(nit): IMHO, comments should be about why instead of what?","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":8107,"name":"Ya Hong Du","email":"du_yahong@126.com","username":"yahongdu"},"change_message_id":"a3659b4a3bd7ef151170b5c37b13f19b3d7d7274","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        if \u0027serviceCatalog\u0027 not in self.catalog[\u0027access\u0027]:"},{"line_number":46,"context_line":"            return None"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        # Full catalog ..."},{"line_number":49,"context_line":"        catalog \u003d self.catalog[\u0027access\u0027][\u0027serviceCatalog\u0027]"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        for service in catalog:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2BPg%3D","line":48,"in_reply_to":"AAAAUH%2F%2B%2Buo%3D","updated":"2014-01-20 08:55:51.000000000","message":"Done","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"bae0956c3417c71a72c07f7a6680b733184f2e0a","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        for service in catalog:"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"            # NOTE(thingee): For backwards compatibility, if they have v2"},{"line_number":54,"context_line":"            # enabled and the service_type is set to \u0027volume\u0027, go ahead and"},{"line_number":55,"context_line":"            # accept that."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"            if service.get(\"type\") !\u003d service_type:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2BuM%3D","line":54,"updated":"2014-01-20 06:47:31.000000000","message":"volume? Is it a copy-paste issue?","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":8107,"name":"Ya Hong Du","email":"du_yahong@126.com","username":"yahongdu"},"change_message_id":"a3659b4a3bd7ef151170b5c37b13f19b3d7d7274","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        for service in catalog:"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"            # NOTE(thingee): For backwards compatibility, if they have v2"},{"line_number":54,"context_line":"            # enabled and the service_type is set to \u0027volume\u0027, go ahead and"},{"line_number":55,"context_line":"            # accept that."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"            if service.get(\"type\") !\u003d service_type:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2BOE%3D","line":54,"in_reply_to":"AAAAUH%2F%2B%2BuM%3D","updated":"2014-01-20 08:55:51.000000000","message":"Sorry, it does is a copy-paste issue. I will remove this comment.","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"bae0956c3417c71a72c07f7a6680b733184f2e0a","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                    matching_endpoints.append(endpoint)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        if not matching_endpoints:"},{"line_number":67,"context_line":"            raise glanceclient.exc.EndpointNotFound()"},{"line_number":68,"context_line":"        else:"},{"line_number":69,"context_line":"            # NOTE(hweihu): This will return only one endpoint, until"},{"line_number":70,"context_line":"            # keystone can return multiple endpoint with one service."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2BuE%3D","line":67,"updated":"2014-01-20 06:47:31.000000000","message":"ditto","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":8107,"name":"Ya Hong Du","email":"du_yahong@126.com","username":"yahongdu"},"change_message_id":"a3659b4a3bd7ef151170b5c37b13f19b3d7d7274","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                    matching_endpoints.append(endpoint)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        if not matching_endpoints:"},{"line_number":67,"context_line":"            raise glanceclient.exc.EndpointNotFound()"},{"line_number":68,"context_line":"        else:"},{"line_number":69,"context_line":"            # NOTE(hweihu): This will return only one endpoint, until"},{"line_number":70,"context_line":"            # keystone can return multiple endpoint with one service."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2BLs%3D","line":67,"in_reply_to":"AAAAUH%2F%2B%2BuE%3D","updated":"2014-01-20 08:55:51.000000000","message":"Done","commit_id":"ada8a02811216aeb329b111e407433f5ae29b475"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e1986fbdf0562cb6aa36a0e238b8de8306f1f1e7","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 OpenStack Foundation"},{"line_number":2,"context_line":"# Copyright 2014 IBM Corp."},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_1733ba62","line":2,"updated":"2014-06-11 17:53:07.000000000","message":"ditto","commit_id":"8f68ecacd977c9198260449bb6a4aa9b1e67a03f"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e1986fbdf0562cb6aa36a0e238b8de8306f1f1e7","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def get_endpoint_url(self, attr\u003dNone, filter_value\u003dNone,"},{"line_number":30,"context_line":"                         service_type\u003dNone, endpoint_type\u003d\u0027publicURL\u0027,"},{"line_number":31,"context_line":"                         service_name\u003dNone):"},{"line_number":32,"context_line":"        \"\"\"Fetch the public URL from the Image service for"},{"line_number":33,"context_line":"           a particular endpoint attribute. If none given, return"},{"line_number":34,"context_line":"           the first. See tests for sample service catalog."}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_525f1041","line":31,"updated":"2014-06-11 17:53:07.000000000","message":"Do you think we should have the region param as a kwarg here? Or attr and filter_value can be a list of options so that filtering can be much more fine grained. \n\nIf glanceclient is used as a library, then having such a option would be useful.","commit_id":"8f68ecacd977c9198260449bb6a4aa9b1e67a03f"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e1986fbdf0562cb6aa36a0e238b8de8306f1f1e7","unresolved":false,"context_lines":[{"line_number":42,"context_line":"            if not matching_endpoints:"},{"line_number":43,"context_line":"                raise glanceclient.exc.InvalidEndpoint()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        # We don\u0027t always get a service catalog back ..."},{"line_number":46,"context_line":"        if \u0027serviceCatalog\u0027 not in self.catalog[\u0027access\u0027]:"},{"line_number":47,"context_line":"            return None"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_37b99679","line":45,"updated":"2014-06-11 17:53:07.000000000","message":"s/..././\n\nCan you please add some more comments as to what the redressel is when there is no service catalog?","commit_id":"8f68ecacd977c9198260449bb6a4aa9b1e67a03f"}],"tests/test_http.py":[{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e1986fbdf0562cb6aa36a0e238b8de8306f1f1e7","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        super(TestClient, self).tearDown()"},{"line_number":47,"context_line":"        self.mock.UnsetStubs()"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def test_create_client_without_endpoint(self):"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        self.auth_url \u003d \u0027http://localhost:5000/v2.0\u0027"},{"line_number":52,"context_line":"        self.mock.StubOutWithMock(http.HTTPClient,"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_0662ad3d","line":49,"updated":"2014-06-11 17:53:07.000000000","message":"Sorry for doing this however, we should prefer adding mock tests vs. mox.","commit_id":"8f68ecacd977c9198260449bb6a4aa9b1e67a03f"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e1986fbdf0562cb6aa36a0e238b8de8306f1f1e7","unresolved":false,"context_lines":[{"line_number":128,"context_line":"                    \"endpoints\": [{"},{"line_number":129,"context_line":"                        \"tenantId\": \"t1000\","},{"line_number":130,"context_line":"                        \"publicURL\":"},{"line_number":131,"context_line":"                        \"https://compute\\"},{"line_number":132,"context_line":"                        \\.north.host.com/v\\"},{"line_number":133,"context_line":"                        \\1/t1000\","},{"line_number":134,"context_line":"                        \"internalURL\":"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_9f751ccd","line":131,"updated":"2014-06-11 17:53:07.000000000","message":"don\u0027t believe you would need to use the escape seq. Python string should do it itself. Also, please try to keep the urls in the same line as it becomes really hard to review otherwise.","commit_id":"8f68ecacd977c9198260449bb6a4aa9b1e67a03f"}],"tests/test_service_catalog.py":[{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"263bb0d6d5e544c3e4419f17a091f37485e3c0b4","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        self.assertEqual(sc.get_endpoint_url(\u0027region\u0027, \u0027North\u0027,"},{"line_number":75,"context_line":"            service_type\u003d\u0027image\u0027), [\"https://image1.host\"])"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        self.assertRaises(exc.InvalidEndpoint, sc.get_endpoint_url,"},{"line_number":78,"context_line":"                          \"region\", \"South\", service_type\u003d\u0027image\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B%2BHA%3D","line":77,"updated":"2014-01-20 09:06:48.000000000","message":"(nit): I think it\u0027s deserved to track as a separate test case.","commit_id":"93b25e2cf065e05c5e2b9e041ad83441db780202"},{"author":{"_account_id":8107,"name":"Ya Hong Du","email":"du_yahong@126.com","username":"yahongdu"},"change_message_id":"f1e91b92b73fe29d65ca18256f5b186e8c587be0","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        self.assertEqual(sc.get_endpoint_url(\u0027region\u0027, \u0027North\u0027,"},{"line_number":75,"context_line":"            service_type\u003d\u0027image\u0027), [\"https://image1.host\"])"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        self.assertRaises(exc.InvalidEndpoint, sc.get_endpoint_url,"},{"line_number":78,"context_line":"                          \"region\", \"South\", service_type\u003d\u0027image\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B4uk%3D","line":77,"in_reply_to":"AAAAUH%2F%2B%2BHA%3D","updated":"2014-01-21 03:45:03.000000000","message":"Done","commit_id":"93b25e2cf065e05c5e2b9e041ad83441db780202"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e1986fbdf0562cb6aa36a0e238b8de8306f1f1e7","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 OpenStack Foundation"},{"line_number":2,"context_line":"# Copyright 2014 IBM Corp."},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_3f424868","line":2,"updated":"2014-06-11 17:53:07.000000000","message":"ditto","commit_id":"8f68ecacd977c9198260449bb6a4aa9b1e67a03f"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e1986fbdf0562cb6aa36a0e238b8de8306f1f1e7","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    def test_building_a_service_catalog(self):"},{"line_number":72,"context_line":"        sc \u003d service_catalog.ServiceCatalog(SERVICE_CATALOG)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        self.assertEqual(sc.get_endpoint_url("},{"line_number":75,"context_line":"            \u0027region\u0027, \u0027North\u0027, service_type\u003d\u0027image\u0027), [\"https://image1.host\"])"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def test_invalid_endpoint_exception(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_7f2690cf","line":74,"updated":"2014-06-11 17:53:07.000000000","message":"Think, the non-strictly typed syntax is assertEqual(expected, actual).\n\nCan you please switch the two here?","commit_id":"8f68ecacd977c9198260449bb6a4aa9b1e67a03f"}]}
