)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"27023ca0f8497271a7dd11059e2562457633f054","unresolved":false,"context_lines":[{"line_number":14,"context_line":"Note: The Cisco plugin will require an out-of-band CSR setup and"},{"line_number":15,"context_line":"      running for operation."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Rev 2 has fixes for tox errors."},{"line_number":18,"context_line":"Rev 3 has rebase to get latest 41827 changes."},{"line_number":19,"context_line":"Rev 4 has code review comments, moving vendor config file chgs to 74156"},{"line_number":20,"context_line":"      review."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAAUn%2F%2F%2F%2BM%3D","line":17,"updated":"2014-02-22 17:07:38.000000000","message":"one more nit: this list of revs is not really necessary, please consider dropping it, it makes the commit message leaner","commit_id":"313e2d79d9186fcd11154fedd4309372c1a7910d"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"9b70dd1015cfeaaf47720dd3dcffa0d4715a59f8","unresolved":false,"context_lines":[{"line_number":14,"context_line":"Note: The Cisco plugin will require an out-of-band CSR setup and"},{"line_number":15,"context_line":"      running for operation."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Rev 2 has fixes for tox errors."},{"line_number":18,"context_line":"Rev 3 has rebase to get latest 41827 changes."},{"line_number":19,"context_line":"Rev 4 has code review comments, moving vendor config file chgs to 74156"},{"line_number":20,"context_line":"      review."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAAU3%2F%2F3q8%3D","line":17,"in_reply_to":"AAAAUn%2F%2F%2F%2BM%3D","updated":"2014-02-24 12:58:23.000000000","message":"Will do. Wanted to give some history for the initial revs and then, was going to pull later, but I can do that now.","commit_id":"313e2d79d9186fcd11154fedd4309372c1a7910d"}],"etc/neutron.conf":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"9b70dd1015cfeaaf47720dd3dcffa0d4715a59f8","unresolved":false,"context_lines":[{"line_number":395,"context_line":"# Otherwise comment the HA Proxy line"},{"line_number":396,"context_line":"#service_provider\u003dLOADBALANCER:Radware:neutron.services.loadbalancer.drivers.radware.driver.LoadBalancerDriver:default"},{"line_number":397,"context_line":"#service_provider\u003dVPN:openswan:neutron.services.vpn.service_drivers.ipsec.IPsecVPNDriver:default"},{"line_number":398,"context_line":"service_provider\u003dVPN:cisco:neutron.services.vpn.service_drivers.cisco_ipsec.CiscoCsrIPsecVPNDriver:default"}],"source_content_type":"text/plain","patch_set":7,"id":"AAAAU3%2F%2F3qs%3D","line":398,"updated":"2014-02-24 12:58:23.000000000","message":"I\u0027ll comment this out in next version. Had it active for testing with devstack.","commit_id":"313e2d79d9186fcd11154fedd4309372c1a7910d"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"0d68c1c2c2a5169dc5589e0a4501dbb1ae4d2cf7","unresolved":false,"context_lines":[{"line_number":420,"context_line":"# uncomment the following line to make the \u0027netscaler\u0027 LBaaS provider available."},{"line_number":421,"context_line":"# service_provider\u003dLOADBALANCER:NetScaler:neutron.services.loadbalancer.drivers.netscaler.netscaler_driver.NetScalerPluginDriver"},{"line_number":422,"context_line":"# Uncomment the following line to enable Cisco\u0027s VPN driver."},{"line_number":423,"context_line":"# service_provider\u003dVPN:cisco:neutron.services.vpn.service_drivers.cisco_ipsec.CiscoCsrIPsecVPNDriver:default"}],"source_content_type":"text/plain","patch_set":15,"id":"AAAAVX%2F%2Fq2M%3D","line":423,"updated":"2014-03-01 11:39:11.000000000","message":"\"default\" at the end of line looks unnecessary.","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"48a8151e1b8af84579cb8197acad2d66ff322488","unresolved":false,"context_lines":[{"line_number":420,"context_line":"# uncomment the following line to make the \u0027netscaler\u0027 LBaaS provider available."},{"line_number":421,"context_line":"# service_provider\u003dLOADBALANCER:NetScaler:neutron.services.loadbalancer.drivers.netscaler.netscaler_driver.NetScalerPluginDriver"},{"line_number":422,"context_line":"# Uncomment the following line to enable Cisco\u0027s VPN driver."},{"line_number":423,"context_line":"# service_provider\u003dVPN:cisco:neutron.services.vpn.service_drivers.cisco_ipsec.CiscoCsrIPsecVPNDriver:default"}],"source_content_type":"text/plain","patch_set":15,"id":"AAAAVX%2F%2FqkU%3D","line":423,"in_reply_to":"AAAAVX%2F%2Fq2M%3D","updated":"2014-03-01 17:42:28.000000000","message":"Correct, the openswan one will be the default (L415). Removing.","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"}],"etc/vpn_agent.ini":[{"author":{"_account_id":105,"name":"Kyle Mestery","email":"mestery@mestery.com","username":"mestery"},"change_message_id":"c95285e60f70423586a9a8558736130992ee437b","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#Status check interval"},{"line_number":14,"context_line":"#ipsec_status_check_interval\u003d60"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# Management port information to allow configuration of Cisco CSR for VPN via REST API."},{"line_number":17,"context_line":"#"},{"line_number":18,"context_line":"# Format is:"},{"line_number":19,"context_line":"# [CISCO_CSR:\u003cpublic IP\u003e]"}],"source_content_type":"text/x-properties","patch_set":2,"id":"AAAAUX%2F%2BulE%3D","line":16,"updated":"2014-02-19 14:52:36.000000000","message":"Wouldn\u0027t this make more sense to be in a separate vendor configuration file?","commit_id":"1d7550cdeb6ab9d61faace7eef92f98b5c2cde06"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b851399f5618fb389c3c5be506c21df16fbb3ed6","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#Status check interval"},{"line_number":14,"context_line":"#ipsec_status_check_interval\u003d60"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# Management port information to allow configuration of Cisco CSR for VPN via REST API."},{"line_number":17,"context_line":"#"},{"line_number":18,"context_line":"# Format is:"},{"line_number":19,"context_line":"# [CISCO_CSR:\u003cpublic IP\u003e]"}],"source_content_type":"text/x-properties","patch_set":2,"id":"AAAAUX%2F%2BkHI%3D","line":16,"in_reply_to":"AAAAUX%2F%2BulE%3D","updated":"2014-02-20 14:22:08.000000000","message":"Sure I can do that. Currently, this file is specifically for all the VPN agent settings.\n\nWhere should this new services config file reside (as it\u0027s not an L2 plugin)? Any conventions on naming?","commit_id":"1d7550cdeb6ab9d61faace7eef92f98b5c2cde06"}],"neutron/db/migration/alembic_migrations/versions/24c7ea5160d7_cisco_csr_vpnaas.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"652c74a337c2d2b15d18753a595297b7f2a561e0","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        return"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    op.create_table("},{"line_number":46,"context_line":"        \u0027csr_identifier_map\u0027,"},{"line_number":47,"context_line":"        sa.Column(\u0027tenant_id\u0027, sa.String(length\u003d255), nullable\u003dTrue),"},{"line_number":48,"context_line":"        sa.Column(\u0027ipsec_site_conn_id\u0027, sa.String(length\u003d64),"},{"line_number":49,"context_line":"                  primary_key\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2Biko%3D","line":46,"updated":"2014-02-20 17:28:52.000000000","message":"Consider naming it \u0027cisco_csr_identifier_map\u0027.","commit_id":"5b0ad705343549b91ded8dd15110a86350b05c4a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"262c8889eb0a9b913f5aa2a101a7043640867e22","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        return"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    op.create_table("},{"line_number":46,"context_line":"        \u0027csr_identifier_map\u0027,"},{"line_number":47,"context_line":"        sa.Column(\u0027tenant_id\u0027, sa.String(length\u003d255), nullable\u003dTrue),"},{"line_number":48,"context_line":"        sa.Column(\u0027ipsec_site_conn_id\u0027, sa.String(length\u003d64),"},{"line_number":49,"context_line":"                  primary_key\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2BgwE%3D","line":46,"in_reply_to":"AAAAUX%2F%2Biko%3D","updated":"2014-02-20 19:59:03.000000000","message":"Good point. Done","commit_id":"5b0ad705343549b91ded8dd15110a86350b05c4a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1c1d00a64bcf8fbec212fcff8aaad526b82ff4e5","unresolved":false,"context_lines":[{"line_number":17,"context_line":"\"\"\"Cisco CSR VPNaaS"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Revision ID: 24c7ea5160d7"},{"line_number":20,"context_line":"Revises: havana"},{"line_number":21,"context_line":"Create Date: 2014-02-03 13:06:50.407601"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUn%2F%2F%2F%2FQ%3D","line":20,"updated":"2014-02-22 17:05:58.000000000","message":"nit: this should match the down_revision below.","commit_id":"313e2d79d9186fcd11154fedd4309372c1a7910d"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"9b70dd1015cfeaaf47720dd3dcffa0d4715a59f8","unresolved":false,"context_lines":[{"line_number":17,"context_line":"\"\"\"Cisco CSR VPNaaS"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Revision ID: 24c7ea5160d7"},{"line_number":20,"context_line":"Revises: havana"},{"line_number":21,"context_line":"Create Date: 2014-02-03 13:06:50.407601"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAU3%2F%2F3i4%3D","line":20,"in_reply_to":"AAAAUn%2F%2F%2F%2FQ%3D","updated":"2014-02-24 12:58:23.000000000","message":"Done","commit_id":"313e2d79d9186fcd11154fedd4309372c1a7910d"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"0ad0f2b2d0b397d5fc140d56f8737a2a27ebca11","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        \u0027cisco_csr_identifier_map\u0027,"},{"line_number":44,"context_line":"        sa.Column(\u0027tenant_id\u0027, sa.String(length\u003d255), nullable\u003dTrue),"},{"line_number":45,"context_line":"        sa.Column(\u0027ipsec_site_conn_id\u0027, sa.String(length\u003d64),"},{"line_number":46,"context_line":"                  primary_key\u003dTrue),"},{"line_number":47,"context_line":"        sa.Column(\u0027csr_tunnel_id\u0027, sa.Integer(), nullable\u003dFalse),"},{"line_number":48,"context_line":"        sa.Column(\u0027csr_ike_policy_id\u0027, sa.Integer(), nullable\u003dFalse),"},{"line_number":49,"context_line":"        sa.Column(\u0027csr_ipsec_policy_id\u0027, sa.Integer(), nullable\u003dFalse))"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAVn%2F%2F%2FBw%3D","line":46,"updated":"2014-03-02 23:48:49.000000000","message":"Do you need to add the foreign key constraint here?\n\n  sa.ForeignKeyConstraint([\u0027ipsec_site_conn_id\u0027], [\u0027ipsec_site_connections.id\u0027])","commit_id":"96191b048f2bb970ef3fa0679a6957e3fc29fb79"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"917643167cae568e5c24b0ea772aae38aa916d45","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        \u0027cisco_csr_identifier_map\u0027,"},{"line_number":44,"context_line":"        sa.Column(\u0027tenant_id\u0027, sa.String(length\u003d255), nullable\u003dTrue),"},{"line_number":45,"context_line":"        sa.Column(\u0027ipsec_site_conn_id\u0027, sa.String(length\u003d64),"},{"line_number":46,"context_line":"                  primary_key\u003dTrue),"},{"line_number":47,"context_line":"        sa.Column(\u0027csr_tunnel_id\u0027, sa.Integer(), nullable\u003dFalse),"},{"line_number":48,"context_line":"        sa.Column(\u0027csr_ike_policy_id\u0027, sa.Integer(), nullable\u003dFalse),"},{"line_number":49,"context_line":"        sa.Column(\u0027csr_ipsec_policy_id\u0027, sa.Integer(), nullable\u003dFalse))"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAVn%2F%2F7Hw%3D","line":46,"in_reply_to":"AAAAVn%2F%2F%2FBw%3D","updated":"2014-03-03 12:10:59.000000000","message":"Yes, probably should to be consistent with database definition.","commit_id":"96191b048f2bb970ef3fa0679a6957e3fc29fb79"}],"neutron/db/vpn/vpn_db.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"1afd83b7064472835f6daaa39d81010cdb270852","unresolved":false,"context_lines":[{"line_number":391,"context_line":"            conn_db \u003d self._get_ipsec_site_connection(context, conn_id)"},{"line_number":392,"context_line":"        except vpnaas.IPsecSiteConnectionNotFound:"},{"line_number":393,"context_line":"            return"},{"line_number":394,"context_line":"        if (not utils.in_pending_status(conn_db.status) or updated_pending):"},{"line_number":395,"context_line":"            conn_db.status \u003d new_status"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"    def _make_ikepolicy_dict(self, ikepolicy, fields\u003dNone):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAU3%2F%2Ftq8%3D","line":394,"updated":"2014-02-25 05:35:37.000000000","message":"nit: outer parentheses not needed.","commit_id":"f3c6c0fec697c31ca3f58b35b44309bc2e7cf890"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"f3285251598c8425e669ee8dd2537cba1b5b33ab","unresolved":false,"context_lines":[{"line_number":391,"context_line":"            conn_db \u003d self._get_ipsec_site_connection(context, conn_id)"},{"line_number":392,"context_line":"        except vpnaas.IPsecSiteConnectionNotFound:"},{"line_number":393,"context_line":"            return"},{"line_number":394,"context_line":"        if (not utils.in_pending_status(conn_db.status) or updated_pending):"},{"line_number":395,"context_line":"            conn_db.status \u003d new_status"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"    def _make_ikepolicy_dict(self, ikepolicy, fields\u003dNone):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAU3%2F%2Fp5Q%3D","line":394,"in_reply_to":"AAAAU3%2F%2Ftq8%3D","updated":"2014-02-25 12:55:28.000000000","message":"Done","commit_id":"f3c6c0fec697c31ca3f58b35b44309bc2e7cf890"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e45a8c153e945157735ba3073183c0d6660ff54c","unresolved":false,"context_lines":[{"line_number":375,"context_line":"                                    self._make_ipsec_site_connection_dict,"},{"line_number":376,"context_line":"                                    filters\u003dfilters, fields\u003dfields)"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"    def update_ipsec_site_conn_status(self, context, conn_id, new_status):"},{"line_number":379,"context_line":"        with context.session.begin():"},{"line_number":380,"context_line":"            self.update_connection_status(context, conn_id, new_status, True)"},{"line_number":381,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2Fq3k%3D","line":378,"updated":"2014-03-01 11:38:01.000000000","message":"Internal methods should start with an underscore.","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"48a8151e1b8af84579cb8197acad2d66ff322488","unresolved":false,"context_lines":[{"line_number":375,"context_line":"                                    self._make_ipsec_site_connection_dict,"},{"line_number":376,"context_line":"                                    filters\u003dfilters, fields\u003dfields)"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"    def update_ipsec_site_conn_status(self, context, conn_id, new_status):"},{"line_number":379,"context_line":"        with context.session.begin():"},{"line_number":380,"context_line":"            self.update_connection_status(context, conn_id, new_status, True)"},{"line_number":381,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2Fqg4%3D","line":378,"in_reply_to":"AAAAVX%2F%2Fq3k%3D","updated":"2014-03-01 17:42:28.000000000","message":"This one is called from cisco_ipsec.py, when create of a connection fails and we need to change status to ERROR.","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e45a8c153e945157735ba3073183c0d6660ff54c","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        with context.session.begin():"},{"line_number":380,"context_line":"            self.update_connection_status(context, conn_id, new_status, True)"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def update_connection_status(self, context, conn_id, new_status,"},{"line_number":383,"context_line":"                                 updated_pending):"},{"line_number":384,"context_line":"        \"\"\"Update the connection status, if changed."},{"line_number":385,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2Fq3g%3D","line":382,"updated":"2014-03-01 11:38:01.000000000","message":"ditto","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"48a8151e1b8af84579cb8197acad2d66ff322488","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        with context.session.begin():"},{"line_number":380,"context_line":"            self.update_connection_status(context, conn_id, new_status, True)"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def update_connection_status(self, context, conn_id, new_status,"},{"line_number":383,"context_line":"                                 updated_pending):"},{"line_number":384,"context_line":"        \"\"\"Update the connection status, if changed."},{"line_number":385,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2Fqg0%3D","line":382,"in_reply_to":"AAAAVX%2F%2Fq3g%3D","updated":"2014-03-01 17:42:28.000000000","message":"Done. This one is internal.","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"}],"neutron/services/vpn/plugin.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"850af48b5cc32e48d8e3312a7649e743ec4768f4","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        # Manager may get loaded with another service\u0027s settings"},{"line_number":49,"context_line":"        # (only) causing UT to fail. As a workaround, forcing the"},{"line_number":50,"context_line":"        # ServiceTypeManager to parse the configuration."},{"line_number":51,"context_line":"        st_db.ServiceTypeManager._instance \u003d None"},{"line_number":52,"context_line":"        drivers, default_provider \u003d service_base.load_drivers("},{"line_number":53,"context_line":"            constants.VPN, self)"},{"line_number":54,"context_line":"        self.ipsec_driver \u003d drivers[default_provider]"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAVn%2F%2Fn0M%3D","line":51,"updated":"2014-03-05 01:02:52.000000000","message":"I have a change to test code that eliminates the need for this forcing of a re-read. Will post on next patch set.","commit_id":"1a987ed871c705aa34d17f26e25321388fecda95"}],"neutron/services/vpn/service_drivers/cisco_csr_db.py":[{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"change_message_id":"684dbbb926c56e42961192faee248b49a3c81ff7","unresolved":false,"context_lines":[{"line_number":155,"context_line":"    \"\"\""},{"line_number":156,"context_line":"    conn_using_id \u003d find_conn_with_policy(conn_policy_field, policy_id,"},{"line_number":157,"context_line":"                                          conn_id, session)"},{"line_number":158,"context_line":"    if False:  # TODO(pcm) conn_using_id:"},{"line_number":159,"context_line":"        csr_id \u003d lookup_policy(policy_type, map_policy_field,"},{"line_number":160,"context_line":"                               conn_using_id, session)"},{"line_number":161,"context_line":"        LOG.debug(_(\"Found existing IPSec connection %(conn)s with %(policy)s \""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2BrLA%3D","line":158,"updated":"2014-02-19 21:13:54.000000000","message":"This looks something dead code...\nWe shouldn\u0027t have it if it is not supported now","commit_id":"1d7550cdeb6ab9d61faace7eef92f98b5c2cde06"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b851399f5618fb389c3c5be506c21df16fbb3ed6","unresolved":false,"context_lines":[{"line_number":155,"context_line":"    \"\"\""},{"line_number":156,"context_line":"    conn_using_id \u003d find_conn_with_policy(conn_policy_field, policy_id,"},{"line_number":157,"context_line":"                                          conn_id, session)"},{"line_number":158,"context_line":"    if False:  # TODO(pcm) conn_using_id:"},{"line_number":159,"context_line":"        csr_id \u003d lookup_policy(policy_type, map_policy_field,"},{"line_number":160,"context_line":"                               conn_using_id, session)"},{"line_number":161,"context_line":"        LOG.debug(_(\"Found existing IPSec connection %(conn)s with %(policy)s \""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Bj%2Fo%3D","line":158,"in_reply_to":"AAAAUX%2F%2BrLA%3D","updated":"2014-02-20 14:22:08.000000000","message":"OK. I can remove. The device driver doesn\u0027t support reuse of policy IDs right now, so I ifdef\u0027ed this out and commented out the UTs for it. I can save those changes away and in the future restore them.","commit_id":"1d7550cdeb6ab9d61faace7eef92f98b5c2cde06"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"change_message_id":"684dbbb926c56e42961192faee248b49a3c81ff7","unresolved":false,"context_lines":[{"line_number":238,"context_line":""},{"line_number":239,"context_line":"def delete_tunnel_mapping(context, conn_info):"},{"line_number":240,"context_line":"    conn_id \u003d conn_info[\u0027id\u0027]"},{"line_number":241,"context_line":"    # TODO(pcm) Should we catch NoResultFound and ignore?"},{"line_number":242,"context_line":"    with context.session.begin():"},{"line_number":243,"context_line":"        sess_qry \u003d context.session.query(IdentifierMap)"},{"line_number":244,"context_line":"        sess_qry.filter_by(ipsec_site_conn_id\u003dconn_id).delete()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2BrJ0%3D","line":241,"updated":"2014-02-19 21:13:54.000000000","message":"Could you add test on this?","commit_id":"1d7550cdeb6ab9d61faace7eef92f98b5c2cde06"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b851399f5618fb389c3c5be506c21df16fbb3ed6","unresolved":false,"context_lines":[{"line_number":238,"context_line":""},{"line_number":239,"context_line":"def delete_tunnel_mapping(context, conn_info):"},{"line_number":240,"context_line":"    conn_id \u003d conn_info[\u0027id\u0027]"},{"line_number":241,"context_line":"    # TODO(pcm) Should we catch NoResultFound and ignore?"},{"line_number":242,"context_line":"    with context.session.begin():"},{"line_number":243,"context_line":"        sess_qry \u003d context.session.query(IdentifierMap)"},{"line_number":244,"context_line":"        sess_qry.filter_by(ipsec_site_conn_id\u003dconn_id).delete()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Bj9w%3D","line":241,"in_reply_to":"AAAAUX%2F%2BrJ0%3D","updated":"2014-02-20 14:22:08.000000000","message":"I can, but I\u0027m not sure it can occur... hence the hesitation and question.\n\nTo get here, it means we\u0027d be deleting an already deleted IPSec VPN connection. Wouldn\u0027t that be caught (and ignored) earlier in the processing of the delete?\n\nStill think I should add logic and a test?","commit_id":"1d7550cdeb6ab9d61faace7eef92f98b5c2cde06"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"652c74a337c2d2b15d18753a595297b7f2a561e0","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    \"\"\"Maps OpenStack IDs to compatible numbers for Cisco CSR.\"\"\""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    __tablename__ \u003d \u0027csr_identifier_map\u0027"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    ipsec_site_conn_id \u003d sa.Column(sa.String(64), primary_key\u003dTrue)"},{"line_number":56,"context_line":"    csr_tunnel_id \u003d sa.Column(sa.Integer, nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2BikA%3D","line":53,"updated":"2014-02-20 17:28:52.000000000","message":"Consider \u0027cisco_csr_identifier_map\u0027.","commit_id":"5b0ad705343549b91ded8dd15110a86350b05c4a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"262c8889eb0a9b913f5aa2a101a7043640867e22","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    \"\"\"Maps OpenStack IDs to compatible numbers for Cisco CSR.\"\"\""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    __tablename__ \u003d \u0027csr_identifier_map\u0027"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    ipsec_site_conn_id \u003d sa.Column(sa.String(64), primary_key\u003dTrue)"},{"line_number":56,"context_line":"    csr_tunnel_id \u003d sa.Column(sa.Integer, nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2Bgv4%3D","line":53,"in_reply_to":"AAAAUX%2F%2BikA%3D","updated":"2014-02-20 19:59:03.000000000","message":"Done","commit_id":"5b0ad705343549b91ded8dd15110a86350b05c4a"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"652c74a337c2d2b15d18753a595297b7f2a561e0","unresolved":false,"context_lines":[{"line_number":238,"context_line":""},{"line_number":239,"context_line":"def delete_tunnel_mapping(context, conn_info):"},{"line_number":240,"context_line":"    conn_id \u003d conn_info[\u0027id\u0027]"},{"line_number":241,"context_line":"    # TODO(pcm) Should we catch NoResultFound and ignore?"},{"line_number":242,"context_line":"    with context.session.begin():"},{"line_number":243,"context_line":"        sess_qry \u003d context.session.query(IdentifierMap)"},{"line_number":244,"context_line":"        sess_qry.filter_by(ipsec_site_conn_id\u003dconn_id).delete()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2BiZY%3D","line":241,"updated":"2014-02-20 17:28:52.000000000","message":"Definitely yes, IMO. This can happen with multiple threads.","commit_id":"5b0ad705343549b91ded8dd15110a86350b05c4a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"60a12e5f4cf724aa49d2ca725f0335e4b5b5520c","unresolved":false,"context_lines":[{"line_number":238,"context_line":""},{"line_number":239,"context_line":"def delete_tunnel_mapping(context, conn_info):"},{"line_number":240,"context_line":"    conn_id \u003d conn_info[\u0027id\u0027]"},{"line_number":241,"context_line":"    # TODO(pcm) Should we catch NoResultFound and ignore?"},{"line_number":242,"context_line":"    with context.session.begin():"},{"line_number":243,"context_line":"        sess_qry \u003d context.session.query(IdentifierMap)"},{"line_number":244,"context_line":"        sess_qry.filter_by(ipsec_site_conn_id\u003dconn_id).delete()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2Bd9w%3D","line":241,"in_reply_to":"AAAAUX%2F%2Bgug%3D","updated":"2014-02-21 00:47:00.000000000","message":"Actually, found that a delete() of a non-existent entry will not generate an exception, so won\u0027t do anything here or write a test case.","commit_id":"5b0ad705343549b91ded8dd15110a86350b05c4a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"262c8889eb0a9b913f5aa2a101a7043640867e22","unresolved":false,"context_lines":[{"line_number":238,"context_line":""},{"line_number":239,"context_line":"def delete_tunnel_mapping(context, conn_info):"},{"line_number":240,"context_line":"    conn_id \u003d conn_info[\u0027id\u0027]"},{"line_number":241,"context_line":"    # TODO(pcm) Should we catch NoResultFound and ignore?"},{"line_number":242,"context_line":"    with context.session.begin():"},{"line_number":243,"context_line":"        sess_qry \u003d context.session.query(IdentifierMap)"},{"line_number":244,"context_line":"        sess_qry.filter_by(ipsec_site_conn_id\u003dconn_id).delete()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2Bgug%3D","line":241,"in_reply_to":"AAAAUX%2F%2BiZY%3D","updated":"2014-02-20 19:59:03.000000000","message":"Adding in a check and test.","commit_id":"5b0ad705343549b91ded8dd15110a86350b05c4a"},{"author":{"_account_id":7317,"name":"Bo Lin","email":"linb@vmware.com","username":"berlin"},"change_message_id":"10af94cd9642a54b5e64a5558e34973e63393e20","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    max_value \u003d MAPPING_LIMITS[id_type][1]"},{"line_number":72,"context_line":"    rows \u003d session.query(table_field)"},{"line_number":73,"context_line":"    used_ids \u003d set([row[0] for row in rows])"},{"line_number":74,"context_line":"    all_ids \u003d set(range(min_value, max_value + min_value))"},{"line_number":75,"context_line":"    available_ids \u003d all_ids - used_ids"},{"line_number":76,"context_line":"    if not available_ids:"},{"line_number":77,"context_line":"        msg \u003d _(\"No available Cisco CSR %(type)s IDs from \""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAU3%2F%2F%2BFk%3D","line":74,"updated":"2014-02-23 09:22:05.000000000","message":"why max_value+min_value other than max_value?","commit_id":"313e2d79d9186fcd11154fedd4309372c1a7910d"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"9b70dd1015cfeaaf47720dd3dcffa0d4715a59f8","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    max_value \u003d MAPPING_LIMITS[id_type][1]"},{"line_number":72,"context_line":"    rows \u003d session.query(table_field)"},{"line_number":73,"context_line":"    used_ids \u003d set([row[0] for row in rows])"},{"line_number":74,"context_line":"    all_ids \u003d set(range(min_value, max_value + min_value))"},{"line_number":75,"context_line":"    available_ids \u003d all_ids - used_ids"},{"line_number":76,"context_line":"    if not available_ids:"},{"line_number":77,"context_line":"        msg \u003d _(\"No available Cisco CSR %(type)s IDs from \""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAU3%2F%2F3iM%3D","line":74,"in_reply_to":"AAAAU3%2F%2F%2BFk%3D","updated":"2014-02-24 12:58:23.000000000","message":"Because this can be used with tunnel IDs, which are zero based, and IKE and IPSec Policy IDs, which are both ones based.\nThis gives range 0..n-1 and 1..n, respectively.","commit_id":"313e2d79d9186fcd11154fedd4309372c1a7910d"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e45a8c153e945157735ba3073183c0d6660ff54c","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    __tablename__ \u003d \u0027cisco_csr_identifier_map\u0027"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    ipsec_site_conn_id \u003d sa.Column(sa.String(64), primary_key\u003dTrue)"},{"line_number":54,"context_line":"    csr_tunnel_id \u003d sa.Column(sa.Integer, nullable\u003dFalse)"},{"line_number":55,"context_line":"    csr_ike_policy_id \u003d sa.Column(sa.Integer, nullable\u003dFalse)"},{"line_number":56,"context_line":"    csr_ipsec_policy_id \u003d sa.Column(sa.Integer, nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2Fq3c%3D","line":53,"updated":"2014-03-01 11:38:01.000000000","message":"No foreign key constraint?","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"48a8151e1b8af84579cb8197acad2d66ff322488","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    __tablename__ \u003d \u0027cisco_csr_identifier_map\u0027"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    ipsec_site_conn_id \u003d sa.Column(sa.String(64), primary_key\u003dTrue)"},{"line_number":54,"context_line":"    csr_tunnel_id \u003d sa.Column(sa.Integer, nullable\u003dFalse)"},{"line_number":55,"context_line":"    csr_ike_policy_id \u003d sa.Column(sa.Integer, nullable\u003dFalse)"},{"line_number":56,"context_line":"    csr_ipsec_policy_id \u003d sa.Column(sa.Integer, nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2Fqfk%3D","line":53,"in_reply_to":"AAAAVX%2F%2Fq3c%3D","updated":"2014-03-01 17:42:28.000000000","message":"Will look at this. I\u0027m not sure how to handle this w.r.t. the test cases.\n\nI have tests that verify functions related to this mapping table. If I add a constraint, then all those tests fail, because it then requires corresponding ipsec_site_connection table  entries (and that table has foreign keys on two other tables).\n\nSo to test the functions related to the mapping table, I\u0027d have to build a bunch of database table entries, just to get a \"valid\" ipsec_site_conn_id. This will add a ton of test logic and complexity.\n\nDo I really need the constraint?\nIf so, how do I handle the test cases that use this table?","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e45a8c153e945157735ba3073183c0d6660ff54c","unresolved":false,"context_lines":[{"line_number":217,"context_line":"            msg \u003d _(\"Attempt to create duplicate entry in Cisco CSR \""},{"line_number":218,"context_line":"                    \"mapping table for connection %s\") % conn_id"},{"line_number":219,"context_line":"            raise CsrInternalError(reason\u003dmsg)"},{"line_number":220,"context_line":"        LOG.info(_(\"Mapped connection %(conn_id)s to Tunnel%(tunnel_id)d \""},{"line_number":221,"context_line":"                   \"using IKE policy ID %(ike_id)d and IPSec policy \""},{"line_number":222,"context_line":"                   \"ID %(ipsec_id)d\"),"},{"line_number":223,"context_line":"                 {\u0027conn_id\u0027: conn_id, \u0027tunnel_id\u0027: csr_tunnel_id,"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2Fq3U%3D","line":220,"updated":"2014-03-01 11:38:01.000000000","message":"Needs a space after Tunnel.","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"48a8151e1b8af84579cb8197acad2d66ff322488","unresolved":false,"context_lines":[{"line_number":217,"context_line":"            msg \u003d _(\"Attempt to create duplicate entry in Cisco CSR \""},{"line_number":218,"context_line":"                    \"mapping table for connection %s\") % conn_id"},{"line_number":219,"context_line":"            raise CsrInternalError(reason\u003dmsg)"},{"line_number":220,"context_line":"        LOG.info(_(\"Mapped connection %(conn_id)s to Tunnel%(tunnel_id)d \""},{"line_number":221,"context_line":"                   \"using IKE policy ID %(ike_id)d and IPSec policy \""},{"line_number":222,"context_line":"                   \"ID %(ipsec_id)d\"),"},{"line_number":223,"context_line":"                 {\u0027conn_id\u0027: conn_id, \u0027tunnel_id\u0027: csr_tunnel_id,"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2Fqfg%3D","line":220,"in_reply_to":"AAAAVX%2F%2Fq3U%3D","updated":"2014-03-01 17:42:28.000000000","message":"Actually, on the CSR the name of the connection will be \"Tunnel0\", \"Tunnel123\", etc. without a space.","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"0ad0f2b2d0b397d5fc140d56f8737a2a27ebca11","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    __tablename__ \u003d \u0027cisco_csr_identifier_map\u0027"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    ipsec_site_conn_id \u003d sa.Column(sa.String(64),"},{"line_number":54,"context_line":"                                   sa.ForeignKey(\u0027ipsec_site_connections.id\u0027),"},{"line_number":55,"context_line":"                                   primary_key\u003dTrue)"},{"line_number":56,"context_line":"    csr_tunnel_id \u003d sa.Column(sa.Integer, nullable\u003dFalse)"},{"line_number":57,"context_line":"    csr_ike_policy_id \u003d sa.Column(sa.Integer, nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAVn%2F%2F%2FC0%3D","line":54,"updated":"2014-03-02 23:48:49.000000000","message":"Do you want to enable ondelete\u003d\u0027CASCADE\u0027? (And if so, also in the migration script.)","commit_id":"96191b048f2bb970ef3fa0679a6957e3fc29fb79"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"917643167cae568e5c24b0ea772aae38aa916d45","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    __tablename__ \u003d \u0027cisco_csr_identifier_map\u0027"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    ipsec_site_conn_id \u003d sa.Column(sa.String(64),"},{"line_number":54,"context_line":"                                   sa.ForeignKey(\u0027ipsec_site_connections.id\u0027),"},{"line_number":55,"context_line":"                                   primary_key\u003dTrue)"},{"line_number":56,"context_line":"    csr_tunnel_id \u003d sa.Column(sa.Integer, nullable\u003dFalse)"},{"line_number":57,"context_line":"    csr_ike_policy_id \u003d sa.Column(sa.Integer, nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAVn%2F%2F7BY%3D","line":54,"in_reply_to":"AAAAVn%2F%2F%2FC0%3D","updated":"2014-03-03 12:10:59.000000000","message":"Looks like we can. I\u0027m not sure, but I think that means I can remove the delete call in the service driver?","commit_id":"96191b048f2bb970ef3fa0679a6957e3fc29fb79"}],"neutron/services/vpn/service_drivers/cisco_ipsec.py":[{"author":{"_account_id":105,"name":"Kyle Mestery","email":"mestery@mestery.com","username":"mestery"},"change_message_id":"c95285e60f70423586a9a8558736130992ee437b","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":11,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":"import netaddr"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from neutron.common import exceptions"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2BujU%3D","line":13,"updated":"2014-02-19 14:52:36.000000000","message":"Add your author info here?","commit_id":"1d7550cdeb6ab9d61faace7eef92f98b5c2cde06"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b851399f5618fb389c3c5be506c21df16fbb3ed6","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":11,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":"import netaddr"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from neutron.common import exceptions"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Bj7E%3D","line":13,"in_reply_to":"AAAAUX%2F%2BujU%3D","updated":"2014-02-20 14:22:08.000000000","message":"Thanks! Forgot to fix this header.","commit_id":"1d7550cdeb6ab9d61faace7eef92f98b5c2cde06"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"change_message_id":"684dbbb926c56e42961192faee248b49a3c81ff7","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        capability \u003d _(\"update of IPSec connections. You can delete and \""},{"line_number":211,"context_line":"                       \"re-add, as a workaround.\")"},{"line_number":212,"context_line":"        raise CsrUnsupportedError(capability\u003dcapability)"},{"line_number":213,"context_line":"        # TODO(pcm): FUTURE - Uncomment, once device driver supports"},{"line_number":214,"context_line":"#         vpnservice \u003d self.service_plugin._get_vpnservice("},{"line_number":215,"context_line":"#             context, ipsec_site_connection[\u0027vpnservice_id\u0027])"},{"line_number":216,"context_line":"#         self.agent_rpc.vpnservice_updated(context, vpnservice[\u0027router_id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2BrKY%3D","line":213,"updated":"2014-02-19 21:13:54.000000000","message":"nit: remove dead code","commit_id":"1d7550cdeb6ab9d61faace7eef92f98b5c2cde06"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b851399f5618fb389c3c5be506c21df16fbb3ed6","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        capability \u003d _(\"update of IPSec connections. You can delete and \""},{"line_number":211,"context_line":"                       \"re-add, as a workaround.\")"},{"line_number":212,"context_line":"        raise CsrUnsupportedError(capability\u003dcapability)"},{"line_number":213,"context_line":"        # TODO(pcm): FUTURE - Uncomment, once device driver supports"},{"line_number":214,"context_line":"#         vpnservice \u003d self.service_plugin._get_vpnservice("},{"line_number":215,"context_line":"#             context, ipsec_site_connection[\u0027vpnservice_id\u0027])"},{"line_number":216,"context_line":"#         self.agent_rpc.vpnservice_updated(context, vpnservice[\u0027router_id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Bj6c%3D","line":213,"in_reply_to":"AAAAUX%2F%2BrKY%3D","updated":"2014-02-20 14:22:08.000000000","message":"Will do in next patch for this and all other commented out code. Thanks.","commit_id":"1d7550cdeb6ab9d61faace7eef92f98b5c2cde06"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"652c74a337c2d2b15d18753a595297b7f2a561e0","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        This method will find where is the router, and"},{"line_number":87,"context_line":"        dispatch notification for the agent."},{"line_number":88,"context_line":"        \"\"\""},{"line_number":89,"context_line":"        adminContext \u003d context.is_admin and context or context.elevated()"},{"line_number":90,"context_line":"        plugin \u003d manager.NeutronManager.get_service_plugins().get("},{"line_number":91,"context_line":"            constants.L3_ROUTER_NAT)"},{"line_number":92,"context_line":"        if not version:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2BiYo%3D","line":89,"updated":"2014-02-20 17:28:52.000000000","message":"Camel case for local variables is not the convention in neutron.","commit_id":"5b0ad705343549b91ded8dd15110a86350b05c4a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"262c8889eb0a9b913f5aa2a101a7043640867e22","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        This method will find where is the router, and"},{"line_number":87,"context_line":"        dispatch notification for the agent."},{"line_number":88,"context_line":"        \"\"\""},{"line_number":89,"context_line":"        adminContext \u003d context.is_admin and context or context.elevated()"},{"line_number":90,"context_line":"        plugin \u003d manager.NeutronManager.get_service_plugins().get("},{"line_number":91,"context_line":"            constants.L3_ROUTER_NAT)"},{"line_number":92,"context_line":"        if not version:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2Bgt8%3D","line":89,"in_reply_to":"AAAAUX%2F%2BiYo%3D","updated":"2014-02-20 19:59:03.000000000","message":"copy and pasted from reference code. Will change.","commit_id":"5b0ad705343549b91ded8dd15110a86350b05c4a"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"652c74a337c2d2b15d18753a595297b7f2a561e0","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def __init__(self, service_plugin):"},{"line_number":122,"context_line":"        self.callbacks \u003d CiscoCsrIPsecVpnDriverCallBack(self)"},{"line_number":123,"context_line":"        self.service_plugin \u003d service_plugin"},{"line_number":124,"context_line":"        self.conn \u003d rpc.create_connection(new\u003dTrue)"},{"line_number":125,"context_line":"        self.conn.create_consumer("},{"line_number":126,"context_line":"            topics.CISCO_IPSEC_DRIVER_TOPIC,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2BiVE%3D","line":123,"updated":"2014-02-20 17:28:52.000000000","message":"If you call __init__ of the super class (which I believe you should do), then you get self.plugin \u003d service_plugin from the VpnDriver metaclass.","commit_id":"5b0ad705343549b91ded8dd15110a86350b05c4a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"2fc105451227468c53852f53736fe007425f169e","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def __init__(self, service_plugin):"},{"line_number":122,"context_line":"        self.callbacks \u003d CiscoCsrIPsecVpnDriverCallBack(self)"},{"line_number":123,"context_line":"        self.service_plugin \u003d service_plugin"},{"line_number":124,"context_line":"        self.conn \u003d rpc.create_connection(new\u003dTrue)"},{"line_number":125,"context_line":"        self.conn.create_consumer("},{"line_number":126,"context_line":"            topics.CISCO_IPSEC_DRIVER_TOPIC,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2Bdic%3D","line":123,"in_reply_to":"AAAAUX%2F%2BgmQ%3D","updated":"2014-02-21 01:32:29.000000000","message":"Actually, I think they are two different plugins. I think this the base class plugin is set with Neutron plugin, so we can\u0027t set the service (VPN) plugin there.","commit_id":"5b0ad705343549b91ded8dd15110a86350b05c4a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"262c8889eb0a9b913f5aa2a101a7043640867e22","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def __init__(self, service_plugin):"},{"line_number":122,"context_line":"        self.callbacks \u003d CiscoCsrIPsecVpnDriverCallBack(self)"},{"line_number":123,"context_line":"        self.service_plugin \u003d service_plugin"},{"line_number":124,"context_line":"        self.conn \u003d rpc.create_connection(new\u003dTrue)"},{"line_number":125,"context_line":"        self.conn.create_consumer("},{"line_number":126,"context_line":"            topics.CISCO_IPSEC_DRIVER_TOPIC,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2BgmQ%3D","line":123,"in_reply_to":"AAAAUX%2F%2BiVE%3D","updated":"2014-02-20 19:59:03.000000000","message":"Good idea. More copy/paste code. I renamed service_plugin in this class to plugin, so it can use the parent class object.","commit_id":"5b0ad705343549b91ded8dd15110a86350b05c4a"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"652c74a337c2d2b15d18753a595297b7f2a561e0","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    def service_type(self):"},{"line_number":135,"context_line":"        return IPSEC"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def validate_lifetime(self, for_policy, policy_info):"},{"line_number":138,"context_line":"        \"\"\"Ensure lifetime in secs and value is supported, based on policy.\"\"\""},{"line_number":139,"context_line":"        units \u003d policy_info[\u0027lifetime\u0027][\u0027units\u0027]"},{"line_number":140,"context_line":"        if units !\u003d \u0027seconds\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2BiS0%3D","line":137,"updated":"2014-02-20 17:28:52.000000000","message":"All these validate_XYZ() methods, except validate_ipsec_connection(), are independent of this class. Consider making them stand-alone functions in this module.","commit_id":"5b0ad705343549b91ded8dd15110a86350b05c4a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"262c8889eb0a9b913f5aa2a101a7043640867e22","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    def service_type(self):"},{"line_number":135,"context_line":"        return IPSEC"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def validate_lifetime(self, for_policy, policy_info):"},{"line_number":138,"context_line":"        \"\"\"Ensure lifetime in secs and value is supported, based on policy.\"\"\""},{"line_number":139,"context_line":"        units \u003d policy_info[\u0027lifetime\u0027][\u0027units\u0027]"},{"line_number":140,"context_line":"        if units !\u003d \u0027seconds\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2BgkA%3D","line":137,"in_reply_to":"AAAAUX%2F%2BiS0%3D","updated":"2014-02-20 19:59:03.000000000","message":"I wanted to keep them associated with this class, even though they don\u0027t access class attributes (and thought it would be more readable than class methods).  This way, the file could have other Cisco driver classes in this module.","commit_id":"5b0ad705343549b91ded8dd15110a86350b05c4a"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"652c74a337c2d2b15d18753a595297b7f2a561e0","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        peer_id \u003d ipsec_conn[\u0027peer_id\u0027]"},{"line_number":179,"context_line":"        try:"},{"line_number":180,"context_line":"            netaddr.IPAddress(peer_id)"},{"line_number":181,"context_line":"        except netaddr.core.AddrFormatError:"},{"line_number":182,"context_line":"            raise CsrValidationFailure(resource\u003d\u0027IPSec Connection\u0027,"},{"line_number":183,"context_line":"                                       key\u003d\u0027peer_id\u0027, value\u003dpeer_id)"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2BiOI%3D","line":181,"updated":"2014-02-20 17:28:52.000000000","message":"Nit: Since netaddr/core.py is a separate module I would prefer that you add an explicit \u0027import netaddr.core\u0027 at the top.","commit_id":"5b0ad705343549b91ded8dd15110a86350b05c4a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"262c8889eb0a9b913f5aa2a101a7043640867e22","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        peer_id \u003d ipsec_conn[\u0027peer_id\u0027]"},{"line_number":179,"context_line":"        try:"},{"line_number":180,"context_line":"            netaddr.IPAddress(peer_id)"},{"line_number":181,"context_line":"        except netaddr.core.AddrFormatError:"},{"line_number":182,"context_line":"            raise CsrValidationFailure(resource\u003d\u0027IPSec Connection\u0027,"},{"line_number":183,"context_line":"                                       key\u003d\u0027peer_id\u0027, value\u003dpeer_id)"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2Bgjo%3D","line":181,"in_reply_to":"AAAAUX%2F%2BiOI%3D","updated":"2014-02-20 19:59:03.000000000","message":"Done","commit_id":"5b0ad705343549b91ded8dd15110a86350b05c4a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1c1d00a64bcf8fbec212fcff8aaad526b82ff4e5","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":11,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":"# @author: Paul Michali, Cisco Systems, Inc."},{"line_number":15,"context_line":"import netaddr"},{"line_number":16,"context_line":"from netaddr import core as net_exc"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUn%2F%2F%2F%2B0%3D","line":13,"updated":"2014-02-22 17:05:58.000000000","message":"please consider dropping the @author line. Authors can be seen via git history","commit_id":"313e2d79d9186fcd11154fedd4309372c1a7910d"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"df350817bc2556a11364368a5c7844c44b74bc5f","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":11,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":"# @author: Paul Michali, Cisco Systems, Inc."},{"line_number":15,"context_line":"import netaddr"},{"line_number":16,"context_line":"from netaddr import core as net_exc"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAU3%2F%2Fv5M%3D","line":13,"in_reply_to":"AAAAU3%2F%2F3hE%3D","updated":"2014-02-25 00:08:02.000000000","message":"Sorry I didn\u0027t come back to this sooner. Not sure there\u0027s a well established convention here, but my suggestion is simply dictated by a practical need of keeping things as most updated as possible. Clearly manually editing the authors of files is not one of them :)","commit_id":"313e2d79d9186fcd11154fedd4309372c1a7910d"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"9b70dd1015cfeaaf47720dd3dcffa0d4715a59f8","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":11,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":"# @author: Paul Michali, Cisco Systems, Inc."},{"line_number":15,"context_line":"import netaddr"},{"line_number":16,"context_line":"from netaddr import core as net_exc"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAU3%2F%2F3hE%3D","line":13,"in_reply_to":"AAAAUn%2F%2F%2F%2B0%3D","updated":"2014-02-24 12:58:23.000000000","message":"What\u0027s the convention here, as I\u0027ve had a reviewer suggesting to add author?  I\u0027ll go with whatever the convention is and make any needed change once resolved.","commit_id":"313e2d79d9186fcd11154fedd4309372c1a7910d"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1c1d00a64bcf8fbec212fcff8aaad526b82ff4e5","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":"# @author: Paul Michali, Cisco Systems, Inc."},{"line_number":15,"context_line":"import netaddr"},{"line_number":16,"context_line":"from netaddr import core as net_exc"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUn%2F%2F%2F%2B8%3D","line":14,"updated":"2014-02-22 17:05:58.000000000","message":"space here?","commit_id":"313e2d79d9186fcd11154fedd4309372c1a7910d"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"9b70dd1015cfeaaf47720dd3dcffa0d4715a59f8","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":"# @author: Paul Michali, Cisco Systems, Inc."},{"line_number":15,"context_line":"import netaddr"},{"line_number":16,"context_line":"from netaddr import core as net_exc"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAU3%2F%2F3hA%3D","line":14,"in_reply_to":"AAAAUn%2F%2F%2F%2B8%3D","updated":"2014-02-24 12:58:23.000000000","message":"Done","commit_id":"313e2d79d9186fcd11154fedd4309372c1a7910d"},{"author":{"_account_id":7317,"name":"Bo Lin","email":"linb@vmware.com","username":"berlin"},"change_message_id":"10af94cd9642a54b5e64a5558e34973e63393e20","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        plugin.update_status_by_agent(context, status)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"class CiscoCsrIPsecVpnAgentApi(proxy.RpcProxy):"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    \"\"\"API and handler for plugin to agent RPC messaging.\"\"\""},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAU3%2F%2F%2BCU%3D","line":78,"updated":"2014-02-23 09:22:05.000000000","message":"One question, whether there are differences between CiscoCsrIPsecVpnAgentApi/CiscoCsrIPsecVpnDriverCallBack and IPsecVpnAgentApi/IPsecVpnDriverCallBack? if not, why don\u0027t directly inherit them.","commit_id":"313e2d79d9186fcd11154fedd4309372c1a7910d"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"9b70dd1015cfeaaf47720dd3dcffa0d4715a59f8","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        plugin.update_status_by_agent(context, status)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"class CiscoCsrIPsecVpnAgentApi(proxy.RpcProxy):"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    \"\"\"API and handler for plugin to agent RPC messaging.\"\"\""},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAU3%2F%2F3fM%3D","line":78,"in_reply_to":"AAAAU3%2F%2F%2BCU%3D","updated":"2014-02-24 12:58:23.000000000","message":"The version number could advance independently between the different drivers for these two classes. In addition, a different topic is used for the API class.\n\nGiven the time constraints of the I-3 release, I\u0027d like to keep it separate at this time, and leave that as a possible refinement later. OK?","commit_id":"313e2d79d9186fcd11154fedd4309372c1a7910d"},{"author":{"_account_id":7317,"name":"Bo Lin","email":"linb@vmware.com","username":"berlin"},"change_message_id":"aed4f536b78d66326ae30212b5aa74e45e60798e","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        vpnservice \u003d self.service_plugin._get_vpnservice("},{"line_number":204,"context_line":"            context, ipsec_site_connection[\u0027vpnservice_id\u0027])"},{"line_number":205,"context_line":"        self.validate_ipsec_connection(context, ipsec_site_connection,"},{"line_number":206,"context_line":"                                       vpnservice)"},{"line_number":207,"context_line":"        csr_id_map.create_tunnel_mapping(context, ipsec_site_connection)"},{"line_number":208,"context_line":"        self.agent_rpc.vpnservice_updated(context, vpnservice[\u0027router_id\u0027])"},{"line_number":209,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAU3%2F%2F7uI%3D","line":206,"updated":"2014-02-24 00:57:39.000000000","message":"whether you need to catch all exceptions and then update the ipsec connection status to ERROR?","commit_id":"313e2d79d9186fcd11154fedd4309372c1a7910d"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"9b70dd1015cfeaaf47720dd3dcffa0d4715a59f8","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        vpnservice \u003d self.service_plugin._get_vpnservice("},{"line_number":204,"context_line":"            context, ipsec_site_connection[\u0027vpnservice_id\u0027])"},{"line_number":205,"context_line":"        self.validate_ipsec_connection(context, ipsec_site_connection,"},{"line_number":206,"context_line":"                                       vpnservice)"},{"line_number":207,"context_line":"        csr_id_map.create_tunnel_mapping(context, ipsec_site_connection)"},{"line_number":208,"context_line":"        self.agent_rpc.vpnservice_updated(context, vpnservice[\u0027router_id\u0027])"},{"line_number":209,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAU3%2F%2F3Zs%3D","line":206,"in_reply_to":"AAAAU3%2F%2F7uI%3D","updated":"2014-02-24 12:58:23.000000000","message":"Good point about the ERROR status. I\u0027m trying to do the same as the reference implementation, where an exception is raised and the command rejected (see DPD handling).\n\nIssue here is that database has already been written for driver, so this will be in \u0027PENDING CREATE\u0027 state (there\u0027s ongoing discussions about enhancing vendor plugin in future).\n\nSome options:\n1) call delete_ipsec_site_connection(), however that does all the delete processing down to the device driver, even though there is nothing created yet.\n2) Set the database entry\u0027s status to ERROR (add database method to do this)\n3) create a delete_ipsec_site_connection_internal() that just updates the database.\n\nI\u0027m considering #2, as in the future, I\u0027d like to see the ability for vendor plugins to validate before database actions occur.","commit_id":"313e2d79d9186fcd11154fedd4309372c1a7910d"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"1afd83b7064472835f6daaa39d81010cdb270852","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def __init__(self, service_plugin):"},{"line_number":124,"context_line":"        self.callbacks \u003d CiscoCsrIPsecVpnDriverCallBack(self)"},{"line_number":125,"context_line":"        self.service_plugin \u003d service_plugin"},{"line_number":126,"context_line":"        self.conn \u003d rpc.create_connection(new\u003dTrue)"},{"line_number":127,"context_line":"        self.conn.create_consumer("},{"line_number":128,"context_line":"            topics.CISCO_IPSEC_DRIVER_TOPIC,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAU3%2F%2Ftog%3D","line":125,"updated":"2014-02-25 05:35:37.000000000","message":"Call __init__ of super class to get this.","commit_id":"f3c6c0fec697c31ca3f58b35b44309bc2e7cf890"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"f3285251598c8425e669ee8dd2537cba1b5b33ab","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def __init__(self, service_plugin):"},{"line_number":124,"context_line":"        self.callbacks \u003d CiscoCsrIPsecVpnDriverCallBack(self)"},{"line_number":125,"context_line":"        self.service_plugin \u003d service_plugin"},{"line_number":126,"context_line":"        self.conn \u003d rpc.create_connection(new\u003dTrue)"},{"line_number":127,"context_line":"        self.conn.create_consumer("},{"line_number":128,"context_line":"            topics.CISCO_IPSEC_DRIVER_TOPIC,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAU3%2F%2Fp4A%3D","line":125,"in_reply_to":"AAAAU3%2F%2Ftog%3D","updated":"2014-02-25 12:55:28.000000000","message":"Thanks! I missed updating some of these based on service type framework changes. I need to update UT file too.","commit_id":"f3c6c0fec697c31ca3f58b35b44309bc2e7cf890"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e45a8c153e945157735ba3073183c0d6660ff54c","unresolved":false,"context_lines":[{"line_number":37,"context_line":"MAX_CSR_MTU \u003d 9192"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"class CsrValidationFailure(exceptions.NeutronException):"},{"line_number":41,"context_line":"    message \u003d _(\"Cisco CSR does not support %(resource)s attribute %(key)s \""},{"line_number":42,"context_line":"                \"with value \u0027%(value)s\u0027\")"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2Fq28%3D","line":40,"updated":"2014-03-01 11:38:01.000000000","message":"Is this exception raised by invalid user input? If so, it should inherit BadRequest or Invalid in neutron.common.exception. Otherwise 500 will be returned.","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"48a8151e1b8af84579cb8197acad2d66ff322488","unresolved":false,"context_lines":[{"line_number":37,"context_line":"MAX_CSR_MTU \u003d 9192"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"class CsrValidationFailure(exceptions.NeutronException):"},{"line_number":41,"context_line":"    message \u003d _(\"Cisco CSR does not support %(resource)s attribute %(key)s \""},{"line_number":42,"context_line":"                \"with value \u0027%(value)s\u0027\")"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2FqfA%3D","line":40,"in_reply_to":"AAAAVX%2F%2Fq28%3D","updated":"2014-03-01 17:42:28.000000000","message":"Done. Will use BadRequest as this is for validation faliures.","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e45a8c153e945157735ba3073183c0d6660ff54c","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    RPC_API_VERSION \u003d BASE_IPSEC_VERSION"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def _agent_notification(self, context, method, router_id,"},{"line_number":85,"context_line":"                            version\u003dNone, **kwargs):"},{"line_number":86,"context_line":"        \"\"\"Notify update for the agent."},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2Fq3I%3D","line":84,"updated":"2014-03-01 11:38:01.000000000","message":"it is very similar to neutron/api/rpc/agentnotifiers/l3_rpc_agent_api.py. It seems only the difference is topic name.\nCould you create a common base class which defines common method(s).","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"48a8151e1b8af84579cb8197acad2d66ff322488","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    RPC_API_VERSION \u003d BASE_IPSEC_VERSION"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def _agent_notification(self, context, method, router_id,"},{"line_number":85,"context_line":"                            version\u003dNone, **kwargs):"},{"line_number":86,"context_line":"        \"\"\"Notify update for the agent."},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2FqdY%3D","line":84,"in_reply_to":"AAAAVX%2F%2Fq3I%3D","updated":"2014-03-01 17:42:28.000000000","message":"Will do! Moving into service_drivers/__init__.py\nLet me know if there is a better place.","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e45a8c153e945157735ba3073183c0d6660ff54c","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    @property"},{"line_number":136,"context_line":"    def service_type(self):"},{"line_number":137,"context_line":"        return IPSEC"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def validate_lifetime(self, for_policy, policy_info):"},{"line_number":140,"context_line":"        \"\"\"Ensure lifetime in secs and value is supported, based on policy.\"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2Fq3E%3D","line":137,"updated":"2014-03-01 11:38:01.000000000","message":"Why is it a method? I think the following should work.\n\n   service_type \u003d IPSEC","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"48a8151e1b8af84579cb8197acad2d66ff322488","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    @property"},{"line_number":136,"context_line":"    def service_type(self):"},{"line_number":137,"context_line":"        return IPSEC"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def validate_lifetime(self, for_policy, policy_info):"},{"line_number":140,"context_line":"        \"\"\"Ensure lifetime in secs and value is supported, based on policy.\"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2FqbY%3D","line":137,"in_reply_to":"AAAAVX%2F%2Fq3E%3D","updated":"2014-03-01 17:42:28.000000000","message":"Conforming to base ABC, which has this as property. Not sure if this is currently used or is there for other non-IPSEC types.\n\nIs it OK to leave this as-is and then address the overall service_type across all driver types separately (which is unrelated to this blueprint)?","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e45a8c153e945157735ba3073183c0d6660ff54c","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        except CsrValidationFailure:"},{"line_number":209,"context_line":"            self.service_plugin.update_ipsec_site_conn_status("},{"line_number":210,"context_line":"                context, ipsec_site_connection[\u0027id\u0027], constants.ERROR)"},{"line_number":211,"context_line":"            raise"},{"line_number":212,"context_line":"        csr_id_map.create_tunnel_mapping(context, ipsec_site_connection)"},{"line_number":213,"context_line":"        self.agent_rpc.vpnservice_updated(context, vpnservice[\u0027router_id\u0027])"},{"line_number":214,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2Fq24%3D","line":211,"updated":"2014-03-01 11:38:01.000000000","message":"Please use excutils.save_and_reraise_exception.\n\n  with excutils.save_and_reraise_exception():\n      self.service_plugin.update_ipsec_site_conn_status(...)","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"48a8151e1b8af84579cb8197acad2d66ff322488","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        except CsrValidationFailure:"},{"line_number":209,"context_line":"            self.service_plugin.update_ipsec_site_conn_status("},{"line_number":210,"context_line":"                context, ipsec_site_connection[\u0027id\u0027], constants.ERROR)"},{"line_number":211,"context_line":"            raise"},{"line_number":212,"context_line":"        csr_id_map.create_tunnel_mapping(context, ipsec_site_connection)"},{"line_number":213,"context_line":"        self.agent_rpc.vpnservice_updated(context, vpnservice[\u0027router_id\u0027])"},{"line_number":214,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2FqbQ%3D","line":211,"in_reply_to":"AAAAVX%2F%2Fq24%3D","updated":"2014-03-01 17:42:28.000000000","message":"Done","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fbd1959ba01de6668d3a699bbc9804e25f68ced4","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    def update_ipsecpolicy(self, context, old_ipsec_policy, ipsecpolicy):"},{"line_number":211,"context_line":"        pass"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def create_vpnservice(self, context, vpnservice):"},{"line_number":214,"context_line":"        pass"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def update_vpnservice(self, context, old_vpnservice, vpnservice):"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAVn%2F%2Fl%2B4%3D","line":213,"updated":"2014-03-05 06:20:53.000000000","message":"Is the implementation here not complete? These should probably be raising Unimplemented then.","commit_id":"c8c9cb5f8c2ba547265b4812abe6a0da2a90ee49"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"4d8ecd75b92d95def2827808ce0b0d54a7469853","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    def update_ipsecpolicy(self, context, old_ipsec_policy, ipsecpolicy):"},{"line_number":211,"context_line":"        pass"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def create_vpnservice(self, context, vpnservice):"},{"line_number":214,"context_line":"        pass"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def update_vpnservice(self, context, old_vpnservice, vpnservice):"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAVn%2F%2Fl7Y%3D","line":213,"in_reply_to":"AAAAVn%2F%2Fl%2B4%3D","updated":"2014-03-05 06:34:06.000000000","message":"In my understanding, cisco IPsec implementation uses l3-agent [1] and there is nothing to do as service driver for these operations. It is same as service_drivers/ipsec.py(the original l3-agent based implementaiton).\nhttps://github.com/openstack/neutron/blob/master/neutron/services/vpn/service_drivers/ipsec.py#L136\n\n[1] https://review.openstack.org/#/c/74156/16/neutron/services/vpn/device_drivers/cisco_ipsec.py  CiscoCsrIPsecDriver","commit_id":"c8c9cb5f8c2ba547265b4812abe6a0da2a90ee49"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"49c9a319f27c92ee171ecf79fb0512cd054fa87c","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    def update_ipsecpolicy(self, context, old_ipsec_policy, ipsecpolicy):"},{"line_number":211,"context_line":"        pass"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def create_vpnservice(self, context, vpnservice):"},{"line_number":214,"context_line":"        pass"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def update_vpnservice(self, context, old_vpnservice, vpnservice):"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAVn%2F%2FlwM%3D","line":213,"in_reply_to":"AAAAVn%2F%2Fl7Y%3D","updated":"2014-03-05 07:06:05.000000000","message":"Akihiro thank you for linking to the info that this is correct.","commit_id":"c8c9cb5f8c2ba547265b4812abe6a0da2a90ee49"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"3b5bcc982570a37c2452641a5120991ede12e171","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    def update_ipsecpolicy(self, context, old_ipsec_policy, ipsecpolicy):"},{"line_number":211,"context_line":"        pass"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def create_vpnservice(self, context, vpnservice):"},{"line_number":214,"context_line":"        pass"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def update_vpnservice(self, context, old_vpnservice, vpnservice):"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAVn%2F%2FjpY%3D","line":213,"in_reply_to":"AAAAVn%2F%2FlwM%3D","updated":"2014-03-05 12:29:32.000000000","message":"Yes, no actions needed at this level for these operations.","commit_id":"c8c9cb5f8c2ba547265b4812abe6a0da2a90ee49"}],"neutron/tests/unit/services/vpn/service_drivers/test_cisco_ipsec.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"bf988ac997e584f1404cb04db37b15dd65237715","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        self.addCleanup(dbapi.clear_db)"},{"line_number":190,"context_line":"        self.context \u003d context.Context(\u0027some_user\u0027, \u0027some_tenant\u0027)"},{"line_number":191,"context_line":"        self.session \u003d self.context.session"},{"line_number":192,"context_line":"        csr_db.find_conn_with_policy \u003d mock.Mock(return_value\u003dNone)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def test_identifying_next_tunnel_id(self):"},{"line_number":195,"context_line":"        \"\"\"Make sure available tunnel IDs can be reserved."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2B0Sc%3D","line":192,"updated":"2014-02-18 20:37:17.000000000","message":"Mocking this in this class is affecting other classes that use the same function. Will fix in next patch.","commit_id":"4861a4150c0f67d961d1f9a030fb5f88a29dac29"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"change_message_id":"684dbbb926c56e42961192faee248b49a3c81ff7","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import mock"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"# from neutron import context"},{"line_number":21,"context_line":"from neutron import context"},{"line_number":22,"context_line":"from neutron.db import api as dbapi"},{"line_number":23,"context_line":"from neutron.openstack.common import uuidutils"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2BrKQ%3D","line":20,"updated":"2014-02-19 21:13:54.000000000","message":"# remove dead code","commit_id":"1d7550cdeb6ab9d61faace7eef92f98b5c2cde06"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b851399f5618fb389c3c5be506c21df16fbb3ed6","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import mock"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"# from neutron import context"},{"line_number":21,"context_line":"from neutron import context"},{"line_number":22,"context_line":"from neutron.db import api as dbapi"},{"line_number":23,"context_line":"from neutron.openstack.common import uuidutils"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Bj58%3D","line":20,"in_reply_to":"AAAAUX%2F%2BrKQ%3D","updated":"2014-02-20 14:22:08.000000000","message":"Done","commit_id":"1d7550cdeb6ab9d61faace7eef92f98b5c2cde06"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"08c44e90e3a4127fc3ede978b85d841fd924bfc3","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        ipsec_conn \u003d {\u0027peer_id\u0027: \u0027some-site.com\u0027}"},{"line_number":168,"context_line":"        self.assertRaises(ipsec_driver.CsrValidationFailure,"},{"line_number":169,"context_line":"                          self.driver.validate_peer_id, ipsec_conn)"},{"line_number":170,"context_line":"        pass"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def test_validation_for_create_ipsec_connection(self):"},{"line_number":173,"context_line":"        \"\"\"Ensure all validation passes for IPSec site connection create.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Bq8U%3D","line":170,"updated":"2014-02-19 21:41:08.000000000","message":"Pass required here?","commit_id":"1d7550cdeb6ab9d61faace7eef92f98b5c2cde06"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b851399f5618fb389c3c5be506c21df16fbb3ed6","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        ipsec_conn \u003d {\u0027peer_id\u0027: \u0027some-site.com\u0027}"},{"line_number":168,"context_line":"        self.assertRaises(ipsec_driver.CsrValidationFailure,"},{"line_number":169,"context_line":"                          self.driver.validate_peer_id, ipsec_conn)"},{"line_number":170,"context_line":"        pass"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def test_validation_for_create_ipsec_connection(self):"},{"line_number":173,"context_line":"        \"\"\"Ensure all validation passes for IPSec site connection create.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Bj5s%3D","line":170,"in_reply_to":"AAAAUX%2F%2Bq8U%3D","updated":"2014-02-20 14:22:08.000000000","message":"Nope! Good catch, I forgot to pull when I implemented the test case.","commit_id":"1d7550cdeb6ab9d61faace7eef92f98b5c2cde06"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"change_message_id":"684dbbb926c56e42961192faee248b49a3c81ff7","unresolved":false,"context_lines":[{"line_number":296,"context_line":"                ike_id \u003d csr_db.lookup_ike_policy_id_for(conn_id, self.session)"},{"line_number":297,"context_line":"                self.assertEqual(i, ike_id)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"# TODO(pcm) Uncomment, once ID reuse is supported in device driver"},{"line_number":300,"context_line":"#     def test_get_ike_policy_id_already_in_use(self):"},{"line_number":301,"context_line":"#         \"\"\"Obtain Cisco CSR IKE policy ID from existing mappings."},{"line_number":302,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2BrKI%3D","line":299,"updated":"2014-02-19 21:13:54.000000000","message":"remove dead code","commit_id":"1d7550cdeb6ab9d61faace7eef92f98b5c2cde06"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b851399f5618fb389c3c5be506c21df16fbb3ed6","unresolved":false,"context_lines":[{"line_number":296,"context_line":"                ike_id \u003d csr_db.lookup_ike_policy_id_for(conn_id, self.session)"},{"line_number":297,"context_line":"                self.assertEqual(i, ike_id)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"# TODO(pcm) Uncomment, once ID reuse is supported in device driver"},{"line_number":300,"context_line":"#     def test_get_ike_policy_id_already_in_use(self):"},{"line_number":301,"context_line":"#         \"\"\"Obtain Cisco CSR IKE policy ID from existing mappings."},{"line_number":302,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Bj5Y%3D","line":299,"in_reply_to":"AAAAUX%2F%2BrKI%3D","updated":"2014-02-20 14:22:08.000000000","message":"Done","commit_id":"1d7550cdeb6ab9d61faace7eef92f98b5c2cde06"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"08c44e90e3a4127fc3ede978b85d841fd924bfc3","unresolved":false,"context_lines":[{"line_number":617,"context_line":"                          self.driver.update_ipsec_site_connection,"},{"line_number":618,"context_line":"                          [FAKE_VPN_CONNECTION, FAKE_VPN_CONNECTION],"},{"line_number":619,"context_line":"                          method_name\u003d\u0027update_ipsec_site_connection\u0027)"},{"line_number":620,"context_line":"        pass"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    def test_delete_ipsec_site_connection(self):"},{"line_number":623,"context_line":"        self._test_update(self.driver.delete_ipsec_site_connection,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Bq7I%3D","line":620,"updated":"2014-02-19 21:41:08.000000000","message":"Pass required here?","commit_id":"1d7550cdeb6ab9d61faace7eef92f98b5c2cde06"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b851399f5618fb389c3c5be506c21df16fbb3ed6","unresolved":false,"context_lines":[{"line_number":617,"context_line":"                          self.driver.update_ipsec_site_connection,"},{"line_number":618,"context_line":"                          [FAKE_VPN_CONNECTION, FAKE_VPN_CONNECTION],"},{"line_number":619,"context_line":"                          method_name\u003d\u0027update_ipsec_site_connection\u0027)"},{"line_number":620,"context_line":"        pass"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    def test_delete_ipsec_site_connection(self):"},{"line_number":623,"context_line":"        self._test_update(self.driver.delete_ipsec_site_connection,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Bj40%3D","line":620,"in_reply_to":"AAAAUX%2F%2Bq7I%3D","updated":"2014-02-20 14:22:08.000000000","message":"Done","commit_id":"1d7550cdeb6ab9d61faace7eef92f98b5c2cde06"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"652c74a337c2d2b15d18753a595297b7f2a561e0","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def simulate_gw_ip_available(self):"},{"line_number":139,"context_line":"        \"\"\"Helper function indicating that tunnel has a gateway IP.\"\"\""},{"line_number":140,"context_line":"        def have_one(self):"},{"line_number":141,"context_line":"            return 1"},{"line_number":142,"context_line":"        self.vpn_service.router.gw_port.fixed_ips.__len__ \u003d have_one"},{"line_number":143,"context_line":"        ip_addr_mock \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2BiME%3D","line":140,"updated":"2014-02-20 17:28:52.000000000","message":"I don\u0027t think the \u0027self\u0027 arg is needed here.","commit_id":"5b0ad705343549b91ded8dd15110a86350b05c4a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"262c8889eb0a9b913f5aa2a101a7043640867e22","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def simulate_gw_ip_available(self):"},{"line_number":139,"context_line":"        \"\"\"Helper function indicating that tunnel has a gateway IP.\"\"\""},{"line_number":140,"context_line":"        def have_one(self):"},{"line_number":141,"context_line":"            return 1"},{"line_number":142,"context_line":"        self.vpn_service.router.gw_port.fixed_ips.__len__ \u003d have_one"},{"line_number":143,"context_line":"        ip_addr_mock \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2BgeM%3D","line":140,"in_reply_to":"AAAAUX%2F%2BiME%3D","updated":"2014-02-20 19:59:03.000000000","message":"Done","commit_id":"5b0ad705343549b91ded8dd15110a86350b05c4a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1c1d00a64bcf8fbec212fcff8aaad526b82ff4e5","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":"#"},{"line_number":15,"context_line":"# @author: Paul Michali, Cisco Systems, Inc."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import mock"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUn%2F%2F%2F%2Bw%3D","line":15,"updated":"2014-02-22 17:05:58.000000000","message":"ditto","commit_id":"313e2d79d9186fcd11154fedd4309372c1a7910d"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1c1d00a64bcf8fbec212fcff8aaad526b82ff4e5","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import mock"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"# from neutron import context"},{"line_number":21,"context_line":"from neutron import context"},{"line_number":22,"context_line":"from neutron.db import api as dbapi"},{"line_number":23,"context_line":"from neutron.openstack.common import uuidutils"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUn%2F%2F%2F%2Bs%3D","line":20,"updated":"2014-02-22 17:05:58.000000000","message":"debug legacy?","commit_id":"313e2d79d9186fcd11154fedd4309372c1a7910d"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"9b70dd1015cfeaaf47720dd3dcffa0d4715a59f8","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import mock"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"# from neutron import context"},{"line_number":21,"context_line":"from neutron import context"},{"line_number":22,"context_line":"from neutron.db import api as dbapi"},{"line_number":23,"context_line":"from neutron.openstack.common import uuidutils"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAU3%2F%2F3ZU%3D","line":20,"in_reply_to":"AAAAUn%2F%2F%2F%2Bs%3D","updated":"2014-02-24 12:58:23.000000000","message":"Done","commit_id":"313e2d79d9186fcd11154fedd4309372c1a7910d"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"1afd83b7064472835f6daaa39d81010cdb270852","unresolved":false,"context_lines":[{"line_number":267,"context_line":"                          csr_db.get_next_available_ike_policy_id,"},{"line_number":268,"context_line":"                          fake_session)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    def simulate_existing_mappings(self, session):"},{"line_number":271,"context_line":"        \"\"\"Helper - create three mapping table entries."},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        Each entry will have the same tenant ID. The IPSec site connection"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAU3%2F%2FtnE%3D","line":270,"updated":"2014-02-25 05:35:37.000000000","message":"session arg not used.","commit_id":"f3c6c0fec697c31ca3f58b35b44309bc2e7cf890"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"a3cd739f074de2237c7c0051158cc5c9aea7b50c","unresolved":false,"context_lines":[{"line_number":267,"context_line":"                          csr_db.get_next_available_ike_policy_id,"},{"line_number":268,"context_line":"                          fake_session)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    def simulate_existing_mappings(self, session):"},{"line_number":271,"context_line":"        \"\"\"Helper - create three mapping table entries."},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        Each entry will have the same tenant ID. The IPSec site connection"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAU3%2F%2FlkI%3D","line":270,"in_reply_to":"AAAAU3%2F%2Fob4%3D","updated":"2014-02-25 19:34:51.000000000","message":"Done","commit_id":"f3c6c0fec697c31ca3f58b35b44309bc2e7cf890"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"61b7ff380d46657b3e3f189869bcdff7ccdfaa23","unresolved":false,"context_lines":[{"line_number":267,"context_line":"                          csr_db.get_next_available_ike_policy_id,"},{"line_number":268,"context_line":"                          fake_session)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    def simulate_existing_mappings(self, session):"},{"line_number":271,"context_line":"        \"\"\"Helper - create three mapping table entries."},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        Each entry will have the same tenant ID. The IPSec site connection"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAU3%2F%2Fob4%3D","line":270,"in_reply_to":"AAAAU3%2F%2Fp3Y%3D","updated":"2014-02-25 15:13:44.000000000","message":"That is self.session, not the session arg.","commit_id":"f3c6c0fec697c31ca3f58b35b44309bc2e7cf890"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"f3285251598c8425e669ee8dd2537cba1b5b33ab","unresolved":false,"context_lines":[{"line_number":267,"context_line":"                          csr_db.get_next_available_ike_policy_id,"},{"line_number":268,"context_line":"                          fake_session)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    def simulate_existing_mappings(self, session):"},{"line_number":271,"context_line":"        \"\"\"Helper - create three mapping table entries."},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        Each entry will have the same tenant ID. The IPSec site connection"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAU3%2F%2Fp3Y%3D","line":270,"in_reply_to":"AAAAU3%2F%2FtnE%3D","updated":"2014-02-25 12:55:28.000000000","message":"Used on L285.","commit_id":"f3c6c0fec697c31ca3f58b35b44309bc2e7cf890"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e45a8c153e945157735ba3073183c0d6660ff54c","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import mock"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from neutron import context"},{"line_number":19,"context_line":"from neutron.db import api as dbapi"},{"line_number":20,"context_line":"from neutron.openstack.common import uuidutils"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2Fq20%3D","line":17,"updated":"2014-03-01 11:38:01.000000000","message":"One blank line here.","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"48a8151e1b8af84579cb8197acad2d66ff322488","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import mock"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from neutron import context"},{"line_number":19,"context_line":"from neutron.db import api as dbapi"},{"line_number":20,"context_line":"from neutron.openstack.common import uuidutils"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2FqZs%3D","line":17,"in_reply_to":"AAAAVX%2F%2Fq20%3D","updated":"2014-03-01 17:42:28.000000000","message":"Done","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e45a8c153e945157735ba3073183c0d6660ff54c","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        available, afterwards. Finally, remove one in the middle and"},{"line_number":205,"context_line":"        ensure that it is the next available ID."},{"line_number":206,"context_line":"        \"\"\""},{"line_number":207,"context_line":"        with self.session.begin():"},{"line_number":208,"context_line":"            for i in xrange(5):"},{"line_number":209,"context_line":"                tunnel \u003d csr_db.get_next_available_tunnel_id(self.session)"},{"line_number":210,"context_line":"                self.assertEqual(i, tunnel)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2Fq2s%3D","line":207,"updated":"2014-03-01 11:38:01.000000000","message":"I think it is bette to split into several transactions\n\n- Add 5 entries\n- get_next_avaialble_tnnel_id\n- delete 3rd entry","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"48a8151e1b8af84579cb8197acad2d66ff322488","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        available, afterwards. Finally, remove one in the middle and"},{"line_number":205,"context_line":"        ensure that it is the next available ID."},{"line_number":206,"context_line":"        \"\"\""},{"line_number":207,"context_line":"        with self.session.begin():"},{"line_number":208,"context_line":"            for i in xrange(5):"},{"line_number":209,"context_line":"                tunnel \u003d csr_db.get_next_available_tunnel_id(self.session)"},{"line_number":210,"context_line":"                self.assertEqual(i, tunnel)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2FqY8%3D","line":207,"in_reply_to":"AAAAVX%2F%2Fq2s%3D","updated":"2014-03-01 17:42:28.000000000","message":"Will separate into separate transactions. Just for my education, can you clarify why this would be good?","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e45a8c153e945157735ba3073183c0d6660ff54c","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        ensure that it is the next available ID."},{"line_number":206,"context_line":"        \"\"\""},{"line_number":207,"context_line":"        with self.session.begin():"},{"line_number":208,"context_line":"            for i in xrange(5):"},{"line_number":209,"context_line":"                tunnel \u003d csr_db.get_next_available_tunnel_id(self.session)"},{"line_number":210,"context_line":"                self.assertEqual(i, tunnel)"},{"line_number":211,"context_line":"                conn_id \u003d i * 10"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2Fq2w%3D","line":208,"updated":"2014-03-01 11:38:01.000000000","message":"For py3compat, range() is recommended. range(5) is small array, so it doesn\u0027t matter.","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"48a8151e1b8af84579cb8197acad2d66ff322488","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        ensure that it is the next available ID."},{"line_number":206,"context_line":"        \"\"\""},{"line_number":207,"context_line":"        with self.session.begin():"},{"line_number":208,"context_line":"            for i in xrange(5):"},{"line_number":209,"context_line":"                tunnel \u003d csr_db.get_next_available_tunnel_id(self.session)"},{"line_number":210,"context_line":"                self.assertEqual(i, tunnel)"},{"line_number":211,"context_line":"                conn_id \u003d i * 10"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2FqZo%3D","line":208,"in_reply_to":"AAAAVX%2F%2Fq2w%3D","updated":"2014-03-01 17:42:28.000000000","message":"Done","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e45a8c153e945157735ba3073183c0d6660ff54c","unresolved":false,"context_lines":[{"line_number":239,"context_line":"        ensure that it is the next available ID. Note: the IKE policy IDs"},{"line_number":240,"context_line":"        are one based."},{"line_number":241,"context_line":"        \"\"\""},{"line_number":242,"context_line":"        with self.session.begin():"},{"line_number":243,"context_line":"            for i in xrange(1, 6):"},{"line_number":244,"context_line":"                ike_id \u003d csr_db.get_next_available_ike_policy_id(self.session)"},{"line_number":245,"context_line":"                self.assertEqual(i, ike_id)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2Fq2o%3D","line":242,"updated":"2014-03-01 11:38:01.000000000","message":"Same as the above.","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"48a8151e1b8af84579cb8197acad2d66ff322488","unresolved":false,"context_lines":[{"line_number":239,"context_line":"        ensure that it is the next available ID. Note: the IKE policy IDs"},{"line_number":240,"context_line":"        are one based."},{"line_number":241,"context_line":"        \"\"\""},{"line_number":242,"context_line":"        with self.session.begin():"},{"line_number":243,"context_line":"            for i in xrange(1, 6):"},{"line_number":244,"context_line":"                ike_id \u003d csr_db.get_next_available_ike_policy_id(self.session)"},{"line_number":245,"context_line":"                self.assertEqual(i, ike_id)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2FqYk%3D","line":242,"in_reply_to":"AAAAVX%2F%2Fq2o%3D","updated":"2014-03-01 17:42:28.000000000","message":"Done","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e45a8c153e945157735ba3073183c0d6660ff54c","unresolved":false,"context_lines":[{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def test_lookup_existing_ike_policy_mapping(self):"},{"line_number":288,"context_line":"        \"\"\"Ensure can find existing mappings for IKE policy.\"\"\""},{"line_number":289,"context_line":"        with self.session.begin():"},{"line_number":290,"context_line":"            self.simulate_existing_mappings()"},{"line_number":291,"context_line":"            for i in xrange(1, 4):"},{"line_number":292,"context_line":"                conn_id \u003d str(i * 10)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2Fq2g%3D","line":289,"updated":"2014-03-01 11:38:01.000000000","message":"It is better to split add and lookup into seprate transaction. thought?","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"48a8151e1b8af84579cb8197acad2d66ff322488","unresolved":false,"context_lines":[{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def test_lookup_existing_ike_policy_mapping(self):"},{"line_number":288,"context_line":"        \"\"\"Ensure can find existing mappings for IKE policy.\"\"\""},{"line_number":289,"context_line":"        with self.session.begin():"},{"line_number":290,"context_line":"            self.simulate_existing_mappings()"},{"line_number":291,"context_line":"            for i in xrange(1, 4):"},{"line_number":292,"context_line":"                conn_id \u003d str(i * 10)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2FqYI%3D","line":289,"in_reply_to":"AAAAVX%2F%2Fq2g%3D","updated":"2014-03-01 17:42:28.000000000","message":"Sure can do that.","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e45a8c153e945157735ba3073183c0d6660ff54c","unresolved":false,"context_lines":[{"line_number":300,"context_line":"        by mocking out database look-up, and ensure that a new policy ID"},{"line_number":301,"context_line":"        is chosen."},{"line_number":302,"context_line":"        \"\"\""},{"line_number":303,"context_line":"        with self.session.begin():"},{"line_number":304,"context_line":"            self.simulate_existing_mappings()"},{"line_number":305,"context_line":"            ike_id \u003d csr_db.determine_csr_ike_policy_id(\u0027ike-uuid\u0027,"},{"line_number":306,"context_line":"                                                        \u0027123\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2Fq2Y%3D","line":303,"updated":"2014-03-01 11:38:01.000000000","message":"ditto","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e45a8c153e945157735ba3073183c0d6660ff54c","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        available, afterwards. Finally, remove one in the middle and"},{"line_number":315,"context_line":"        ensure that it is the next available ID. Note: the IPSec policy IDs"},{"line_number":316,"context_line":"        are one based."},{"line_number":317,"context_line":"        \"\"\""},{"line_number":318,"context_line":"        with self.session.begin():"},{"line_number":319,"context_line":"            for i in xrange(1, 6):"},{"line_number":320,"context_line":"                ipsec_id \u003d csr_db.get_next_available_ipsec_policy_id("}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2Fq2U%3D","line":317,"updated":"2014-03-01 11:38:01.000000000","message":"Same comments as above. They apply to throughtout the test.","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"48a8151e1b8af84579cb8197acad2d66ff322488","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        available, afterwards. Finally, remove one in the middle and"},{"line_number":315,"context_line":"        ensure that it is the next available ID. Note: the IPSec policy IDs"},{"line_number":316,"context_line":"        are one based."},{"line_number":317,"context_line":"        \"\"\""},{"line_number":318,"context_line":"        with self.session.begin():"},{"line_number":319,"context_line":"            for i in xrange(1, 6):"},{"line_number":320,"context_line":"                ipsec_id \u003d csr_db.get_next_available_ipsec_policy_id("}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVX%2F%2FqXo%3D","line":317,"in_reply_to":"AAAAVX%2F%2Fq2U%3D","updated":"2014-03-01 17:42:28.000000000","message":"Changed all xrange() to range(). Splitting out the transactions.","commit_id":"3ed77026298a78bd4338ee7db7301e979e807e6c"}]}
