)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"77d0c7d407eef52907061ddb2d7f4d6e13c0ac59","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactored the update method in api.py for volume object"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The update method now checks if volume is versioned, if not it coverts it at"},{"line_number":10,"context_line":"the start. It makes sure the update method works whether a volume is dict or in"},{"line_number":11,"context_line":"its object notation"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I82be27bcd370a783c33f3d561af8315589437b96"},{"line_number":14,"context_line":"Partial-Implements: blueprint cinder-object"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a122d0e_3deba514","line":11,"range":{"start_line":9,"start_character":0,"end_line":11,"end_character":19},"updated":"2016-04-28 15:15:55.000000000","message":"nit: We\u0027re normally wrapping commit messages in 72 column [1].\n\n[1] https://wiki.openstack.org/wiki/GitCommitMessages#Summary_of_Git_commit_message_structure","commit_id":"9d8c7819e5904748a9a26ade6400ba803a21d2e7"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"29b22a4b76d8e8d7177553740e837465b46e09a2","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactored the update method in api.py for vol obj"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The update method now checks if volume is ovo, if not, it coverts"},{"line_number":10,"context_line":"it at the start. It makes sure the update method works whether a"},{"line_number":11,"context_line":"volume is dict or ovo"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bab6814e_3a109e4e","line":9,"range":{"start_line":9,"start_character":58,"end_line":9,"end_character":65},"updated":"2016-05-18 07:32:12.000000000","message":"s/coverts/converts","commit_id":"42413f0e5aa5a3b90ddf29252b0c6ac11694cdae"}],"cinder/volume/api.py":[{"author":{"_account_id":16308,"name":"Sheel Rana","email":"ranasheel2000@gmail.com","username":"sheel.rana"},"change_message_id":"a6e3f143f45938cbdcd3d7bdd02d3840714c82fc","unresolved":false,"context_lines":[{"line_number":443,"context_line":"            msg \u003d _(\"The volume cannot be updated during maintenance.\")"},{"line_number":444,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"        # NOTE(thangp): Update is called by various APIs, some of which are"},{"line_number":447,"context_line":"        # not yet using oslo_versionedobjects.  We need to handle the case"},{"line_number":448,"context_line":"        # where volume is either a dict or an oslo_versionedobject."},{"line_number":449,"context_line":"        if isinstance(volume, objects_base.CinderObject):"},{"line_number":450,"context_line":"            volume.update(fields)"},{"line_number":451,"context_line":"            volume.save()"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_c5016f06","side":"PARENT","line":448,"range":{"start_line":446,"start_character":0,"end_line":448,"end_character":66},"updated":"2016-04-23 18:08:56.000000000","message":"though i am still doubting on this but hope we have confirmed that there is no API which passes dict now..","commit_id":"ab8d63b7962e6a95c28dda955db7064cc9d08013"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"77d0c7d407eef52907061ddb2d7f4d6e13c0ac59","unresolved":false,"context_lines":[{"line_number":443,"context_line":"            msg \u003d _(\"The volume cannot be updated during maintenance.\")"},{"line_number":444,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"        # NOTE(thangp): Update is called by various APIs, some of which are"},{"line_number":447,"context_line":"        # not yet using oslo_versionedobjects.  We need to handle the case"},{"line_number":448,"context_line":"        # where volume is either a dict or an oslo_versionedobject."},{"line_number":449,"context_line":"        if isinstance(volume, objects_base.CinderObject):"},{"line_number":450,"context_line":"            volume.update(fields)"},{"line_number":451,"context_line":"            volume.save()"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_5dcb01a4","side":"PARENT","line":448,"range":{"start_line":446,"start_character":0,"end_line":448,"end_character":66},"in_reply_to":"1a122d0e_c5016f06","updated":"2016-04-28 15:15:55.000000000","message":"This is covered by new code Karthik is adding.","commit_id":"ab8d63b7962e6a95c28dda955db7064cc9d08013"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"77d0c7d407eef52907061ddb2d7f4d6e13c0ac59","unresolved":false,"context_lines":[{"line_number":438,"context_line":""},{"line_number":439,"context_line":"    @wrap_check_policy"},{"line_number":440,"context_line":"    def update(self, context, volume, fields):"},{"line_number":441,"context_line":"        # NOTE(karthikp): Making sure volume is always oslo-versioned"},{"line_number":442,"context_line":"        # If not, we convert it at the start of the update method"},{"line_number":443,"context_line":"        if not isinstance(volume, objects_base.CinderObject):"},{"line_number":444,"context_line":"            db_volume \u003d dbapi.get_volume(context, volume[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_5d6f81c3","line":441,"range":{"start_line":441,"start_character":10,"end_line":441,"end_character":14},"updated":"2016-04-28 15:15:55.000000000","message":"Can you make that a TODO instead of NOTE?","commit_id":"9d8c7819e5904748a9a26ade6400ba803a21d2e7"},{"author":{"_account_id":16308,"name":"Sheel Rana","email":"ranasheel2000@gmail.com","username":"sheel.rana"},"change_message_id":"bd09f8dc81133ee60cb75d7594fff2e15eaa8178","unresolved":false,"context_lines":[{"line_number":440,"context_line":"    def update(self, context, volume, fields):"},{"line_number":441,"context_line":"        # NOTE(karthikp): Making sure volume is always oslo-versioned"},{"line_number":442,"context_line":"        # If not, we convert it at the start of the update method"},{"line_number":443,"context_line":"        if not isinstance(volume, objects_base.CinderObject):"},{"line_number":444,"context_line":"            db_volume \u003d dbapi.get_volume(context, volume[\u0027id\u0027])"},{"line_number":445,"context_line":"            volume \u003d objects.Volume._from_db_object(context, volume, db_volume)"},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"        if volume.status \u003d\u003d \u0027maintenance\u0027:"},{"line_number":448,"context_line":"            LOG.info(_LI(\"Unable to update volume, \""},{"line_number":449,"context_line":"                         \"because it is in maintenance.\"), resource\u003dvolume)"},{"line_number":450,"context_line":"            msg \u003d _(\"The volume cannot be updated during maintenance.\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_aa588057","line":447,"range":{"start_line":443,"start_character":0,"end_line":447,"end_character":42},"updated":"2016-04-23 18:03:43.000000000","message":"why we need to convert volume to ovo in case volume.status is maintenance?\nI think for cases where volume.status\u003dmaintenance, this will be extra overhead to convert volume to ovo as for these cases we just log message and raise exception.","commit_id":"9d8c7819e5904748a9a26ade6400ba803a21d2e7"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"77d0c7d407eef52907061ddb2d7f4d6e13c0ac59","unresolved":false,"context_lines":[{"line_number":440,"context_line":"    def update(self, context, volume, fields):"},{"line_number":441,"context_line":"        # NOTE(karthikp): Making sure volume is always oslo-versioned"},{"line_number":442,"context_line":"        # If not, we convert it at the start of the update method"},{"line_number":443,"context_line":"        if not isinstance(volume, objects_base.CinderObject):"},{"line_number":444,"context_line":"            db_volume \u003d dbapi.get_volume(context, volume[\u0027id\u0027])"},{"line_number":445,"context_line":"            volume \u003d objects.Volume._from_db_object(context, volume, db_volume)"},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"        if volume.status \u003d\u003d \u0027maintenance\u0027:"},{"line_number":448,"context_line":"            LOG.info(_LI(\"Unable to update volume, \""},{"line_number":449,"context_line":"                         \"because it is in maintenance.\"), resource\u003dvolume)"},{"line_number":450,"context_line":"            msg \u003d _(\"The volume cannot be updated during maintenance.\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_fd492d61","line":447,"range":{"start_line":443,"start_character":0,"end_line":447,"end_character":42},"in_reply_to":"1a122d0e_aa588057","updated":"2016-04-28 15:15:55.000000000","message":"Sheel: Nice point. Code above is just for consistency and will go away once we\u0027ll finish transition period and be 100% sure we\u0027re passing o.vo everywhere. I believe we can go with the solution Karthik is proposing.","commit_id":"9d8c7819e5904748a9a26ade6400ba803a21d2e7"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"166926fb48727c5343b855451a9fef6e69b90c15","unresolved":false,"context_lines":[{"line_number":442,"context_line":"        # If not we convert it at the start of update method. This check"},{"line_number":443,"context_line":"        # needs to be removed once we have moved to ovo."},{"line_number":444,"context_line":"        if not isinstance(volume, objects_base.CinderObject):"},{"line_number":445,"context_line":"            db_volume \u003d dbapi.get_volume(context, volume[\u0027id\u0027])"},{"line_number":446,"context_line":"            volume \u003d objects.Volume._from_db_object(context, volume, db_volume)"},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"        if volume.status \u003d\u003d \u0027maintenance\u0027:"},{"line_number":449,"context_line":"            LOG.info(_LI(\"Unable to update volume, \""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_3d9d460a","line":446,"range":{"start_line":445,"start_character":0,"end_line":446,"end_character":79},"updated":"2016-04-29 14:06:55.000000000","message":"Oh, that\u0027s still an additional DB call. Do we really need it? I think it should work with:\n\n vol_obj \u003d objects.Volume()\n volume \u003d objects.Volume._from_db_object(context, vol_obj, volume)","commit_id":"6173e3745c3dec7359be9077c1710be2640f9489"}]}
