)]}'
{"nova/image/glance.py":[{"author":{"_account_id":21239,"name":"Alex Szarka","email":"szarka@inf.u-szeged.hu","username":"xavvior"},"change_message_id":"b7dab2ea9ac24a7a2ab751d1c576fc0f3595aac1","unresolved":false,"context_lines":[{"line_number":195,"context_line":""},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"class GlanceImageServices(object):"},{"line_number":198,"context_line":"    def init(self, client):"},{"line_number":199,"context_line":"        self._client \u003d client or GlanceClientWrapper()"},{"line_number":200,"context_line":"        # NOTE(jbresnah) build the table of download handlers at the beginning"},{"line_number":201,"context_line":"        # so that operators can catch errors at load time rather than whenever"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_44d766ed","line":198,"range":{"start_line":198,"start_character":19,"end_line":198,"end_character":25},"updated":"2016-07-14 14:23:17.000000000","message":"If remove the default value, the client become expected and can\u0027t call without client parameter.\nEverytime get \"client\" parameter in calls?","commit_id":"2e3808b47d5e52df5f260717a415647541295231"},{"author":{"_account_id":21239,"name":"Alex Szarka","email":"szarka@inf.u-szeged.hu","username":"xavvior"},"change_message_id":"b7dab2ea9ac24a7a2ab751d1c576fc0f3595aac1","unresolved":false,"context_lines":[{"line_number":195,"context_line":""},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"class GlanceImageServices(object):"},{"line_number":198,"context_line":"    def init(self, client):"},{"line_number":199,"context_line":"        self._client \u003d client or GlanceClientWrapper()"},{"line_number":200,"context_line":"        # NOTE(jbresnah) build the table of download handlers at the beginning"},{"line_number":201,"context_line":"        # so that operators can catch errors at load time rather than whenever"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_8492ee49","line":198,"range":{"start_line":198,"start_character":8,"end_line":198,"end_character":12},"updated":"2016-07-14 14:23:17.000000000","message":"Yes, in python the construct call __init__","commit_id":"2e3808b47d5e52df5f260717a415647541295231"},{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"37d61bfadfaf29f8408d49204f2c4c6fb882bc89","unresolved":false,"context_lines":[{"line_number":195,"context_line":""},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"class GlanceImageServices(object):"},{"line_number":198,"context_line":"    def init(self, client):"},{"line_number":199,"context_line":"        self._client \u003d client or GlanceClientWrapper()"},{"line_number":200,"context_line":"        # NOTE(jbresnah) build the table of download handlers at the beginning"},{"line_number":201,"context_line":"        # so that operators can catch errors at load time rather than whenever"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_a1939cff","line":198,"range":{"start_line":198,"start_character":8,"end_line":198,"end_character":12},"updated":"2016-07-14 14:09:30.000000000","message":"should be __init__","commit_id":"2e3808b47d5e52df5f260717a415647541295231"},{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"46a17e619ca06a4d0bf1557d79e9ca353790e958","unresolved":false,"context_lines":[{"line_number":195,"context_line":""},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"class GlanceImageServices(object):"},{"line_number":198,"context_line":"    def init(self, client):"},{"line_number":199,"context_line":"        self._client \u003d client or GlanceClientWrapper()"},{"line_number":200,"context_line":"        # NOTE(jbresnah) build the table of download handlers at the beginning"},{"line_number":201,"context_line":"        # so that operators can catch errors at load time rather than whenever"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_27182e75","line":198,"range":{"start_line":198,"start_character":19,"end_line":198,"end_character":25},"in_reply_to":"1aa78d24_44d766ed","updated":"2016-07-15 10:14:13.000000000","message":"It is not required as the subclasses always inits this parameter (maybe it will be none, but will be initialized anyway)","commit_id":"2e3808b47d5e52df5f260717a415647541295231"},{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"37d61bfadfaf29f8408d49204f2c4c6fb882bc89","unresolved":false,"context_lines":[{"line_number":365,"context_line":"    \"\"\"Provides storage and retrieval of disk image objects within Glance.\"\"\""},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def __init__(self, client\u003dNone):"},{"line_number":368,"context_line":"        self.init(client)"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"    def detail(self, context, **kwargs):"},{"line_number":371,"context_line":"        \"\"\"Calls out to Glance for a list of detailed image information.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_215dec48","line":368,"range":{"start_line":368,"start_character":8,"end_line":368,"end_character":25},"updated":"2016-07-14 14:09:30.000000000","message":"Should call the base class init method, the following way: \nsuper(GlanceImageService, self).__init__(client)","commit_id":"2e3808b47d5e52df5f260717a415647541295231"},{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"37d61bfadfaf29f8408d49204f2c4c6fb882bc89","unresolved":false,"context_lines":[{"line_number":469,"context_line":"    \"\"\"Provides storage and retrieval of disk image objects within Glance.\"\"\""},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    def __init__(self, client\u003dNone):"},{"line_number":472,"context_line":"        self.init(client)"},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"    def show(self, context, image_id, include_locations\u003dFalse,"},{"line_number":475,"context_line":"             show_deleted\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_e13924f4","line":472,"range":{"start_line":472,"start_character":13,"end_line":472,"end_character":25},"updated":"2016-07-14 14:09:30.000000000","message":"ditto","commit_id":"2e3808b47d5e52df5f260717a415647541295231"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b33c72cb27bf954d281cac9d41c75b412168f8d6","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                time.sleep(1)"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"class GlanceImageServices(object):"},{"line_number":198,"context_line":"    def __init__(self, client):"},{"line_number":199,"context_line":"        self._client \u003d client or GlanceClientWrapper()"},{"line_number":200,"context_line":"        # NOTE(jbresnah) build the table of download handlers at the beginning"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_91ec30bc","line":197,"range":{"start_line":197,"start_character":6,"end_line":197,"end_character":25},"updated":"2016-08-02 07:39:16.000000000","message":"The name suggest a collection but it seems to me it is a base class for the GlanceImageService and GlanceImageServiceV2. I suggest call it GlanceImageServiceBase","commit_id":"5fe87acd19bf0c6c4803f587bafb028d1016cca8"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b33c72cb27bf954d281cac9d41c75b412168f8d6","unresolved":false,"context_lines":[{"line_number":216,"context_line":"                              \u0027following error occurred: %(ex)s\u0027),"},{"line_number":217,"context_line":"                          {\u0027module_str\u0027: str(mod), \u0027ex\u0027: ex})"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    def glance_images_details(self, context, version, **params):"},{"line_number":220,"context_line":"        \"\"\"Calls out to Glance for a list of detailed image information."},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        :param context: The context object to pass to image client"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_14594e35","line":219,"range":{"start_line":219,"start_character":8,"end_line":219,"end_character":21},"updated":"2016-08-02 07:39:16.000000000","message":"I\u0027m wondering about the \u0027glance_image\u0027 prefix for these functions, it feels like a duplication as the class name already state that it is a glance service","commit_id":"5fe87acd19bf0c6c4803f587bafb028d1016cca8"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b33c72cb27bf954d281cac9d41c75b412168f8d6","unresolved":false,"context_lines":[{"line_number":376,"context_line":"    def detail(self, context, **kwargs):"},{"line_number":377,"context_line":"        \"\"\"Calls out to Glance for a list of detailed image information.\"\"\""},{"line_number":378,"context_line":"        params \u003d _extract_query_params(kwargs)"},{"line_number":379,"context_line":"        return self.glance_images_details(context, 1, **params)"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"    def show(self, context, image_id, include_locations\u003dFalse,"},{"line_number":382,"context_line":"             show_deleted\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_74752a62","line":379,"range":{"start_line":379,"start_character":51,"end_line":379,"end_character":52},"updated":"2016-08-02 07:39:16.000000000","message":"If this class is for version 1 then I guess we can factor out the passing 1 for the base class. I imagine that the base class expects the version in __init__ so that the derived classes can initialize the base with the actual version","commit_id":"5fe87acd19bf0c6c4803f587bafb028d1016cca8"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b33c72cb27bf954d281cac9d41c75b412168f8d6","unresolved":false,"context_lines":[{"line_number":393,"context_line":"        :param show_deleted: (Optional) show the image even the status of"},{"line_number":394,"context_line":"                             image is deleted."},{"line_number":395,"context_line":"        \"\"\""},{"line_number":396,"context_line":"        version \u003d 1"},{"line_number":397,"context_line":"        if include_locations:"},{"line_number":398,"context_line":"            version \u003d 2"},{"line_number":399,"context_line":"        return self.glance_images_show(context, version, image_id,"},{"line_number":400,"context_line":"                                       show_deleted, include_locations)"},{"line_number":401,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_34f29206","line":398,"range":{"start_line":396,"start_character":1,"end_line":398,"end_character":23},"updated":"2016-08-02 07:39:16.000000000","message":"Is this class for version 1 only and GlanceImageServiceV2 is the version 2?","commit_id":"5fe87acd19bf0c6c4803f587bafb028d1016cca8"},{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"0d68d8d69ee6decf8210a6101f699ef50af65591","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        return self.glance_images_show(context, version, image_id,"},{"line_number":400,"context_line":"                                       show_deleted, include_locations)"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"    def _get_transfer_module(self, scheme):"},{"line_number":403,"context_line":"        return self.glance_images_get_transfer_module(scheme)"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"    def download(self, context, image_id, data\u003dNone, dst_path\u003dNone):"},{"line_number":406,"context_line":"        \"\"\"Calls out to Glance for data and writes data.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"1aa78d24_27530e3b","line":403,"range":{"start_line":402,"start_character":0,"end_line":403,"end_character":61},"updated":"2016-07-15 10:42:31.000000000","message":"I think you should keep the original name in the base class, and these 2-lined methods would not exist.","commit_id":"5fe87acd19bf0c6c4803f587bafb028d1016cca8"},{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"0d68d8d69ee6decf8210a6101f699ef50af65591","unresolved":false,"context_lines":[{"line_number":495,"context_line":"        return self.glance_images_show(context, 2, image_id,"},{"line_number":496,"context_line":"                                       show_deleted, include_locations)"},{"line_number":497,"context_line":""},{"line_number":498,"context_line":"    def _get_transfer_module(self, scheme):"},{"line_number":499,"context_line":"        return self.glance_images_get_transfer_module(scheme)"},{"line_number":500,"context_line":""},{"line_number":501,"context_line":"    def detail(self, context, **kwargs):"},{"line_number":502,"context_line":"        \"\"\"Calls out to Glance for a list of detailed image information.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"1aa78d24_472f3aa1","line":499,"range":{"start_line":498,"start_character":0,"end_line":499,"end_character":61},"updated":"2016-07-15 10:42:31.000000000","message":"Ditto","commit_id":"5fe87acd19bf0c6c4803f587bafb028d1016cca8"},{"author":{"_account_id":15524,"name":"dane-fichter","email":"dane.fichter@jhuapl.edu","username":"dane-fichter"},"change_message_id":"d55886bcb5623360ab616b18c337705d5bbab70c","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                    except Exception:"},{"line_number":296,"context_line":"                        LOG.exception(_LE(\"Download image error\"))"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def verify_glance_signatures(self, context, image_id):"},{"line_number":299,"context_line":"        verifier \u003d None"},{"line_number":300,"context_line":"        if CONF.glance.verify_glance_signatures:"},{"line_number":301,"context_line":"            image_meta_dict \u003d self.show(context, image_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_a1945f44","line":298,"updated":"2016-08-02 18:13:34.000000000","message":"This method name is a bit misleading, since it just builds the verifier. I would call this get_glance_signature_verifier or something along those lines.","commit_id":"74a381614e5cda9e12c3022d1b4a3dbeec9c03c1"},{"author":{"_account_id":15524,"name":"dane-fichter","email":"dane.fichter@jhuapl.edu","username":"dane-fichter"},"change_message_id":"d55886bcb5623360ab616b18c337705d5bbab70c","unresolved":false,"context_lines":[{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def verify_glance_signatures(self, context, image_id):"},{"line_number":299,"context_line":"        verifier \u003d None"},{"line_number":300,"context_line":"        if CONF.glance.verify_glance_signatures:"},{"line_number":301,"context_line":"            image_meta_dict \u003d self.show(context, image_id,"},{"line_number":302,"context_line":"                                        include_locations\u003dFalse)"},{"line_number":303,"context_line":"            image_meta \u003d objects.ImageMeta.from_dict(image_meta_dict)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_21d22f35","line":300,"updated":"2016-08-02 18:13:34.000000000","message":"It seems unintuitive to me that this method gets called whether verify_glance_signatures is set or not. We should be checking the conf option in the download() method and calling this method whenever the option is True.","commit_id":"74a381614e5cda9e12c3022d1b4a3dbeec9c03c1"},{"author":{"_account_id":15524,"name":"dane-fichter","email":"dane.fichter@jhuapl.edu","username":"dane-fichter"},"change_message_id":"d55886bcb5623360ab616b18c337705d5bbab70c","unresolved":false,"context_lines":[{"line_number":347,"context_line":"        try:"},{"line_number":348,"context_line":"            for chunk in image_chunks:"},{"line_number":349,"context_line":"                if verifier:"},{"line_number":350,"context_line":"                    verifier.update(chunk)"},{"line_number":351,"context_line":"                data.write(chunk)"},{"line_number":352,"context_line":"            if verifier:"},{"line_number":353,"context_line":"                verifier.verify()"}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_a15d7f4a","line":350,"updated":"2016-08-02 18:13:34.000000000","message":"The name of this method should reflect that it is performing signature verification as well as writing the data. It also seems a bit confusing to break out the signature verification into it\u0027s own separate method but not use that method here.","commit_id":"74a381614e5cda9e12c3022d1b4a3dbeec9c03c1"},{"author":{"_account_id":15524,"name":"dane-fichter","email":"dane.fichter@jhuapl.edu","username":"dane-fichter"},"change_message_id":"d55886bcb5623360ab616b18c337705d5bbab70c","unresolved":false,"context_lines":[{"line_number":422,"context_line":"        if data is None:"},{"line_number":423,"context_line":"            return self.perform_image_signature_verification("},{"line_number":424,"context_line":"                verifier, image_chunks, image_id)"},{"line_number":425,"context_line":"        else:"},{"line_number":426,"context_line":"            self._data_write(image_chunks, verifier,"},{"line_number":427,"context_line":"                             image_id, dst_path, close_file, data)"},{"line_number":428,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_81d79bbe","line":425,"updated":"2016-08-02 18:13:34.000000000","message":"This rewrite is confusing/unintuitive as well. Looking at this code, it looks as if signature verification only occurs when data is None.","commit_id":"74a381614e5cda9e12c3022d1b4a3dbeec9c03c1"}]}
