)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"393876a38a2631e6ddbfa6b4c3c029d0367cfa37","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This patch also performs NVP/NSX renaming where appropriate."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Related to blueprint nvp-async-backend-communication"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: Ib0e9ed0f58e7fa3497a93e9cd3baa9cb81ad797b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F%2FpUk%3D","line":18,"updated":"2013-10-30 23:55:19.000000000","message":"so it\u0027s worth adding the reference to this other one: nicira-plugin-renaming","commit_id":"e326b767fdd0756a4082cc5576c91962084392e3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"45622c8dd06ad5e686d0c382d8bebdf649b63e8c","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This patch also performs NVP/NSX renaming where appropriate."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Related to blueprint nvp-async-backend-communication"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: Ib0e9ed0f58e7fa3497a93e9cd3baa9cb81ad797b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F%2FpM4%3D","line":18,"in_reply_to":"AAAATn%2F%2FpUk%3D","updated":"2013-10-31 00:09:00.000000000","message":"as you wish my master","commit_id":"e326b767fdd0756a4082cc5576c91962084392e3"}],"neutron/db/migration/alembic_migrations/versions/4ca36cfc898c_nsx_router_mappings.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"12d509716ac7e4bc23ce1264aad89e44a990bbec","unresolved":false,"context_lines":[{"line_number":18,"context_line":"\"\"\"nsx_router_mappings"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Revision ID: 4ca36cfc898c"},{"line_number":21,"context_line":"Revises: 49f5e553f61f"},{"line_number":22,"context_line":"Create Date: 2014-01-08 10:41:43.373031"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2F0J4%3D","line":21,"updated":"2014-02-10 16:50:45.000000000","message":"new revision?","commit_id":"fb6bd57f8520c8418faee2cf115f5aada3490556"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1a99d08b59c2647ae042a8d4bc5f6b11979e29c4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright 2014 OpenStack Foundation"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUX%2F%2FiC4%3D","line":1,"updated":"2014-02-12 15:11:04.000000000","message":"lines 1 -3 not needed","commit_id":"ce11afb51feefbc7dae0f1a562ebee340950a354"}],"neutron/db/migration/alembic_migrations/versions/50e86cb2637a_nsx_mappings.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8916d3c85f6b531a1f0302c12efcdb27acb6702a","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        existing_nullable\u003dTrue,"},{"line_number":56,"context_line":"        existing_type\u003dsa.String(length\u003d36))"},{"line_number":57,"context_line":"    # Create table for router/lrouter mappings"},{"line_number":58,"context_line":"    op.create_table("},{"line_number":59,"context_line":"        \u0027neutron_nsx_router_mappings\u0027,"},{"line_number":60,"context_line":"        sa.Column(\u0027neutron_id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":61,"context_line":"        sa.Column(\u0027nsx_id\u0027, sa.String(length\u003d36), nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAT3%2F%2F1yc%3D","line":58,"updated":"2013-12-30 11:53:19.000000000","message":"What happens to trunk chasers? What if they already executed this migration? Does this need to be split into another migration?","commit_id":"369bcb8b879879a4c266cfd87a0ccc98460b51e4"}],"neutron/db/migration/alembic_migrations/versions/50e86cb2637a_nsx_port_mappings.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"393876a38a2631e6ddbfa6b4c3c029d0367cfa37","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        new_column_name\u003d\u0027nsx_port_id\u0027,"},{"line_number":54,"context_line":"        existing_nullable\u003dTrue,"},{"line_number":55,"context_line":"        existing_type\u003dsa.String(length\u003d36))"},{"line_number":56,"context_line":"    # Create table for router/lrouter mappings"},{"line_number":57,"context_line":"    op.create_table("},{"line_number":58,"context_line":"        \u0027neutron_nsx_router_mappings\u0027,"},{"line_number":59,"context_line":"        sa.Column(\u0027neutron_id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FpUc%3D","line":56,"updated":"2013-10-30 23:55:19.000000000","message":"how do we get existing deployments pick this one up?","commit_id":"e326b767fdd0756a4082cc5576c91962084392e3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"45622c8dd06ad5e686d0c382d8bebdf649b63e8c","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        new_column_name\u003d\u0027nsx_port_id\u0027,"},{"line_number":54,"context_line":"        existing_nullable\u003dTrue,"},{"line_number":55,"context_line":"        existing_type\u003dsa.String(length\u003d36))"},{"line_number":56,"context_line":"    # Create table for router/lrouter mappings"},{"line_number":57,"context_line":"    op.create_table("},{"line_number":58,"context_line":"        \u0027neutron_nsx_router_mappings\u0027,"},{"line_number":59,"context_line":"        sa.Column(\u0027neutron_id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FpMw%3D","line":56,"in_reply_to":"AAAATn%2F%2FpUc%3D","updated":"2013-10-31 00:09:00.000000000","message":"Do you mean this migration won\u0027t be executed for an existing havana deployment? It should...","commit_id":"e326b767fdd0756a4082cc5576c91962084392e3"}],"neutron/plugins/nicira/NeutronPlugin.py":[{"author":{"_account_id":6601,"name":"James Carey","email":"jecarey@yerac.com","username":"jecarey"},"change_message_id":"c84184dd4d409066f036e763bd39300e3d6392d2","unresolved":false,"context_lines":[{"line_number":364,"context_line":"                                               attachment,"},{"line_number":365,"context_line":"                                               attachment_type,"},{"line_number":366,"context_line":"                                               attachment_vlan)"},{"line_number":367,"context_line":"            LOG.debug(_(\"Attached %(att)s to NVP router port %(port)s\"),"},{"line_number":368,"context_line":"                      {\u0027att\u0027: attachment, \u0027port\u0027: nvp_router_port_id})"},{"line_number":369,"context_line":"        except NvpApiClient.NvpApiException:"},{"line_number":370,"context_line":"            # Must remove NVP logical port"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FwjQ%3D","line":367,"updated":"2014-01-08 20:31:46.000000000","message":"Are you going to update the messages from NVP to NSX in a different commit?","commit_id":"0b4ad4004a7128e530bef78e4dc7712f48d2795d"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"d6fc7c83a453f9ae8a694f8b7655192975ddfe8c","unresolved":false,"context_lines":[{"line_number":364,"context_line":"                                               attachment,"},{"line_number":365,"context_line":"                                               attachment_type,"},{"line_number":366,"context_line":"                                               attachment_vlan)"},{"line_number":367,"context_line":"            LOG.debug(_(\"Attached %(att)s to NVP router port %(port)s\"),"},{"line_number":368,"context_line":"                      {\u0027att\u0027: attachment, \u0027port\u0027: nvp_router_port_id})"},{"line_number":369,"context_line":"        except NvpApiClient.NvpApiException:"},{"line_number":370,"context_line":"            # Must remove NVP logical port"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FwK4%3D","line":367,"in_reply_to":"AAAAUH%2F%2FwjQ%3D","updated":"2014-01-08 21:29:56.000000000","message":"Yes. There is a blueprint that I and the rest of my team will implement throughout Icehouse.","commit_id":"0b4ad4004a7128e530bef78e4dc7712f48d2795d"},{"author":{"_account_id":6601,"name":"James Carey","email":"jecarey@yerac.com","username":"jecarey"},"change_message_id":"c84184dd4d409066f036e763bd39300e3d6392d2","unresolved":false,"context_lines":[{"line_number":573,"context_line":"            # Assuming subnet being attached is on first fixed ip"},{"line_number":574,"context_line":"            # element in port data"},{"line_number":575,"context_line":"            subnet_id \u003d port_data[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027]"},{"line_number":576,"context_line":"            router_id \u003d nsx_utils.get_nsx_router_id("},{"line_number":577,"context_line":"                context.session, self.cluster, port_data[\u0027device_id\u0027])"},{"line_number":578,"context_line":"            # Create peer port on logical router"},{"line_number":579,"context_line":"            self._create_and_attach_router_port("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2Fwi8%3D","line":576,"updated":"2014-01-08 20:31:46.000000000","message":"change varaible to nsx_router_id (also usage below)","commit_id":"0b4ad4004a7128e530bef78e4dc7712f48d2795d"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"d6fc7c83a453f9ae8a694f8b7655192975ddfe8c","unresolved":false,"context_lines":[{"line_number":573,"context_line":"            # Assuming subnet being attached is on first fixed ip"},{"line_number":574,"context_line":"            # element in port data"},{"line_number":575,"context_line":"            subnet_id \u003d port_data[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027]"},{"line_number":576,"context_line":"            router_id \u003d nsx_utils.get_nsx_router_id("},{"line_number":577,"context_line":"                context.session, self.cluster, port_data[\u0027device_id\u0027])"},{"line_number":578,"context_line":"            # Create peer port on logical router"},{"line_number":579,"context_line":"            self._create_and_attach_router_port("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FwKc%3D","line":576,"in_reply_to":"AAAAUH%2F%2Fwi8%3D","updated":"2014-01-08 21:29:56.000000000","message":"can be done","commit_id":"0b4ad4004a7128e530bef78e4dc7712f48d2795d"},{"author":{"_account_id":6601,"name":"James Carey","email":"jecarey@yerac.com","username":"jecarey"},"change_message_id":"c84184dd4d409066f036e763bd39300e3d6392d2","unresolved":false,"context_lines":[{"line_number":608,"context_line":"            raise nvp_exc.NvpPluginException("},{"line_number":609,"context_line":"                err_msg\u003d(_(\"The gateway port for the router %s \""},{"line_number":610,"context_line":"                           \"was not found on the NSX backend\")"},{"line_number":611,"context_line":"                         % nsx_router_id))"},{"line_number":612,"context_line":"        return lr_port"},{"line_number":613,"context_line":""},{"line_number":614,"context_line":"    @lockutils.synchronized(\u0027nicira\u0027, \u0027neutron-\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FwiY%3D","line":611,"updated":"2014-01-08 20:31:46.000000000","message":"Should this indicate it is the logical router so it is clear that the id is the NSX id?","commit_id":"0b4ad4004a7128e530bef78e4dc7712f48d2795d"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"d6fc7c83a453f9ae8a694f8b7655192975ddfe8c","unresolved":false,"context_lines":[{"line_number":608,"context_line":"            raise nvp_exc.NvpPluginException("},{"line_number":609,"context_line":"                err_msg\u003d(_(\"The gateway port for the router %s \""},{"line_number":610,"context_line":"                           \"was not found on the NSX backend\")"},{"line_number":611,"context_line":"                         % nsx_router_id))"},{"line_number":612,"context_line":"        return lr_port"},{"line_number":613,"context_line":""},{"line_number":614,"context_line":"    @lockutils.synchronized(\u0027nicira\u0027, \u0027neutron-\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FwKo%3D","line":611,"in_reply_to":"AAAAUH%2F%2FwiY%3D","updated":"2014-01-08 21:29:56.000000000","message":"technically even the neutron router is a logical one.\nI can clarify that this a NSX ID further.","commit_id":"0b4ad4004a7128e530bef78e4dc7712f48d2795d"},{"author":{"_account_id":6601,"name":"James Carey","email":"jecarey@yerac.com","username":"jecarey"},"change_message_id":"c84184dd4d409066f036e763bd39300e3d6392d2","unresolved":false,"context_lines":[{"line_number":691,"context_line":"        LOG.debug(_(\"_nvp_delete_ext_gw_port completed on external network \""},{"line_number":692,"context_line":"                    \"%(ext_net_id)s, attached to router:%(router_id)s\"),"},{"line_number":693,"context_line":"                  {\u0027ext_net_id\u0027: port_data[\u0027network_id\u0027],"},{"line_number":694,"context_line":"                   \u0027router_id\u0027: nsx_router_id})"},{"line_number":695,"context_line":""},{"line_number":696,"context_line":"    def _nvp_create_l2_gw_port(self, context, port_data):"},{"line_number":697,"context_line":"        \"\"\"Create a switch port, and attach it to a L2 gateway attachment.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FwiE%3D","line":694,"updated":"2014-01-08 20:31:46.000000000","message":"Will it be clear that this is the logical router id?","commit_id":"0b4ad4004a7128e530bef78e4dc7712f48d2795d"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"d6fc7c83a453f9ae8a694f8b7655192975ddfe8c","unresolved":false,"context_lines":[{"line_number":691,"context_line":"        LOG.debug(_(\"_nvp_delete_ext_gw_port completed on external network \""},{"line_number":692,"context_line":"                    \"%(ext_net_id)s, attached to router:%(router_id)s\"),"},{"line_number":693,"context_line":"                  {\u0027ext_net_id\u0027: port_data[\u0027network_id\u0027],"},{"line_number":694,"context_line":"                   \u0027router_id\u0027: nsx_router_id})"},{"line_number":695,"context_line":""},{"line_number":696,"context_line":"    def _nvp_create_l2_gw_port(self, context, port_data):"},{"line_number":697,"context_line":"        \"\"\"Create a switch port, and attach it to a L2 gateway attachment.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FwKY%3D","line":694,"in_reply_to":"AAAAUH%2F%2FwiE%3D","updated":"2014-01-08 21:29:56.000000000","message":"Done","commit_id":"0b4ad4004a7128e530bef78e4dc7712f48d2795d"},{"author":{"_account_id":6601,"name":"James Carey","email":"jecarey@yerac.com","username":"jecarey"},"change_message_id":"c84184dd4d409066f036e763bd39300e3d6392d2","unresolved":false,"context_lines":[{"line_number":1570,"context_line":"                    context, router_id, previous_routes)"},{"line_number":1571,"context_line":""},{"line_number":1572,"context_line":"    def _delete_lrouter(self, context, router_id, nsx_router_id):"},{"line_number":1573,"context_line":"        # The neutron router id (router_id) is ignored in this routine"},{"line_number":1574,"context_line":"        nvplib.delete_lrouter(self.cluster, nsx_router_id)"},{"line_number":1575,"context_line":""},{"line_number":1576,"context_line":"    def delete_router(self, context, router_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FweM%3D","line":1573,"updated":"2014-01-08 20:31:46.000000000","message":"In other cases the parameter was simply changed.  I\u0027m not clear why you don\u0027t do that here as well.","commit_id":"0b4ad4004a7128e530bef78e4dc7712f48d2795d"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"d6fc7c83a453f9ae8a694f8b7655192975ddfe8c","unresolved":false,"context_lines":[{"line_number":1570,"context_line":"                    context, router_id, previous_routes)"},{"line_number":1571,"context_line":""},{"line_number":1572,"context_line":"    def _delete_lrouter(self, context, router_id, nsx_router_id):"},{"line_number":1573,"context_line":"        # The neutron router id (router_id) is ignored in this routine"},{"line_number":1574,"context_line":"        nvplib.delete_lrouter(self.cluster, nsx_router_id)"},{"line_number":1575,"context_line":""},{"line_number":1576,"context_line":"    def delete_router(self, context, router_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FwKM%3D","line":1573,"in_reply_to":"AAAAUH%2F%2FweM%3D","updated":"2014-01-08 21:29:56.000000000","message":"there is a plugin which inherits from this class and uses the neutron_id.\n\ncheck NeutronServicePlugin.NvpAdvancedPlugin","commit_id":"0b4ad4004a7128e530bef78e4dc7712f48d2795d"},{"author":{"_account_id":6601,"name":"James Carey","email":"jecarey@yerac.com","username":"jecarey"},"change_message_id":"c84184dd4d409066f036e763bd39300e3d6392d2","unresolved":false,"context_lines":[{"line_number":1619,"context_line":"        # Perform the actual delete on the Neutron DB"},{"line_number":1620,"context_line":"        try:"},{"line_number":1621,"context_line":"            super(NvpPluginV2, self).delete_router(context, router_id)"},{"line_number":1622,"context_line":"        except Exception:"},{"line_number":1623,"context_line":"            # NOTE(salv-orlando): Broad catching as the following action"},{"line_number":1624,"context_line":"            # needs to be performed for every exception."},{"line_number":1625,"context_line":"            # Put the router in ERROR status"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FwfY%3D","line":1622,"updated":"2014-01-08 20:31:46.000000000","message":"If you reach this, isn\u0027t the logical (NSX) router gone (because the call to self._delete_lrouter worked above)?   If that is the case, should the entry in the mapping table be removed since the NSX router uuid no longer exists?","commit_id":"0b4ad4004a7128e530bef78e4dc7712f48d2795d"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"efc01d4fbf4433daf05a7df8710d5d09abf8eb19","unresolved":false,"context_lines":[{"line_number":1619,"context_line":"        # Perform the actual delete on the Neutron DB"},{"line_number":1620,"context_line":"        try:"},{"line_number":1621,"context_line":"            super(NvpPluginV2, self).delete_router(context, router_id)"},{"line_number":1622,"context_line":"        except Exception:"},{"line_number":1623,"context_line":"            # NOTE(salv-orlando): Broad catching as the following action"},{"line_number":1624,"context_line":"            # needs to be performed for every exception."},{"line_number":1625,"context_line":"            # Put the router in ERROR status"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2Fv14%3D","line":1622,"in_reply_to":"AAAAUH%2F%2FwfY%3D","updated":"2014-01-08 22:35:45.000000000","message":"Done","commit_id":"0b4ad4004a7128e530bef78e4dc7712f48d2795d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"c21c4eef9b0bf6345f0cfbff63bb0a200f29bc98","unresolved":false,"context_lines":[{"line_number":1447,"context_line":"        # NOTE(salv-orlando): Pre-generating uuid for Neutron"},{"line_number":1448,"context_line":"        # router. This will be removed once the router create operation"},{"line_number":1449,"context_line":"        # becomes an asynchronous task"},{"line_number":1450,"context_line":"        neutron_router_id \u003d str(uuid.uuid4())"},{"line_number":1451,"context_line":"        r[\u0027id\u0027] \u003d neutron_router_id"},{"line_number":1452,"context_line":"        lrouter \u003d self._create_lrouter(context, r, nexthop)"},{"line_number":1453,"context_line":"        # Update \u0027distributed\u0027 with value returned from NVP"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FC7k%3D","line":1450,"updated":"2014-01-17 23:49:55.000000000","message":"nit: could remove neutron_router_id and just use r[\u0027id\u0027] but doesn\u0027t matter.","commit_id":"18f51bc3057a670cf5c7da7b4f965b32045e2fe2"}],"neutron/plugins/nicira/NeutronServicePlugin.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1a99d08b59c2647ae042a8d4bc5f6b11979e29c4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright 2013 VMware, Inc."},{"line_number":4,"context_line":"# All Rights Reserved"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUX%2F%2FiCI%3D","line":1,"updated":"2014-02-12 15:11:04.000000000","message":"not needed","commit_id":"ce11afb51feefbc7dae0f1a562ebee340950a354"}],"neutron/plugins/nicira/common/nsx_utils.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"393876a38a2631e6ddbfa6b4c3c029d0367cfa37","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    return nvp_switch_id, nvp_port_id"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"def get_nsx_router_id(session, cluster, neutron_router_id):"},{"line_number":78,"context_line":"    \"\"\"Return the NSX router uuid for a given neutron router."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    First, look up the Neutron database. If not found, execute"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FpPM%3D","line":77,"updated":"2013-10-30 23:55:19.000000000","message":"wouldn\u0027t this need coverage?","commit_id":"e326b767fdd0756a4082cc5576c91962084392e3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"45622c8dd06ad5e686d0c382d8bebdf649b63e8c","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    return nvp_switch_id, nvp_port_id"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"def get_nsx_router_id(session, cluster, neutron_router_id):"},{"line_number":78,"context_line":"    \"\"\"Return the NSX router uuid for a given neutron router."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    First, look up the Neutron database. If not found, execute"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FpMk%3D","line":77,"in_reply_to":"AAAATn%2F%2FpPM%3D","updated":"2013-10-31 00:09:00.000000000","message":"Ok, I\u0027ll then put a blanket on it.","commit_id":"e326b767fdd0756a4082cc5576c91962084392e3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8916d3c85f6b531a1f0302c12efcdb27acb6702a","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            return"},{"line_number":101,"context_line":"        nsx_router \u003d nsx_routers[0]"},{"line_number":102,"context_line":"        nsx_router_id \u003d nsx_router[\u0027uuid\u0027]"},{"line_number":103,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":104,"context_line":"            # Create DB mapping"},{"line_number":105,"context_line":"            nicira_db.add_neutron_nsx_router_mapping("},{"line_number":106,"context_line":"                session,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAT3%2F%2F1xw%3D","line":103,"updated":"2013-12-30 11:53:19.000000000","message":"It looks like the with statement is already in the called method\u0027s body so here this can be removed.","commit_id":"369bcb8b879879a4c266cfd87a0ccc98460b51e4"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"553cb745595b7b0ee2be00afca45a12192755563","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            return"},{"line_number":101,"context_line":"        nsx_router \u003d nsx_routers[0]"},{"line_number":102,"context_line":"        nsx_router_id \u003d nsx_router[\u0027uuid\u0027]"},{"line_number":103,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":104,"context_line":"            # Create DB mapping"},{"line_number":105,"context_line":"            nicira_db.add_neutron_nsx_router_mapping("},{"line_number":106,"context_line":"                session,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAT3%2F%2F0d4%3D","line":103,"in_reply_to":"AAAAT3%2F%2F01U%3D","updated":"2013-12-30 20:40:15.000000000","message":"My apologies, but I am not sure I get it: what is the difference from these two:\n\nwith session.begin(subtransactions\u003dTrue):\n    with session.begin(subtransactions\u003dTrue):\n        # do something\n\nand:\n\nwith session.begin(subtransactions\u003dTrue):\n    # do something","commit_id":"369bcb8b879879a4c266cfd87a0ccc98460b51e4"},{"author":{"_account_id":5572,"name":"Don Kehn","display_name":"DEKehn","email":"dekehn@gmail.com","username":"dekehn"},"change_message_id":"bc17046ed029a6805ab3659fe2460ac0c68ff7bc","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            return"},{"line_number":101,"context_line":"        nsx_router \u003d nsx_routers[0]"},{"line_number":102,"context_line":"        nsx_router_id \u003d nsx_router[\u0027uuid\u0027]"},{"line_number":103,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":104,"context_line":"            # Create DB mapping"},{"line_number":105,"context_line":"            nicira_db.add_neutron_nsx_router_mapping("},{"line_number":106,"context_line":"                session,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAT3%2F%2Fycg%3D","line":103,"in_reply_to":"AAAAT3%2F%2F0d4%3D","updated":"2013-12-31 15:33:44.000000000","message":"If this is directed to me, there isn\u0027t a difference. My point was that if the caller starts the transaction it would be a duplication to start another transaction within the called routine, and given this situation, your correct, but if this routine would ever be called from another method where a transaction is not started this method is implementing its requirement for the transaction.","commit_id":"369bcb8b879879a4c266cfd87a0ccc98460b51e4"},{"author":{"_account_id":5572,"name":"Don Kehn","display_name":"DEKehn","email":"dekehn@gmail.com","username":"dekehn"},"change_message_id":"f9adc3f2109baf140c76066e16ed12babf8ee98c","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            return"},{"line_number":101,"context_line":"        nsx_router \u003d nsx_routers[0]"},{"line_number":102,"context_line":"        nsx_router_id \u003d nsx_router[\u0027uuid\u0027]"},{"line_number":103,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":104,"context_line":"            # Create DB mapping"},{"line_number":105,"context_line":"            nicira_db.add_neutron_nsx_router_mapping("},{"line_number":106,"context_line":"                session,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAT3%2F%2F01U%3D","line":103,"in_reply_to":"AAAAT3%2F%2F1xw%3D","updated":"2013-12-30 17:31:06.000000000","message":"It may not be necessary, but is there ever a situation where this could be called from somewhere else? In that this doesn\u0027t harm anything and with the subtrasactions\u003dTrue this protect it against a situation where something would call it without a transaction.\n\nA subtransaction indicates usage of the Session.begin() method in conjunction with the subtransactions\u003dTrue flag. This produces a non-transactional, delimiting construct that allows nesting of calls to begin() and commit(). It’s purpose is to allow the construction of code that can function within a transaction both independently of any external code that starts a transaction, as well as within a block that has already demarcated a transaction.","commit_id":"369bcb8b879879a4c266cfd87a0ccc98460b51e4"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"433861f39ab243b79ff1f9e0d36ae45a171ea180","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        nvp_port \u003d nvp_ports[0]"},{"line_number":64,"context_line":"        nvp_switch_id \u003d (nvp_port[\u0027_relations\u0027]"},{"line_number":65,"context_line":"                         [\u0027LogicalSwitchConfig\u0027][\u0027uuid\u0027])"},{"line_number":66,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":67,"context_line":"            if nvp_port_id:"},{"line_number":68,"context_line":"                # Mapping already exists. Delete before recreating"},{"line_number":69,"context_line":"                nicira_db.delete_neutron_nsx_port_mapping("}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F9pdQ%3D","side":"PARENT","line":66,"updated":"2014-02-05 11:22:39.000000000","message":"Is there a reason why we removed this?","commit_id":"7f070c5471b02928500d13acab9c5c3b08664ef8"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"5ec4e5eeb52a086cb22caf14913e691f128b328e","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        nvp_port \u003d nvp_ports[0]"},{"line_number":64,"context_line":"        nvp_switch_id \u003d (nvp_port[\u0027_relations\u0027]"},{"line_number":65,"context_line":"                         [\u0027LogicalSwitchConfig\u0027][\u0027uuid\u0027])"},{"line_number":66,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":67,"context_line":"            if nvp_port_id:"},{"line_number":68,"context_line":"                # Mapping already exists. Delete before recreating"},{"line_number":69,"context_line":"                nicira_db.delete_neutron_nsx_port_mapping("}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F9d6c%3D","side":"PARENT","line":66,"in_reply_to":"AAAAUH%2F9pdQ%3D","updated":"2014-02-06 18:34:41.000000000","message":"it was asked in a previous review as the function is always called from within a transaction","commit_id":"7f070c5471b02928500d13acab9c5c3b08664ef8"}],"neutron/plugins/nicira/dbexts/nicira_db.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"393876a38a2631e6ddbfa6b4c3c029d0367cfa37","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    return (session.query(model).filter_by(neutron_id\u003dneutron_id).delete())"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"def delete_neutron_nsx_port_mapping(session, neutron_id):"},{"line_number":94,"context_line":"    return _delete_by_neutron_id("},{"line_number":95,"context_line":"        session, nicira_models.NeutronNsxPortMapping, neutron_id)"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FpPQ%3D","line":93,"updated":"2013-10-30 23:55:19.000000000","message":"what are these for? I cannot see them used anywhere.","commit_id":"e326b767fdd0756a4082cc5576c91962084392e3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"45622c8dd06ad5e686d0c382d8bebdf649b63e8c","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    return (session.query(model).filter_by(neutron_id\u003dneutron_id).delete())"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"def delete_neutron_nsx_port_mapping(session, neutron_id):"},{"line_number":94,"context_line":"    return _delete_by_neutron_id("},{"line_number":95,"context_line":"        session, nicira_models.NeutronNsxPortMapping, neutron_id)"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FpMY%3D","line":93,"in_reply_to":"AAAATn%2F%2FpPQ%3D","updated":"2013-10-31 00:09:00.000000000","message":"I hit the cut \u0026 paste trigger.\nWe don\u0027t need any of them I guess, they\u0027re automatically removed by the cascade relationship.","commit_id":"e326b767fdd0756a4082cc5576c91962084392e3"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"433861f39ab243b79ff1f9e0d36ae45a171ea180","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"def _delete_by_neutron_id(session, model, neutron_id):"},{"line_number":104,"context_line":"    return (session.query(model).filter_by(neutron_id\u003dneutron_id).delete())"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"def delete_neutron_nsx_port_mapping(session, neutron_id):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F9pco%3D","line":104,"updated":"2014-02-05 11:22:39.000000000","message":"nit: line doesn\u0027t need to be warped in  ( )","commit_id":"7cf275c53bcdabae7447e170105085bb5234470e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"5ec4e5eeb52a086cb22caf14913e691f128b328e","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"def _delete_by_neutron_id(session, model, neutron_id):"},{"line_number":104,"context_line":"    return (session.query(model).filter_by(neutron_id\u003dneutron_id).delete())"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"def delete_neutron_nsx_port_mapping(session, neutron_id):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F9d6U%3D","line":104,"in_reply_to":"AAAAUH%2F9pco%3D","updated":"2014-02-06 18:34:41.000000000","message":"Done","commit_id":"7cf275c53bcdabae7447e170105085bb5234470e"}],"neutron/plugins/nicira/dbexts/nicira_models.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8916d3c85f6b531a1f0302c12efcdb27acb6702a","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    \"\"\"Maps neutron router identifiers to NSX identifiers.\"\"\""},{"line_number":78,"context_line":"    __tablename__ \u003d \u0027neutron_nsx_router_mappings\u0027"},{"line_number":79,"context_line":"    neutron_id \u003d Column(String(36),"},{"line_number":80,"context_line":"                        ForeignKey(\u0027routers.id\u0027, ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":81,"context_line":"                        primary_key\u003dTrue)"},{"line_number":82,"context_line":"    nsx_id \u003d Column(String(36))"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAT3%2F%2F1wQ%3D","line":80,"updated":"2013-12-30 11:53:19.000000000","message":"If I understand the code correctly, the super\u0027s delete_router is hit before deleting the nsx\u0027s router. If that\u0027s the case, the cascading policy will delete the mapping to the nsx router, thus causing you to always hit the backend to retrieve the nsx router uuid (as the db row will be missing). Please, confirm.","commit_id":"369bcb8b879879a4c266cfd87a0ccc98460b51e4"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b350cebde3ecdf54bb24a0e860dfbe98439d57b3","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    \"\"\"Maps neutron router identifiers to NSX identifiers.\"\"\""},{"line_number":78,"context_line":"    __tablename__ \u003d \u0027neutron_nsx_router_mappings\u0027"},{"line_number":79,"context_line":"    neutron_id \u003d Column(String(36),"},{"line_number":80,"context_line":"                        ForeignKey(\u0027routers.id\u0027, ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":81,"context_line":"                        primary_key\u003dTrue)"},{"line_number":82,"context_line":"    nsx_id \u003d Column(String(36))"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAT3%2F%2F1hA%3D","line":80,"in_reply_to":"AAAAT3%2F%2F1wQ%3D","updated":"2013-12-30 13:17:03.000000000","message":"Actually, on second inspection the nsx router id is retrieved before calling the base version of the delete_router, so actually things works as expected, so please disregard.","commit_id":"369bcb8b879879a4c266cfd87a0ccc98460b51e4"}]}
