)]}'
{"cinder/volume/drivers/drbdmanagedrv.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"cfddc0e40dfdc574ca9afcdf35066dbf6245f1ad","unresolved":false,"context_lines":[{"line_number":576,"context_line":"        new_vol_nr \u003d 0"},{"line_number":577,"context_line":"        v0_props \u003d self._priv_hash_from_volume(volume)"},{"line_number":578,"context_line":""},{"line_number":579,"context_line":"        if ((\u0027size\u0027 in volume) and (volume[\u0027size\u0027] \u003e snapshot[\u0027volume_size\u0027])):"},{"line_number":580,"context_line":"            LOG.debug(\"resize volume \u0027%(dst_vol)s\u0027 from %(src_size)d to \""},{"line_number":581,"context_line":"                      \"%(dst_size)d\","},{"line_number":582,"context_line":"                      {\u0027dst_vol\u0027: volume[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_4f42ac3f","line":579,"updated":"2016-08-16 12:18:55.000000000","message":"-1: Volume will always have the size attribute since it\u0027s an OVO instance, and snapshot will also be an OVO instance, so we should use attribute notation instead of dictionary notation:\n\n if volume.size \u003e snapshot.volume_size:","commit_id":"945a6d61ce099fb939c017823969a535cbb3dc45"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"541034e6ec82899820dee1e11221b588105d3f85","unresolved":false,"context_lines":[{"line_number":576,"context_line":"        new_vol_nr \u003d 0"},{"line_number":577,"context_line":"        v0_props \u003d self._priv_hash_from_volume(volume)"},{"line_number":578,"context_line":""},{"line_number":579,"context_line":"        if ((\u0027size\u0027 in volume) and (volume[\u0027size\u0027] \u003e snapshot[\u0027volume_size\u0027])):"},{"line_number":580,"context_line":"            LOG.debug(\"resize volume \u0027%(dst_vol)s\u0027 from %(src_size)d to \""},{"line_number":581,"context_line":"                      \"%(dst_size)d\","},{"line_number":582,"context_line":"                      {\u0027dst_vol\u0027: volume[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_8c1abd7b","line":579,"in_reply_to":"3ac371cc_4a03ba42","updated":"2016-08-17 09:07:35.000000000","message":"While backporting is something we have to keep in mind, it cannot dictate our existing code base.  In this case OVOs were added the dict compatibility functionality for convenience, that way we didn\u0027t have to change all existing code at once, but the plan is to change everything to stop using dictionary notation when it\u0027s not a dictionary, thus removing the confusion of what we are really working with.  And any new code that gets added must use the attribute notation with dealing with OVO instances.\n\nIf you see the dictionary notation you assume you have a dictionary instance, when in fact you have an OVO instance.  And thinking one has a dictionary means that they usually do like you did, check that the key exists or use the `get` method.\n\nAs for backporting to Juno, I have looked at the Juno code base and back then we were already passing ORM instances and not dictionaries, so the attribute notation should be fine.","commit_id":"945a6d61ce099fb939c017823969a535cbb3dc45"},{"author":{"_account_id":14339,"name":"Philipp Marek","email":"philipp.marek@linbit.com","username":"pmarek"},"change_message_id":"36d064364e01ad640095ea0a5e45bc188a6911b9","unresolved":false,"context_lines":[{"line_number":576,"context_line":"        new_vol_nr \u003d 0"},{"line_number":577,"context_line":"        v0_props \u003d self._priv_hash_from_volume(volume)"},{"line_number":578,"context_line":""},{"line_number":579,"context_line":"        if ((\u0027size\u0027 in volume) and (volume[\u0027size\u0027] \u003e snapshot[\u0027volume_size\u0027])):"},{"line_number":580,"context_line":"            LOG.debug(\"resize volume \u0027%(dst_vol)s\u0027 from %(src_size)d to \""},{"line_number":581,"context_line":"                      \"%(dst_size)d\","},{"line_number":582,"context_line":"                      {\u0027dst_vol\u0027: volume[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_4a03ba42","line":579,"in_reply_to":"3ac371cc_4f42ac3f","updated":"2016-08-16 12:43:54.000000000","message":"Does that hold for older OpenStack releases as well?\n\nWe know about people using this driver with OS releases as far back as Juno - and leaving that in makes backporting other fixes a bit easier.","commit_id":"945a6d61ce099fb939c017823969a535cbb3dc45"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"cfddc0e40dfdc574ca9afcdf35066dbf6245f1ad","unresolved":false,"context_lines":[{"line_number":579,"context_line":"        if ((\u0027size\u0027 in volume) and (volume[\u0027size\u0027] \u003e snapshot[\u0027volume_size\u0027])):"},{"line_number":580,"context_line":"            LOG.debug(\"resize volume \u0027%(dst_vol)s\u0027 from %(src_size)d to \""},{"line_number":581,"context_line":"                      \"%(dst_size)d\","},{"line_number":582,"context_line":"                      {\u0027dst_vol\u0027: volume[\u0027id\u0027],"},{"line_number":583,"context_line":"                       \u0027src_size\u0027: snapshot[\u0027volume_size\u0027],"},{"line_number":584,"context_line":"                       \u0027dst_size\u0027: volume[\u0027size\u0027]})"},{"line_number":585,"context_line":"            v0_props[dm_const.VOL_SIZE] \u003d str("}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_afec002a","line":582,"range":{"start_line":582,"start_character":34,"end_line":582,"end_character":47},"updated":"2016-08-16 12:18:55.000000000","message":"nit: volume.id","commit_id":"945a6d61ce099fb939c017823969a535cbb3dc45"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"cfddc0e40dfdc574ca9afcdf35066dbf6245f1ad","unresolved":false,"context_lines":[{"line_number":580,"context_line":"            LOG.debug(\"resize volume \u0027%(dst_vol)s\u0027 from %(src_size)d to \""},{"line_number":581,"context_line":"                      \"%(dst_size)d\","},{"line_number":582,"context_line":"                      {\u0027dst_vol\u0027: volume[\u0027id\u0027],"},{"line_number":583,"context_line":"                       \u0027src_size\u0027: snapshot[\u0027volume_size\u0027],"},{"line_number":584,"context_line":"                       \u0027dst_size\u0027: volume[\u0027size\u0027]})"},{"line_number":585,"context_line":"            v0_props[dm_const.VOL_SIZE] \u003d str("},{"line_number":586,"context_line":"                self._vol_size_to_dm(volume[\u0027size\u0027]))"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_4f210c4d","line":583,"range":{"start_line":583,"start_character":35,"end_line":583,"end_character":57},"updated":"2016-08-16 12:18:55.000000000","message":"nit: snapshot.volume_size","commit_id":"945a6d61ce099fb939c017823969a535cbb3dc45"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"cfddc0e40dfdc574ca9afcdf35066dbf6245f1ad","unresolved":false,"context_lines":[{"line_number":581,"context_line":"                      \"%(dst_size)d\","},{"line_number":582,"context_line":"                      {\u0027dst_vol\u0027: volume[\u0027id\u0027],"},{"line_number":583,"context_line":"                       \u0027src_size\u0027: snapshot[\u0027volume_size\u0027],"},{"line_number":584,"context_line":"                       \u0027dst_size\u0027: volume[\u0027size\u0027]})"},{"line_number":585,"context_line":"            v0_props[dm_const.VOL_SIZE] \u003d str("},{"line_number":586,"context_line":"                self._vol_size_to_dm(volume[\u0027size\u0027]))"},{"line_number":587,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_cfd33c37","line":584,"range":{"start_line":584,"start_character":35,"end_line":584,"end_character":49},"updated":"2016-08-16 12:18:55.000000000","message":"nit: volume.size","commit_id":"945a6d61ce099fb939c017823969a535cbb3dc45"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"cfddc0e40dfdc574ca9afcdf35066dbf6245f1ad","unresolved":false,"context_lines":[{"line_number":583,"context_line":"                       \u0027src_size\u0027: snapshot[\u0027volume_size\u0027],"},{"line_number":584,"context_line":"                       \u0027dst_size\u0027: volume[\u0027size\u0027]})"},{"line_number":585,"context_line":"            v0_props[dm_const.VOL_SIZE] \u003d str("},{"line_number":586,"context_line":"                self._vol_size_to_dm(volume[\u0027size\u0027]))"},{"line_number":587,"context_line":""},{"line_number":588,"context_line":"        v_props \u003d [(new_vol_nr, v0_props)]"},{"line_number":589,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_8ff2e4d0","line":586,"range":{"start_line":586,"start_character":37,"end_line":586,"end_character":51},"updated":"2016-08-16 12:18:55.000000000","message":"-1: volume.size","commit_id":"945a6d61ce099fb939c017823969a535cbb3dc45"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8e612e3e4bbe7f6d47276aaf1bf47c624a5c7869","unresolved":false,"context_lines":[{"line_number":562,"context_line":"                                         d_res_name, False)"},{"line_number":563,"context_line":"            self._check_result(res, ignore\u003d[dm_exc.DM_ENOENT])"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"    # This function has to work with a fake object created by"},{"line_number":566,"context_line":"    # create_cloned_volume() as well, so don\u0027t use the \".\" operator"},{"line_number":567,"context_line":"    # on the \"snapshot\" argument."},{"line_number":568,"context_line":"    def create_volume_from_snapshot(self, volume, snapshot):"},{"line_number":569,"context_line":"        \"\"\"Creates a volume from a snapshot.\"\"\""},{"line_number":570,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"7a8ec9b2_bed8bc80","line":567,"range":{"start_line":565,"start_character":1,"end_line":567,"end_character":33},"updated":"2016-09-21 09:34:35.000000000","message":"-1: If we pass an OVO instance instead of a dictionary in create_cloned_volume we don\u0027t need to use dictionary notation.","commit_id":"b53b2119d9284ac71a0f5a278cd8acb4c4792af7"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8e612e3e4bbe7f6d47276aaf1bf47c624a5c7869","unresolved":false,"context_lines":[{"line_number":582,"context_line":"        new_vol_nr \u003d 0"},{"line_number":583,"context_line":"        v0_props \u003d self._priv_hash_from_volume(volume)"},{"line_number":584,"context_line":""},{"line_number":585,"context_line":"        if volume.size \u003e snapshot[\u0027volume_size\u0027]:"},{"line_number":586,"context_line":"            LOG.debug(\"resize volume \u0027%(dst_vol)s\u0027 from %(src_size)d to \""},{"line_number":587,"context_line":"                      \"%(dst_size)d\","},{"line_number":588,"context_line":"                      {\u0027dst_vol\u0027: volume.id,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a8ec9b2_debe68fe","line":585,"range":{"start_line":585,"start_character":25,"end_line":585,"end_character":49},"updated":"2016-09-21 09:34:35.000000000","message":"snapshot.volume_size","commit_id":"b53b2119d9284ac71a0f5a278cd8acb4c4792af7"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8e612e3e4bbe7f6d47276aaf1bf47c624a5c7869","unresolved":false,"context_lines":[{"line_number":586,"context_line":"            LOG.debug(\"resize volume \u0027%(dst_vol)s\u0027 from %(src_size)d to \""},{"line_number":587,"context_line":"                      \"%(dst_size)d\","},{"line_number":588,"context_line":"                      {\u0027dst_vol\u0027: volume.id,"},{"line_number":589,"context_line":"                       \u0027src_size\u0027: snapshot[\u0027volume_size\u0027],"},{"line_number":590,"context_line":"                       \u0027dst_size\u0027: volume.size})"},{"line_number":591,"context_line":"            v0_props[dm_const.VOL_SIZE] \u003d str("},{"line_number":592,"context_line":"                self._vol_size_to_dm(volume.size))"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a8ec9b2_7e44741a","line":589,"range":{"start_line":589,"start_character":35,"end_line":589,"end_character":58},"updated":"2016-09-21 09:34:35.000000000","message":"snapshot.volume_size","commit_id":"b53b2119d9284ac71a0f5a278cd8acb4c4792af7"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8e612e3e4bbe7f6d47276aaf1bf47c624a5c7869","unresolved":false,"context_lines":[{"line_number":618,"context_line":"    def create_cloned_volume(self, volume, src_vref):"},{"line_number":619,"context_line":"        temp_id \u003d self._clean_uuid()"},{"line_number":620,"context_line":"        snapshot \u003d {\u0027id\u0027: temp_id,"},{"line_number":621,"context_line":"                    \u0027volume_size\u0027: src_vref[\u0027size\u0027]}"},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"        self.create_snapshot({\u0027id\u0027: temp_id,"},{"line_number":624,"context_line":"                              \u0027volume_id\u0027: src_vref[\u0027id\u0027]})"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a8ec9b2_639f7b03","line":621,"range":{"start_line":621,"start_character":35,"end_line":621,"end_character":51},"updated":"2016-09-21 09:34:35.000000000","message":"-1: src_vref.size\n\nI think we should be creating an OVO instance instead:\n\n snapshot \u003d objects.Snapshot(id\u003dtemp_id, volume_size\u003dsrc_vref.size)","commit_id":"b53b2119d9284ac71a0f5a278cd8acb4c4792af7"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"8e612e3e4bbe7f6d47276aaf1bf47c624a5c7869","unresolved":false,"context_lines":[{"line_number":623,"context_line":"        self.create_snapshot({\u0027id\u0027: temp_id,"},{"line_number":624,"context_line":"                              \u0027volume_id\u0027: src_vref[\u0027id\u0027]})"},{"line_number":625,"context_line":""},{"line_number":626,"context_line":"        self.create_volume_from_snapshot(volume, snapshot)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"        self.delete_snapshot(snapshot)"},{"line_number":629,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"7a8ec9b2_bec51c3e","line":626,"updated":"2016-09-21 09:34:35.000000000","message":"This should be enclosed in a try...except clause with a finally delete_snapshot, but that\u0027s unrelated to this change.","commit_id":"b53b2119d9284ac71a0f5a278cd8acb4c4792af7"}]}
