)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"75c042f584fd6c80097dbefe39b75688731db288","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Support to backup volume via snapshot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a volume is in-use, the Unity driver could achieve the backup of that"},{"line_number":10,"context_line":"volume through creating a temp snapshot, and then backing-up the snapshot."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"DocImpact"},{"line_number":13,"context_line":"Implements: blueprint unity-backup-using-snapshot"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a6eadb0_b9e3ce04","line":10,"updated":"2016-12-19 15:12:11.000000000","message":"Please wrap at 72 characters.","commit_id":"8c03c99c12c21fa1e4d3d80a1abf104325511068"},{"author":{"_account_id":18742,"name":"Ryan Liang","email":"ryan.liang@emc.com","username":"RyanLiang"},"change_message_id":"87ee5bee31d917c8372175a8b231e04eebbb889c","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Support to backup volume via snapshot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a volume is in-use, the Unity driver could achieve the backup of that"},{"line_number":10,"context_line":"volume through creating a temp snapshot, and then backing-up the snapshot."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"DocImpact"},{"line_number":13,"context_line":"Implements: blueprint unity-backup-using-snapshot"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a6eadb0_2715bd9a","line":10,"in_reply_to":"1a6eadb0_b9e3ce04","updated":"2016-12-20 06:29:04.000000000","message":"Done","commit_id":"8c03c99c12c21fa1e4d3d80a1abf104325511068"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"24adb3982bd70fc07cf60d83535357a900da324c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Ryan Liang \u003cryan.liang@emc.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-12-27 11:09:01 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Support to backup volume via snapshot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a volume is in-use, the Unity driver could achieve the backup of"},{"line_number":10,"context_line":"that volume through creating a temp snapshot, and then backing-up the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba5201f7_49c89e74","line":7,"updated":"2017-01-06 14:07:26.000000000","message":"Please, add driver name to the commit message tittle","commit_id":"a00866b05aae6e84f7e27fc072fccaab1cf1feb4"},{"author":{"_account_id":18742,"name":"Ryan Liang","email":"ryan.liang@emc.com","username":"RyanLiang"},"change_message_id":"7698ac9fe2ef63dab80b6cadccbd9d80fc06b315","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Ryan Liang \u003cryan.liang@emc.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-12-27 11:09:01 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Support to backup volume via snapshot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a volume is in-use, the Unity driver could achieve the backup of"},{"line_number":10,"context_line":"that volume through creating a temp snapshot, and then backing-up the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba5201f7_2dfb3c7a","line":7,"in_reply_to":"ba5201f7_49c89e74","updated":"2017-01-09 02:36:51.000000000","message":"Sure. Will add it in next patch.","commit_id":"a00866b05aae6e84f7e27fc072fccaab1cf1feb4"}],"cinder/tests/unit/volume/drivers/dell_emc/unity/test_adapter.py":[{"author":{"_account_id":14865,"name":"Adriano Freires Rosso","email":"adriano.rosso@fit-tecnologia.org.br","username":"adriano_rosso"},"change_message_id":"ae6ed4fe382d49c8a1c91355b8155b64010ac0a9","unresolved":false,"context_lines":[{"line_number":193,"context_line":""},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"def get_snap_pl(name):"},{"line_number":196,"context_line":"    return \u0027id^{}|system^CLIENT_SERIAL|type^snapshot|version^None\u0027.format(name)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"def get_connector_uids(adapter, connector):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_d819d689","line":196,"range":{"start_line":196,"start_character":67,"end_line":196,"end_character":78},"updated":"2016-12-15 19:17:38.000000000","message":"Can you use % instead of format? (like in get_lun_pl)","commit_id":"7b1ff66d525747a992438021104bd03e82130d04"},{"author":{"_account_id":18742,"name":"Ryan Liang","email":"ryan.liang@emc.com","username":"RyanLiang"},"change_message_id":"6d7b45587a173966fd42cd80a7e19c3b1dc5f810","unresolved":false,"context_lines":[{"line_number":193,"context_line":""},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"def get_snap_pl(name):"},{"line_number":196,"context_line":"    return \u0027id^{}|system^CLIENT_SERIAL|type^snapshot|version^None\u0027.format(name)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"def get_connector_uids(adapter, connector):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_0512fe56","line":196,"range":{"start_line":196,"start_character":67,"end_line":196,"end_character":78},"in_reply_to":"1a6eadb0_d819d689","updated":"2016-12-16 02:05:09.000000000","message":"Sure, will update it.","commit_id":"7b1ff66d525747a992438021104bd03e82130d04"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"70526afac8eee05876a67a7ce623cf94cdecfb3f","unresolved":false,"context_lines":[{"line_number":221,"context_line":"def patch_for_concrete_adapter(clz_str):"},{"line_number":222,"context_line":"    def inner_decorator(func):"},{"line_number":223,"context_line":"        @functools.wraps(func)"},{"line_number":224,"context_line":"        @mock.patch(\u0027{clz}.get_connector_uids\u0027.format(clz\u003dclz_str),"},{"line_number":225,"context_line":"                    new\u003dget_connector_uids)"},{"line_number":226,"context_line":"        @mock.patch(\u0027{clz}.get_connection_info\u0027.format(clz\u003dclz_str),"},{"line_number":227,"context_line":"                    new\u003dget_connection_info)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da4df55a_2e4d876c","line":224,"updated":"2016-12-23 20:18:46.000000000","message":"Use %s formatting style.","commit_id":"93b5cb580c23fdf2735c2d7155c062c0821b6b66"},{"author":{"_account_id":18742,"name":"Ryan Liang","email":"ryan.liang@emc.com","username":"RyanLiang"},"change_message_id":"6ce994eb5f21f5c7de1e9916d75ad8f438c273ca","unresolved":false,"context_lines":[{"line_number":221,"context_line":"def patch_for_concrete_adapter(clz_str):"},{"line_number":222,"context_line":"    def inner_decorator(func):"},{"line_number":223,"context_line":"        @functools.wraps(func)"},{"line_number":224,"context_line":"        @mock.patch(\u0027{clz}.get_connector_uids\u0027.format(clz\u003dclz_str),"},{"line_number":225,"context_line":"                    new\u003dget_connector_uids)"},{"line_number":226,"context_line":"        @mock.patch(\u0027{clz}.get_connection_info\u0027.format(clz\u003dclz_str),"},{"line_number":227,"context_line":"                    new\u003dget_connection_info)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da4df55a_4ff8db49","line":224,"in_reply_to":"da4df55a_2e4d876c","updated":"2016-12-27 03:09:57.000000000","message":"Done","commit_id":"93b5cb580c23fdf2735c2d7155c062c0821b6b66"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"70526afac8eee05876a67a7ce623cf94cdecfb3f","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        @functools.wraps(func)"},{"line_number":224,"context_line":"        @mock.patch(\u0027{clz}.get_connector_uids\u0027.format(clz\u003dclz_str),"},{"line_number":225,"context_line":"                    new\u003dget_connector_uids)"},{"line_number":226,"context_line":"        @mock.patch(\u0027{clz}.get_connection_info\u0027.format(clz\u003dclz_str),"},{"line_number":227,"context_line":"                    new\u003dget_connection_info)"},{"line_number":228,"context_line":"        def func_wrapper(*args, **kwargs):"},{"line_number":229,"context_line":"            return func(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da4df55a_4e480b5c","line":226,"updated":"2016-12-23 20:18:46.000000000","message":"Use %s","commit_id":"93b5cb580c23fdf2735c2d7155c062c0821b6b66"},{"author":{"_account_id":18742,"name":"Ryan Liang","email":"ryan.liang@emc.com","username":"RyanLiang"},"change_message_id":"6ce994eb5f21f5c7de1e9916d75ad8f438c273ca","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        @functools.wraps(func)"},{"line_number":224,"context_line":"        @mock.patch(\u0027{clz}.get_connector_uids\u0027.format(clz\u003dclz_str),"},{"line_number":225,"context_line":"                    new\u003dget_connector_uids)"},{"line_number":226,"context_line":"        @mock.patch(\u0027{clz}.get_connection_info\u0027.format(clz\u003dclz_str),"},{"line_number":227,"context_line":"                    new\u003dget_connection_info)"},{"line_number":228,"context_line":"        def func_wrapper(*args, **kwargs):"},{"line_number":229,"context_line":"            return func(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da4df55a_6f975fec","line":226,"in_reply_to":"da4df55a_4e480b5c","updated":"2016-12-27 03:09:57.000000000","message":"Done","commit_id":"93b5cb580c23fdf2735c2d7155c062c0821b6b66"}],"cinder/tests/unit/volume/drivers/dell_emc/unity/test_driver.py":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"24adb3982bd70fc07cf60d83535357a900da324c","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        snapshot \u003d self.driver.create_export_snapshot(self.get_context(),"},{"line_number":250,"context_line":"                                                      self.get_snapshot(),"},{"line_number":251,"context_line":"                                                      self.get_connector())"},{"line_number":252,"context_line":"        self.assertTrue(snapshot.exists)"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def test_remove_export_snapshot(self):"},{"line_number":255,"context_line":"        snapshot \u003d self.get_snapshot()"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_29251a08","line":252,"updated":"2017-01-06 14:07:26.000000000","message":"I\u0027m not sure that this test is really useful, but I won\u0027t -1 on it. Let\u0027s get more feedback","commit_id":"a00866b05aae6e84f7e27fc072fccaab1cf1feb4"},{"author":{"_account_id":18742,"name":"Ryan Liang","email":"ryan.liang@emc.com","username":"RyanLiang"},"change_message_id":"7698ac9fe2ef63dab80b6cadccbd9d80fc06b315","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        snapshot \u003d self.driver.create_export_snapshot(self.get_context(),"},{"line_number":250,"context_line":"                                                      self.get_snapshot(),"},{"line_number":251,"context_line":"                                                      self.get_connector())"},{"line_number":252,"context_line":"        self.assertTrue(snapshot.exists)"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def test_remove_export_snapshot(self):"},{"line_number":255,"context_line":"        snapshot \u003d self.get_snapshot()"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_4da16093","line":252,"in_reply_to":"ba5201f7_29251a08","updated":"2017-01-09 02:36:51.000000000","message":"We mocked the actual snapshot creation and deletion in L57 and L62. So we need to verify the `driver.create_export_snapshot` invoking the mocked snapshot creation indeed.","commit_id":"a00866b05aae6e84f7e27fc072fccaab1cf1feb4"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"24adb3982bd70fc07cf60d83535357a900da324c","unresolved":false,"context_lines":[{"line_number":254,"context_line":"    def test_remove_export_snapshot(self):"},{"line_number":255,"context_line":"        snapshot \u003d self.get_snapshot()"},{"line_number":256,"context_line":"        self.driver.remove_export_snapshot(self.get_context(), snapshot)"},{"line_number":257,"context_line":"        self.assertFalse(snapshot.exists)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    def test_initialize_connection_snapshot(self):"},{"line_number":260,"context_line":"        snapshot \u003d self.get_snapshot()"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_092a16db","line":257,"updated":"2017-01-06 14:07:26.000000000","message":"I\u0027m not sure that this test is really useful, but I won\u0027t -1 on it. Let\u0027s get more feedback","commit_id":"a00866b05aae6e84f7e27fc072fccaab1cf1feb4"},{"author":{"_account_id":18742,"name":"Ryan Liang","email":"ryan.liang@emc.com","username":"RyanLiang"},"change_message_id":"7698ac9fe2ef63dab80b6cadccbd9d80fc06b315","unresolved":false,"context_lines":[{"line_number":254,"context_line":"    def test_remove_export_snapshot(self):"},{"line_number":255,"context_line":"        snapshot \u003d self.get_snapshot()"},{"line_number":256,"context_line":"        self.driver.remove_export_snapshot(self.get_context(), snapshot)"},{"line_number":257,"context_line":"        self.assertFalse(snapshot.exists)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    def test_initialize_connection_snapshot(self):"},{"line_number":260,"context_line":"        snapshot \u003d self.get_snapshot()"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_adb80cc9","line":257,"in_reply_to":"ba5201f7_092a16db","updated":"2017-01-09 02:36:51.000000000","message":"Ditto.","commit_id":"a00866b05aae6e84f7e27fc072fccaab1cf1feb4"}],"cinder/volume/drivers/dell_emc/unity/adapter.py":[{"author":{"_account_id":14865,"name":"Adriano Freires Rosso","email":"adriano.rosso@fit-tecnologia.org.br","username":"adriano_rosso"},"change_message_id":"ae6ed4fe382d49c8a1c91355b8155b64010ac0a9","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                        \u0027provider_id\u0027: lun.get_id()}"},{"line_number":134,"context_line":"        # Update `volume` explicitly due to its `provider_location`, for"},{"line_number":135,"context_line":"        # example, will be used later like in `_create_volume_from_snap`."},{"line_number":136,"context_line":"        volume.update(model_update)"},{"line_number":137,"context_line":"        return model_update"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def delete_volume(self, volume):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_186b4ef2","line":136,"range":{"start_line":136,"start_character":8,"end_line":136,"end_character":35},"updated":"2016-12-15 19:17:38.000000000","message":"I think you just need to return the model update and the update will be done by the manager.","commit_id":"7b1ff66d525747a992438021104bd03e82130d04"},{"author":{"_account_id":18742,"name":"Ryan Liang","email":"ryan.liang@emc.com","username":"RyanLiang"},"change_message_id":"6d7b45587a173966fd42cd80a7e19c3b1dc5f810","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                        \u0027provider_id\u0027: lun.get_id()}"},{"line_number":134,"context_line":"        # Update `volume` explicitly due to its `provider_location`, for"},{"line_number":135,"context_line":"        # example, will be used later like in `_create_volume_from_snap`."},{"line_number":136,"context_line":"        volume.update(model_update)"},{"line_number":137,"context_line":"        return model_update"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def delete_volume(self, volume):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_654d7299","line":136,"range":{"start_line":136,"start_character":8,"end_line":136,"end_character":35},"in_reply_to":"1a6eadb0_186b4ef2","updated":"2016-12-16 02:05:09.000000000","message":"Yes, we do return the model_update, and the manager will update it.\n\nThe main reason we put volume.update here is that:\n1. For performance consideration, Unity driver leverages the volume provider_location and provider_id to get the LUN on Unity backend array quickly.\n2. In some case, for example the volume is created by cloning, the provider_location could be the same as the source volume.\n3. Look into line 380, although we invoke create_volume to create a new LUN on backend, we still get the source LUN due to the wrong provider_location. To avoid more bugs(hard to triage), we decide update volume after each create_volume.","commit_id":"7b1ff66d525747a992438021104bd03e82130d04"},{"author":{"_account_id":14865,"name":"Adriano Freires Rosso","email":"adriano.rosso@fit-tecnologia.org.br","username":"adriano_rosso"},"change_message_id":"d671c79cffcd5f90dcc49e4f2c5cde0383fbf5ef","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                        \u0027provider_id\u0027: lun.get_id()}"},{"line_number":134,"context_line":"        # Update `volume` explicitly due to its `provider_location`, for"},{"line_number":135,"context_line":"        # example, will be used later like in `_create_volume_from_snap`."},{"line_number":136,"context_line":"        volume.update(model_update)"},{"line_number":137,"context_line":"        return model_update"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def delete_volume(self, volume):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_9fad649d","line":136,"range":{"start_line":136,"start_character":8,"end_line":136,"end_character":35},"in_reply_to":"1a6eadb0_654d7299","updated":"2016-12-16 12:05:22.000000000","message":"You mean that if you let just the manager do the update, when you try to get the provider_location on L381, the update may not have happened yet and you get the wrong provider_location. Did I get it right?","commit_id":"7b1ff66d525747a992438021104bd03e82130d04"},{"author":{"_account_id":18742,"name":"Ryan Liang","email":"ryan.liang@emc.com","username":"RyanLiang"},"change_message_id":"bcd0e956575aa7476e53df40e1ba88dfbe513ed2","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                        \u0027provider_id\u0027: lun.get_id()}"},{"line_number":134,"context_line":"        # Update `volume` explicitly due to its `provider_location`, for"},{"line_number":135,"context_line":"        # example, will be used later like in `_create_volume_from_snap`."},{"line_number":136,"context_line":"        volume.update(model_update)"},{"line_number":137,"context_line":"        return model_update"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def delete_volume(self, volume):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_e67ce3ed","line":136,"range":{"start_line":136,"start_character":8,"end_line":136,"end_character":35},"in_reply_to":"1a6eadb0_9fad649d","updated":"2016-12-19 02:51:25.000000000","message":"Right.","commit_id":"7b1ff66d525747a992438021104bd03e82130d04"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"75c042f584fd6c80097dbefe39b75688731db288","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                        \u0027provider_id\u0027: lun.get_id()}"},{"line_number":134,"context_line":"        # Update `volume` explicitly due to its `provider_location`, for"},{"line_number":135,"context_line":"        # example, will be used later like in `_create_volume_from_snap`."},{"line_number":136,"context_line":"        volume.update(model_update)"},{"line_number":137,"context_line":"        return model_update"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def delete_volume(self, volume):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_597b9a7b","line":136,"updated":"2016-12-19 15:12:11.000000000","message":"Driver should not be updating database directly.  When you return model_update, the db should be updated by the manager.","commit_id":"8c03c99c12c21fa1e4d3d80a1abf104325511068"},{"author":{"_account_id":18742,"name":"Ryan Liang","email":"ryan.liang@emc.com","username":"RyanLiang"},"change_message_id":"dcf41c99a7954ea869d47903d27332ecd97add39","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                        \u0027provider_id\u0027: lun.get_id()}"},{"line_number":134,"context_line":"        # Update `volume` explicitly due to its `provider_location`, for"},{"line_number":135,"context_line":"        # example, will be used later like in `_create_volume_from_snap`."},{"line_number":136,"context_line":"        volume.update(model_update)"},{"line_number":137,"context_line":"        return model_update"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def delete_volume(self, volume):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_830d6e40","line":136,"in_reply_to":"1a6eadb0_251cacc0","updated":"2016-12-21 03:30:09.000000000","message":"Actually, it will not update the db by only invoking volume.update(). volume.save() is needed to write to db. volume.update() is equivalent to \"volume[\u0027provider_location\u0027] \u003d model_update[\u0027provider_location\u0027]\". I just move the logic from L368. This way when we add \u0027provider_id\u0027 to model_update, we don\u0027t need to append \"volume[\u0027provider_id\u0027]\u003dmodel_update[\u0027provider_id\u0027]\" to every line in driver where create_volume is called.","commit_id":"8c03c99c12c21fa1e4d3d80a1abf104325511068"},{"author":{"_account_id":18742,"name":"Ryan Liang","email":"ryan.liang@emc.com","username":"RyanLiang"},"change_message_id":"87ee5bee31d917c8372175a8b231e04eebbb889c","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                        \u0027provider_id\u0027: lun.get_id()}"},{"line_number":134,"context_line":"        # Update `volume` explicitly due to its `provider_location`, for"},{"line_number":135,"context_line":"        # example, will be used later like in `_create_volume_from_snap`."},{"line_number":136,"context_line":"        volume.update(model_update)"},{"line_number":137,"context_line":"        return model_update"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def delete_volume(self, volume):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_ea046fc7","line":136,"in_reply_to":"1a6eadb0_597b9a7b","updated":"2016-12-20 06:29:04.000000000","message":"We do return model_update to let the manager to update. Besides, we need to invoke create_volume in our driver codes (see L380 of this file). In that case, the manager haven\u0027t update the Volume before we use it later in L382.","commit_id":"8c03c99c12c21fa1e4d3d80a1abf104325511068"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"91d2f70f4d43195fc430ee6046f6b80ed071369b","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                        \u0027provider_id\u0027: lun.get_id()}"},{"line_number":134,"context_line":"        # Update `volume` explicitly due to its `provider_location`, for"},{"line_number":135,"context_line":"        # example, will be used later like in `_create_volume_from_snap`."},{"line_number":136,"context_line":"        volume.update(model_update)"},{"line_number":137,"context_line":"        return model_update"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def delete_volume(self, volume):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_89a4ada6","line":136,"in_reply_to":"1a6eadb0_830d6e40","updated":"2016-12-21 04:27:34.000000000","message":"You are right.  volume.update() doesn\u0027t write to db.  Removing my -1 now.  Will take another look later.","commit_id":"8c03c99c12c21fa1e4d3d80a1abf104325511068"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"81beab710461648068a456b29004d1267b411ba9","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                        \u0027provider_id\u0027: lun.get_id()}"},{"line_number":134,"context_line":"        # Update `volume` explicitly due to its `provider_location`, for"},{"line_number":135,"context_line":"        # example, will be used later like in `_create_volume_from_snap`."},{"line_number":136,"context_line":"        volume.update(model_update)"},{"line_number":137,"context_line":"        return model_update"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def delete_volume(self, volume):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_251cacc0","line":136,"in_reply_to":"1a6eadb0_ea046fc7","updated":"2016-12-20 20:12:24.000000000","message":"See my comments below.  You should be able to get the data without updating db.  Driver should not write to the db.","commit_id":"8c03c99c12c21fa1e4d3d80a1abf104325511068"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"0de6e2288b5b57c420a7cd9f32d69bcbb88cdd94","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    @cinder_utils.trace"},{"line_number":175,"context_line":"    def terminate_connection(self, volume, connector):"},{"line_number":176,"context_line":"        lun \u003d self.client.get_lun(lun_id\u003dself.get_lun_id(volume))"},{"line_number":177,"context_line":"        return self._terminate_connection(lun, connector)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def get_connector_uids(self, connector):"},{"line_number":180,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_11b9002f","line":177,"range":{"start_line":177,"start_character":8,"end_line":177,"end_character":14},"updated":"2016-12-19 13:51:07.000000000","message":"Do we need this return? _terminate_connection doesn\u0027t return anything.","commit_id":"8c03c99c12c21fa1e4d3d80a1abf104325511068"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"75c042f584fd6c80097dbefe39b75688731db288","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    @cinder_utils.trace"},{"line_number":175,"context_line":"    def terminate_connection(self, volume, connector):"},{"line_number":176,"context_line":"        lun \u003d self.client.get_lun(lun_id\u003dself.get_lun_id(volume))"},{"line_number":177,"context_line":"        return self._terminate_connection(lun, connector)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def get_connector_uids(self, connector):"},{"line_number":180,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_19d20235","line":177,"range":{"start_line":177,"start_character":8,"end_line":177,"end_character":14},"in_reply_to":"1a6eadb0_11b9002f","updated":"2016-12-19 15:12:11.000000000","message":"Good question.  Why doesn\u0027t _terminate_connection return anything?","commit_id":"8c03c99c12c21fa1e4d3d80a1abf104325511068"},{"author":{"_account_id":18742,"name":"Ryan Liang","email":"ryan.liang@emc.com","username":"RyanLiang"},"change_message_id":"87ee5bee31d917c8372175a8b231e04eebbb889c","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    @cinder_utils.trace"},{"line_number":175,"context_line":"    def terminate_connection(self, volume, connector):"},{"line_number":176,"context_line":"        lun \u003d self.client.get_lun(lun_id\u003dself.get_lun_id(volume))"},{"line_number":177,"context_line":"        return self._terminate_connection(lun, connector)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def get_connector_uids(self, connector):"},{"line_number":180,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_eaed4f8f","line":177,"range":{"start_line":177,"start_character":8,"end_line":177,"end_character":14},"in_reply_to":"1a6eadb0_19d20235","updated":"2016-12-20 06:29:04.000000000","message":"Good catch. We have two Adapters here, one for ISCSI, the other for FC. For ISCSI, _terminate_connection returns None (in python, no return means to return None). For FC, some zone info is returned (L539). So in the caller - terminate_connection (L177), \u0027return\u0027 is added to handle both cases.","commit_id":"8c03c99c12c21fa1e4d3d80a1abf104325511068"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"75c042f584fd6c80097dbefe39b75688731db288","unresolved":false,"context_lines":[{"line_number":246,"context_line":"            # In some cases, cinder will not update volume info in DB with"},{"line_number":247,"context_line":"            # provider_location returned by us. We need to retrieve the id"},{"line_number":248,"context_line":"            # from array. For example, cinder backup-create doesn\u0027t use the"},{"line_number":249,"context_line":"            # provider_location returned from create_cloned_volume."},{"line_number":250,"context_line":"            lun \u003d self.client.get_lun(name\u003dvolume.name)"},{"line_number":251,"context_line":"            return lun.get_id() if lun is not None else None"},{"line_number":252,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_d9024ab4","line":249,"updated":"2016-12-19 15:12:11.000000000","message":"Are you sure this is still a problem?  I thought it is fixed.","commit_id":"8c03c99c12c21fa1e4d3d80a1abf104325511068"},{"author":{"_account_id":18742,"name":"Ryan Liang","email":"ryan.liang@emc.com","username":"RyanLiang"},"change_message_id":"87ee5bee31d917c8372175a8b231e04eebbb889c","unresolved":false,"context_lines":[{"line_number":246,"context_line":"            # In some cases, cinder will not update volume info in DB with"},{"line_number":247,"context_line":"            # provider_location returned by us. We need to retrieve the id"},{"line_number":248,"context_line":"            # from array. For example, cinder backup-create doesn\u0027t use the"},{"line_number":249,"context_line":"            # provider_location returned from create_cloned_volume."},{"line_number":250,"context_line":"            lun \u003d self.client.get_lun(name\u003dvolume.name)"},{"line_number":251,"context_line":"            return lun.get_id() if lun is not None else None"},{"line_number":252,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_d54914b9","line":249,"in_reply_to":"1a6eadb0_d9024ab4","updated":"2016-12-20 06:29:04.000000000","message":"Yes, it is fixed already. I will remove the comments. But leave the implementation there.","commit_id":"8c03c99c12c21fa1e4d3d80a1abf104325511068"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"81beab710461648068a456b29004d1267b411ba9","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        \"\"\""},{"line_number":380,"context_line":"        model_update \u003d self.create_volume(volume)"},{"line_number":381,"context_line":"        src_id \u003d snap.get_id()"},{"line_number":382,"context_line":"        dest_lun \u003d self.client.get_lun(lun_id\u003dself.get_lun_id(volume))"},{"line_number":383,"context_line":"        try:"},{"line_number":384,"context_line":"            conn_props \u003d cinder_utils.brick_get_connector_properties()"},{"line_number":385,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_e521d4fd","line":382,"updated":"2016-12-20 20:12:24.000000000","message":"In this case, why don\u0027t you keep line 367 from the left hand side.  This is all happening locally.  I don\u0027t see why you have to update the database.","commit_id":"8c03c99c12c21fa1e4d3d80a1abf104325511068"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"70526afac8eee05876a67a7ce623cf94cdecfb3f","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        data from the Unity snapshot to the `volume`."},{"line_number":365,"context_line":"        \"\"\""},{"line_number":366,"context_line":"        model_update \u003d self.create_volume(volume)"},{"line_number":367,"context_line":"        volume.provider_location \u003d model_update[\u0027provider_location\u0027]"},{"line_number":368,"context_line":"        src_id \u003d snap.get_id()"},{"line_number":369,"context_line":"        dest_lun \u003d self.client.get_lun(lun_id\u003dself.get_lun_id(volume))"},{"line_number":370,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"da4df55a_4b2c7dab","side":"PARENT","line":367,"updated":"2016-12-23 20:18:46.000000000","message":"Keep this line.  Although this also modifies the object, I understand this is necessary and it is used immediately.  This is more explicit.","commit_id":"7880246ca195d8dd74d40e25a2728a9db131dd64"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"bd2293554fb1ea7ca671a698e2493948b862eb1e","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                        \u0027provider_id\u0027: lun.get_id()}"},{"line_number":134,"context_line":"        # Update `volume` explicitly due to its `provider_location`, for"},{"line_number":135,"context_line":"        # example, will be used later like in `_create_volume_from_snap`."},{"line_number":136,"context_line":"        volume.update(model_update)"},{"line_number":137,"context_line":"        return model_update"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def delete_volume(self, volume):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_657ce4eb","line":136,"updated":"2016-12-20 20:12:37.000000000","message":"See my comments in patch set 3.  Driver should not write to db directly.","commit_id":"93b5cb580c23fdf2735c2d7155c062c0821b6b66"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"70526afac8eee05876a67a7ce623cf94cdecfb3f","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                        \u0027provider_id\u0027: lun.get_id()}"},{"line_number":134,"context_line":"        # Update `volume` explicitly due to its `provider_location`, for"},{"line_number":135,"context_line":"        # example, will be used later like in `_create_volume_from_snap`."},{"line_number":136,"context_line":"        volume.update(model_update)"},{"line_number":137,"context_line":"        return model_update"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def delete_volume(self, volume):"}],"source_content_type":"text/x-python","patch_set":4,"id":"da4df55a_2b31f905","line":136,"in_reply_to":"1a6eadb0_0905fd78","updated":"2016-12-23 20:18:46.000000000","message":"I still think the original approach is better.  Driver should not modify the object passed in.  Usually driver creates a dictionary with any changes and return to the caller.","commit_id":"93b5cb580c23fdf2735c2d7155c062c0821b6b66"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"85ced81d8475e205fd0e778a92d0d0205fdf69e9","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                        \u0027provider_id\u0027: lun.get_id()}"},{"line_number":134,"context_line":"        # Update `volume` explicitly due to its `provider_location`, for"},{"line_number":135,"context_line":"        # example, will be used later like in `_create_volume_from_snap`."},{"line_number":136,"context_line":"        volume.update(model_update)"},{"line_number":137,"context_line":"        return model_update"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def delete_volume(self, volume):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_0905fd78","line":136,"in_reply_to":"1a6eadb0_657ce4eb","updated":"2016-12-21 04:29:15.000000000","message":"Ignore this comment.  volume.update doesn\u0027t write to db.","commit_id":"93b5cb580c23fdf2735c2d7155c062c0821b6b66"},{"author":{"_account_id":18742,"name":"Ryan Liang","email":"ryan.liang@emc.com","username":"RyanLiang"},"change_message_id":"6ce994eb5f21f5c7de1e9916d75ad8f438c273ca","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                        \u0027provider_id\u0027: lun.get_id()}"},{"line_number":134,"context_line":"        # Update `volume` explicitly due to its `provider_location`, for"},{"line_number":135,"context_line":"        # example, will be used later like in `_create_volume_from_snap`."},{"line_number":136,"context_line":"        volume.update(model_update)"},{"line_number":137,"context_line":"        return model_update"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def delete_volume(self, volume):"}],"source_content_type":"text/x-python","patch_set":4,"id":"da4df55a_8f6ac3ec","line":136,"in_reply_to":"da4df55a_2b31f905","updated":"2016-12-27 03:09:57.000000000","message":"Actually, we just consider this case:\n1. Every time we add a new property to update, like \u0027provider_id\u0027 for this time.\n2. We need to find out every line in our driver where the property need to be update explicitly. For example after L367, we need add volume.provider_id \u003d model_update[\u0027provider_id\u0027].\n3. Adding volume.update in create_volume could avoid the bunch of modification in our driver upon future changes.","commit_id":"93b5cb580c23fdf2735c2d7155c062c0821b6b66"}],"releasenotes/notes/unity-backup-via-snapshot-81a2d5a118c97042.yaml":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"70526afac8eee05876a67a7ce623cf94cdecfb3f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Support to backup volume using snapshot in the Unity driver."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"da4df55a_4e5f2b0e","line":3,"updated":"2016-12-23 20:18:46.000000000","message":"Add support","commit_id":"93b5cb580c23fdf2735c2d7155c062c0821b6b66"},{"author":{"_account_id":18742,"name":"Ryan Liang","email":"ryan.liang@emc.com","username":"RyanLiang"},"change_message_id":"6ce994eb5f21f5c7de1e9916d75ad8f438c273ca","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Support to backup volume using snapshot in the Unity driver."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"da4df55a_ef60af03","line":3,"in_reply_to":"da4df55a_4e5f2b0e","updated":"2016-12-27 03:09:57.000000000","message":"Done","commit_id":"93b5cb580c23fdf2735c2d7155c062c0821b6b66"}]}
