)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"e78bec331c8677db6fe5d5c935daf073e52634cd","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Mohammad Banikazemi \u003cmb@us.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-08-17 15:04:22 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Move postcommit ops out of transaction for bulk"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently, the bulk create operations in ML2 are executed in"},{"line_number":10,"context_line":"a transaction. This means all precommit and postcommit operations"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"1abeadc6_d02b0193","line":7,"updated":"2014-08-28 15:29:30.000000000","message":"Indicate in summary that only addressing network ops.","commit_id":"b55f44aaef00227f560a890e7d8f3dcbb771c020"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"03271b757ff6ff48700cc672b7562c260cec49c2","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Mohammad Banikazemi \u003cmb@us.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-08-17 15:04:22 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Move postcommit ops out of transaction for bulk"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently, the bulk create operations in ML2 are executed in"},{"line_number":10,"context_line":"a transaction. This means all precommit and postcommit operations"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"fa98f980_b221c0fe","line":7,"in_reply_to":"1abeadc6_d02b0193","updated":"2014-09-06 14:15:50.000000000","message":"Done","commit_id":"b55f44aaef00227f560a890e7d8f3dcbb771c020"}],"neutron/plugins/ml2/managers.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"cc155b0dc69d59e15d32c391748b768af7b73ccd","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            LOG.info(_LI(\"Initializing mechanism driver \u0027%s\u0027\"), driver.name)"},{"line_number":274,"context_line":"            driver.obj.initialize()"},{"line_number":275,"context_line":"            self.native_bulk_support \u0026\u003d getattr(driver.obj,"},{"line_number":276,"context_line":"                                                \u0027native_bulk_support\u0027, True)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    def _call_on_drivers(self, method_name, context,"},{"line_number":279,"context_line":"                         continue_on_failure\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a961159_e6bbffc1","side":"PARENT","line":276,"updated":"2015-01-05 23:53:57.000000000","message":"is there any mech driver which supports bulk ops? If yes, are those drivers going to be affected by this change?","commit_id":"5de1d2ed67e00a010f23c5f9055556745a55957a"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"46371609571454f1584d3904c23cfd484a533b8a","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            LOG.info(_LI(\"Initializing mechanism driver \u0027%s\u0027\"), driver.name)"},{"line_number":274,"context_line":"            driver.obj.initialize()"},{"line_number":275,"context_line":"            self.native_bulk_support \u0026\u003d getattr(driver.obj,"},{"line_number":276,"context_line":"                                                \u0027native_bulk_support\u0027, True)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    def _call_on_drivers(self, method_name, context,"},{"line_number":279,"context_line":"                         continue_on_failure\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a961159_faf45588","side":"PARENT","line":276,"in_reply_to":"3a961159_e6bbffc1","updated":"2015-01-06 19:54:33.000000000","message":"No. This is a good question to ask though. That is, to ask how a mechanism driver can natively support bulk operations within the ml2 mainframe and what that exactly means. That is perhaps something to address in a separate spec?\n\n (The Arista backend supports some bulk operations and the Arista driver uses those but that is different from supporting Neutron bulk creates for network/subnet/port.)","commit_id":"5de1d2ed67e00a010f23c5f9055556745a55957a"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"0daed64f0ff04f8758d69f170044526ada6e2ad5","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            LOG.info(_LI(\"Initializing mechanism driver \u0027%s\u0027\"), driver.name)"},{"line_number":274,"context_line":"            driver.obj.initialize()"},{"line_number":275,"context_line":"            self.native_bulk_support \u0026\u003d getattr(driver.obj,"},{"line_number":276,"context_line":"                                                \u0027native_bulk_support\u0027, True)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    def _call_on_drivers(self, method_name, context,"},{"line_number":279,"context_line":"                         continue_on_failure\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a961159_ea6f8bf8","side":"PARENT","line":276,"in_reply_to":"3a961159_faf45588","updated":"2015-01-13 01:18:33.000000000","message":"We don\u0027t need to address this question here. If there was some driver supporting native bulk ops then we had to take action. In this case we can think about a solution later.","commit_id":"5de1d2ed67e00a010f23c5f9055556745a55957a"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":8767,"name":"Nikolay Fedotov","email":"nfedotov@cisco.com","username":"nfedotov"},"change_message_id":"93b1b54aab4b7032c2f7b3e1cb88a7731c3aedaa","unresolved":false,"context_lines":[{"line_number":516,"context_line":"        context.session.begin(subtransactions\u003dTrue)"},{"line_number":517,"context_line":"        try:"},{"line_number":518,"context_line":"            for item in items:"},{"line_number":519,"context_line":"                obj_creator \u003d getattr(self, \u0027create_%s_db\u0027 % resource)"},{"line_number":520,"context_line":"                result, mech_context \u003d obj_creator(context, item)"},{"line_number":521,"context_line":"                objects.append({\u0027mech_context\u0027: mech_context,"},{"line_number":522,"context_line":"                                \u0027result\u0027: result})"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ab29df4_e0c7f862","line":519,"updated":"2014-08-13 19:56:56.000000000","message":"It looks like there should be underscore in the beginning of \u0027create_%s_db\u0027. So that it can match method name: _create_network_db","commit_id":"49eb85d6c10033ef741fbf29befd70609da1b81e"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"1c6a9847599759204fc62f5b6ef4ef53b9a62e92","unresolved":false,"context_lines":[{"line_number":516,"context_line":"        context.session.begin(subtransactions\u003dTrue)"},{"line_number":517,"context_line":"        try:"},{"line_number":518,"context_line":"            for item in items:"},{"line_number":519,"context_line":"                obj_creator \u003d getattr(self, \u0027create_%s_db\u0027 % resource)"},{"line_number":520,"context_line":"                result, mech_context \u003d obj_creator(context, item)"},{"line_number":521,"context_line":"                objects.append({\u0027mech_context\u0027: mech_context,"},{"line_number":522,"context_line":"                                \u0027result\u0027: result})"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ac7a964_5deecc23","line":519,"in_reply_to":"9ab29df4_e0c7f862","updated":"2014-08-14 01:24:19.000000000","message":"Yes indeed. Changed in last minute. Will fix.","commit_id":"49eb85d6c10033ef741fbf29befd70609da1b81e"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"f990c91443212dd7d87e5922a6b5dce985703554","unresolved":false,"context_lines":[{"line_number":522,"context_line":"                                \u0027result\u0027: result})"},{"line_number":523,"context_line":"            context.session.commit()"},{"line_number":524,"context_line":"        except Exception:"},{"line_number":525,"context_line":"            context.session.rollback()"},{"line_number":526,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":527,"context_line":"                LOG.error(_(\"An exception occurred while creating \""},{"line_number":528,"context_line":"                            \"the %(resource)s:%(item)s\"),"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ac7a964_3cf3d974","line":525,"updated":"2014-08-13 22:36:39.000000000","message":"this should be inside save_and_reraise_exception block.","commit_id":"49eb85d6c10033ef741fbf29befd70609da1b81e"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"1c6a9847599759204fc62f5b6ef4ef53b9a62e92","unresolved":false,"context_lines":[{"line_number":522,"context_line":"                                \u0027result\u0027: result})"},{"line_number":523,"context_line":"            context.session.commit()"},{"line_number":524,"context_line":"        except Exception:"},{"line_number":525,"context_line":"            context.session.rollback()"},{"line_number":526,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":527,"context_line":"                LOG.error(_(\"An exception occurred while creating \""},{"line_number":528,"context_line":"                            \"the %(resource)s:%(item)s\"),"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ac7a964_9db944ec","line":525,"in_reply_to":"7ac7a964_3cf3d974","updated":"2014-08-14 01:24:19.000000000","message":"Why is that? Have a look at _create_bulk in db/db_base_plugin_v2.py.","commit_id":"49eb85d6c10033ef741fbf29befd70609da1b81e"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"744e5927d81141b46dca9966a46a52708d28ceb2","unresolved":false,"context_lines":[{"line_number":522,"context_line":"                                \u0027result\u0027: result})"},{"line_number":523,"context_line":"            context.session.commit()"},{"line_number":524,"context_line":"        except Exception:"},{"line_number":525,"context_line":"            context.session.rollback()"},{"line_number":526,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":527,"context_line":"                LOG.error(_(\"An exception occurred while creating \""},{"line_number":528,"context_line":"                            \"the %(resource)s:%(item)s\"),"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ac7a964_21e8d00f","line":525,"in_reply_to":"7ac7a964_9db944ec","updated":"2014-08-15 05:54:43.000000000","message":"i suppose rollback() can sleep.\naccording to the comment in save_and_reraise_exception,\nsuch a call needs to be inside.","commit_id":"49eb85d6c10033ef741fbf29befd70609da1b81e"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"f990c91443212dd7d87e5922a6b5dce985703554","unresolved":false,"context_lines":[{"line_number":531,"context_line":"        results \u003d []"},{"line_number":532,"context_line":"        try:"},{"line_number":533,"context_line":"            for obj in objects:"},{"line_number":534,"context_line":"                self.mechanism_manager.create_network_postcommit("},{"line_number":535,"context_line":"                    obj[\u0027mech_context\u0027])"},{"line_number":536,"context_line":"                results.append(obj[\u0027result\u0027])"},{"line_number":537,"context_line":"        except ml2_exc.MechanismDriverError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ac7a964_dcdae516","line":534,"updated":"2014-08-13 22:36:39.000000000","message":"should this look at resource?","commit_id":"49eb85d6c10033ef741fbf29befd70609da1b81e"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"1c6a9847599759204fc62f5b6ef4ef53b9a62e92","unresolved":false,"context_lines":[{"line_number":531,"context_line":"        results \u003d []"},{"line_number":532,"context_line":"        try:"},{"line_number":533,"context_line":"            for obj in objects:"},{"line_number":534,"context_line":"                self.mechanism_manager.create_network_postcommit("},{"line_number":535,"context_line":"                    obj[\u0027mech_context\u0027])"},{"line_number":536,"context_line":"                results.append(obj[\u0027result\u0027])"},{"line_number":537,"context_line":"        except ml2_exc.MechanismDriverError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ac7a964_3d7910fd","line":534,"in_reply_to":"7ac7a964_dcdae516","updated":"2014-08-14 01:24:19.000000000","message":"Yes, will fix.","commit_id":"49eb85d6c10033ef741fbf29befd70609da1b81e"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"f990c91443212dd7d87e5922a6b5dce985703554","unresolved":false,"context_lines":[{"line_number":539,"context_line":"                LOG.error(_(\"mechanism_manager.create_network_postcommit \""},{"line_number":540,"context_line":"                            \"failed, deleting networks \u0027%s\u0027\"), objects)"},{"line_number":541,"context_line":"                for obj in objects:"},{"line_number":542,"context_line":"                    self.delete_network(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":543,"context_line":"        return results"},{"line_number":544,"context_line":""},{"line_number":545,"context_line":"    def _create_network_db(self, context, network):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ac7a964_5cfed56c","line":542,"updated":"2014-08-13 22:36:39.000000000","message":"ditto","commit_id":"49eb85d6c10033ef741fbf29befd70609da1b81e"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"1c6a9847599759204fc62f5b6ef4ef53b9a62e92","unresolved":false,"context_lines":[{"line_number":539,"context_line":"                LOG.error(_(\"mechanism_manager.create_network_postcommit \""},{"line_number":540,"context_line":"                            \"failed, deleting networks \u0027%s\u0027\"), objects)"},{"line_number":541,"context_line":"                for obj in objects:"},{"line_number":542,"context_line":"                    self.delete_network(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":543,"context_line":"        return results"},{"line_number":544,"context_line":""},{"line_number":545,"context_line":"    def _create_network_db(self, context, network):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ac7a964_7d82a801","line":542,"in_reply_to":"7ac7a964_5cfed56c","updated":"2014-08-14 01:24:19.000000000","message":"Will fix.","commit_id":"49eb85d6c10033ef741fbf29befd70609da1b81e"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"6bc64d6dd9ee1043b9863259c666181789df4ab7","unresolved":false,"context_lines":[{"line_number":522,"context_line":"                                \u0027result\u0027: result})"},{"line_number":523,"context_line":"            context.session.commit()"},{"line_number":524,"context_line":"        except Exception:"},{"line_number":525,"context_line":"            context.session.rollback()"},{"line_number":526,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":527,"context_line":"                LOG.error(_(\"An exception occurred while creating \""},{"line_number":528,"context_line":"                            \"the %(resource)s:%(item)s\"),"}],"source_content_type":"text/x-python","patch_set":7,"id":"7ac7a964_81d44448","line":525,"updated":"2014-08-15 05:55:35.000000000","message":"commented in PS2.","commit_id":"d88d1e34751f22ee81ae82ad22cc093e8d8e2dd7"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"0b64f2c672808be981810969d3a4b9fa35e0298a","unresolved":false,"context_lines":[{"line_number":522,"context_line":"                                \u0027result\u0027: result})"},{"line_number":523,"context_line":"            context.session.commit()"},{"line_number":524,"context_line":"        except Exception:"},{"line_number":525,"context_line":"            context.session.rollback()"},{"line_number":526,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":527,"context_line":"                LOG.error(_(\"An exception occurred while creating \""},{"line_number":528,"context_line":"                            \"the %(resource)s:%(item)s\"),"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_f6ba5e09","line":525,"in_reply_to":"7ac7a964_81d44448","updated":"2014-08-17 05:31:13.000000000","message":"Done","commit_id":"d88d1e34751f22ee81ae82ad22cc093e8d8e2dd7"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"6bc64d6dd9ee1043b9863259c666181789df4ab7","unresolved":false,"context_lines":[{"line_number":537,"context_line":"                results.append(obj[\u0027result\u0027])"},{"line_number":538,"context_line":"        except ml2_exc.MechanismDriverError:"},{"line_number":539,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":540,"context_line":"                LOG.error(_(\"mechanism_manager.create_network_postcommit \""},{"line_number":541,"context_line":"                            \"failed, deleting networks \u0027%s\u0027\"), objects)"},{"line_number":542,"context_line":"                for obj in objects:"},{"line_number":543,"context_line":"                    delete_op \u003d getattr(self, \u0027delete_%s\u0027 % resource)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7ac7a964_01abd4d6","line":540,"range":{"start_line":540,"start_character":47,"end_line":540,"end_character":72},"updated":"2014-08-15 05:55:35.000000000","message":"this message needs a tweak.","commit_id":"d88d1e34751f22ee81ae82ad22cc093e8d8e2dd7"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"0b64f2c672808be981810969d3a4b9fa35e0298a","unresolved":false,"context_lines":[{"line_number":537,"context_line":"                results.append(obj[\u0027result\u0027])"},{"line_number":538,"context_line":"        except ml2_exc.MechanismDriverError:"},{"line_number":539,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":540,"context_line":"                LOG.error(_(\"mechanism_manager.create_network_postcommit \""},{"line_number":541,"context_line":"                            \"failed, deleting networks \u0027%s\u0027\"), objects)"},{"line_number":542,"context_line":"                for obj in objects:"},{"line_number":543,"context_line":"                    delete_op \u003d getattr(self, \u0027delete_%s\u0027 % resource)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_1637dab1","line":540,"in_reply_to":"7ac7a964_01abd4d6","updated":"2014-08-17 05:31:13.000000000","message":"Done","commit_id":"d88d1e34751f22ee81ae82ad22cc093e8d8e2dd7"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"6bc64d6dd9ee1043b9863259c666181789df4ab7","unresolved":false,"context_lines":[{"line_number":541,"context_line":"                            \"failed, deleting networks \u0027%s\u0027\"), objects)"},{"line_number":542,"context_line":"                for obj in objects:"},{"line_number":543,"context_line":"                    delete_op \u003d getattr(self, \u0027delete_%s\u0027 % resource)"},{"line_number":544,"context_line":"                    delete_op(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":545,"context_line":"        return results"},{"line_number":546,"context_line":""},{"line_number":547,"context_line":"    def _create_network_db(self, context, network):"}],"source_content_type":"text/x-python","patch_set":7,"id":"7ac7a964_61eac810","line":544,"updated":"2014-08-15 05:55:35.000000000","message":"i prefer to have a plugin level \"post commit\" method and make it shared by\nbulk and non-bulk variants.","commit_id":"d88d1e34751f22ee81ae82ad22cc093e8d8e2dd7"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"0b64f2c672808be981810969d3a4b9fa35e0298a","unresolved":false,"context_lines":[{"line_number":541,"context_line":"                            \"failed, deleting networks \u0027%s\u0027\"), objects)"},{"line_number":542,"context_line":"                for obj in objects:"},{"line_number":543,"context_line":"                    delete_op \u003d getattr(self, \u0027delete_%s\u0027 % resource)"},{"line_number":544,"context_line":"                    delete_op(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":545,"context_line":"        return results"},{"line_number":546,"context_line":""},{"line_number":547,"context_line":"    def _create_network_db(self, context, network):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_363cd693","line":544,"in_reply_to":"7ac7a964_61eac810","updated":"2014-08-17 05:31:13.000000000","message":"Looks like doing that doesn\u0027t make the code more compact or modular but I will look in to it.","commit_id":"d88d1e34751f22ee81ae82ad22cc093e8d8e2dd7"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"e78bec331c8677db6fe5d5c935daf073e52634cd","unresolved":false,"context_lines":[{"line_number":513,"context_line":"        objects \u003d []"},{"line_number":514,"context_line":"        collection \u003d \"%ss\" % resource"},{"line_number":515,"context_line":"        items \u003d request_items[collection]"},{"line_number":516,"context_line":"        context.session.begin(subtransactions\u003dTrue)"},{"line_number":517,"context_line":"        try:"},{"line_number":518,"context_line":"            for item in items:"},{"line_number":519,"context_line":"                obj_creator \u003d getattr(self, \u0027_create_%s_db\u0027 % resource)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_53a29bfc","line":516,"updated":"2014-08-28 15:29:30.000000000","message":"Shouldn\u0027t this been in a with block?","commit_id":"b55f44aaef00227f560a890e7d8f3dcbb771c020"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"03271b757ff6ff48700cc672b7562c260cec49c2","unresolved":false,"context_lines":[{"line_number":513,"context_line":"        objects \u003d []"},{"line_number":514,"context_line":"        collection \u003d \"%ss\" % resource"},{"line_number":515,"context_line":"        items \u003d request_items[collection]"},{"line_number":516,"context_line":"        context.session.begin(subtransactions\u003dTrue)"},{"line_number":517,"context_line":"        try:"},{"line_number":518,"context_line":"            for item in items:"},{"line_number":519,"context_line":"                obj_creator \u003d getattr(self, \u0027_create_%s_db\u0027 % resource)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa98f980_5234144a","line":516,"in_reply_to":"1abeadc6_53a29bfc","updated":"2014-09-06 14:15:50.000000000","message":"Thanks for pointing this out. We used to use this in earlier code. Not sure if needs change. Will look into it.","commit_id":"b55f44aaef00227f560a890e7d8f3dcbb771c020"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"e78bec331c8677db6fe5d5c935daf073e52634cd","unresolved":false,"context_lines":[{"line_number":524,"context_line":"        except Exception:"},{"line_number":525,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":526,"context_line":"                context.session.rollback()"},{"line_number":527,"context_line":"                LOG.error(_(\"An exception occurred while creating \""},{"line_number":528,"context_line":"                            \"the %(resource)s:%(item)s\"),"},{"line_number":529,"context_line":"                          {\u0027resource\u0027: resource, \u0027item\u0027: item})"},{"line_number":530,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_b3376fe2","line":527,"updated":"2014-08-28 15:29:30.000000000","message":"Use the newer _LE() for error logs i18n.","commit_id":"b55f44aaef00227f560a890e7d8f3dcbb771c020"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"03271b757ff6ff48700cc672b7562c260cec49c2","unresolved":false,"context_lines":[{"line_number":524,"context_line":"        except Exception:"},{"line_number":525,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":526,"context_line":"                context.session.rollback()"},{"line_number":527,"context_line":"                LOG.error(_(\"An exception occurred while creating \""},{"line_number":528,"context_line":"                            \"the %(resource)s:%(item)s\"),"},{"line_number":529,"context_line":"                          {\u0027resource\u0027: resource, \u0027item\u0027: item})"},{"line_number":530,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"fa98f980_72391841","line":527,"in_reply_to":"1abeadc6_b3376fe2","updated":"2014-09-06 14:15:50.000000000","message":"Done","commit_id":"b55f44aaef00227f560a890e7d8f3dcbb771c020"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"e78bec331c8677db6fe5d5c935daf073e52634cd","unresolved":false,"context_lines":[{"line_number":546,"context_line":"                           \u0027resource_ids\u0027: resource_ids})"},{"line_number":547,"context_line":"                for obj in objects:"},{"line_number":548,"context_line":"                    delete_op \u003d getattr(self, \u0027delete_%s\u0027 % resource)"},{"line_number":549,"context_line":"                    delete_op(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":550,"context_line":"        return results"},{"line_number":551,"context_line":""},{"line_number":552,"context_line":"    def _create_network_db(self, context, network):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_b393efa1","line":549,"updated":"2014-08-28 15:29:30.000000000","message":"Are these delete operations guaranteed not to raise an exception?","commit_id":"b55f44aaef00227f560a890e7d8f3dcbb771c020"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"d1ecc6591eed36cb72327cc1c2345f9f3ed8265b","unresolved":false,"context_lines":[{"line_number":546,"context_line":"                           \u0027resource_ids\u0027: resource_ids})"},{"line_number":547,"context_line":"                for obj in objects:"},{"line_number":548,"context_line":"                    delete_op \u003d getattr(self, \u0027delete_%s\u0027 % resource)"},{"line_number":549,"context_line":"                    delete_op(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":550,"context_line":"        return results"},{"line_number":551,"context_line":""},{"line_number":552,"context_line":"    def _create_network_db(self, context, network):"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa98f980_abf117cf","line":549,"updated":"2014-09-01 17:08:11.000000000","message":"Doesn\u0027t delete for networks require similar bulk facility with interleaved bulk precommit , commit and bulk postcommit?","commit_id":"b55f44aaef00227f560a890e7d8f3dcbb771c020"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"03271b757ff6ff48700cc672b7562c260cec49c2","unresolved":false,"context_lines":[{"line_number":546,"context_line":"                           \u0027resource_ids\u0027: resource_ids})"},{"line_number":547,"context_line":"                for obj in objects:"},{"line_number":548,"context_line":"                    delete_op \u003d getattr(self, \u0027delete_%s\u0027 % resource)"},{"line_number":549,"context_line":"                    delete_op(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":550,"context_line":"        return results"},{"line_number":551,"context_line":""},{"line_number":552,"context_line":"    def _create_network_db(self, context, network):"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa98f980_b23aa032","line":549,"in_reply_to":"1abeadc6_b393efa1","updated":"2014-09-06 14:15:50.000000000","message":"Following how we deal with deleting the resource when postcomit throws in create_* ops in this plugin.","commit_id":"b55f44aaef00227f560a890e7d8f3dcbb771c020"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"03271b757ff6ff48700cc672b7562c260cec49c2","unresolved":false,"context_lines":[{"line_number":546,"context_line":"                           \u0027resource_ids\u0027: resource_ids})"},{"line_number":547,"context_line":"                for obj in objects:"},{"line_number":548,"context_line":"                    delete_op \u003d getattr(self, \u0027delete_%s\u0027 % resource)"},{"line_number":549,"context_line":"                    delete_op(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":550,"context_line":"        return results"},{"line_number":551,"context_line":""},{"line_number":552,"context_line":"    def _create_network_db(self, context, network):"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa98f980_1211acaf","line":549,"in_reply_to":"fa98f980_abf117cf","updated":"2014-09-06 14:15:50.000000000","message":"There is no notion of bulk delete. Don\u0027t think we need a similar facility for bulk deletes as we are invoking the deletes one by one and not from within a transaction.","commit_id":"b55f44aaef00227f560a890e7d8f3dcbb771c020"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"1885260d2751d37392812a0bdb036ec39ad822d3","unresolved":false,"context_lines":[{"line_number":486,"context_line":"        objects \u003d []"},{"line_number":487,"context_line":"        collection \u003d \"%ss\" % resource"},{"line_number":488,"context_line":"        items \u003d request_items[collection]"},{"line_number":489,"context_line":"        context.session.begin(subtransactions\u003dTrue)"},{"line_number":490,"context_line":"        try:"},{"line_number":491,"context_line":"            for item in items:"},{"line_number":492,"context_line":"                obj_creator \u003d getattr(self, \u0027_create_%s_db\u0027 % resource)"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa98f980_18946de7","line":489,"updated":"2014-09-06 20:08:55.000000000","message":"How do you ensure the transaction ends?","commit_id":"e961bf887e2900a7c81049395a3d7aa7b3e38146"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"ac40abf2f37b91196a894c70a0236be2154aed4a","unresolved":false,"context_lines":[{"line_number":486,"context_line":"        objects \u003d []"},{"line_number":487,"context_line":"        collection \u003d \"%ss\" % resource"},{"line_number":488,"context_line":"        items \u003d request_items[collection]"},{"line_number":489,"context_line":"        context.session.begin(subtransactions\u003dTrue)"},{"line_number":490,"context_line":"        try:"},{"line_number":491,"context_line":"            for item in items:"},{"line_number":492,"context_line":"                obj_creator \u003d getattr(self, \u0027_create_%s_db\u0027 % resource)"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa98f980_7b2493af","line":489,"in_reply_to":"fa98f980_18946de7","updated":"2014-09-06 20:52:23.000000000","message":"This is how the bulk ops are implemented here: https://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_v2.py#L834\nThe transaction either commits (line 496 below) or rollbacks (line 499).","commit_id":"e961bf887e2900a7c81049395a3d7aa7b3e38146"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"1885260d2751d37392812a0bdb036ec39ad822d3","unresolved":false,"context_lines":[{"line_number":489,"context_line":"        context.session.begin(subtransactions\u003dTrue)"},{"line_number":490,"context_line":"        try:"},{"line_number":491,"context_line":"            for item in items:"},{"line_number":492,"context_line":"                obj_creator \u003d getattr(self, \u0027_create_%s_db\u0027 % resource)"},{"line_number":493,"context_line":"                result, mech_context \u003d obj_creator(context, item)"},{"line_number":494,"context_line":"                objects.append({\u0027mech_context\u0027: mech_context,"},{"line_number":495,"context_line":"                                \u0027result\u0027: result})"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa98f980_78ec9990","line":492,"updated":"2014-09-06 20:08:55.000000000","message":"obj_creator could be defined outside of the loop","commit_id":"e961bf887e2900a7c81049395a3d7aa7b3e38146"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"ac40abf2f37b91196a894c70a0236be2154aed4a","unresolved":false,"context_lines":[{"line_number":489,"context_line":"        context.session.begin(subtransactions\u003dTrue)"},{"line_number":490,"context_line":"        try:"},{"line_number":491,"context_line":"            for item in items:"},{"line_number":492,"context_line":"                obj_creator \u003d getattr(self, \u0027_create_%s_db\u0027 % resource)"},{"line_number":493,"context_line":"                result, mech_context \u003d obj_creator(context, item)"},{"line_number":494,"context_line":"                objects.append({\u0027mech_context\u0027: mech_context,"},{"line_number":495,"context_line":"                                \u0027result\u0027: result})"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa98f980_9b3857d6","line":492,"in_reply_to":"fa98f980_78ec9990","updated":"2014-09-06 20:52:23.000000000","message":"Done","commit_id":"e961bf887e2900a7c81049395a3d7aa7b3e38146"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"1885260d2751d37392812a0bdb036ec39ad822d3","unresolved":false,"context_lines":[{"line_number":503,"context_line":""},{"line_number":504,"context_line":"        try:"},{"line_number":505,"context_line":"            for obj in objects:"},{"line_number":506,"context_line":"                postcommit_op \u003d getattr(self.mechanism_manager,"},{"line_number":507,"context_line":"                                        \u0027create_%s_postcommit\u0027 % resource)"},{"line_number":508,"context_line":"                postcommit_op(obj[\u0027mech_context\u0027])"},{"line_number":509,"context_line":"        except ml2_exc.MechanismDriverError:"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa98f980_58e7d5ac","line":506,"updated":"2014-09-06 20:08:55.000000000","message":"itto for postcommit_op","commit_id":"e961bf887e2900a7c81049395a3d7aa7b3e38146"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"ac40abf2f37b91196a894c70a0236be2154aed4a","unresolved":false,"context_lines":[{"line_number":503,"context_line":""},{"line_number":504,"context_line":"        try:"},{"line_number":505,"context_line":"            for obj in objects:"},{"line_number":506,"context_line":"                postcommit_op \u003d getattr(self.mechanism_manager,"},{"line_number":507,"context_line":"                                        \u0027create_%s_postcommit\u0027 % resource)"},{"line_number":508,"context_line":"                postcommit_op(obj[\u0027mech_context\u0027])"},{"line_number":509,"context_line":"        except ml2_exc.MechanismDriverError:"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa98f980_bb351bdd","line":506,"in_reply_to":"fa98f980_58e7d5ac","updated":"2014-09-06 20:52:23.000000000","message":"Done","commit_id":"e961bf887e2900a7c81049395a3d7aa7b3e38146"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"ff43a7769932180a23545ce19ec1f104f68046de","unresolved":false,"context_lines":[{"line_number":486,"context_line":"        objects \u003d []"},{"line_number":487,"context_line":"        collection \u003d \"%ss\" % resource"},{"line_number":488,"context_line":"        items \u003d request_items[collection]"},{"line_number":489,"context_line":"        context.session.begin(subtransactions\u003dTrue)"},{"line_number":490,"context_line":"        try:"},{"line_number":491,"context_line":"            obj_creator \u003d getattr(self, \u0027_create_%s_db\u0027 % resource)"},{"line_number":492,"context_line":"            for item in items:"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_d2a3cbaf","line":489,"updated":"2014-09-15 04:04:42.000000000","message":"What is the reason to skip using the context manager? It handles all of the rollback on exception logic you implemented here.\n\ntry:\n    with context.session.begin(subtransactions\u003dTrue):\n        ...\nexcept Exception:\n    LOG.exception(...)","commit_id":"7ea1a0d50d45609b4675cb40ca691c96525a7898"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"5ed9848265027423363650ef528e99677c728111","unresolved":false,"context_lines":[{"line_number":486,"context_line":"        objects \u003d []"},{"line_number":487,"context_line":"        collection \u003d \"%ss\" % resource"},{"line_number":488,"context_line":"        items \u003d request_items[collection]"},{"line_number":489,"context_line":"        context.session.begin(subtransactions\u003dTrue)"},{"line_number":490,"context_line":"        try:"},{"line_number":491,"context_line":"            obj_creator \u003d getattr(self, \u0027_create_%s_db\u0027 % resource)"},{"line_number":492,"context_line":"            for item in items:"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_8533b012","line":489,"in_reply_to":"fa98f980_d2a3cbaf","updated":"2014-09-15 14:09:29.000000000","message":"I tried to use how the bulk method is implemented in NeutronDbPluginV2 without changing its main structure. May be there is no value in doing that as there are other differences as well. Will update as suggested.","commit_id":"7ea1a0d50d45609b4675cb40ca691c96525a7898"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"b63319c3ee0a9bf6e420990c9be8fe03f597d44d","unresolved":false,"context_lines":[{"line_number":493,"context_line":"                result, mech_context \u003d obj_creator(context, item)"},{"line_number":494,"context_line":"                objects.append({\u0027mech_context\u0027: mech_context,"},{"line_number":495,"context_line":"                                \u0027result\u0027: result})"},{"line_number":496,"context_line":"            context.session.commit()"},{"line_number":497,"context_line":"        except Exception:"},{"line_number":498,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":499,"context_line":"                context.session.rollback()"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_a96738e9","line":496,"updated":"2014-09-10 03:58:57.000000000","message":"doesn\u0027t commit failure need different except block?","commit_id":"7ea1a0d50d45609b4675cb40ca691c96525a7898"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"7e5179db25cccf70767f6c2a451d3169f90b7cc8","unresolved":false,"context_lines":[{"line_number":493,"context_line":"                result, mech_context \u003d obj_creator(context, item)"},{"line_number":494,"context_line":"                objects.append({\u0027mech_context\u0027: mech_context,"},{"line_number":495,"context_line":"                                \u0027result\u0027: result})"},{"line_number":496,"context_line":"            context.session.commit()"},{"line_number":497,"context_line":"        except Exception:"},{"line_number":498,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":499,"context_line":"                context.session.rollback()"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_7c1a4970","line":496,"in_reply_to":"fa98f980_74b42b35","updated":"2014-09-11 06:40:15.000000000","message":"in sql i believe commit failure means implicit rollback.  so no additional rollback is necessary.\nbut i haven\u0027t checked what sqlalchemy does in these methods.","commit_id":"7ea1a0d50d45609b4675cb40ca691c96525a7898"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"feb6303efd493959a0acc53c3cd44cee5859f0f8","unresolved":false,"context_lines":[{"line_number":493,"context_line":"                result, mech_context \u003d obj_creator(context, item)"},{"line_number":494,"context_line":"                objects.append({\u0027mech_context\u0027: mech_context,"},{"line_number":495,"context_line":"                                \u0027result\u0027: result})"},{"line_number":496,"context_line":"            context.session.commit()"},{"line_number":497,"context_line":"        except Exception:"},{"line_number":498,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":499,"context_line":"                context.session.rollback()"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_74b42b35","line":496,"in_reply_to":"fa98f980_a96738e9","updated":"2014-09-10 21:40:46.000000000","message":"Wouldn\u0027t we need to do the same rollback in both blocks if we have a separate block for commit? Would the difference be what we log? Having a single block is what I see used in other similar use cases in neutron tree: neutron/db/db_base_plugin_v2.py, neutron/plugins/vmware/dbexts/db.py and neutron/scheduler/dhcp_agent_scheduler.py for example.","commit_id":"7ea1a0d50d45609b4675cb40ca691c96525a7898"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"12dbbd0ce3694bc87949cd1681ee7598b9da8853","unresolved":false,"context_lines":[{"line_number":494,"context_line":"                objects.append({\u0027mech_context\u0027: mech_context,"},{"line_number":495,"context_line":"                                \u0027result\u0027: result})"},{"line_number":496,"context_line":"            context.session.commit()"},{"line_number":497,"context_line":"        except Exception:"},{"line_number":498,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":499,"context_line":"                context.session.rollback()"},{"line_number":500,"context_line":"                LOG.error(_LE(\"An exception occurred while creating \""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_40a05643","line":497,"updated":"2014-09-10 10:55:05.000000000","message":"Is it possible to catch specific expected exceptions here, versus the base Exception type?","commit_id":"7ea1a0d50d45609b4675cb40ca691c96525a7898"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"feb6303efd493959a0acc53c3cd44cee5859f0f8","unresolved":false,"context_lines":[{"line_number":494,"context_line":"                objects.append({\u0027mech_context\u0027: mech_context,"},{"line_number":495,"context_line":"                                \u0027result\u0027: result})"},{"line_number":496,"context_line":"            context.session.commit()"},{"line_number":497,"context_line":"        except Exception:"},{"line_number":498,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":499,"context_line":"                context.session.rollback()"},{"line_number":500,"context_line":"                LOG.error(_LE(\"An exception occurred while creating \""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_3468e320","line":497,"in_reply_to":"fa98f980_40a05643","updated":"2014-09-10 21:40:46.000000000","message":"Thinking this is a place where it is ok if we catch all exceptions (derived from Exception). We could certainly specify the db and ml2 related exceptions specifically.","commit_id":"7ea1a0d50d45609b4675cb40ca691c96525a7898"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"367bc0e4d758bce8b90947c2cfd189722dd2b0a0","unresolved":false,"context_lines":[{"line_number":496,"context_line":"            context.session.commit()"},{"line_number":497,"context_line":"        except Exception:"},{"line_number":498,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":499,"context_line":"                context.session.rollback()"},{"line_number":500,"context_line":"                LOG.error(_LE(\"An exception occurred while creating \""},{"line_number":501,"context_line":"                              \"the %(resource)s:%(item)s\"),"},{"line_number":502,"context_line":"                          {\u0027resource\u0027: resource, \u0027item\u0027: item})"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_ec8f8b21","line":499,"updated":"2014-09-10 08:02:58.000000000","message":"it would be safer to rollback just before the with","commit_id":"7ea1a0d50d45609b4675cb40ca691c96525a7898"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"ea7ac8adddf3e314a7cd9cda93a53da6de2c3f0c","unresolved":false,"context_lines":[{"line_number":496,"context_line":"            context.session.commit()"},{"line_number":497,"context_line":"        except Exception:"},{"line_number":498,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":499,"context_line":"                context.session.rollback()"},{"line_number":500,"context_line":"                LOG.error(_LE(\"An exception occurred while creating \""},{"line_number":501,"context_line":"                              \"the %(resource)s:%(item)s\"),"},{"line_number":502,"context_line":"                          {\u0027resource\u0027: resource, \u0027item\u0027: item})"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_a8d39d36","line":499,"in_reply_to":"fa98f980_37c47091","updated":"2014-09-10 17:53:27.000000000","message":"Regarding save_and_reraise and rollback, rollback should be inside in save_and_reraise. eventlet coroutine switch can occur when db access and it potentially leads to lose the exception context as described in save_and_reraise_exception docstring.\n\nsave_and_reraise_exception with clause just saves the original exception context in __enter__ and restores the original exception context in __exit__ accordingly, so it affects nothing on context.session.rollback.","commit_id":"7ea1a0d50d45609b4675cb40ca691c96525a7898"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"625ff7b24cfc34bf5bde688e0bca3e0ef9e1be57","unresolved":false,"context_lines":[{"line_number":496,"context_line":"            context.session.commit()"},{"line_number":497,"context_line":"        except Exception:"},{"line_number":498,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":499,"context_line":"                context.session.rollback()"},{"line_number":500,"context_line":"                LOG.error(_LE(\"An exception occurred while creating \""},{"line_number":501,"context_line":"                              \"the %(resource)s:%(item)s\"),"},{"line_number":502,"context_line":"                          {\u0027resource\u0027: resource, \u0027item\u0027: item})"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_37c47091","line":499,"in_reply_to":"fa98f980_ec8f8b21","updated":"2014-09-10 16:15:52.000000000","message":"it would contradict the purpose of save_and_reraise_exception.","commit_id":"7ea1a0d50d45609b4675cb40ca691c96525a7898"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"fa3807b0ce8fbad7cc5898ee2aa4e5ad27a73f56","unresolved":false,"context_lines":[{"line_number":512,"context_line":""},{"line_number":513,"context_line":"                LOG.error(_LE(\"mechanism_manager.create_%(res)s_postcommit \""},{"line_number":514,"context_line":"                              \"failed for %(res)s \u0027%(failed_id)s\u0027, deleting \""},{"line_number":515,"context_line":"                              \"%(res)%ss %(resource_ids)s\"),"},{"line_number":516,"context_line":"                          {\u0027res\u0027: resource,"},{"line_number":517,"context_line":"                           \u0027failed_id\u0027: obj[\u0027result\u0027][\u0027id\u0027],"},{"line_number":518,"context_line":"                           \u0027resource_ids\u0027: resource_ids})"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_5ef2e89a","line":515,"updated":"2014-09-10 20:33:41.000000000","message":"Will fix the format string here (remove extra %s) in the next patch set.","commit_id":"7ea1a0d50d45609b4675cb40ca691c96525a7898"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"12dbbd0ce3694bc87949cd1681ee7598b9da8853","unresolved":false,"context_lines":[{"line_number":554,"context_line":""},{"line_number":555,"context_line":"    def create_network_bulk(self, context, networks):"},{"line_number":556,"context_line":"        objects \u003d self._create_bulk_ml2(\u0027network\u0027, context, networks)"},{"line_number":557,"context_line":"        results \u003d [obj[\u0027result\u0027] for obj in objects]"},{"line_number":558,"context_line":"        return results"},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"    def update_network(self, context, id, network):"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_a0abc21c","line":557,"updated":"2014-09-10 10:55:05.000000000","message":"can eliminate temp variable.","commit_id":"7ea1a0d50d45609b4675cb40ca691c96525a7898"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"2714039bbba452f2ffac8bce1be1400d3d8a8b0c","unresolved":false,"context_lines":[{"line_number":554,"context_line":""},{"line_number":555,"context_line":"    def create_network_bulk(self, context, networks):"},{"line_number":556,"context_line":"        objects \u003d self._create_bulk_ml2(\u0027network\u0027, context, networks)"},{"line_number":557,"context_line":"        results \u003d [obj[\u0027result\u0027] for obj in objects]"},{"line_number":558,"context_line":"        return results"},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"    def update_network(self, context, id, network):"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_43685dba","line":557,"in_reply_to":"fa98f980_a0abc21c","updated":"2014-09-10 16:03:35.000000000","message":"Done","commit_id":"7ea1a0d50d45609b4675cb40ca691c96525a7898"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"12dbbd0ce3694bc87949cd1681ee7598b9da8853","unresolved":false,"context_lines":[{"line_number":726,"context_line":""},{"line_number":727,"context_line":"    def create_subnet_bulk(self, context, subnets):"},{"line_number":728,"context_line":"        objects \u003d self._create_bulk_ml2(\u0027subnet\u0027, context, subnets)"},{"line_number":729,"context_line":"        results \u003d [obj[\u0027result\u0027] for obj in objects]"},{"line_number":730,"context_line":"        return results"},{"line_number":731,"context_line":""},{"line_number":732,"context_line":"    def update_subnet(self, context, id, subnet):"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_e0a5ca47","line":729,"updated":"2014-09-10 10:55:05.000000000","message":"can eliminate temp variable","commit_id":"7ea1a0d50d45609b4675cb40ca691c96525a7898"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"2714039bbba452f2ffac8bce1be1400d3d8a8b0c","unresolved":false,"context_lines":[{"line_number":726,"context_line":""},{"line_number":727,"context_line":"    def create_subnet_bulk(self, context, subnets):"},{"line_number":728,"context_line":"        objects \u003d self._create_bulk_ml2(\u0027subnet\u0027, context, subnets)"},{"line_number":729,"context_line":"        results \u003d [obj[\u0027result\u0027] for obj in objects]"},{"line_number":730,"context_line":"        return results"},{"line_number":731,"context_line":""},{"line_number":732,"context_line":"    def update_subnet(self, context, id, subnet):"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_a35d8917","line":729,"in_reply_to":"fa98f980_e0a5ca47","updated":"2014-09-10 16:03:35.000000000","message":"Done","commit_id":"7ea1a0d50d45609b4675cb40ca691c96525a7898"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"12dbbd0ce3694bc87949cd1681ee7598b9da8853","unresolved":false,"context_lines":[{"line_number":886,"context_line":"        except ml2_exc.MechanismDriverError:"},{"line_number":887,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":888,"context_line":"                resource_ids \u003d [res[\u0027result\u0027][\u0027id\u0027] for res in objects]"},{"line_number":889,"context_line":"                LOG.error(_LE(\"_bind_port_if_needed failed, \""},{"line_number":890,"context_line":"                              \"deleting all ports from create bulk \u0027%s\u0027\"),"},{"line_number":891,"context_line":"                          resource_ids)"},{"line_number":892,"context_line":"                for obj in objects:"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_20c0b2df","line":889,"updated":"2014-09-10 10:55:05.000000000","message":"nit: failed, deleting -\u003e failed. Deleting","commit_id":"7ea1a0d50d45609b4675cb40ca691c96525a7898"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"2714039bbba452f2ffac8bce1be1400d3d8a8b0c","unresolved":false,"context_lines":[{"line_number":886,"context_line":"        except ml2_exc.MechanismDriverError:"},{"line_number":887,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":888,"context_line":"                resource_ids \u003d [res[\u0027result\u0027][\u0027id\u0027] for res in objects]"},{"line_number":889,"context_line":"                LOG.error(_LE(\"_bind_port_if_needed failed, \""},{"line_number":890,"context_line":"                              \"deleting all ports from create bulk \u0027%s\u0027\"),"},{"line_number":891,"context_line":"                          resource_ids)"},{"line_number":892,"context_line":"                for obj in objects:"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_c39b6dc7","line":889,"in_reply_to":"fa98f980_20c0b2df","updated":"2014-09-10 16:03:35.000000000","message":"Done","commit_id":"7ea1a0d50d45609b4675cb40ca691c96525a7898"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"12dbbd0ce3694bc87949cd1681ee7598b9da8853","unresolved":false,"context_lines":[{"line_number":892,"context_line":"                for obj in objects:"},{"line_number":893,"context_line":"                    self.delete_port(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":894,"context_line":"        results \u003d [obj[\u0027bound_context\u0027]._port for obj in objects]"},{"line_number":895,"context_line":"        return results"},{"line_number":896,"context_line":""},{"line_number":897,"context_line":"    def update_port(self, context, id, port):"},{"line_number":898,"context_line":"        attrs \u003d port[\u0027port\u0027]"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_80779ed3","line":895,"updated":"2014-09-10 10:55:05.000000000","message":"can eliminate temp variable","commit_id":"7ea1a0d50d45609b4675cb40ca691c96525a7898"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"2714039bbba452f2ffac8bce1be1400d3d8a8b0c","unresolved":false,"context_lines":[{"line_number":892,"context_line":"                for obj in objects:"},{"line_number":893,"context_line":"                    self.delete_port(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":894,"context_line":"        results \u003d [obj[\u0027bound_context\u0027]._port for obj in objects]"},{"line_number":895,"context_line":"        return results"},{"line_number":896,"context_line":""},{"line_number":897,"context_line":"    def update_port(self, context, id, port):"},{"line_number":898,"context_line":"        attrs \u003d port[\u0027port\u0027]"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_e39eb1b7","line":895,"in_reply_to":"fa98f980_80779ed3","updated":"2014-09-10 16:03:35.000000000","message":"Done","commit_id":"7ea1a0d50d45609b4675cb40ca691c96525a7898"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"change_message_id":"93bc30934d7878c254a5872641bd0ee430ac02e5","unresolved":false,"context_lines":[{"line_number":486,"context_line":"        objects \u003d []"},{"line_number":487,"context_line":"        collection \u003d \"%ss\" % resource"},{"line_number":488,"context_line":"        items \u003d request_items[collection]"},{"line_number":489,"context_line":"        #context.session.begin(subtransactions\u003dTrue)"},{"line_number":490,"context_line":"        try:"},{"line_number":491,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":492,"context_line":"                obj_creator \u003d getattr(self, \u0027_create_%s_db\u0027 % resource)"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa98f980_e7e8f9e3","line":489,"updated":"2014-09-15 18:25:56.000000000","message":"remove","commit_id":"a40509d121f413f25569dd4ffc199045ce311056"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"dfba7824bcb8c9e8e5737233b16dd16c6dc9947f","unresolved":false,"context_lines":[{"line_number":486,"context_line":"        objects \u003d []"},{"line_number":487,"context_line":"        collection \u003d \"%ss\" % resource"},{"line_number":488,"context_line":"        items \u003d request_items[collection]"},{"line_number":489,"context_line":"        #context.session.begin(subtransactions\u003dTrue)"},{"line_number":490,"context_line":"        try:"},{"line_number":491,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":492,"context_line":"                obj_creator \u003d getattr(self, \u0027_create_%s_db\u0027 % resource)"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa98f980_644fa492","line":489,"in_reply_to":"fa98f980_e7e8f9e3","updated":"2014-09-15 22:19:07.000000000","message":"Done","commit_id":"a40509d121f413f25569dd4ffc199045ce311056"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"1743c56193498e9a9b35fe789c19c0be2f5953f3","unresolved":false,"context_lines":[{"line_number":496,"context_line":"                                    \u0027result\u0027: result})"},{"line_number":497,"context_line":"        except Exception:"},{"line_number":498,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":499,"context_line":"                LOG.exception(_LE(\"An exception occurred while creating \""},{"line_number":500,"context_line":"                                  \"the %(resource)s:%(item)s\"),"},{"line_number":501,"context_line":"                              {\u0027resource\u0027: resource, \u0027item\u0027: item})"},{"line_number":502,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"fa98f980_3850510a","line":499,"updated":"2014-09-16 11:24:47.000000000","message":"Hint shouldn\u0027t be used here. Should use _() for exception level logs. Here and L512.","commit_id":"a40509d121f413f25569dd4ffc199045ce311056"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ee4be771b5bec500e47e0d1709ced9373adffc30","unresolved":false,"context_lines":[{"line_number":496,"context_line":"                                    \u0027result\u0027: result})"},{"line_number":497,"context_line":"        except Exception:"},{"line_number":498,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":499,"context_line":"                LOG.exception(_LE(\"An exception occurred while creating \""},{"line_number":500,"context_line":"                                  \"the %(resource)s:%(item)s\"),"},{"line_number":501,"context_line":"                              {\u0027resource\u0027: resource, \u0027item\u0027: item})"},{"line_number":502,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"fa98f980_bb3b5bc7","line":499,"in_reply_to":"fa98f980_3850510a","updated":"2014-09-16 12:00:47.000000000","message":"No, we should use _LE\n\nfrom [1]:\n\n # RIGHT\n LOG.exception(_LE(\u0027There was an error.\u0027))\n raise LocalExceptionClass(_(\u0027An error occured.\u0027))\n\n[1] http://docs.openstack.org/developer/oslo.i18n/guidelines.html#choosing-a-marker-function","commit_id":"a40509d121f413f25569dd4ffc199045ce311056"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"0fae98033091e3538b861116cc0b70549fdfb5fc","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        self.type_manager.initialize()"},{"line_number":127,"context_line":"        self.extension_manager.initialize()"},{"line_number":128,"context_line":"        self.mechanism_manager.initialize()"},{"line_number":129,"context_line":"        # bulk support depends on the underlying drivers"},{"line_number":130,"context_line":"        self.__native_bulk_support \u003d self.mechanism_manager.native_bulk_support"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        self._setup_rpc()"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_db3291f1","line":129,"updated":"2014-09-18 18:58:38.000000000","message":"I\u0027ve never quite understood what it meant for a mechanism driver to support bulk or not, but now that the precommit and postcommit processing for bulk operations is being done correctly, I suspect the above two lines can be removed, along with the corresponding code in MechanismManager and the drivers.","commit_id":"698a61e0ac590b5ae296d5565521cbb247336c4a"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"0a0df7a24c01d42ff844374d257bd577b204150e","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        self.type_manager.initialize()"},{"line_number":127,"context_line":"        self.extension_manager.initialize()"},{"line_number":128,"context_line":"        self.mechanism_manager.initialize()"},{"line_number":129,"context_line":"        # bulk support depends on the underlying drivers"},{"line_number":130,"context_line":"        self.__native_bulk_support \u003d self.mechanism_manager.native_bulk_support"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        self._setup_rpc()"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_8e7efa68","line":129,"in_reply_to":"fa98f980_db3291f1","updated":"2014-09-19 04:42:39.000000000","message":"Yeah, unless we have bulk pre commit and bulk post commit operations in mechanism drivers having mechanism drivers support for bulk does not make much sense. \n\nI am not sure about one of the unit tests that uses the \"bulkless\" driver. I think we should eventually remove that driver and update setup.cfg to reflect that. Considering where we are in the cycle, I am not sure if we should do it here or not. That is why I have simply updated the test (in the next patch set) and added a comment in the test method as well to say if mechanism drivers define whether bulk ops are supported or not, that is ignored. \n\nIf it is better to remove the test or update it in other ways, remove the bulkless driver, and remove the corresponding entry in setup.cfg in this patch, I can do that.","commit_id":"698a61e0ac590b5ae296d5565521cbb247336c4a"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"a471aabebef2b55f74318b045d6cf29dda9bd74f","unresolved":false,"context_lines":[{"line_number":481,"context_line":"                                  segment[api.SEGMENTATION_ID],"},{"line_number":482,"context_line":"                                  segment[api.PHYSICAL_NETWORK])"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"    # TODO(apech): Need to override bulk operations"},{"line_number":485,"context_line":"    def _create_bulk_ml2(self, resource, context, request_items):"},{"line_number":486,"context_line":"        objects \u003d []"},{"line_number":487,"context_line":"        collection \u003d \"%ss\" % resource"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_59cfa257","line":484,"updated":"2014-09-18 04:05:37.000000000","message":"this TODO comment can be removed now?","commit_id":"698a61e0ac590b5ae296d5565521cbb247336c4a"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"fdcc7ce18abe09e6f69b1a265c7286078e021c75","unresolved":false,"context_lines":[{"line_number":481,"context_line":"                                  segment[api.SEGMENTATION_ID],"},{"line_number":482,"context_line":"                                  segment[api.PHYSICAL_NETWORK])"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"    # TODO(apech): Need to override bulk operations"},{"line_number":485,"context_line":"    def _create_bulk_ml2(self, resource, context, request_items):"},{"line_number":486,"context_line":"        objects \u003d []"},{"line_number":487,"context_line":"        collection \u003d \"%ss\" % resource"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_ff574b25","line":484,"in_reply_to":"fa98f980_59cfa257","updated":"2014-09-18 13:57:54.000000000","message":"Sure, will do.","commit_id":"698a61e0ac590b5ae296d5565521cbb247336c4a"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"a471aabebef2b55f74318b045d6cf29dda9bd74f","unresolved":false,"context_lines":[{"line_number":539,"context_line":"            self.mechanism_manager.create_network_precommit(mech_context)"},{"line_number":540,"context_line":"        return result, mech_context"},{"line_number":541,"context_line":""},{"line_number":542,"context_line":"    def create_network(self, context, network):"},{"line_number":543,"context_line":"        result, mech_context \u003d self._create_network_db(context, network)"},{"line_number":544,"context_line":"        try:"},{"line_number":545,"context_line":"            self.mechanism_manager.create_network_postcommit(mech_context)"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_3902de6f","line":542,"updated":"2014-09-18 04:05:37.000000000","message":"it\u0027s probably simpler to implement non-bulk ops using _create_bulk_ml2.\nas a bonus _create_bulk_ml2 will be tested more that way.","commit_id":"698a61e0ac590b5ae296d5565521cbb247336c4a"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"fdcc7ce18abe09e6f69b1a265c7286078e021c75","unresolved":false,"context_lines":[{"line_number":539,"context_line":"            self.mechanism_manager.create_network_precommit(mech_context)"},{"line_number":540,"context_line":"        return result, mech_context"},{"line_number":541,"context_line":""},{"line_number":542,"context_line":"    def create_network(self, context, network):"},{"line_number":543,"context_line":"        result, mech_context \u003d self._create_network_db(context, network)"},{"line_number":544,"context_line":"        try:"},{"line_number":545,"context_line":"            self.mechanism_manager.create_network_postcommit(mech_context)"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_5f49378d","line":542,"in_reply_to":"fa98f980_3902de6f","updated":"2014-09-18 13:57:54.000000000","message":"Yeah that would be something we should do. Probably in a separate patch;  I just wanted to keep changes to the code for non bulk ops to a minimum here (i.e., just refactoring of the code through use of _create_*_db).","commit_id":"698a61e0ac590b5ae296d5565521cbb247336c4a"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"5f73ee8742fa5b7c4d5340f9b7408992b9c12e48","unresolved":false,"context_lines":[{"line_number":479,"context_line":"                                  segment[api.SEGMENTATION_ID],"},{"line_number":480,"context_line":"                                  segment[api.PHYSICAL_NETWORK])"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    # TODO(apech): Need to override bulk operations"},{"line_number":483,"context_line":"    def _create_bulk_ml2(self, resource, context, request_items):"},{"line_number":484,"context_line":"        objects \u003d []"},{"line_number":485,"context_line":"        collection \u003d \"%ss\" % resource"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_69246dc6","line":482,"updated":"2014-09-19 09:47:44.000000000","message":"this comment can be removed.","commit_id":"44bb81dda92ecd074c63d4dc5bc2317529a07af0"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"eebe7fe7bd1d7320cafa912ae1bb5a0fc0c01982","unresolved":false,"context_lines":[{"line_number":514,"context_line":"                               \u0027resource_ids\u0027: resource_ids})"},{"line_number":515,"context_line":"                for obj in objects:"},{"line_number":516,"context_line":"                    delete_op \u003d getattr(self, \u0027delete_%s\u0027 % resource)"},{"line_number":517,"context_line":"                    delete_op(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":518,"context_line":"        return objects"},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"    def _create_network_db(self, context, network):"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_84262b67","line":517,"updated":"2014-09-21 07:59:22.000000000","message":"I think we need to wrap this with a try-except statement. Since this is deleting all of the objects and some of will likely not have been actually created in the mechanism driver if we reach this error, it\u0027s very possible that the MD can raise exceptions during the deletion. Delete should be called on every object, regardless of whether or not errors are thrown on the others.","commit_id":"0183419cda33e6e10c78737ea4a9b6b4c5780c0b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"621a718fc04a558c34253768dfce14e0504e64be","unresolved":false,"context_lines":[{"line_number":514,"context_line":"                               \u0027resource_ids\u0027: resource_ids})"},{"line_number":515,"context_line":"                for obj in objects:"},{"line_number":516,"context_line":"                    delete_op \u003d getattr(self, \u0027delete_%s\u0027 % resource)"},{"line_number":517,"context_line":"                    delete_op(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":518,"context_line":"        return objects"},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"    def _create_network_db(self, context, network):"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_8fa0d144","line":517,"in_reply_to":"da9df570_4d09b530","updated":"2014-09-23 14:40:25.000000000","message":"+1 for try/except. After precommit finishes, the transaction completes, so resources created are visible to API and it can potentially be deleted. Considering it, it looks reasonable to me to ignore NotFound exception from sqlalchemy. Thought?","commit_id":"0183419cda33e6e10c78737ea4a9b6b4c5780c0b"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"af880ef7faf989b50252a072cb0e4ec2239f2ae1","unresolved":false,"context_lines":[{"line_number":514,"context_line":"                               \u0027resource_ids\u0027: resource_ids})"},{"line_number":515,"context_line":"                for obj in objects:"},{"line_number":516,"context_line":"                    delete_op \u003d getattr(self, \u0027delete_%s\u0027 % resource)"},{"line_number":517,"context_line":"                    delete_op(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":518,"context_line":"        return objects"},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"    def _create_network_db(self, context, network):"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_26ba9ec0","line":517,"in_reply_to":"da9df570_637ae6f2","updated":"2014-09-23 22:05:32.000000000","message":"Done","commit_id":"0183419cda33e6e10c78737ea4a9b6b4c5780c0b"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"0d59ab962a4e62641251a7f4fd7193abe3435d87","unresolved":false,"context_lines":[{"line_number":514,"context_line":"                               \u0027resource_ids\u0027: resource_ids})"},{"line_number":515,"context_line":"                for obj in objects:"},{"line_number":516,"context_line":"                    delete_op \u003d getattr(self, \u0027delete_%s\u0027 % resource)"},{"line_number":517,"context_line":"                    delete_op(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":518,"context_line":"        return objects"},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"    def _create_network_db(self, context, network):"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_4d09b530","line":517,"in_reply_to":"da9df570_84262b67","updated":"2014-09-22 14:33:49.000000000","message":"ML2 plugin delete operations simply log the error if a mechanism driver raises an exception. Also, all the objects being deleted have been successfully added to the database or they won\u0027t be in \"objects\". However, It is still possible that the database delete for one or more of these objects for some reason raise an exception. So having try-except wrapping this for loop makes sense.","commit_id":"0183419cda33e6e10c78737ea4a9b6b4c5780c0b"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"e32c6f739705b2ed28ae950545856c888d6ce585","unresolved":false,"context_lines":[{"line_number":514,"context_line":"                               \u0027resource_ids\u0027: resource_ids})"},{"line_number":515,"context_line":"                for obj in objects:"},{"line_number":516,"context_line":"                    delete_op \u003d getattr(self, \u0027delete_%s\u0027 % resource)"},{"line_number":517,"context_line":"                    delete_op(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":518,"context_line":"        return objects"},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"    def _create_network_db(self, context, network):"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_637ae6f2","line":517,"in_reply_to":"da9df570_8fa0d144","updated":"2014-09-23 14:55:35.000000000","message":"Yes, I forgot delete exceptions from the backend drivers are already ignored. NotFound should be all you have to worry about.","commit_id":"0183419cda33e6e10c78737ea4a9b6b4c5780c0b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"f2f8a24b3a59620e95d8a55599b0d7c665cd058a","unresolved":false,"context_lines":[{"line_number":536,"context_line":"            self.mechanism_manager.create_network_precommit(mech_context)"},{"line_number":537,"context_line":"        return result, mech_context"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"    def create_network(self, context, network):"},{"line_number":540,"context_line":"        result, mech_context \u003d self._create_network_db(context, network)"},{"line_number":541,"context_line":"        try:"},{"line_number":542,"context_line":"            self.mechanism_manager.create_network_postcommit(mech_context)"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_f34a6354","line":539,"updated":"2014-09-20 19:14:43.000000000","message":"I think a single network creation is a simple case of create_network_bulk. Can we merge the code?\n\nIt can be done if L.485 is moved outside of _create_bulk_ml2.","commit_id":"0183419cda33e6e10c78737ea4a9b6b4c5780c0b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"621a718fc04a558c34253768dfce14e0504e64be","unresolved":false,"context_lines":[{"line_number":536,"context_line":"            self.mechanism_manager.create_network_precommit(mech_context)"},{"line_number":537,"context_line":"        return result, mech_context"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"    def create_network(self, context, network):"},{"line_number":540,"context_line":"        result, mech_context \u003d self._create_network_db(context, network)"},{"line_number":541,"context_line":"        try:"},{"line_number":542,"context_line":"            self.mechanism_manager.create_network_postcommit(mech_context)"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_0f94e1e0","line":539,"in_reply_to":"da9df570_33ddcb15","updated":"2014-09-23 14:40:25.000000000","message":"Okay, I got it. It looks no problem if all are in the same page.","commit_id":"0183419cda33e6e10c78737ea4a9b6b4c5780c0b"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"b2d1a8d594e9dfc36e9048613b97e4ebe0ff1b02","unresolved":false,"context_lines":[{"line_number":536,"context_line":"            self.mechanism_manager.create_network_precommit(mech_context)"},{"line_number":537,"context_line":"        return result, mech_context"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"    def create_network(self, context, network):"},{"line_number":540,"context_line":"        result, mech_context \u003d self._create_network_db(context, network)"},{"line_number":541,"context_line":"        try:"},{"line_number":542,"context_line":"            self.mechanism_manager.create_network_postcommit(mech_context)"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_33ddcb15","line":539,"in_reply_to":"da9df570_f34a6354","updated":"2014-09-20 21:25:56.000000000","message":"Please see comments right at this location on patch set 19. If this is not targeted for Juno anymore, I will make the changes.","commit_id":"0183419cda33e6e10c78737ea4a9b6b4c5780c0b"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"eebe7fe7bd1d7320cafa912ae1bb5a0fc0c01982","unresolved":false,"context_lines":[{"line_number":884,"context_line":"                              \"Deleting all ports from create bulk \u0027%s\u0027\"),"},{"line_number":885,"context_line":"                          resource_ids)"},{"line_number":886,"context_line":"                for obj in objects:"},{"line_number":887,"context_line":"                    self.delete_port(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":888,"context_line":"        return [obj[\u0027bound_context\u0027]._port for obj in objects]"},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"    def update_port(self, context, id, port):"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_a42b2f2f","line":887,"updated":"2014-09-21 07:59:22.000000000","message":"Same here. Ignore exceptions to make sure delete is called for all.","commit_id":"0183419cda33e6e10c78737ea4a9b6b4c5780c0b"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"0d59ab962a4e62641251a7f4fd7193abe3435d87","unresolved":false,"context_lines":[{"line_number":884,"context_line":"                              \"Deleting all ports from create bulk \u0027%s\u0027\"),"},{"line_number":885,"context_line":"                          resource_ids)"},{"line_number":886,"context_line":"                for obj in objects:"},{"line_number":887,"context_line":"                    self.delete_port(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":888,"context_line":"        return [obj[\u0027bound_context\u0027]._port for obj in objects]"},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"    def update_port(self, context, id, port):"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_d0045e17","line":887,"in_reply_to":"da9df570_a42b2f2f","updated":"2014-09-22 14:33:49.000000000","message":"Please see above.","commit_id":"0183419cda33e6e10c78737ea4a9b6b4c5780c0b"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"af880ef7faf989b50252a072cb0e4ec2239f2ae1","unresolved":false,"context_lines":[{"line_number":884,"context_line":"                              \"Deleting all ports from create bulk \u0027%s\u0027\"),"},{"line_number":885,"context_line":"                          resource_ids)"},{"line_number":886,"context_line":"                for obj in objects:"},{"line_number":887,"context_line":"                    self.delete_port(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":888,"context_line":"        return [obj[\u0027bound_context\u0027]._port for obj in objects]"},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"    def update_port(self, context, id, port):"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_46b162e0","line":887,"in_reply_to":"da9df570_d0045e17","updated":"2014-09-23 22:05:32.000000000","message":"Done","commit_id":"0183419cda33e6e10c78737ea4a9b6b4c5780c0b"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"5f126cf374497d69d0f3fbb0c8133886b3412259","unresolved":false,"context_lines":[{"line_number":479,"context_line":"                                  segment[api.SEGMENTATION_ID],"},{"line_number":480,"context_line":"                                  segment[api.PHYSICAL_NETWORK])"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    def _create_bulk_ml2(self, resource, context, request_items):"},{"line_number":483,"context_line":"        objects \u003d []"},{"line_number":484,"context_line":"        collection \u003d \"%ss\" % resource"},{"line_number":485,"context_line":"        items \u003d request_items[collection]"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_0e876362","line":482,"updated":"2014-09-24 11:40:06.000000000","message":"consider adding callbacks here as parameters.\n\nPerhaps if we use callbacks we can avoid having a distinct method for create_port_bulk. I\u0027m not sure if that would be feasible. Your opinion?","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"ef227acd0f2d39e34164363d0137d3340d781ecc","unresolved":false,"context_lines":[{"line_number":479,"context_line":"                                  segment[api.SEGMENTATION_ID],"},{"line_number":480,"context_line":"                                  segment[api.PHYSICAL_NETWORK])"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    def _create_bulk_ml2(self, resource, context, request_items):"},{"line_number":483,"context_line":"        objects \u003d []"},{"line_number":484,"context_line":"        collection \u003d \"%ss\" % resource"},{"line_number":485,"context_line":"        items \u003d request_items[collection]"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_d6a5e8b5","line":482,"in_reply_to":"da9df570_0e876362","updated":"2014-09-24 19:47:39.000000000","message":"create_port_bulk similar to create_network_bulk and create_subnet_bulk methods, calls this method. As you have noticed, create_port_bulk does a lot more than other bulk methods after calling this method. What is done in create_bulk_op could possibly be moved here but considering that that piece will be very specific to ports and should be not executed for other resources (networks and subnets), wouldn\u0027t keep the code where it is right now makes the code more readable?","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"5f126cf374497d69d0f3fbb0c8133886b3412259","unresolved":false,"context_lines":[{"line_number":523,"context_line":"                                      {\u0027res\u0027: resource,"},{"line_number":524,"context_line":"                                       \u0027res_id\u0027: obj[\u0027result\u0027][\u0027id\u0027]})"},{"line_number":525,"context_line":"                        update_op \u003d getattr(self, \u0027update_%s\u0027 % resource)"},{"line_number":526,"context_line":"                        update_status \u003d getattr(const, \u0027%s_STATUS_ERROR\u0027 %"},{"line_number":527,"context_line":"                                                resource.upper())"},{"line_number":528,"context_line":"                        try:"},{"line_number":529,"context_line":"                            update_op(context, obj[\u0027result\u0027][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_ae1e5761","line":526,"updated":"2014-09-24 11:40:06.000000000","message":"consider error_status rather than update_status (but do as you prefer)","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"a25b308882a3a23e7c1daf62b6d1305e0a0fa17e","unresolved":false,"context_lines":[{"line_number":523,"context_line":"                                      {\u0027res\u0027: resource,"},{"line_number":524,"context_line":"                                       \u0027res_id\u0027: obj[\u0027result\u0027][\u0027id\u0027]})"},{"line_number":525,"context_line":"                        update_op \u003d getattr(self, \u0027update_%s\u0027 % resource)"},{"line_number":526,"context_line":"                        update_status \u003d getattr(const, \u0027%s_STATUS_ERROR\u0027 %"},{"line_number":527,"context_line":"                                                resource.upper())"},{"line_number":528,"context_line":"                        try:"},{"line_number":529,"context_line":"                            update_op(context, obj[\u0027result\u0027][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_82c0762b","line":526,"in_reply_to":"da9df570_53acaa35","updated":"2014-09-24 22:02:10.000000000","message":"Filed a bug https://bugs.launchpad.net/neutron/+bug/1373637 to keep track of making the needed enhancement in a separate patch.","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"ef227acd0f2d39e34164363d0137d3340d781ecc","unresolved":false,"context_lines":[{"line_number":523,"context_line":"                                      {\u0027res\u0027: resource,"},{"line_number":524,"context_line":"                                       \u0027res_id\u0027: obj[\u0027result\u0027][\u0027id\u0027]})"},{"line_number":525,"context_line":"                        update_op \u003d getattr(self, \u0027update_%s\u0027 % resource)"},{"line_number":526,"context_line":"                        update_status \u003d getattr(const, \u0027%s_STATUS_ERROR\u0027 %"},{"line_number":527,"context_line":"                                                resource.upper())"},{"line_number":528,"context_line":"                        try:"},{"line_number":529,"context_line":"                            update_op(context, obj[\u0027result\u0027][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_53acaa35","line":526,"in_reply_to":"da9df570_ae1e5761","updated":"2014-09-24 19:47:39.000000000","message":"During the weekly ML2 meeting today Sep 24th, it was decided that we keep changes in this patch limited to bulk operations. Since non bulk operations need to address the case being addressed here (failing db delete operations during the rollback) as well, we do the setting of the status to ERROR in a separate patch for both bulk and non bulk operations.","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"5f126cf374497d69d0f3fbb0c8133886b3412259","unresolved":false,"context_lines":[{"line_number":524,"context_line":"                                       \u0027res_id\u0027: obj[\u0027result\u0027][\u0027id\u0027]})"},{"line_number":525,"context_line":"                        update_op \u003d getattr(self, \u0027update_%s\u0027 % resource)"},{"line_number":526,"context_line":"                        update_status \u003d getattr(const, \u0027%s_STATUS_ERROR\u0027 %"},{"line_number":527,"context_line":"                                                resource.upper())"},{"line_number":528,"context_line":"                        try:"},{"line_number":529,"context_line":"                            update_op(context, obj[\u0027result\u0027][\u0027id\u0027],"},{"line_number":530,"context_line":"                                      {resource: {\u0027status\u0027: update_status}})"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_2e0b4726","line":527,"updated":"2014-09-24 11:40:06.000000000","message":"the above two line can probably be moved up to line 516 (I know they are here because you want them to be executed only when delete fails, but in this case they are executed everytime delete fails, so it\u0027s not very efficient).\n\nI think the cost of retrieving update_op and status always is negligible whereas the readability improvement is tangible","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"ef227acd0f2d39e34164363d0137d3340d781ecc","unresolved":false,"context_lines":[{"line_number":524,"context_line":"                                       \u0027res_id\u0027: obj[\u0027result\u0027][\u0027id\u0027]})"},{"line_number":525,"context_line":"                        update_op \u003d getattr(self, \u0027update_%s\u0027 % resource)"},{"line_number":526,"context_line":"                        update_status \u003d getattr(const, \u0027%s_STATUS_ERROR\u0027 %"},{"line_number":527,"context_line":"                                                resource.upper())"},{"line_number":528,"context_line":"                        try:"},{"line_number":529,"context_line":"                            update_op(context, obj[\u0027result\u0027][\u0027id\u0027],"},{"line_number":530,"context_line":"                                      {resource: {\u0027status\u0027: update_status}})"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_5373cae6","line":527,"in_reply_to":"da9df570_2e0b4726","updated":"2014-09-24 19:47:39.000000000","message":"Makes sense. Please see the above for explanation as why these were removed from this patch.","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"5f126cf374497d69d0f3fbb0c8133886b3412259","unresolved":false,"context_lines":[{"line_number":532,"context_line":"                            LOG.exception(_LE(\"Could not set status for \""},{"line_number":533,"context_line":"                                              \"%(res)s %(res_id)s to error.\"),"},{"line_number":534,"context_line":"                                          {\u0027res\u0027: resource,"},{"line_number":535,"context_line":"                                           \u0027res_id\u0027: obj[\u0027result\u0027][\u0027id\u0027]})"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        return objects"},{"line_number":538,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_ab300902","line":535,"updated":"2014-09-24 11:40:06.000000000","message":"Readability for this method probably needs improvement. I think the error handling code might be moved in a separate method.","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"ef227acd0f2d39e34164363d0137d3340d781ecc","unresolved":false,"context_lines":[{"line_number":532,"context_line":"                            LOG.exception(_LE(\"Could not set status for \""},{"line_number":533,"context_line":"                                              \"%(res)s %(res_id)s to error.\"),"},{"line_number":534,"context_line":"                                          {\u0027res\u0027: resource,"},{"line_number":535,"context_line":"                                           \u0027res_id\u0027: obj[\u0027result\u0027][\u0027id\u0027]})"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        return objects"},{"line_number":538,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_b34b1686","line":535,"in_reply_to":"da9df570_ab300902","updated":"2014-09-24 19:47:39.000000000","message":"Please see above.","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"5ab2177b9bfe027b345a3ff0e5973928e43905d3","unresolved":false,"context_lines":[{"line_number":534,"context_line":"                                          {\u0027res\u0027: resource,"},{"line_number":535,"context_line":"                                           \u0027res_id\u0027: obj[\u0027result\u0027][\u0027id\u0027]})"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        return objects"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"    def _create_network_db(self, context, network):"},{"line_number":540,"context_line":"        net_data \u003d network[\u0027network\u0027]"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_a891ef9a","line":537,"updated":"2014-09-24 10:30:07.000000000","message":"Nit: we can move this after L.502. It is just for readability. except-clause always reraises an exception and the logic never comes here, so placing \"normal code\" and \"return\" in near place makes easier to read.","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"ef227acd0f2d39e34164363d0137d3340d781ecc","unresolved":false,"context_lines":[{"line_number":534,"context_line":"                                          {\u0027res\u0027: resource,"},{"line_number":535,"context_line":"                                           \u0027res_id\u0027: obj[\u0027result\u0027][\u0027id\u0027]})"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        return objects"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"    def _create_network_db(self, context, network):"},{"line_number":540,"context_line":"        net_data \u003d network[\u0027network\u0027]"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_1349428b","line":537,"in_reply_to":"da9df570_a891ef9a","updated":"2014-09-24 19:47:39.000000000","message":"Done","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"5ab2177b9bfe027b345a3ff0e5973928e43905d3","unresolved":false,"context_lines":[{"line_number":563,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":564,"context_line":"                LOG.error(_LE(\"mechanism_manager.create_network_postcommit \""},{"line_number":565,"context_line":"                              \"failed, deleting network \u0027%s\u0027\"), result[\u0027id\u0027])"},{"line_number":566,"context_line":"                self.delete_network(context, result[\u0027id\u0027])"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        return result"},{"line_number":569,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_e85f77e3","line":566,"updated":"2014-09-24 10:30:07.000000000","message":"Should we change the exception logic to match the logic in create_bulk? Both changing now or fixing it later works for me. At least we should have consistent behavior in both sooner or later.","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"ef227acd0f2d39e34164363d0137d3340d781ecc","unresolved":false,"context_lines":[{"line_number":563,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":564,"context_line":"                LOG.error(_LE(\"mechanism_manager.create_network_postcommit \""},{"line_number":565,"context_line":"                              \"failed, deleting network \u0027%s\u0027\"), result[\u0027id\u0027])"},{"line_number":566,"context_line":"                self.delete_network(context, result[\u0027id\u0027])"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        return result"},{"line_number":569,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_f33cbee4","line":566,"in_reply_to":"da9df570_e85f77e3","updated":"2014-09-24 19:47:39.000000000","message":"As discussed in ML2 meeting, will do for both bulk and non bulk in a separate patch.","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"5f126cf374497d69d0f3fbb0c8133886b3412259","unresolved":false,"context_lines":[{"line_number":887,"context_line":"        objects \u003d self._create_bulk_ml2(\u0027port\u0027, context, ports)"},{"line_number":888,"context_line":""},{"line_number":889,"context_line":"        for obj in objects:"},{"line_number":890,"context_line":"            # REVISIT(rkukura): Is there any point in calling this before"},{"line_number":891,"context_line":"            # a binding has been successfully established?"},{"line_number":892,"context_line":"            self.notify_security_groups_member_updated(context,"},{"line_number":893,"context_line":"                                                       obj[\u0027result\u0027])"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_ce30fbea","line":890,"updated":"2014-09-24 11:40:06.000000000","message":"rkukura?","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"ef227acd0f2d39e34164363d0137d3340d781ecc","unresolved":false,"context_lines":[{"line_number":887,"context_line":"        objects \u003d self._create_bulk_ml2(\u0027port\u0027, context, ports)"},{"line_number":888,"context_line":""},{"line_number":889,"context_line":"        for obj in objects:"},{"line_number":890,"context_line":"            # REVISIT(rkukura): Is there any point in calling this before"},{"line_number":891,"context_line":"            # a binding has been successfully established?"},{"line_number":892,"context_line":"            self.notify_security_groups_member_updated(context,"},{"line_number":893,"context_line":"                                                       obj[\u0027result\u0027])"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_932b7293","line":890,"in_reply_to":"da9df570_ce30fbea","updated":"2014-09-24 19:47:39.000000000","message":"This is rkukura\u0027s comment from the code for non bulk operations being repeated here.","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"5f126cf374497d69d0f3fbb0c8133886b3412259","unresolved":false,"context_lines":[{"line_number":890,"context_line":"            # REVISIT(rkukura): Is there any point in calling this before"},{"line_number":891,"context_line":"            # a binding has been successfully established?"},{"line_number":892,"context_line":"            self.notify_security_groups_member_updated(context,"},{"line_number":893,"context_line":"                                                       obj[\u0027result\u0027])"},{"line_number":894,"context_line":""},{"line_number":895,"context_line":"        try:"},{"line_number":896,"context_line":"            for obj in objects:"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_ee9cdfc2","line":893,"updated":"2014-09-24 11:40:06.000000000","message":"Gah! Don\u0027t we have a way to send a single notification for a bunch of objects? that\u0027s a shame (pls add a #TODO - or file a bug on lp - or both)","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"a25b308882a3a23e7c1daf62b6d1305e0a0fa17e","unresolved":false,"context_lines":[{"line_number":890,"context_line":"            # REVISIT(rkukura): Is there any point in calling this before"},{"line_number":891,"context_line":"            # a binding has been successfully established?"},{"line_number":892,"context_line":"            self.notify_security_groups_member_updated(context,"},{"line_number":893,"context_line":"                                                       obj[\u0027result\u0027])"},{"line_number":894,"context_line":""},{"line_number":895,"context_line":"        try:"},{"line_number":896,"context_line":"            for obj in objects:"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_e2b5c2ee","line":893,"in_reply_to":"da9df570_16e21003","updated":"2014-09-24 22:02:10.000000000","message":"In addition to adding a TODO I filed a bug: https://bugs.launchpad.net/neutron/+bug/1373634","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"ef227acd0f2d39e34164363d0137d3340d781ecc","unresolved":false,"context_lines":[{"line_number":890,"context_line":"            # REVISIT(rkukura): Is there any point in calling this before"},{"line_number":891,"context_line":"            # a binding has been successfully established?"},{"line_number":892,"context_line":"            self.notify_security_groups_member_updated(context,"},{"line_number":893,"context_line":"                                                       obj[\u0027result\u0027])"},{"line_number":894,"context_line":""},{"line_number":895,"context_line":"        try:"},{"line_number":896,"context_line":"            for obj in objects:"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_16e21003","line":893,"in_reply_to":"da9df570_ee9cdfc2","updated":"2014-09-24 19:47:39.000000000","message":"Done","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"7a74a5636c556fdae5245302f79a0957af9a8ee7","unresolved":false,"context_lines":[{"line_number":902,"context_line":"                LOG.error(_LE(\"_bind_port_if_needed failed. \""},{"line_number":903,"context_line":"                              \"Deleting all ports from create bulk \u0027%s\u0027\"),"},{"line_number":904,"context_line":"                          resource_ids)"},{"line_number":905,"context_line":"                for obj in objects:"},{"line_number":906,"context_line":"                    try:"},{"line_number":907,"context_line":"                        self.delete_port(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":908,"context_line":"                    except Exception:"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_2e5a67f3","line":905,"updated":"2014-09-24 11:45:05.000000000","message":"This seems like a specialized case of L516+. Could that be extracted to a method and then pass in \u0027port\u0027 as the resource to delete/update, to reduce code duplication?","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"ef227acd0f2d39e34164363d0137d3340d781ecc","unresolved":false,"context_lines":[{"line_number":902,"context_line":"                LOG.error(_LE(\"_bind_port_if_needed failed. \""},{"line_number":903,"context_line":"                              \"Deleting all ports from create bulk \u0027%s\u0027\"),"},{"line_number":904,"context_line":"                          resource_ids)"},{"line_number":905,"context_line":"                for obj in objects:"},{"line_number":906,"context_line":"                    try:"},{"line_number":907,"context_line":"                        self.delete_port(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":908,"context_line":"                    except Exception:"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_16177052","line":905,"in_reply_to":"da9df570_2e5a67f3","updated":"2014-09-24 19:47:39.000000000","message":"Done","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"5f126cf374497d69d0f3fbb0c8133886b3412259","unresolved":false,"context_lines":[{"line_number":913,"context_line":"                        except Exception:"},{"line_number":914,"context_line":"                            LOG.exception(_LE(\"Could not set status for \""},{"line_number":915,"context_line":"                                              \"port %s to error.\"),"},{"line_number":916,"context_line":"                                          obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":917,"context_line":""},{"line_number":918,"context_line":"        return [obj[\u0027bound_context\u0027]._port for obj in objects]"},{"line_number":919,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_ee75bf98","line":916,"updated":"2014-09-24 11:40:06.000000000","message":"the error handling code here is similar as the other generic method. Perhaps there is a chance that if it\u0027s moved to a separate method the same method could be used both for create_bulk_ml2 and this one.","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"ef227acd0f2d39e34164363d0137d3340d781ecc","unresolved":false,"context_lines":[{"line_number":913,"context_line":"                        except Exception:"},{"line_number":914,"context_line":"                            LOG.exception(_LE(\"Could not set status for \""},{"line_number":915,"context_line":"                                              \"port %s to error.\"),"},{"line_number":916,"context_line":"                                          obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":917,"context_line":""},{"line_number":918,"context_line":"        return [obj[\u0027bound_context\u0027]._port for obj in objects]"},{"line_number":919,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_76351cd9","line":916,"in_reply_to":"da9df570_ee75bf98","updated":"2014-09-24 19:47:39.000000000","message":"Please see above.","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"5ab2177b9bfe027b345a3ff0e5973928e43905d3","unresolved":false,"context_lines":[{"line_number":915,"context_line":"                                              \"port %s to error.\"),"},{"line_number":916,"context_line":"                                          obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":917,"context_line":""},{"line_number":918,"context_line":"        return [obj[\u0027bound_context\u0027]._port for obj in objects]"},{"line_number":919,"context_line":""},{"line_number":920,"context_line":"    def update_port(self, context, id, port):"},{"line_number":921,"context_line":"        attrs \u003d port[\u0027port\u0027]"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_c868f389","line":918,"updated":"2014-09-24 10:30:07.000000000","message":"Same comment as the above. This line can be moved to after L.898 for readability.","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"ef227acd0f2d39e34164363d0137d3340d781ecc","unresolved":false,"context_lines":[{"line_number":915,"context_line":"                                              \"port %s to error.\"),"},{"line_number":916,"context_line":"                                          obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":917,"context_line":""},{"line_number":918,"context_line":"        return [obj[\u0027bound_context\u0027]._port for obj in objects]"},{"line_number":919,"context_line":""},{"line_number":920,"context_line":"    def update_port(self, context, id, port):"},{"line_number":921,"context_line":"        attrs \u003d port[\u0027port\u0027]"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_b64ea46d","line":918,"in_reply_to":"da9df570_c868f389","updated":"2014-09-24 19:47:39.000000000","message":"Done","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"0052d0c1b40249335ecd88c318ebec12ca8867d7","unresolved":false,"context_lines":[{"line_number":512,"context_line":"            for obj in objects:"},{"line_number":513,"context_line":"                postcommit_op(obj[\u0027mech_context\u0027])"},{"line_number":514,"context_line":"            return objects"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"        except ml2_exc.MechanismDriverError:"},{"line_number":517,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":518,"context_line":"                resource_ids \u003d [res[\u0027result\u0027][\u0027id\u0027] for res in objects]"}],"source_content_type":"text/x-python","patch_set":24,"id":"da9df570_d5a22cfc","line":515,"updated":"2014-09-25 11:29:56.000000000","message":"(suggestion only) blank lines here and inside except-clause are unnecessary.","commit_id":"7970f4077c96bea6836fdb2edad1616e695fcea5"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"a8d4dae46130d450c9d6e9f2c36999de7005ec85","unresolved":false,"context_lines":[{"line_number":512,"context_line":"            for obj in objects:"},{"line_number":513,"context_line":"                postcommit_op(obj[\u0027mech_context\u0027])"},{"line_number":514,"context_line":"            return objects"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"        except ml2_exc.MechanismDriverError:"},{"line_number":517,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":518,"context_line":"                resource_ids \u003d [res[\u0027result\u0027][\u0027id\u0027] for res in objects]"}],"source_content_type":"text/x-python","patch_set":24,"id":"da9df570_1ba943df","line":515,"in_reply_to":"da9df570_d5a22cfc","updated":"2014-09-25 12:42:07.000000000","message":"Done","commit_id":"7970f4077c96bea6836fdb2edad1616e695fcea5"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8205e65613f3321231d487c6598014d2d56aaf6e","unresolved":false,"context_lines":[{"line_number":847,"context_line":"                                                      dhcp_opts)"},{"line_number":848,"context_line":"            self.mechanism_manager.create_port_precommit(mech_context)"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"        # Notification must be sent after the above transaction is complete"},{"line_number":851,"context_line":"        self._notify_l3_agent_new_port(context, new_host_port)"},{"line_number":852,"context_line":""},{"line_number":853,"context_line":"        return result, mech_context"}],"source_content_type":"text/x-python","patch_set":27,"id":"da9df570_5f753b62","line":850,"updated":"2014-09-28 18:35:20.000000000","message":"Why isn\u0027t notify_l3_agent_new_port part of create_port? This way _create_port_db doesn\u0027t send notifications in it. I haven\u0027t thought this through so please consider this suggestion critically, but I\u0027d at least like to know you\u0027ve considered it yourself.","commit_id":"3b9317b9f55ff231f798c15fe818fd535c7dd746"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"ad3c0c936919280070e7f8d7e4cfc3a75fde124f","unresolved":false,"context_lines":[{"line_number":847,"context_line":"                                                      dhcp_opts)"},{"line_number":848,"context_line":"            self.mechanism_manager.create_port_precommit(mech_context)"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"        # Notification must be sent after the above transaction is complete"},{"line_number":851,"context_line":"        self._notify_l3_agent_new_port(context, new_host_port)"},{"line_number":852,"context_line":""},{"line_number":853,"context_line":"        return result, mech_context"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a890539_386c1b35","line":850,"in_reply_to":"baa201ad_93dafee7","updated":"2014-11-15 04:39:12.000000000","message":"Done","commit_id":"3b9317b9f55ff231f798c15fe818fd535c7dd746"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"bb6a490cfd0916865b4c659f487f863d4b15ef72","unresolved":false,"context_lines":[{"line_number":847,"context_line":"                                                      dhcp_opts)"},{"line_number":848,"context_line":"            self.mechanism_manager.create_port_precommit(mech_context)"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"        # Notification must be sent after the above transaction is complete"},{"line_number":851,"context_line":"        self._notify_l3_agent_new_port(context, new_host_port)"},{"line_number":852,"context_line":""},{"line_number":853,"context_line":"        return result, mech_context"}],"source_content_type":"text/x-python","patch_set":27,"id":"baa201ad_93dafee7","line":850,"in_reply_to":"da9df570_5f753b62","updated":"2014-09-29 02:45:49.000000000","message":"Good point. I agree it is better not to be a part of _create_port_db. It is not a db operation and this method should contain only db related logic, so it is worth considered to move it to create_port and create_port_bulk.","commit_id":"3b9317b9f55ff231f798c15fe818fd535c7dd746"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"1222eacc73f2bb4823dee8f29b81a9e4ae7fe090","unresolved":false,"context_lines":[{"line_number":175,"context_line":"    def _get_host_port_if_changed(self, mech_context, attrs):"},{"line_number":176,"context_line":"        host \u003d attrs and attrs.get(portbindings.HOST_ID)"},{"line_number":177,"context_line":"        if (attributes.is_attr_set(host) and"},{"line_number":178,"context_line":"            mech_context._binding.host !\u003d host):"},{"line_number":179,"context_line":"            return mech_context.current"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def _process_port_binding(self, mech_context, attrs):"}],"source_content_type":"text/x-python","patch_set":29,"id":"5a890539_282a7b90","line":178,"updated":"2014-11-20 07:23:43.000000000","message":"unrelated change?","commit_id":"54fe4433014ac1946fd26fc2560806c179a7b0ba"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"96e60c1cc71bca1fcd1eb5e7230523bc4930e61b","unresolved":false,"context_lines":[{"line_number":175,"context_line":"    def _get_host_port_if_changed(self, mech_context, attrs):"},{"line_number":176,"context_line":"        host \u003d attrs and attrs.get(portbindings.HOST_ID)"},{"line_number":177,"context_line":"        if (attributes.is_attr_set(host) and"},{"line_number":178,"context_line":"            mech_context._binding.host !\u003d host):"},{"line_number":179,"context_line":"            return mech_context.current"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def _process_port_binding(self, mech_context, attrs):"}],"source_content_type":"text/x-python","patch_set":29,"id":"3a961159_bf874360","line":178,"in_reply_to":"3a961159_8d4d5a75","updated":"2015-01-05 18:49:22.000000000","message":"Done","commit_id":"54fe4433014ac1946fd26fc2560806c179a7b0ba"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"05ad61a9043e2b66a4ba1d68061458873ef81112","unresolved":false,"context_lines":[{"line_number":175,"context_line":"    def _get_host_port_if_changed(self, mech_context, attrs):"},{"line_number":176,"context_line":"        host \u003d attrs and attrs.get(portbindings.HOST_ID)"},{"line_number":177,"context_line":"        if (attributes.is_attr_set(host) and"},{"line_number":178,"context_line":"            mech_context._binding.host !\u003d host):"},{"line_number":179,"context_line":"            return mech_context.current"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def _process_port_binding(self, mech_context, attrs):"}],"source_content_type":"text/x-python","patch_set":29,"id":"3a961159_8d4d5a75","line":178,"in_reply_to":"5a890539_282a7b90","updated":"2014-12-08 19:49:20.000000000","message":"will fix.","commit_id":"54fe4433014ac1946fd26fc2560806c179a7b0ba"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"1222eacc73f2bb4823dee8f29b81a9e4ae7fe090","unresolved":false,"context_lines":[{"line_number":505,"context_line":"                    objects.append({\u0027mech_context\u0027: mech_context,"},{"line_number":506,"context_line":"                                    \u0027result\u0027: result})"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"                    # For port resources see if host has changed"},{"line_number":509,"context_line":"                    if attrs and attrs.get(portbindings.HOST_ID):"},{"line_number":510,"context_line":"                        new_host_port \u003d self._get_host_port_if_changed("},{"line_number":511,"context_line":"                            mech_context, attrs)"}],"source_content_type":"text/x-python","patch_set":29,"id":"5a890539_8bf36909","line":508,"updated":"2014-11-20 07:23:43.000000000","message":"doesn\u0027t this block belong to create_port_bulk?","commit_id":"54fe4433014ac1946fd26fc2560806c179a7b0ba"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"96e60c1cc71bca1fcd1eb5e7230523bc4930e61b","unresolved":false,"context_lines":[{"line_number":505,"context_line":"                    objects.append({\u0027mech_context\u0027: mech_context,"},{"line_number":506,"context_line":"                                    \u0027result\u0027: result})"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"                    # For port resources see if host has changed"},{"line_number":509,"context_line":"                    if attrs and attrs.get(portbindings.HOST_ID):"},{"line_number":510,"context_line":"                        new_host_port \u003d self._get_host_port_if_changed("},{"line_number":511,"context_line":"                            mech_context, attrs)"}],"source_content_type":"text/x-python","patch_set":29,"id":"3a961159_1faf77e4","line":508,"in_reply_to":"3a961159_8d747a9d","updated":"2015-01-05 18:49:22.000000000","message":"Moved this to create_port_bulk as suggested.","commit_id":"54fe4433014ac1946fd26fc2560806c179a7b0ba"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"05ad61a9043e2b66a4ba1d68061458873ef81112","unresolved":false,"context_lines":[{"line_number":505,"context_line":"                    objects.append({\u0027mech_context\u0027: mech_context,"},{"line_number":506,"context_line":"                                    \u0027result\u0027: result})"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"                    # For port resources see if host has changed"},{"line_number":509,"context_line":"                    if attrs and attrs.get(portbindings.HOST_ID):"},{"line_number":510,"context_line":"                        new_host_port \u003d self._get_host_port_if_changed("},{"line_number":511,"context_line":"                            mech_context, attrs)"}],"source_content_type":"text/x-python","patch_set":29,"id":"3a961159_8d747a9d","line":508,"in_reply_to":"5a890539_8bf36909","updated":"2014-12-08 19:49:20.000000000","message":"will address these comments depending on the result of discussions at the mid cycle Neutron sprint to see if we want to continue this work or not.","commit_id":"54fe4433014ac1946fd26fc2560806c179a7b0ba"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"1222eacc73f2bb4823dee8f29b81a9e4ae7fe090","unresolved":false,"context_lines":[{"line_number":509,"context_line":"                    if attrs and attrs.get(portbindings.HOST_ID):"},{"line_number":510,"context_line":"                        new_host_port \u003d self._get_host_port_if_changed("},{"line_number":511,"context_line":"                            mech_context, attrs)"},{"line_number":512,"context_line":"                        self._notify_l3_agent_new_port(context, new_host_port)"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"        except Exception:"},{"line_number":515,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":29,"id":"5a890539_ebd78d4d","line":512,"updated":"2014-11-20 07:23:43.000000000","message":"is this safe to do inside transaction?","commit_id":"54fe4433014ac1946fd26fc2560806c179a7b0ba"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"96e60c1cc71bca1fcd1eb5e7230523bc4930e61b","unresolved":false,"context_lines":[{"line_number":509,"context_line":"                    if attrs and attrs.get(portbindings.HOST_ID):"},{"line_number":510,"context_line":"                        new_host_port \u003d self._get_host_port_if_changed("},{"line_number":511,"context_line":"                            mech_context, attrs)"},{"line_number":512,"context_line":"                        self._notify_l3_agent_new_port(context, new_host_port)"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"        except Exception:"},{"line_number":515,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":29,"id":"3a961159_7fb23b4a","line":512,"in_reply_to":"3a961159_ad793695","updated":"2015-01-05 18:49:22.000000000","message":"Done","commit_id":"54fe4433014ac1946fd26fc2560806c179a7b0ba"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"05ad61a9043e2b66a4ba1d68061458873ef81112","unresolved":false,"context_lines":[{"line_number":509,"context_line":"                    if attrs and attrs.get(portbindings.HOST_ID):"},{"line_number":510,"context_line":"                        new_host_port \u003d self._get_host_port_if_changed("},{"line_number":511,"context_line":"                            mech_context, attrs)"},{"line_number":512,"context_line":"                        self._notify_l3_agent_new_port(context, new_host_port)"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"        except Exception:"},{"line_number":515,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":29,"id":"3a961159_ad793695","line":512,"in_reply_to":"5a890539_ebd78d4d","updated":"2014-12-08 19:49:20.000000000","message":"pls see above.","commit_id":"54fe4433014ac1946fd26fc2560806c179a7b0ba"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"cc155b0dc69d59e15d32c391748b768af7b73ccd","unresolved":false,"context_lines":[{"line_number":487,"context_line":"        delete_op \u003d getattr(self, \u0027delete_%s\u0027 % resource)"},{"line_number":488,"context_line":"        for obj in objects:"},{"line_number":489,"context_line":"            try:"},{"line_number":490,"context_line":"                delete_op(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":491,"context_line":"            except Exception:"},{"line_number":492,"context_line":"                LOG.exception(_LE(\"Could not delete %(res)s %(id)s.\"),"},{"line_number":493,"context_line":"                              {\u0027res\u0027: resource,"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a961159_5974b4ce","line":490,"updated":"2015-01-05 23:53:57.000000000","message":"Are we sure that calling the plugin-level operation (eg: delete_network) is the right choice?\n\nThe postcommit operation was never executed on these resources, the driver operations on delete ops instead generally assume the postcommit on create was executed. Perhaps the safest choice here is to perform a db-only removal; there is a chance we can even add the pre-commit delete operation which should ensure  a complete rollback of the failed create","commit_id":"f9d878c59a2ab3321e66cc155dd1777e56e1c4c2"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"46371609571454f1584d3904c23cfd484a533b8a","unresolved":false,"context_lines":[{"line_number":487,"context_line":"        delete_op \u003d getattr(self, \u0027delete_%s\u0027 % resource)"},{"line_number":488,"context_line":"        for obj in objects:"},{"line_number":489,"context_line":"            try:"},{"line_number":490,"context_line":"                delete_op(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":491,"context_line":"            except Exception:"},{"line_number":492,"context_line":"                LOG.exception(_LE(\"Could not delete %(res)s %(id)s.\"),"},{"line_number":493,"context_line":"                              {\u0027res\u0027: resource,"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a961159_74879c61","line":490,"in_reply_to":"3a961159_5974b4ce","updated":"2015-01-06 19:54:33.000000000","message":"This is consistent with what is done for single (non-bulk) operations. Furthermore, for some of the resources the postcommit operation on create may have been called. Since the bulk creates are atomic, if any of the creates fails we need to rollback all creates even those which have been completed successfully.","commit_id":"f9d878c59a2ab3321e66cc155dd1777e56e1c4c2"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"0daed64f0ff04f8758d69f170044526ada6e2ad5","unresolved":false,"context_lines":[{"line_number":487,"context_line":"        delete_op \u003d getattr(self, \u0027delete_%s\u0027 % resource)"},{"line_number":488,"context_line":"        for obj in objects:"},{"line_number":489,"context_line":"            try:"},{"line_number":490,"context_line":"                delete_op(context, obj[\u0027result\u0027][\u0027id\u0027])"},{"line_number":491,"context_line":"            except Exception:"},{"line_number":492,"context_line":"                LOG.exception(_LE(\"Could not delete %(res)s %(id)s.\"),"},{"line_number":493,"context_line":"                              {\u0027res\u0027: resource,"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a961159_aa3ca3e2","line":490,"in_reply_to":"3a961159_74879c61","updated":"2015-01-13 01:18:33.000000000","message":"Your comment make sense, but also make me think that we\u0027re assuming post commit ops are idempotent. Definitely not a problem for this patch, but something worth thinking about and perhaps documenting.","commit_id":"f9d878c59a2ab3321e66cc155dd1777e56e1c4c2"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"cc155b0dc69d59e15d32c391748b768af7b73ccd","unresolved":false,"context_lines":[{"line_number":491,"context_line":"            except Exception:"},{"line_number":492,"context_line":"                LOG.exception(_LE(\"Could not delete %(res)s %(id)s.\"),"},{"line_number":493,"context_line":"                              {\u0027res\u0027: resource,"},{"line_number":494,"context_line":"                               \u0027id\u0027: obj[\u0027result\u0027][\u0027id\u0027]})"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"    def _create_bulk_ml2(self, resource, context, request_items):"},{"line_number":497,"context_line":"        objects \u003d []"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a961159_9947fca2","line":494,"updated":"2015-01-05 23:53:57.000000000","message":"I think the generic catch and logging here are redundant - however if you feel they add more debugging info I don\u0027t mind (but probably you should be a bit more careful as the reason for the exception in theory could be a keyerror on obj - and then your log statement will raise a keyerror as well)","commit_id":"f9d878c59a2ab3321e66cc155dd1777e56e1c4c2"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"46371609571454f1584d3904c23cfd484a533b8a","unresolved":false,"context_lines":[{"line_number":491,"context_line":"            except Exception:"},{"line_number":492,"context_line":"                LOG.exception(_LE(\"Could not delete %(res)s %(id)s.\"),"},{"line_number":493,"context_line":"                              {\u0027res\u0027: resource,"},{"line_number":494,"context_line":"                               \u0027id\u0027: obj[\u0027result\u0027][\u0027id\u0027]})"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"    def _create_bulk_ml2(self, resource, context, request_items):"},{"line_number":497,"context_line":"        objects \u003d []"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a961159_c71c2116","line":494,"in_reply_to":"3a961159_9947fca2","updated":"2015-01-06 19:54:33.000000000","message":"The reason for using the try block is to allow the for loop to continue with deleting other resources if one or more delete operations fail. In such cases I thought logging which resources were not deleted properly may be of some value. If you agree that having the log is valuable, I can avoid the possible exception from the log statement that you have correctly pointed out by catching the KeyError separately or using .get() to avoid that possibility. Would that make sense?","commit_id":"f9d878c59a2ab3321e66cc155dd1777e56e1c4c2"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"0daed64f0ff04f8758d69f170044526ada6e2ad5","unresolved":false,"context_lines":[{"line_number":491,"context_line":"            except Exception:"},{"line_number":492,"context_line":"                LOG.exception(_LE(\"Could not delete %(res)s %(id)s.\"),"},{"line_number":493,"context_line":"                              {\u0027res\u0027: resource,"},{"line_number":494,"context_line":"                               \u0027id\u0027: obj[\u0027result\u0027][\u0027id\u0027]})"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"    def _create_bulk_ml2(self, resource, context, request_items):"},{"line_number":497,"context_line":"        objects \u003d []"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a961159_cdc10983","line":494,"in_reply_to":"3a961159_c71c2116","updated":"2015-01-13 01:18:33.000000000","message":".get looks good","commit_id":"f9d878c59a2ab3321e66cc155dd1777e56e1c4c2"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"cc155b0dc69d59e15d32c391748b768af7b73ccd","unresolved":false,"context_lines":[{"line_number":525,"context_line":"                LOG.exception(_LE(\"mechanism_manager.create_%(res)s\""},{"line_number":526,"context_line":"                                  \"_postcommit failed for %(res)s: \""},{"line_number":527,"context_line":"                                  \"\u0027%(failed_id)s\u0027. Deleting \""},{"line_number":528,"context_line":"                                  \"%(res)ss %(resource_ids)s\"),"},{"line_number":529,"context_line":"                              {\u0027res\u0027: resource,"},{"line_number":530,"context_line":"                               \u0027failed_id\u0027: obj[\u0027result\u0027][\u0027id\u0027],"},{"line_number":531,"context_line":"                               \u0027resource_ids\u0027: resource_ids})"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a961159_79541022","line":528,"updated":"2015-01-05 23:53:57.000000000","message":"use \",\".join(resource_ids) for a nice output","commit_id":"f9d878c59a2ab3321e66cc155dd1777e56e1c4c2"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"46371609571454f1584d3904c23cfd484a533b8a","unresolved":false,"context_lines":[{"line_number":525,"context_line":"                LOG.exception(_LE(\"mechanism_manager.create_%(res)s\""},{"line_number":526,"context_line":"                                  \"_postcommit failed for %(res)s: \""},{"line_number":527,"context_line":"                                  \"\u0027%(failed_id)s\u0027. Deleting \""},{"line_number":528,"context_line":"                                  \"%(res)ss %(resource_ids)s\"),"},{"line_number":529,"context_line":"                              {\u0027res\u0027: resource,"},{"line_number":530,"context_line":"                               \u0027failed_id\u0027: obj[\u0027result\u0027][\u0027id\u0027],"},{"line_number":531,"context_line":"                               \u0027resource_ids\u0027: resource_ids})"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a961159_09548520","line":528,"in_reply_to":"3a961159_79541022","updated":"2015-01-06 19:54:33.000000000","message":"Done","commit_id":"f9d878c59a2ab3321e66cc155dd1777e56e1c4c2"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"cc155b0dc69d59e15d32c391748b768af7b73ccd","unresolved":false,"context_lines":[{"line_number":563,"context_line":"        return result"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"    def create_network_bulk(self, context, networks):"},{"line_number":566,"context_line":"        objects \u003d self._create_bulk_ml2(\u0027network\u0027, context, networks)"},{"line_number":567,"context_line":"        return [obj[\u0027result\u0027] for obj in objects]"},{"line_number":568,"context_line":""},{"line_number":569,"context_line":"    def update_network(self, context, id, network):"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a961159_b9a118ab","line":566,"updated":"2015-01-05 23:53:57.000000000","message":"somewhere constants for resources are already defined - use of literals can be probably avoided","commit_id":"f9d878c59a2ab3321e66cc155dd1777e56e1c4c2"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"46371609571454f1584d3904c23cfd484a533b8a","unresolved":false,"context_lines":[{"line_number":563,"context_line":"        return result"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"    def create_network_bulk(self, context, networks):"},{"line_number":566,"context_line":"        objects \u003d self._create_bulk_ml2(\u0027network\u0027, context, networks)"},{"line_number":567,"context_line":"        return [obj[\u0027result\u0027] for obj in objects]"},{"line_number":568,"context_line":""},{"line_number":569,"context_line":"    def update_network(self, context, id, network):"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a961159_a9a0d142","line":566,"in_reply_to":"3a961159_b9a118ab","updated":"2015-01-06 19:54:33.000000000","message":"Done","commit_id":"f9d878c59a2ab3321e66cc155dd1777e56e1c4c2"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"cc155b0dc69d59e15d32c391748b768af7b73ccd","unresolved":false,"context_lines":[{"line_number":904,"context_line":"            # a binding has been successfully established?"},{"line_number":905,"context_line":"            # TODO(banix): Use a single notification for all objects"},{"line_number":906,"context_line":"            self.notify_security_groups_member_updated(context,"},{"line_number":907,"context_line":"                                                       obj[\u0027result\u0027])"},{"line_number":908,"context_line":""},{"line_number":909,"context_line":"            attrs \u003d obj[\u0027attributes\u0027]"},{"line_number":910,"context_line":"            if attrs and attrs.get(portbindings.HOST_ID):"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a961159_99fffc01","line":907,"updated":"2015-01-05 23:53:57.000000000","message":"At a first glance, without a lot of effort it should be possible to send a single notification for each security group. What\u0027s your opinion?","commit_id":"f9d878c59a2ab3321e66cc155dd1777e56e1c4c2"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"46371609571454f1584d3904c23cfd484a533b8a","unresolved":false,"context_lines":[{"line_number":904,"context_line":"            # a binding has been successfully established?"},{"line_number":905,"context_line":"            # TODO(banix): Use a single notification for all objects"},{"line_number":906,"context_line":"            self.notify_security_groups_member_updated(context,"},{"line_number":907,"context_line":"                                                       obj[\u0027result\u0027])"},{"line_number":908,"context_line":""},{"line_number":909,"context_line":"            attrs \u003d obj[\u0027attributes\u0027]"},{"line_number":910,"context_line":"            if attrs and attrs.get(portbindings.HOST_ID):"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a961159_346514af","line":907,"in_reply_to":"3a961159_99fffc01","updated":"2015-01-06 19:54:33.000000000","message":"Is what is filed as a separate bug here what you have in mind: https://bugs.launchpad.net/neutron/+bug/1373634","commit_id":"f9d878c59a2ab3321e66cc155dd1777e56e1c4c2"}],"neutron/tests/unit/ml2/test_ml2_plugin.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"fa6cadc98403420eae31011ea59e0cb6c495b49c","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"class TestMl2BulkToggleWithBulkless(Ml2PluginV2TestCase):"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    _mechanism_drivers \u003d [\u0027logger\u0027, \u0027test\u0027, \u0027bulkless\u0027]"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def test_bulk_disable_with_bulkless_driver(self):"}],"source_content_type":"text/x-python","patch_set":22,"id":"da9df570_a0b4b1d1","line":88,"updated":"2014-09-24 01:27:39.000000000","message":"Can you remove this test case and the bulkless driver?","commit_id":"fd40ec41c11b2cfdaa2f1eae684530ac0d34571e"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"7a4a2f44cfe30f8ba86ec822a03587665993f854","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"class TestMl2BulkToggleWithBulkless(Ml2PluginV2TestCase):"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    _mechanism_drivers \u003d [\u0027logger\u0027, \u0027test\u0027, \u0027bulkless\u0027]"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def test_bulk_disable_with_bulkless_driver(self):"}],"source_content_type":"text/x-python","patch_set":22,"id":"da9df570_03ae6785","line":88,"in_reply_to":"da9df570_a0b4b1d1","updated":"2014-09-24 02:32:40.000000000","message":"Done","commit_id":"fd40ec41c11b2cfdaa2f1eae684530ac0d34571e"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"change_message_id":"bd4663a2f03c7d72328feb01f0e3762b1c84afeb","unresolved":false,"context_lines":[{"line_number":688,"context_line":"        super(Ml2PluginV2FaultyDriverTestCase, self).setUp(PLUGIN_NAME)"},{"line_number":689,"context_line":"        self.port_create_status \u003d \u0027DOWN\u0027"},{"line_number":690,"context_line":""},{"line_number":691,"context_line":""},{"line_number":692,"context_line":"class TestFaultyMechansimDriver(Ml2PluginV2FaultyDriverTestCase):"},{"line_number":693,"context_line":""},{"line_number":694,"context_line":"    def test_create_network_faulty(self):"}],"source_content_type":"text/x-python","patch_set":22,"id":"da9df570_06967af0","line":691,"updated":"2014-09-23 22:27:10.000000000","message":"it might give us more confidence to have test cases for the failure handling being added","commit_id":"fd40ec41c11b2cfdaa2f1eae684530ac0d34571e"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"301b85e791e9db35ff0d8fff58355eccde5d79be","unresolved":false,"context_lines":[{"line_number":688,"context_line":"        super(Ml2PluginV2FaultyDriverTestCase, self).setUp(PLUGIN_NAME)"},{"line_number":689,"context_line":"        self.port_create_status \u003d \u0027DOWN\u0027"},{"line_number":690,"context_line":""},{"line_number":691,"context_line":""},{"line_number":692,"context_line":"class TestFaultyMechansimDriver(Ml2PluginV2FaultyDriverTestCase):"},{"line_number":693,"context_line":""},{"line_number":694,"context_line":"    def test_create_network_faulty(self):"}],"source_content_type":"text/x-python","patch_set":22,"id":"da9df570_3151fa0e","line":691,"in_reply_to":"da9df570_06967af0","updated":"2014-09-23 22:38:59.000000000","message":"I think one thing that is not tested is when a delete operation fails during the rollback and we set the status of the resource to ERROR. Is that what you had in mind? Will look into it.","commit_id":"fd40ec41c11b2cfdaa2f1eae684530ac0d34571e"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"86b7623e0cee176dc0afc400c9159961b49298e3","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def test_create_ports_bulk_port_binding_failure(self):"},{"line_number":143,"context_line":"        if self._skip_native_bulk:"},{"line_number":144,"context_line":"            self.skipTest(\"Plugin does not support native bulk port create\")"},{"line_number":145,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":146,"context_line":"        with self.network() as net:"},{"line_number":147,"context_line":"            plugin \u003d manager.NeutronManager.get_plugin()"}],"source_content_type":"text/x-python","patch_set":26,"id":"da9df570_6f799fc7","line":144,"updated":"2014-09-25 18:28:05.000000000","message":"I think there is no need to check this. It is a unit test for ML2 plugin and ML2 support bulk operation.","commit_id":"89a81e934ca4b2f33f7713c2e6c6fbaf5f7f518b"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"52f8d83c9707d1d024d1610f73375574b2732da8","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def test_create_ports_bulk_port_binding_failure(self):"},{"line_number":143,"context_line":"        if self._skip_native_bulk:"},{"line_number":144,"context_line":"            self.skipTest(\"Plugin does not support native bulk port create\")"},{"line_number":145,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":146,"context_line":"        with self.network() as net:"},{"line_number":147,"context_line":"            plugin \u003d manager.NeutronManager.get_plugin()"}],"source_content_type":"text/x-python","patch_set":26,"id":"da9df570_7e4a2f27","line":144,"in_reply_to":"da9df570_6f799fc7","updated":"2014-09-25 20:57:16.000000000","message":"Done","commit_id":"89a81e934ca4b2f33f7713c2e6c6fbaf5f7f518b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"86b7623e0cee176dc0afc400c9159961b49298e3","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                raise ml2_exc.MechanismDriverError(method\u003d\u0027create_port_bulk\u0027)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"            with mock.patch.object(plugin, \u0027_bind_port_if_needed\u0027,"},{"line_number":153,"context_line":"                                   new\u003dfake_bind_port):"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"                res \u003d self._create_port_bulk(self.fmt, 2, net[\u0027network\u0027][\u0027id\u0027],"},{"line_number":156,"context_line":"                                             \u0027test\u0027, True, context\u003dctx)"}],"source_content_type":"text/x-python","patch_set":26,"id":"da9df570_0f2013ab","line":153,"updated":"2014-09-25 18:28:05.000000000","message":"Please consider:\n\n  with mock.patch.object(\n      plugin, \u0027_bind_port_if_needed\u0027,\n      side_effect\u003dml2_exc.MechanismDriverError(method\u003d\u0027create_port_bulk\u0027)) as _bind_port_if_needed:","commit_id":"89a81e934ca4b2f33f7713c2e6c6fbaf5f7f518b"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"52f8d83c9707d1d024d1610f73375574b2732da8","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                raise ml2_exc.MechanismDriverError(method\u003d\u0027create_port_bulk\u0027)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"            with mock.patch.object(plugin, \u0027_bind_port_if_needed\u0027,"},{"line_number":153,"context_line":"                                   new\u003dfake_bind_port):"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"                res \u003d self._create_port_bulk(self.fmt, 2, net[\u0027network\u0027][\u0027id\u0027],"},{"line_number":156,"context_line":"                                             \u0027test\u0027, True, context\u003dctx)"}],"source_content_type":"text/x-python","patch_set":26,"id":"da9df570_9e5353e1","line":153,"in_reply_to":"da9df570_0f2013ab","updated":"2014-09-25 20:57:16.000000000","message":"Done","commit_id":"89a81e934ca4b2f33f7713c2e6c6fbaf5f7f518b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"86b7623e0cee176dc0afc400c9159961b49298e3","unresolved":false,"context_lines":[{"line_number":156,"context_line":"                                             \u0027test\u0027, True, context\u003dctx)"},{"line_number":157,"context_line":"                # We expect a 500 as we injected a fault in the plugin"},{"line_number":158,"context_line":"                self._validate_behavior_on_bulk_failure("},{"line_number":159,"context_line":"                    res, \u0027ports\u0027, webob.exc.HTTPServerError.code)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def test_delete_port_no_notify_in_disassociate_floatingips(self):"},{"line_number":162,"context_line":"        ctx \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":26,"id":"da9df570_d246b44e","line":159,"updated":"2014-09-25 18:28:05.000000000","message":"In addition to this, we need to check the following two:\n\n- _bind_port_if_needed is called once\n- _delete_objects succeeded. We can check this by listing ports and no ports are remaining.","commit_id":"89a81e934ca4b2f33f7713c2e6c6fbaf5f7f518b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3e0cf498b0134e3b3be31abec38f5d6dfd21d575","unresolved":false,"context_lines":[{"line_number":156,"context_line":"                                             \u0027test\u0027, True, context\u003dctx)"},{"line_number":157,"context_line":"                # We expect a 500 as we injected a fault in the plugin"},{"line_number":158,"context_line":"                self._validate_behavior_on_bulk_failure("},{"line_number":159,"context_line":"                    res, \u0027ports\u0027, webob.exc.HTTPServerError.code)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def test_delete_port_no_notify_in_disassociate_floatingips(self):"},{"line_number":162,"context_line":"        ctx \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":26,"id":"da9df570_5e79ebc6","line":159,"in_reply_to":"da9df570_be6737b6","updated":"2014-09-25 21:29:02.000000000","message":"Got it. Thanks.","commit_id":"89a81e934ca4b2f33f7713c2e6c6fbaf5f7f518b"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"52f8d83c9707d1d024d1610f73375574b2732da8","unresolved":false,"context_lines":[{"line_number":156,"context_line":"                                             \u0027test\u0027, True, context\u003dctx)"},{"line_number":157,"context_line":"                # We expect a 500 as we injected a fault in the plugin"},{"line_number":158,"context_line":"                self._validate_behavior_on_bulk_failure("},{"line_number":159,"context_line":"                    res, \u0027ports\u0027, webob.exc.HTTPServerError.code)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def test_delete_port_no_notify_in_disassociate_floatingips(self):"},{"line_number":162,"context_line":"        ctx \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":26,"id":"da9df570_be6737b6","line":159,"in_reply_to":"da9df570_d246b44e","updated":"2014-09-25 20:57:16.000000000","message":"First point: i added the test.\n\nSecond point: already taken care of in _validate_behavious_on_bulk_failure() method","commit_id":"89a81e934ca4b2f33f7713c2e6c6fbaf5f7f518b"}],"neutron/tests/unit/test_db_plugin.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"1885260d2751d37392812a0bdb036ec39ad822d3","unresolved":false,"context_lines":[{"line_number":2020,"context_line":"        #ensures the API choose the emulation code path"},{"line_number":2021,"context_line":"        with mock.patch(\u0027__builtin__.hasattr\u0027,"},{"line_number":2022,"context_line":"                        new\u003dfakehasattr):"},{"line_number":2023,"context_line":"            if getattr(manager.NeutronManager.get_plugin(),"},{"line_number":2024,"context_line":"                       \u0027_create_network_db\u0027, False):"},{"line_number":2025,"context_line":"                method_to_patch \u003d \u0027_create_network_db\u0027"},{"line_number":2026,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa98f980_d89105f3","line":2023,"updated":"2014-09-06 20:08:55.000000000","message":"duplicate code, i would prefer such code in a specific function or a specific context","commit_id":"e961bf887e2900a7c81049395a3d7aa7b3e38146"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"ac40abf2f37b91196a894c70a0236be2154aed4a","unresolved":false,"context_lines":[{"line_number":2020,"context_line":"        #ensures the API choose the emulation code path"},{"line_number":2021,"context_line":"        with mock.patch(\u0027__builtin__.hasattr\u0027,"},{"line_number":2022,"context_line":"                        new\u003dfakehasattr):"},{"line_number":2023,"context_line":"            if getattr(manager.NeutronManager.get_plugin(),"},{"line_number":2024,"context_line":"                       \u0027_create_network_db\u0027, False):"},{"line_number":2025,"context_line":"                method_to_patch \u003d \u0027_create_network_db\u0027"},{"line_number":2026,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa98f980_fb188377","line":2023,"in_reply_to":"fa98f980_d89105f3","updated":"2014-09-06 20:52:23.000000000","message":"Sure, makes sense. I Wonder if there is a better way of implementing this block. We essentially need to know if we are using the ml2 plugin or not.","commit_id":"e961bf887e2900a7c81049395a3d7aa7b3e38146"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"change_message_id":"331324819ce9fb0893119bbddf2b8804214bf0bf","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def _get_method_to_patch(resource):"},{"line_number":66,"context_line":"    ml2_method \u003d \u0027_create_%s_db\u0027 % resource"},{"line_number":67,"context_line":"    if getattr(manager.NeutronManager.get_plugin(), ml2_method, False):"},{"line_number":68,"context_line":"        return ml2_method"},{"line_number":69,"context_line":"    else:"},{"line_number":70,"context_line":"        return \u0027create_%s\u0027 % resource"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_e57a0af0","line":67,"updated":"2014-09-11 16:45:36.000000000","message":"To avoid unintentional matching of _create_*_db methods in other plugin code, you could add a custom_patch_method_name() method to the ml2 subclass of NeutronDbPluginV2TestCase and test here for the existence of that method.  You would need to move this into the NeutronDbPluginV2TestCase class.","commit_id":"7ea1a0d50d45609b4675cb40ca691c96525a7898"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"953b9e01882e190396b1922114fdb328a91cd74a","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def _get_method_to_patch(resource):"},{"line_number":66,"context_line":"    ml2_method \u003d \u0027_create_%s_db\u0027 % resource"},{"line_number":67,"context_line":"    if getattr(manager.NeutronManager.get_plugin(), ml2_method, False):"},{"line_number":68,"context_line":"        return ml2_method"},{"line_number":69,"context_line":"    else:"},{"line_number":70,"context_line":"        return \u0027create_%s\u0027 % resource"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_b6a6290d","line":67,"in_reply_to":"fa98f980_e57a0af0","updated":"2014-09-15 16:36:22.000000000","message":"Done","commit_id":"7ea1a0d50d45609b4675cb40ca691c96525a7898"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"5f73ee8742fa5b7c4d5340f9b7408992b9c12e48","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    if getattr(manager.NeutronManager.get_plugin(), ml2_method, False):"},{"line_number":68,"context_line":"        return ml2_method"},{"line_number":69,"context_line":"    else:"},{"line_number":70,"context_line":"        return \u0027create_%s\u0027 % resource"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"class NeutronDbPluginV2TestCase(testlib_api.WebTestCase,"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_4c7fb766","line":70,"updated":"2014-09-19 09:47:44.000000000","message":"this method needs a comment i guess.","commit_id":"44bb81dda92ecd074c63d4dc5bc2317529a07af0"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"f2f8a24b3a59620e95d8a55599b0d7c665cd058a","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def _get_method_to_patch(resource):"},{"line_number":66,"context_line":"    ml2_method \u003d \u0027_create_%s_db\u0027 % resource"},{"line_number":67,"context_line":"    if getattr(manager.NeutronManager.get_plugin(), ml2_method, False):"},{"line_number":68,"context_line":"        return ml2_method"},{"line_number":69,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_33e94b1b","line":66,"updated":"2014-09-20 19:14:43.000000000","message":"It is not a good idea to have ML2 related code in test_db_plugin. Can we override this method in ML2 db test?","commit_id":"0183419cda33e6e10c78737ea4a9b6b4c5780c0b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"621a718fc04a558c34253768dfce14e0504e64be","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def _get_method_to_patch(resource):"},{"line_number":66,"context_line":"    ml2_method \u003d \u0027_create_%s_db\u0027 % resource"},{"line_number":67,"context_line":"    if getattr(manager.NeutronManager.get_plugin(), ml2_method, False):"},{"line_number":68,"context_line":"        return ml2_method"},{"line_number":69,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_a30a0e1f","line":66,"in_reply_to":"da9df570_13c1a72e","updated":"2014-09-23 14:40:25.000000000","message":"I think a reasonable approach to this is to file a bug on this AND to add TODO or FIXME(?) here.","commit_id":"0183419cda33e6e10c78737ea4a9b6b4c5780c0b"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"b2d1a8d594e9dfc36e9048613b97e4ebe0ff1b02","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def _get_method_to_patch(resource):"},{"line_number":66,"context_line":"    ml2_method \u003d \u0027_create_%s_db\u0027 % resource"},{"line_number":67,"context_line":"    if getattr(manager.NeutronManager.get_plugin(), ml2_method, False):"},{"line_number":68,"context_line":"        return ml2_method"},{"line_number":69,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_13c1a72e","line":66,"in_reply_to":"da9df570_33e94b1b","updated":"2014-09-20 21:25:56.000000000","message":"Makes sense. Please note the comment I posted on Sep 15, 2:05 PM Patch Set 17:\n\"@Chuck It turns out a bunch of mechanism driver unit tests use the NeutronDbPluginV2TestCase class directly and not through Ml2PluginV2TestCase. We may want to look into making changes to those mechanism drivers but I think that would be out of scope for this patch set. So I am going back to the original checking for specific methods. Please let me know what you think.\"\n\nWe may want to open a bug for mechanism drivers that do this (and I believe there are several of them) but without changing them I am not sure where we can move this to. Any other place that makes sense but don\u0027t break mechanism drivers tests?","commit_id":"0183419cda33e6e10c78737ea4a9b6b4c5780c0b"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"af880ef7faf989b50252a072cb0e4ec2239f2ae1","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def _get_method_to_patch(resource):"},{"line_number":66,"context_line":"    ml2_method \u003d \u0027_create_%s_db\u0027 % resource"},{"line_number":67,"context_line":"    if getattr(manager.NeutronManager.get_plugin(), ml2_method, False):"},{"line_number":68,"context_line":"        return ml2_method"},{"line_number":69,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_6b162f57","line":66,"in_reply_to":"da9df570_a30a0e1f","updated":"2014-09-23 22:05:32.000000000","message":"Done","commit_id":"0183419cda33e6e10c78737ea4a9b6b4c5780c0b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"5ab2177b9bfe027b345a3ff0e5973928e43905d3","unresolved":false,"context_lines":[{"line_number":65,"context_line":"# TODO(banix): Move the following method to ML2 db test module when ML2"},{"line_number":66,"context_line":"# mechanism driver unit tests are corrected to use Ml2PluginV2TestCase"},{"line_number":67,"context_line":"# instead of directly using NeutronDbPluginV2TestCase"},{"line_number":68,"context_line":"def _get_method_to_patch(resource):"},{"line_number":69,"context_line":"    ml2_method \u003d \u0027_create_%s_db\u0027 % resource"},{"line_number":70,"context_line":"    if getattr(manager.NeutronManager.get_plugin(), ml2_method, False):"},{"line_number":71,"context_line":"        return ml2_method"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_68d2a701","line":68,"updated":"2014-09-24 10:30:07.000000000","message":"\"_get_create_db_method\" seems better name.\nIt is from two reasons because it just returns a method to *create* db entry and because it is not directly related to *mock*.","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"ef227acd0f2d39e34164363d0137d3340d781ecc","unresolved":false,"context_lines":[{"line_number":65,"context_line":"# TODO(banix): Move the following method to ML2 db test module when ML2"},{"line_number":66,"context_line":"# mechanism driver unit tests are corrected to use Ml2PluginV2TestCase"},{"line_number":67,"context_line":"# instead of directly using NeutronDbPluginV2TestCase"},{"line_number":68,"context_line":"def _get_method_to_patch(resource):"},{"line_number":69,"context_line":"    ml2_method \u003d \u0027_create_%s_db\u0027 % resource"},{"line_number":70,"context_line":"    if getattr(manager.NeutronManager.get_plugin(), ml2_method, False):"},{"line_number":71,"context_line":"        return ml2_method"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_76e8bc10","line":68,"in_reply_to":"da9df570_68d2a701","updated":"2014-09-24 19:47:39.000000000","message":"Done","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"5ab2177b9bfe027b345a3ff0e5973928e43905d3","unresolved":false,"context_lines":[{"line_number":67,"context_line":"# instead of directly using NeutronDbPluginV2TestCase"},{"line_number":68,"context_line":"def _get_method_to_patch(resource):"},{"line_number":69,"context_line":"    ml2_method \u003d \u0027_create_%s_db\u0027 % resource"},{"line_number":70,"context_line":"    if getattr(manager.NeutronManager.get_plugin(), ml2_method, False):"},{"line_number":71,"context_line":"        return ml2_method"},{"line_number":72,"context_line":"    else:"},{"line_number":73,"context_line":"        return \u0027create_%s\u0027 % resource"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_88f42b88","line":70,"updated":"2014-09-24 10:30:07.000000000","message":"Please consider:\n\n if hasattr(manager.NeutronManager.get_plugin(), ml2_method):\n     return ml2_method","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"ef227acd0f2d39e34164363d0137d3340d781ecc","unresolved":false,"context_lines":[{"line_number":67,"context_line":"# instead of directly using NeutronDbPluginV2TestCase"},{"line_number":68,"context_line":"def _get_method_to_patch(resource):"},{"line_number":69,"context_line":"    ml2_method \u003d \u0027_create_%s_db\u0027 % resource"},{"line_number":70,"context_line":"    if getattr(manager.NeutronManager.get_plugin(), ml2_method, False):"},{"line_number":71,"context_line":"        return ml2_method"},{"line_number":72,"context_line":"    else:"},{"line_number":73,"context_line":"        return \u0027create_%s\u0027 % resource"}],"source_content_type":"text/x-python","patch_set":23,"id":"da9df570_b6d14459","line":70,"in_reply_to":"da9df570_88f42b88","updated":"2014-09-24 19:47:39.000000000","message":"Done","commit_id":"09e2b3c3d0175e49d9b9f945d31d923dff98ca75"}]}
