)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4128,"name":"Francois Deppierraz","email":"francois@ctrlaltdel.ch","username":"francois-ctrlaltdel"},"change_message_id":"78e6456938b91fc31ab9c2d13025105ea4efe975","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Modify L3 Agent for Distributed Routers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch is an enhancment to the existing L3"},{"line_number":10,"context_line":"Agent. This allows the L3 Agent to run in"},{"line_number":11,"context_line":"Distributed mode.  This patch is a part of"},{"line_number":12,"context_line":"Neutron OVS Distributed Router Blueprint"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7adec928_06ab0cd7","line":9,"updated":"2014-05-21 08:13:16.000000000","message":"nitpicking: enhancment -\u003e enhancement","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":105,"name":"Kyle Mestery","email":"mestery@mestery.com","username":"mestery"},"change_message_id":"8faaceff4188f9b8159e87c0eb9bbf0d0c83baa4","unresolved":false,"context_lines":[{"line_number":11,"context_line":"Distributed mode.  This patch is a part of"},{"line_number":12,"context_line":"Neutron OVS Distributed Router Blueprint"},{"line_number":13,"context_line":"neutron-ovs-dvr."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: Icead821bb74372b15aac2e5cefe8ad7f08c037ab"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAXH%2F%2FbnI%3D","line":14,"updated":"2014-04-21 20:52:29.000000000","message":"Please add:\n\nPartially-implements: blueprint neutron-ovs-dvr","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"27765c3f39f79b733540968b5936dddc0684b113","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Modify L3 Agent for Distributed Routers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch is an enhancment to the existing L3"},{"line_number":10,"context_line":"Agent. This allows the L3 Agent to run in"},{"line_number":11,"context_line":"Distributed mode.  This patch is a part of"},{"line_number":12,"context_line":"Neutron OVS Distributed Router Blueprint"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1ae5cdf2_24adcae9","line":9,"updated":"2014-06-12 08:50:42.000000000","message":"enhancement","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":105,"name":"Kyle Mestery","email":"mestery@mestery.com","username":"mestery"},"change_message_id":"7654cdf0b2aa711d2fd8060bac583538a48df5e9","unresolved":false,"context_lines":[{"line_number":11,"context_line":"Distributed mode.  This patch is a part of"},{"line_number":12,"context_line":"Neutron OVS Distributed Router Blueprint"},{"line_number":13,"context_line":"neutron-ovs-dvr."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Co-Authored-By: Rajeev Grover"},{"line_number":16,"context_line":"Partially-Implements: blueprint neutron-ovs-dvr"},{"line_number":17,"context_line":"Change-Id: Icead821bb74372b15aac2e5cefe8ad7f08c037ab"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1ae5cdf2_371b6d1d","line":14,"updated":"2014-06-11 02:39:22.000000000","message":"DocImpact flag needed.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ed444067c1b4ad75d9bf719dc4e8e43ef7eb99bd","unresolved":false,"context_lines":[{"line_number":11,"context_line":"Distributed mode.  This patch is a part of"},{"line_number":12,"context_line":"Neutron OVS Distributed Router Blueprint"},{"line_number":13,"context_line":"neutron-ovs-dvr."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Co-Authored-By: Rajeev Grover"},{"line_number":16,"context_line":"Partially-Implements: blueprint neutron-ovs-dvr"},{"line_number":17,"context_line":"Change-Id: Icead821bb74372b15aac2e5cefe8ad7f08c037ab"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1ae5cdf2_9ccfea55","line":14,"in_reply_to":"1ae5cdf2_371b6d1d","updated":"2014-06-11 17:32:15.000000000","message":"Will do.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"}],"etc/l3_agent.ini":[{"author":{"_account_id":105,"name":"Kyle Mestery","email":"mestery@mestery.com","username":"mestery"},"change_message_id":"7654cdf0b2aa711d2fd8060bac583538a48df5e9","unresolved":false,"context_lines":[{"line_number":79,"context_line":"# ovs_vsctl_timeout \u003d 10"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"# Enables distributed router agent function."},{"line_number":82,"context_line":"# distributed_agent \u003d False"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"# Enables centralized SNAT in dvr mode."},{"line_number":85,"context_line":"# centralized_snat \u003d False"}],"source_content_type":"text/x-properties","patch_set":2,"id":"1ae5cdf2_17f911c8","line":82,"updated":"2014-06-11 02:39:22.000000000","message":"Nit: Maybe \"distributed_router_agent\". \"distributed_agent\" seems too generic.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ed444067c1b4ad75d9bf719dc4e8e43ef7eb99bd","unresolved":false,"context_lines":[{"line_number":79,"context_line":"# ovs_vsctl_timeout \u003d 10"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"# Enables distributed router agent function."},{"line_number":82,"context_line":"# distributed_agent \u003d False"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"# Enables centralized SNAT in dvr mode."},{"line_number":85,"context_line":"# centralized_snat \u003d False"}],"source_content_type":"text/x-properties","patch_set":2,"id":"1ae5cdf2_fcde2e10","line":82,"in_reply_to":"1ae5cdf2_17f911c8","updated":"2014-06-11 17:32:15.000000000","message":"Sure.  I am flexible with naming.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"4251558c22adc29cbeecc8a17a6324c1bfebded8","unresolved":false,"context_lines":[{"line_number":79,"context_line":"# ovs_vsctl_timeout \u003d 10"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"# Enables distributed router agent function."},{"line_number":82,"context_line":"# distributed_agent \u003d False"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"# Enables centralized SNAT in dvr mode."},{"line_number":85,"context_line":"# centralized_snat \u003d False"}],"source_content_type":"text/x-properties","patch_set":2,"id":"1ae5cdf2_7643e941","line":82,"in_reply_to":"1ae5cdf2_fcde2e10","updated":"2014-06-13 00:48:00.000000000","message":"Suggestions are great here but please understand that these parameters define the capabilities of the agent:\n capable of hosting distributed router\n capable of hosting centralized snat for distributed routers\n capable of hosting conventional centralized router.\n\nHope this helps in picking the appropriate parameter names.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":105,"name":"Kyle Mestery","email":"mestery@mestery.com","username":"mestery"},"change_message_id":"7654cdf0b2aa711d2fd8060bac583538a48df5e9","unresolved":false,"context_lines":[{"line_number":85,"context_line":"# centralized_snat \u003d False"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"# Enables centralized router in dvr mode."},{"line_number":88,"context_line":"# centralized \u003d True"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-properties","patch_set":2,"id":"1ae5cdf2_d726c967","line":88,"updated":"2014-06-11 02:39:22.000000000","message":"\"centralized_router\" instead of \"centralized\", it\u0027s too generic otherwise.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"a42ace9486e784d6535294b3deb708c2aec8fdc4","unresolved":false,"context_lines":[{"line_number":85,"context_line":"# centralized_snat \u003d False"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"# Enables centralized router in dvr mode."},{"line_number":88,"context_line":"# centralized \u003d True"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-properties","patch_set":2,"id":"1ae5cdf2_8f0ec98a","line":88,"in_reply_to":"1ae5cdf2_7ccbfe52","updated":"2014-06-11 20:55:48.000000000","message":"To distinguish it from a legacy centralized router maybe call it something like:  dvr_centralized_router.  It sounds a bit like an oxymoron though.  Other thoughts?","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c134c3bc4b6c746a55abf6d7a040efb80e4dd2bf","unresolved":false,"context_lines":[{"line_number":85,"context_line":"# centralized_snat \u003d False"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"# Enables centralized router in dvr mode."},{"line_number":88,"context_line":"# centralized \u003d True"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-properties","patch_set":2,"id":"1ae5cdf2_9860a9d0","line":88,"in_reply_to":"1ae5cdf2_8f0ec98a","updated":"2014-06-12 20:35:00.000000000","message":"Actually, maybe I misunderstood the meaning of this config option.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"27765c3f39f79b733540968b5936dddc0684b113","unresolved":false,"context_lines":[{"line_number":85,"context_line":"# centralized_snat \u003d False"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"# Enables centralized router in dvr mode."},{"line_number":88,"context_line":"# centralized \u003d True"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-properties","patch_set":2,"id":"1ae5cdf2_c45506c3","line":88,"in_reply_to":"1ae5cdf2_8f0ec98a","updated":"2014-06-12 08:50:42.000000000","message":"Does it make sense to put those new configs under [dvr] group and use simple config names?","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"bb36be5a18e05115aecf01fc83a7b6e6ddee3c7a","unresolved":false,"context_lines":[{"line_number":85,"context_line":"# centralized_snat \u003d False"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"# Enables centralized router in dvr mode."},{"line_number":88,"context_line":"# centralized \u003d True"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-properties","patch_set":2,"id":"1ae5cdf2_40b38709","line":88,"in_reply_to":"1ae5cdf2_9860a9d0","updated":"2014-06-13 05:39:22.000000000","message":"Carl, the \u0027centralized\u0027 param will notify legacy-centralized routers can be hosted by this agent.  This will allow for single node setups or even a legacy-centralized router be scheduled to a compute node.  \nI still like \u0027centralized_router\u0027 since that captures what it is.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"bb36be5a18e05115aecf01fc83a7b6e6ddee3c7a","unresolved":false,"context_lines":[{"line_number":85,"context_line":"# centralized_snat \u003d False"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"# Enables centralized router in dvr mode."},{"line_number":88,"context_line":"# centralized \u003d True"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-properties","patch_set":2,"id":"1ae5cdf2_e0981377","line":88,"in_reply_to":"1ae5cdf2_c45506c3","updated":"2014-06-13 05:39:22.000000000","message":"Perhaps.  Not sure if that is needed.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ed444067c1b4ad75d9bf719dc4e8e43ef7eb99bd","unresolved":false,"context_lines":[{"line_number":85,"context_line":"# centralized_snat \u003d False"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"# Enables centralized router in dvr mode."},{"line_number":88,"context_line":"# centralized \u003d True"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-properties","patch_set":2,"id":"1ae5cdf2_7ccbfe52","line":88,"in_reply_to":"1ae5cdf2_d726c967","updated":"2014-06-11 17:32:15.000000000","message":"I never liked just plain \u0027centralized\u0027 I wanted to hear from others in the review.  If I don\u0027t get any other feedback, I\u0027ll go with centralized_router.  Thanks.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"36bc30fb1d71c4756ae4eea189f78d397ca1cc84","unresolved":false,"context_lines":[{"line_number":77,"context_line":"# Timeout for ovs-vsctl commands."},{"line_number":78,"context_line":"# If the timeout expires, ovs commands will fail with ALARMCLOCK error."},{"line_number":79,"context_line":"# ovs_vsctl_timeout \u003d 10"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"# Enables distributed router agent function."},{"line_number":82,"context_line":"# distributed_agent \u003d False"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-properties","patch_set":7,"id":"1ae5cdf2_11ed4f25","line":80,"updated":"2014-06-27 18:44:55.000000000","message":"I wonder if we can consolidate these options into a more compact one, as I suspect that the L3 agent won\u0027t work in some of the 8 combinations possible.\n\nCould you please go over these options to elaborate what are they for more  in details? I understand they enable/disable things, but I am concerned that an operator will have a hard time figuring out what to do with these without diving in the code.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"d5833d302fc5f7d1d508bc450465e0383abf673e","unresolved":false,"context_lines":[{"line_number":77,"context_line":"# Timeout for ovs-vsctl commands."},{"line_number":78,"context_line":"# If the timeout expires, ovs commands will fail with ALARMCLOCK error."},{"line_number":79,"context_line":"# ovs_vsctl_timeout \u003d 10"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"# Enables distributed router agent function."},{"line_number":82,"context_line":"# distributed_agent \u003d False"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-properties","patch_set":7,"id":"1ae5cdf2_eaf2a503","line":80,"in_reply_to":"1ae5cdf2_11ed4f25","updated":"2014-06-28 20:28:19.000000000","message":"Sure.  Part of the issue is the l3-agent-scheduler uses these flags to decide how to schedule routers and services.  So its not just a config knob for the agent.\n\ndistributed_agent: Enables/disables *any* dvr functionality in the agent.  The scheduler will use this to decide if a distributed router can be scheduled to this agent\n\ncentralized_snat:  Used by the agent to create snat namespace or do special handling for centralized_snat.  Used by the scheduler to decide where to host snat functionality for a distributed router.  Admins may want only some nodes to have this functionality instead of ALL dvr-enabled agents.\n\ncentralized_router:  Not used by the agent other than reporting to the scheduler.  Used by the scheduler to host decide where to host a legacy/non-distributed router.  This one is really on the scheduler - if there is an easier way to determine where to host a non-distributed router without this flag, then this one could go away.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"9f095518a7d88c146bb74503aa58b86c6090f64e","unresolved":false,"context_lines":[{"line_number":77,"context_line":"# Timeout for ovs-vsctl commands."},{"line_number":78,"context_line":"# If the timeout expires, ovs commands will fail with ALARMCLOCK error."},{"line_number":79,"context_line":"# ovs_vsctl_timeout \u003d 10"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"# Enables distributed router agent function."},{"line_number":82,"context_line":"# distributed_agent \u003d False"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-properties","patch_set":7,"id":"baada198_65902d96","line":80,"in_reply_to":"1ae5cdf2_eaf2a503","updated":"2014-07-01 15:29:24.000000000","message":"Can you help me understand the difference between \u0027centralized_router\u0027 and \u0027distributed_agent\u0027? Can a DVR-enabled L3 agent host centralized routers? I assume so, since these options are just passthrough in the l3 agent code.\n\nThat said, from line 358 in agent_scheduler_db.py I read:\n\nif (not distributed_router_enable) or centralized:\n\nWhich has the following boolean results:\n\nT T -\u003e T\n\nT F -\u003e F\n\nF T -\u003e T\n\nF F -\u003e T\n\nSo this is always true unless I disable DVR as well as centralized routing; this is equivalent to disabling the agent altogether.\n\nMaybe we can collapse the two into one and call the resulting option \u0027enable_distributed_routing\u0027 (like the equivalent L2 one)\u0027?","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"93e934d031bf63747e0264ed7859854ac8b8943a","unresolved":false,"context_lines":[{"line_number":79,"context_line":"# ovs_vsctl_timeout \u003d 10"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"# Enables distributed router agent function."},{"line_number":82,"context_line":"# distributed_agent \u003d False"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"# Enables centralized SNAT in dvr mode."},{"line_number":85,"context_line":"# centralized_snat \u003d False"}],"source_content_type":"text/x-properties","patch_set":10,"id":"baada198_528a5864","line":82,"updated":"2014-07-07 16:05:04.000000000","message":"This file needs updating for the new config.","commit_id":"cae3b385609eb8377857a8c22600d7a392148fd8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"d2b8821a9592c65435ce4f419cf73108a5db418a","unresolved":false,"context_lines":[{"line_number":79,"context_line":"# ovs_vsctl_timeout \u003d 10"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"# Enables distributed router agent function."},{"line_number":82,"context_line":"# distributed_agent \u003d False"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"# Enables centralized SNAT in dvr mode."},{"line_number":85,"context_line":"# centralized_snat \u003d False"}],"source_content_type":"text/x-properties","patch_set":10,"id":"baada198_127aa023","line":82,"in_reply_to":"baada198_528a5864","updated":"2014-07-07 16:43:15.000000000","message":"Done","commit_id":"cae3b385609eb8377857a8c22600d7a392148fd8"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"83f8bd578e70f281330603bb615c0864696cdd61","unresolved":false,"context_lines":[{"line_number":85,"context_line":"# - dvr: this mode enables DVR functionality, and must be used for an L3"},{"line_number":86,"context_line":"#   agent that runs on a compute host."},{"line_number":87,"context_line":"# - dvr_snat: this enables centralized SNAT support in conjunction with"},{"line_number":88,"context_line":"#   DVR. This mode must be used for an L3 agent running on centralized"},{"line_number":89,"context_line":"#   node (or in single-host deployments, e.g. devstack)."},{"line_number":90,"context_line":"# agent_mode \u003d legacy"}],"source_content_type":"text/x-properties","patch_set":23,"id":"baada198_955aacf0","line":88,"updated":"2014-07-17 09:35:50.000000000","message":"Missing \"a\" before \"centralized\"?","commit_id":"53dfc8a8decbb40181a4b8b407fe43b30cffeef0"}],"neutron/agent/l3_agent.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"bd67a9588183ace4c0e5b2453b4fc0a700d63024","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"1ae5cdf2_b91c2bc3","updated":"2014-06-09 07:15:57.000000000","message":"it seems better to split DVR-specific code to a separate module. l3-agent implementation becomes a bit modular and a bit easier to read.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"750cd9215013192e68de791c5488075853a5a2ad","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import eventlet"},{"line_number":17,"context_line":"import netaddr"},{"line_number":18,"context_line":"from oslo.config import cfg"},{"line_number":19,"context_line":"import re"},{"line_number":20,"context_line":"from neutron.agent.common import config"},{"line_number":21,"context_line":"from neutron.agent.linux import external_process"},{"line_number":22,"context_line":"from neutron.agent.linux import interface"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_15d68df1","line":19,"updated":"2014-05-23 08:24:28.000000000","message":"it seems unused","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"b1b39446b4dbaf3513899026e567ea8ede49d87f","unresolved":false,"context_lines":[{"line_number":50,"context_line":"FIP_2_RTR_DEV_PREFIX \u003d \u0027fpr-\u0027"},{"line_number":51,"context_line":"RTR_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":52,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"},{"line_number":53,"context_line":"FIP_LL_PREFIX \u003d \u0027169.254.30.\u0027"},{"line_number":54,"context_line":"RPC_LOOP_INTERVAL \u003d 1"},{"line_number":55,"context_line":"FLOATING_IP_CIDR_SUFFIX \u003d \u0027/32\u0027"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FFP8%3D","line":53,"updated":"2014-04-24 07:53:08.000000000","message":"should prefix be 169.254.30.0/24?  And I didn\u0027t find this prefix is used in this file.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"0ecb7661f471146a8de30aaac9949087f913f361","unresolved":false,"context_lines":[{"line_number":50,"context_line":"FIP_2_RTR_DEV_PREFIX \u003d \u0027fpr-\u0027"},{"line_number":51,"context_line":"RTR_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":52,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"},{"line_number":53,"context_line":"FIP_LL_PREFIX \u003d \u0027169.254.30.\u0027"},{"line_number":54,"context_line":"RPC_LOOP_INTERVAL \u003d 1"},{"line_number":55,"context_line":"FLOATING_IP_CIDR_SUFFIX \u003d \u0027/32\u0027"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FAJ8%3D","line":53,"in_reply_to":"AAAAXH%2F%2FFP8%3D","updated":"2014-04-24 18:30:11.000000000","message":"This is being used to track link-local sets of addresses between the FIP namespace and router namespaces.  Entire IP addrs are used, not just cidrs.\nThe use of this prefix was removed temporarily since it was part of the in-progress merge/refactor to icehouse.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"672ee8f6a54aa57f2e8d6b2b5d78080a1cbc7fdb","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def get_agent_gateway_port(self, context, fip_net):"},{"line_number":101,"context_line":"        \"\"\"Make a remote process call to get or create a agent_gateway_port.\"\"\""},{"line_number":102,"context_line":"        LOG.debug(_(\u0027DVR: fip_net: %s\u0027), fip_net)"},{"line_number":103,"context_line":"        return self.call(context,"},{"line_number":104,"context_line":"                         self.make_msg(\u0027get_agent_gateway_port\u0027,"},{"line_number":105,"context_line":"                                       network_id\u003dfip_net, host\u003dself.host),"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_8ac38189","line":102,"updated":"2014-05-22 05:49:22.000000000","message":"Debug messages shouldn\u0027t be translated any more. \n\nSee: https://bugs.launchpad.net/neutron/+bug/1317851","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"750cd9215013192e68de791c5488075853a5a2ad","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        self.rtr_2_fip \u003d None"},{"line_number":141,"context_line":"        # Linklocal floating to router IP addr"},{"line_number":142,"context_line":"        self.fip_2_rtr \u003d None"},{"line_number":143,"context_line":"        self.dist_fip_count \u003d 0"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    @property"},{"line_number":146,"context_line":"    def router(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_352b89ec","line":143,"updated":"2014-05-23 08:24:28.000000000","message":"it seems these variables are unused.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"change_message_id":"42794fb05b6c827e409c1561f9533a18368041f3","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            # Gateway port was removed, remove rules"},{"line_number":162,"context_line":"            self._snat_action \u003d \u0027remove_rules\u0027"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    def ns_name(self):"},{"line_number":165,"context_line":"        if self.use_namespaces:"},{"line_number":166,"context_line":"            return NS_PREFIX + self.router_id"},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2Fah0%3D","line":164,"updated":"2014-04-22 00:16:59.000000000","message":"Why is this method necessary ?","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5037f10623f094c62bcfb6cb3c36f6b1c39b0b47","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            # Gateway port was removed, remove rules"},{"line_number":162,"context_line":"            self._snat_action \u003d \u0027remove_rules\u0027"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    def ns_name(self):"},{"line_number":165,"context_line":"        if self.use_namespaces:"},{"line_number":166,"context_line":"            return NS_PREFIX + self.router_id"},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FWtg%3D","line":164,"in_reply_to":"AAAAXH%2F%2FagA%3D","updated":"2014-04-22 11:20:44.000000000","message":"L131 sets up self.ns_name, so seems unneeded.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"b039ef90444d5da8b7359f887ef5d819ad9ea273","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            # Gateway port was removed, remove rules"},{"line_number":162,"context_line":"            self._snat_action \u003d \u0027remove_rules\u0027"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    def ns_name(self):"},{"line_number":165,"context_line":"        if self.use_namespaces:"},{"line_number":166,"context_line":"            return NS_PREFIX + self.router_id"},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FagA%3D","line":164,"in_reply_to":"AAAAXH%2F%2Fah0%3D","updated":"2014-04-22 00:24:54.000000000","message":"That might be a hold over from my merge to havana, if I can just use ns_name, I will use that.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"b1b39446b4dbaf3513899026e567ea8ede49d87f","unresolved":false,"context_lines":[{"line_number":187,"context_line":"    RPC_API_VERSION \u003d \u00271.1\u0027"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    OPTS \u003d ["},{"line_number":190,"context_line":"        cfg.BoolOpt(\u0027distributed_agent\u0027, default\u003dFalse,"},{"line_number":191,"context_line":"                    help\u003d_(\"Enables distributed router agent function.\")),"},{"line_number":192,"context_line":"        cfg.BoolOpt(\u0027centralized_snat\u0027, default\u003dFalse,"},{"line_number":193,"context_line":"                    help\u003d_(\"Enables centralized SNAT in dvr mode.\")),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FFPw%3D","line":190,"updated":"2014-04-24 07:53:08.000000000","message":"this configuration should be added to l3_agent.ini.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"b1b39446b4dbaf3513899026e567ea8ede49d87f","unresolved":false,"context_lines":[{"line_number":189,"context_line":"    OPTS \u003d ["},{"line_number":190,"context_line":"        cfg.BoolOpt(\u0027distributed_agent\u0027, default\u003dFalse,"},{"line_number":191,"context_line":"                    help\u003d_(\"Enables distributed router agent function.\")),"},{"line_number":192,"context_line":"        cfg.BoolOpt(\u0027centralized_snat\u0027, default\u003dFalse,"},{"line_number":193,"context_line":"                    help\u003d_(\"Enables centralized SNAT in dvr mode.\")),"},{"line_number":194,"context_line":"        cfg.StrOpt(\u0027external_network_bridge\u0027, default\u003d\u0027br-ex\u0027,"},{"line_number":195,"context_line":"                   help\u003d_(\"Name of bridge used for external network \""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FFPs%3D","line":192,"updated":"2014-04-24 07:53:08.000000000","message":"same as above","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"008aaf63a9844f21e4fff08177f16732d8cfa2b5","unresolved":false,"context_lines":[{"line_number":189,"context_line":"    OPTS \u003d ["},{"line_number":190,"context_line":"        cfg.BoolOpt(\u0027distributed_agent\u0027, default\u003dFalse,"},{"line_number":191,"context_line":"                    help\u003d_(\"Enables distributed router agent function.\")),"},{"line_number":192,"context_line":"        cfg.BoolOpt(\u0027centralized_snat\u0027, default\u003dFalse,"},{"line_number":193,"context_line":"                    help\u003d_(\"Enables centralized SNAT in dvr mode.\")),"},{"line_number":194,"context_line":"        cfg.StrOpt(\u0027external_network_bridge\u0027, default\u003d\u0027br-ex\u0027,"},{"line_number":195,"context_line":"                   help\u003d_(\"Name of bridge used for external network \""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXX%2F%2F8x0%3D","line":192,"in_reply_to":"AAAAXH%2F%2FAJg%3D","updated":"2014-04-25 05:36:25.000000000","message":"It should still be included in the ini file.  Add the line to the file showing the default value and comment the line out.  Then add a description to the file above the commented line.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"0ecb7661f471146a8de30aaac9949087f913f361","unresolved":false,"context_lines":[{"line_number":189,"context_line":"    OPTS \u003d ["},{"line_number":190,"context_line":"        cfg.BoolOpt(\u0027distributed_agent\u0027, default\u003dFalse,"},{"line_number":191,"context_line":"                    help\u003d_(\"Enables distributed router agent function.\")),"},{"line_number":192,"context_line":"        cfg.BoolOpt(\u0027centralized_snat\u0027, default\u003dFalse,"},{"line_number":193,"context_line":"                    help\u003d_(\"Enables centralized SNAT in dvr mode.\")),"},{"line_number":194,"context_line":"        cfg.StrOpt(\u0027external_network_bridge\u0027, default\u003d\u0027br-ex\u0027,"},{"line_number":195,"context_line":"                   help\u003d_(\"Name of bridge used for external network \""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FAJg%3D","line":192,"in_reply_to":"AAAAXH%2F%2FFPs%3D","updated":"2014-04-24 18:30:11.000000000","message":"Agreed but these will be optional.  It is required for DVR functionality, but admins can configure the agents as they wish, with or without DVR support.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"4d491584a082482d11968e7e2cede14108e1fede","unresolved":false,"context_lines":[{"line_number":189,"context_line":"    OPTS \u003d ["},{"line_number":190,"context_line":"        cfg.BoolOpt(\u0027distributed_agent\u0027, default\u003dFalse,"},{"line_number":191,"context_line":"                    help\u003d_(\"Enables distributed router agent function.\")),"},{"line_number":192,"context_line":"        cfg.BoolOpt(\u0027centralized_snat\u0027, default\u003dFalse,"},{"line_number":193,"context_line":"                    help\u003d_(\"Enables centralized SNAT in dvr mode.\")),"},{"line_number":194,"context_line":"        cfg.StrOpt(\u0027external_network_bridge\u0027, default\u003d\u0027br-ex\u0027,"},{"line_number":195,"context_line":"                   help\u003d_(\"Name of bridge used for external network \""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXX%2F%2F4fM%3D","line":192,"in_reply_to":"AAAAXX%2F%2F8x0%3D","updated":"2014-04-25 15:24:53.000000000","message":"Understood.  Will do.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5037f10623f094c62bcfb6cb3c36f6b1c39b0b47","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        # dvr data"},{"line_number":256,"context_line":"        self.agent_gateway_port \u003d None"},{"line_number":257,"context_line":"        self.agent_fip_count \u003d 0"},{"line_number":258,"context_line":"        # TODO: increase valid range of local IPs to 64k"},{"line_number":259,"context_line":"        self.local_ips \u003d set(xrange(2, 251))"},{"line_number":260,"context_line":"        #self.local_ips \u003d netaddr.IPRange(\u0027192.168.1.5\u0027, \u0027192.168.1.250\u0027)"},{"line_number":261,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FWpM%3D","line":258,"updated":"2014-04-22 11:20:44.000000000","message":"If you run tox -e pep8 it\u0027ll require that you do \"TODO(NAME)\" for all TODOs. You\u0027ll want to update all these in file...","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"187f1aa110b839442bd13d53bad0c13abcd3792f","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        # dvr data"},{"line_number":256,"context_line":"        self.agent_gateway_port \u003d None"},{"line_number":257,"context_line":"        self.agent_fip_count \u003d 0"},{"line_number":258,"context_line":"        # TODO: increase valid range of local IPs to 64k"},{"line_number":259,"context_line":"        self.local_ips \u003d set(xrange(2, 251))"},{"line_number":260,"context_line":"        #self.local_ips \u003d netaddr.IPRange(\u0027192.168.1.5\u0027, \u0027192.168.1.250\u0027)"},{"line_number":261,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FTHs%3D","line":258,"in_reply_to":"AAAAXH%2F%2FWpM%3D","updated":"2014-04-23 17:56:24.000000000","message":"Yes - I saw that in the post push tests.  I will make the changes for all todos.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"750cd9215013192e68de791c5488075853a5a2ad","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        self.agent_gateway_port \u003d None"},{"line_number":257,"context_line":"        self.agent_fip_count \u003d 0"},{"line_number":258,"context_line":"        # TODO: increase valid range of local IPs to 64k"},{"line_number":259,"context_line":"        self.local_ips \u003d set(xrange(2, 251))"},{"line_number":260,"context_line":"        #self.local_ips \u003d netaddr.IPRange(\u0027192.168.1.5\u0027, \u0027192.168.1.250\u0027)"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        self.rpc_loop \u003d loopingcall.FixedIntervalLoopingCall("}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_3579c9fc","line":259,"updated":"2014-05-23 08:24:28.000000000","message":"agent_fip_count and local_ips seem to be unused.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5037f10623f094c62bcfb6cb3c36f6b1c39b0b47","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        self.agent_fip_count \u003d 0"},{"line_number":258,"context_line":"        # TODO: increase valid range of local IPs to 64k"},{"line_number":259,"context_line":"        self.local_ips \u003d set(xrange(2, 251))"},{"line_number":260,"context_line":"        #self.local_ips \u003d netaddr.IPRange(\u0027192.168.1.5\u0027, \u0027192.168.1.250\u0027)"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        self.rpc_loop \u003d loopingcall.FixedIntervalLoopingCall("},{"line_number":263,"context_line":"            self._rpc_loop)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FWpI%3D","line":260,"updated":"2014-04-22 11:20:44.000000000","message":"remove dead code","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"187f1aa110b839442bd13d53bad0c13abcd3792f","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        self.agent_fip_count \u003d 0"},{"line_number":258,"context_line":"        # TODO: increase valid range of local IPs to 64k"},{"line_number":259,"context_line":"        self.local_ips \u003d set(xrange(2, 251))"},{"line_number":260,"context_line":"        #self.local_ips \u003d netaddr.IPRange(\u0027192.168.1.5\u0027, \u0027192.168.1.250\u0027)"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        self.rpc_loop \u003d loopingcall.FixedIntervalLoopingCall("},{"line_number":263,"context_line":"            self._rpc_loop)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FTHc%3D","line":260,"in_reply_to":"AAAAXH%2F%2FWpI%3D","updated":"2014-04-23 17:56:24.000000000","message":"Agreed","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"672ee8f6a54aa57f2e8d6b2b5d78080a1cbc7fdb","unresolved":false,"context_lines":[{"line_number":339,"context_line":"                                   bridge\u003dself.conf.external_network_bridge,"},{"line_number":340,"context_line":"                                   namespace\u003dns_name,"},{"line_number":341,"context_line":"                                   prefix\u003dFIP_EXT_DEV_PREFIX)"},{"line_number":342,"context_line":"        LOG.debug(_(\u0027DVR: destroy fip ns: %s\u0027), ns_name)"},{"line_number":343,"context_line":"        # TODO: add LOG warn if fip count !\u003d 0"},{"line_number":344,"context_line":"        ns_ip.netns.delete(ns_name)"},{"line_number":345,"context_line":"        self.agent_gateway_port \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_0a3771b1","line":342,"updated":"2014-05-22 05:49:22.000000000","message":"don\u0027t translate","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"008aaf63a9844f21e4fff08177f16732d8cfa2b5","unresolved":false,"context_lines":[{"line_number":364,"context_line":"                msg \u003d _(\u0027Failed trying to delete namespace: %s\u0027)"},{"line_number":365,"context_line":"                LOG.exception(msg % namespace)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def _create_namespace(self, name):"},{"line_number":368,"context_line":"        ip_wrapper_root \u003d ip_lib.IPWrapper(self.root_helper)"},{"line_number":369,"context_line":"        ip_wrapper \u003d ip_wrapper_root.ensure_namespace(name)"},{"line_number":370,"context_line":"        LOG.debug(_(\u0027DVR: ns-name: %s\u0027), name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXX%2F%2F8xo%3D","line":367,"updated":"2014-04-25 05:36:25.000000000","message":"I don\u0027t see much value in adding this extra indirection.  An I missing it?","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"41ce542cbe327d952cb526017e40f0964d3e31b0","unresolved":false,"context_lines":[{"line_number":364,"context_line":"                msg \u003d _(\u0027Failed trying to delete namespace: %s\u0027)"},{"line_number":365,"context_line":"                LOG.exception(msg % namespace)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def _create_namespace(self, name):"},{"line_number":368,"context_line":"        ip_wrapper_root \u003d ip_lib.IPWrapper(self.root_helper)"},{"line_number":369,"context_line":"        ip_wrapper \u003d ip_wrapper_root.ensure_namespace(name)"},{"line_number":370,"context_line":"        LOG.debug(_(\u0027DVR: ns-name: %s\u0027), name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad9bd40_5fddeb41","line":367,"in_reply_to":"AAAAXX%2F%2F4eA%3D","updated":"2014-04-29 22:04:56.000000000","message":"I see.  I agree that it is a good refactor.  Mostly because it is better in general to pass a value directly like this rather than the whole object.  Give a method only the information it needs to do its job.  I totally agree.\n\nYou might consider submitting this refactoring as a smaller patch on which this one depends.  It would be easier to review and it could be merged before the rest of this work is completed.\n\nPersonally, if a refactor like this can stand on its own then I submit it as a separate patch.  It can complicate working with the multiple dependent patches a bit though.  I can be pretty pedantic about splitting out independent changes in to separate patches.  :)","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"4d491584a082482d11968e7e2cede14108e1fede","unresolved":false,"context_lines":[{"line_number":364,"context_line":"                msg \u003d _(\u0027Failed trying to delete namespace: %s\u0027)"},{"line_number":365,"context_line":"                LOG.exception(msg % namespace)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def _create_namespace(self, name):"},{"line_number":368,"context_line":"        ip_wrapper_root \u003d ip_lib.IPWrapper(self.root_helper)"},{"line_number":369,"context_line":"        ip_wrapper \u003d ip_wrapper_root.ensure_namespace(name)"},{"line_number":370,"context_line":"        LOG.debug(_(\u0027DVR: ns-name: %s\u0027), name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXX%2F%2F4eA%3D","line":367,"in_reply_to":"AAAAXX%2F%2F8xo%3D","updated":"2014-04-25 15:24:53.000000000","message":"Many places in the current code assumes only a ri namespace.  For DVR we are adding 2 new namespace \"types\" - FIP and SNAT.  Many of the internal APIs only pass ri around for the ri.ns_name - so I am refactoring to pass the ns_name alone so the APIs can be used for all 3 namespace \"types\".\nI could remove the router specific one below if you like and have all calls come to this generic one?","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5037f10623f094c62bcfb6cb3c36f6b1c39b0b47","unresolved":false,"context_lines":[{"line_number":469,"context_line":""},{"line_number":470,"context_line":"    def _set_subnet_arp_info(self, ri, port):"},{"line_number":471,"context_line":"        # Get DVR ports for subnet"},{"line_number":472,"context_line":"        if \u0027id\u0027 not in port[\u0027subnet\u0027] or ri.router[\u0027distributed\u0027] is False:"},{"line_number":473,"context_line":"            return"},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"        subnet_ports \u003d ("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FWoM%3D","line":472,"updated":"2014-04-22 11:20:44.000000000","message":"...or not ri.router[\u0027distributed\u0027]: ?","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"187f1aa110b839442bd13d53bad0c13abcd3792f","unresolved":false,"context_lines":[{"line_number":469,"context_line":""},{"line_number":470,"context_line":"    def _set_subnet_arp_info(self, ri, port):"},{"line_number":471,"context_line":"        # Get DVR ports for subnet"},{"line_number":472,"context_line":"        if \u0027id\u0027 not in port[\u0027subnet\u0027] or ri.router[\u0027distributed\u0027] is False:"},{"line_number":473,"context_line":"            return"},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"        subnet_ports \u003d ("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FTG0%3D","line":472,"in_reply_to":"AAAAXH%2F%2FWoM%3D","updated":"2014-04-23 17:56:24.000000000","message":"As is, this might be a bit overkill.  I wanted to make sure this code would only be run when a valid dvr router is being used.  I will refine/simplify this.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5037f10623f094c62bcfb6cb3c36f6b1c39b0b47","unresolved":false,"context_lines":[{"line_number":483,"context_line":"        for p in subnet_ports:"},{"line_number":484,"context_line":"            for fip in p[\u0027fixed_ips\u0027]:"},{"line_number":485,"context_line":"                # TODO: check for multiple subnets on port case"},{"line_number":486,"context_line":"                if (p[\u0027device_owner\u0027] !\u003d \u0027network:router_interface\u0027 and"},{"line_number":487,"context_line":"                        p[\u0027device_owner\u0027] !\u003d"},{"line_number":488,"context_line":"                        \u0027network:router_interface_distributed\u0027):"},{"line_number":489,"context_line":"                    ip_cidr \u003d str(fip[\u0027ip_address\u0027]) + \u0027/32\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FWoA%3D","line":486,"updated":"2014-04-22 11:20:44.000000000","message":"if p[\u0027device_owner\u0027] not in (\u0027network:router_interface\u0027, \u0027network:router_interface_distributed\u0027):","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"187f1aa110b839442bd13d53bad0c13abcd3792f","unresolved":false,"context_lines":[{"line_number":483,"context_line":"        for p in subnet_ports:"},{"line_number":484,"context_line":"            for fip in p[\u0027fixed_ips\u0027]:"},{"line_number":485,"context_line":"                # TODO: check for multiple subnets on port case"},{"line_number":486,"context_line":"                if (p[\u0027device_owner\u0027] !\u003d \u0027network:router_interface\u0027 and"},{"line_number":487,"context_line":"                        p[\u0027device_owner\u0027] !\u003d"},{"line_number":488,"context_line":"                        \u0027network:router_interface_distributed\u0027):"},{"line_number":489,"context_line":"                    ip_cidr \u003d str(fip[\u0027ip_address\u0027]) + \u0027/32\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FTF8%3D","line":486,"in_reply_to":"AAAAXH%2F%2FWoA%3D","updated":"2014-04-23 17:56:24.000000000","message":"Nice improvement. I will update, thanks.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5037f10623f094c62bcfb6cb3c36f6b1c39b0b47","unresolved":false,"context_lines":[{"line_number":487,"context_line":"                        p[\u0027device_owner\u0027] !\u003d"},{"line_number":488,"context_line":"                        \u0027network:router_interface_distributed\u0027):"},{"line_number":489,"context_line":"                    ip_cidr \u003d str(fip[\u0027ip_address\u0027]) + \u0027/32\u0027"},{"line_number":490,"context_line":"                    net \u003d netaddr.IPNetwork(ip_cidr)"},{"line_number":491,"context_line":"                    device.neigh.add(net.version,"},{"line_number":492,"context_line":"                                     fip[\u0027ip_address\u0027], p[\u0027mac_address\u0027])"},{"line_number":493,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FWns%3D","line":490,"updated":"2014-04-22 11:20:44.000000000","message":"Can you encounter a bad ip_cidr that will raise an exception (that should be handled)?","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"672ee8f6a54aa57f2e8d6b2b5d78080a1cbc7fdb","unresolved":false,"context_lines":[{"line_number":487,"context_line":"                        p[\u0027device_owner\u0027] !\u003d"},{"line_number":488,"context_line":"                        \u0027network:router_interface_distributed\u0027):"},{"line_number":489,"context_line":"                    ip_cidr \u003d str(fip[\u0027ip_address\u0027]) + \u0027/32\u0027"},{"line_number":490,"context_line":"                    net \u003d netaddr.IPNetwork(ip_cidr)"},{"line_number":491,"context_line":"                    device.neigh.add(net.version,"},{"line_number":492,"context_line":"                                     fip[\u0027ip_address\u0027], p[\u0027mac_address\u0027])"},{"line_number":493,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_0a05b1c1","line":490,"in_reply_to":"AAAAXH%2F%2FJQc%3D","updated":"2014-05-22 05:49:22.000000000","message":"I\u0027m not sure that\u0027s necessary. Isn\u0027t this information coming from the neutron db where it has already been validated?","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"187f1aa110b839442bd13d53bad0c13abcd3792f","unresolved":false,"context_lines":[{"line_number":487,"context_line":"                        p[\u0027device_owner\u0027] !\u003d"},{"line_number":488,"context_line":"                        \u0027network:router_interface_distributed\u0027):"},{"line_number":489,"context_line":"                    ip_cidr \u003d str(fip[\u0027ip_address\u0027]) + \u0027/32\u0027"},{"line_number":490,"context_line":"                    net \u003d netaddr.IPNetwork(ip_cidr)"},{"line_number":491,"context_line":"                    device.neigh.add(net.version,"},{"line_number":492,"context_line":"                                     fip[\u0027ip_address\u0027], p[\u0027mac_address\u0027])"},{"line_number":493,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FJQc%3D","line":490,"in_reply_to":"AAAAXH%2F%2FWns%3D","updated":"2014-04-23 17:56:24.000000000","message":"I\u0027ll add a try/catch","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"b1b39446b4dbaf3513899026e567ea8ede49d87f","unresolved":false,"context_lines":[{"line_number":488,"context_line":"                        \u0027network:router_interface_distributed\u0027):"},{"line_number":489,"context_line":"                    ip_cidr \u003d str(fip[\u0027ip_address\u0027]) + \u0027/32\u0027"},{"line_number":490,"context_line":"                    net \u003d netaddr.IPNetwork(ip_cidr)"},{"line_number":491,"context_line":"                    device.neigh.add(net.version,"},{"line_number":492,"context_line":"                                     fip[\u0027ip_address\u0027], p[\u0027mac_address\u0027])"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"    def _set_subnet_info(self, port):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FE4A%3D","line":491,"updated":"2014-04-24 07:53:08.000000000","message":"Why not call add_arp_entry added below?","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"0ecb7661f471146a8de30aaac9949087f913f361","unresolved":false,"context_lines":[{"line_number":488,"context_line":"                        \u0027network:router_interface_distributed\u0027):"},{"line_number":489,"context_line":"                    ip_cidr \u003d str(fip[\u0027ip_address\u0027]) + \u0027/32\u0027"},{"line_number":490,"context_line":"                    net \u003d netaddr.IPNetwork(ip_cidr)"},{"line_number":491,"context_line":"                    device.neigh.add(net.version,"},{"line_number":492,"context_line":"                                     fip[\u0027ip_address\u0027], p[\u0027mac_address\u0027])"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"    def _set_subnet_info(self, port):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FAHk%3D","line":491,"in_reply_to":"AAAAXH%2F%2FE4A%3D","updated":"2014-04-24 18:30:11.000000000","message":"Ah - good optimization.  One method was written before the other.  I will refactor - thanks.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5037f10623f094c62bcfb6cb3c36f6b1c39b0b47","unresolved":false,"context_lines":[{"line_number":692,"context_line":"                net \u003d netaddr.IPNetwork(ip_cidr)"},{"line_number":693,"context_line":"                try:"},{"line_number":694,"context_line":"                    device.addr.add(net.version, ip_cidr, str(net.broadcast))"},{"line_number":695,"context_line":"                    if ri.router[\u0027distributed\u0027] is True:"},{"line_number":696,"context_line":"                        # Special Handling for DVR - TBD"},{"line_number":697,"context_line":"                        self.floating_ip_added_dist(ri, fip)"},{"line_number":698,"context_line":"                except (processutils.UnknownArgumentError,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FWnI%3D","line":695,"updated":"2014-04-22 11:20:44.000000000","message":"if ri.router[\u0027distributed\u0027]:","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"672ee8f6a54aa57f2e8d6b2b5d78080a1cbc7fdb","unresolved":false,"context_lines":[{"line_number":692,"context_line":"                net \u003d netaddr.IPNetwork(ip_cidr)"},{"line_number":693,"context_line":"                try:"},{"line_number":694,"context_line":"                    device.addr.add(net.version, ip_cidr, str(net.broadcast))"},{"line_number":695,"context_line":"                    if ri.router[\u0027distributed\u0027] is True:"},{"line_number":696,"context_line":"                        # Special Handling for DVR - TBD"},{"line_number":697,"context_line":"                        self.floating_ip_added_dist(ri, fip)"},{"line_number":698,"context_line":"                except (processutils.UnknownArgumentError,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_aae3dd03","line":695,"in_reply_to":"AAAAXH%2F%2FJRM%3D","updated":"2014-05-22 05:49:22.000000000","message":"I can\u0027t see the test code, but if the ri object is a magic mock, you should be able to do something like the following to make it return false in this check.\n\nri.return_value.router.return_value \u003d {\u0027distributed\u0027: False}","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"187f1aa110b839442bd13d53bad0c13abcd3792f","unresolved":false,"context_lines":[{"line_number":692,"context_line":"                net \u003d netaddr.IPNetwork(ip_cidr)"},{"line_number":693,"context_line":"                try:"},{"line_number":694,"context_line":"                    device.addr.add(net.version, ip_cidr, str(net.broadcast))"},{"line_number":695,"context_line":"                    if ri.router[\u0027distributed\u0027] is True:"},{"line_number":696,"context_line":"                        # Special Handling for DVR - TBD"},{"line_number":697,"context_line":"                        self.floating_ip_added_dist(ri, fip)"},{"line_number":698,"context_line":"                except (processutils.UnknownArgumentError,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FJRM%3D","line":695,"in_reply_to":"AAAAXH%2F%2FWnI%3D","updated":"2014-04-23 17:56:24.000000000","message":"I was hitting issues with the unit tests mock object handling of the ri object.  Essentially it will be \"true\" since it is an object.  I will resolve this however.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"change_message_id":"38275584d3ad9b887284a151c7b8f68822104e92","unresolved":false,"context_lines":[{"line_number":707,"context_line":"                # As GARP is processed in a distinct thread the call below"},{"line_number":708,"context_line":"                # won\u0027t raise an exception to be handled."},{"line_number":709,"context_line":"                self._send_gratuitous_arp_packet("},{"line_number":710,"context_line":"                    ri, interface_name, fip_ip)"},{"line_number":711,"context_line":"            fip_statuses[fip[\u0027id\u0027]] \u003d ("},{"line_number":712,"context_line":"                l3_constants.FLOATINGIP_STATUS_ACTIVE)"},{"line_number":713,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FQyo%3D","line":710,"updated":"2014-04-22 22:45:46.000000000","message":"ri.name","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"187f1aa110b839442bd13d53bad0c13abcd3792f","unresolved":false,"context_lines":[{"line_number":707,"context_line":"                # As GARP is processed in a distinct thread the call below"},{"line_number":708,"context_line":"                # won\u0027t raise an exception to be handled."},{"line_number":709,"context_line":"                self._send_gratuitous_arp_packet("},{"line_number":710,"context_line":"                    ri, interface_name, fip_ip)"},{"line_number":711,"context_line":"            fip_statuses[fip[\u0027id\u0027]] \u003d ("},{"line_number":712,"context_line":"                l3_constants.FLOATINGIP_STATUS_ACTIVE)"},{"line_number":713,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FJQ4%3D","line":710,"in_reply_to":"AAAAXH%2F%2FQyo%3D","updated":"2014-04-23 17:56:24.000000000","message":"good catch","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5037f10623f094c62bcfb6cb3c36f6b1c39b0b47","unresolved":false,"context_lines":[{"line_number":714,"context_line":"        # Clean up addresses that no longer belong on the gateway interface."},{"line_number":715,"context_line":"        for ip_cidr in existing_cidrs - new_cidrs:"},{"line_number":716,"context_line":"            if ip_cidr.endswith(FLOATING_IP_CIDR_SUFFIX):"},{"line_number":717,"context_line":"                if ri.router[\u0027distributed\u0027] is True:"},{"line_number":718,"context_line":"                    # Special handling for DVR - TBD"},{"line_number":719,"context_line":"                    # TODO: find FIP obj from cidr - TBD"},{"line_number":720,"context_line":"                    self.floating_ip_removed_dist(ri, ip_cidr)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FWnA%3D","line":717,"updated":"2014-04-22 11:20:44.000000000","message":"ditto","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"187f1aa110b839442bd13d53bad0c13abcd3792f","unresolved":false,"context_lines":[{"line_number":714,"context_line":"        # Clean up addresses that no longer belong on the gateway interface."},{"line_number":715,"context_line":"        for ip_cidr in existing_cidrs - new_cidrs:"},{"line_number":716,"context_line":"            if ip_cidr.endswith(FLOATING_IP_CIDR_SUFFIX):"},{"line_number":717,"context_line":"                if ri.router[\u0027distributed\u0027] is True:"},{"line_number":718,"context_line":"                    # Special handling for DVR - TBD"},{"line_number":719,"context_line":"                    # TODO: find FIP obj from cidr - TBD"},{"line_number":720,"context_line":"                    self.floating_ip_removed_dist(ri, ip_cidr)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FJQk%3D","line":717,"in_reply_to":"AAAAXH%2F%2FWnA%3D","updated":"2014-04-23 17:56:24.000000000","message":"ditto","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"008aaf63a9844f21e4fff08177f16732d8cfa2b5","unresolved":false,"context_lines":[{"line_number":726,"context_line":"    def _get_ex_gw_port(self, ri):"},{"line_number":727,"context_line":"        return ri.router.get(\u0027gw_port\u0027)"},{"line_number":728,"context_line":""},{"line_number":729,"context_line":"    def _arping(self, ns_name, interface_name, ip_address):"},{"line_number":730,"context_line":"        arping_cmd \u003d [\u0027arping\u0027, \u0027-A\u0027,"},{"line_number":731,"context_line":"                      \u0027-I\u0027, interface_name,"},{"line_number":732,"context_line":"                      \u0027-c\u0027, self.conf.send_arp_for_ha,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXX%2F%2F8uA%3D","line":729,"updated":"2014-04-25 05:36:25.000000000","message":"Could this be submitted as an independent change to refactor this method.  I agree that this change is the right thing to do but it isn\u0027t strictly related to this patch and should go in to its own patch.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"4d491584a082482d11968e7e2cede14108e1fede","unresolved":false,"context_lines":[{"line_number":726,"context_line":"    def _get_ex_gw_port(self, ri):"},{"line_number":727,"context_line":"        return ri.router.get(\u0027gw_port\u0027)"},{"line_number":728,"context_line":""},{"line_number":729,"context_line":"    def _arping(self, ns_name, interface_name, ip_address):"},{"line_number":730,"context_line":"        arping_cmd \u003d [\u0027arping\u0027, \u0027-A\u0027,"},{"line_number":731,"context_line":"                      \u0027-I\u0027, interface_name,"},{"line_number":732,"context_line":"                      \u0027-c\u0027, self.conf.send_arp_for_ha,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXX%2F%2F4dY%3D","line":729,"in_reply_to":"AAAAXX%2F%2F8uA%3D","updated":"2014-04-25 15:24:53.000000000","message":"This is another example of the ns_name independence we need since we have more than one namespace type.  As you can see, ri is only used for the ns_name anyway.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5037f10623f094c62bcfb6cb3c36f6b1c39b0b47","unresolved":false,"context_lines":[{"line_number":743,"context_line":"            eventlet.spawn_n(self._arping, ns_name, interface_name, ip_address)"},{"line_number":744,"context_line":""},{"line_number":745,"context_line":"    def get_internal_port(self, ri, subnet_id):"},{"line_number":746,"context_line":"        \u0027Returns internal router port based on subnet_id\u0027"},{"line_number":747,"context_line":"        router_ports \u003d ri.router.get(l3_constants.INTERFACE_KEY, [])"},{"line_number":748,"context_line":"        for port in router_ports:"},{"line_number":749,"context_line":"            fips \u003d port[\u0027fixed_ips\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FWlc%3D","line":746,"updated":"2014-04-22 11:20:44.000000000","message":"PEP8 use triple double-quotes and period at end of docstring line.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"187f1aa110b839442bd13d53bad0c13abcd3792f","unresolved":false,"context_lines":[{"line_number":743,"context_line":"            eventlet.spawn_n(self._arping, ns_name, interface_name, ip_address)"},{"line_number":744,"context_line":""},{"line_number":745,"context_line":"    def get_internal_port(self, ri, subnet_id):"},{"line_number":746,"context_line":"        \u0027Returns internal router port based on subnet_id\u0027"},{"line_number":747,"context_line":"        router_ports \u003d ri.router.get(l3_constants.INTERFACE_KEY, [])"},{"line_number":748,"context_line":"        for port in router_ports:"},{"line_number":749,"context_line":"            fips \u003d port[\u0027fixed_ips\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FRiU%3D","line":746,"in_reply_to":"AAAAXH%2F%2FWlc%3D","updated":"2014-04-23 17:56:24.000000000","message":"I will update the docstring","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"750cd9215013192e68de791c5488075853a5a2ad","unresolved":false,"context_lines":[{"line_number":830,"context_line":"                ip_wrapper.netns.execute(cmd, check_exit_code\u003dFalse)"},{"line_number":831,"context_line":"            else:"},{"line_number":832,"context_line":"                utils.execute(cmd, check_exit_code\u003dFalse,"},{"line_number":833,"context_line":"                              root_helper\u003dself.root_helper)"},{"line_number":834,"context_line":""},{"line_number":835,"context_line":"    def internal_ns_interface_added(self, ip_cidr,"},{"line_number":836,"context_line":"                                    interface_name, ns_name):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_554d7598","line":833,"updated":"2014-05-23 08:24:28.000000000","message":"Instead of writing these 10 lines of code, I wonder simply passing gateway\u003dex_gw_port[\u0027subnet\u0027][\u0027gateway_ip\u0027] to init_l3 works.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5037f10623f094c62bcfb6cb3c36f6b1c39b0b47","unresolved":false,"context_lines":[{"line_number":921,"context_line":"                                 interface_name)"},{"line_number":922,"context_line":""},{"line_number":923,"context_line":"    def floating_ip_added_dist(self, ri, fip):"},{"line_number":924,"context_line":"        \"\"\" FIP rule handling was based on havana and re-factoring to"},{"line_number":925,"context_line":"            icehouse is currently in progress \"\"\""},{"line_number":926,"context_line":""},{"line_number":927,"context_line":"    def floating_ip_removed_dist(self, ri, ip_cidr):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FWik%3D","line":924,"updated":"2014-04-22 11:20:44.000000000","message":"PEP8 either use single line summary with a period, or summary line with period, followed by additional detail lines (separated by a  blank line from summary).\n\nre-factoring -\u003e refactoring\n\nDocstring (at least summary) should describe what the function does. Is icehouse refactoring currently \"in progress\"? May want to remove time dependency here.\n\nAre you saying that this is no longer used for Icehouse?\n\nShould an explicit \"pass\" be used to make it clear that this is a NOP?","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"187f1aa110b839442bd13d53bad0c13abcd3792f","unresolved":false,"context_lines":[{"line_number":921,"context_line":"                                 interface_name)"},{"line_number":922,"context_line":""},{"line_number":923,"context_line":"    def floating_ip_added_dist(self, ri, fip):"},{"line_number":924,"context_line":"        \"\"\" FIP rule handling was based on havana and re-factoring to"},{"line_number":925,"context_line":"            icehouse is currently in progress \"\"\""},{"line_number":926,"context_line":""},{"line_number":927,"context_line":"    def floating_ip_removed_dist(self, ri, ip_cidr):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FTDQ%3D","line":924,"in_reply_to":"AAAAXH%2F%2FWik%3D","updated":"2014-04-23 17:56:24.000000000","message":"The icehouse version of this method is currently in progress.  DVR specific work will be done here.  I will update for all pep8 issues - for some reason when I ran pep8 it wasn\u0027t catching all the errors the automated tests did.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5037f10623f094c62bcfb6cb3c36f6b1c39b0b47","unresolved":false,"context_lines":[{"line_number":924,"context_line":"        \"\"\" FIP rule handling was based on havana and re-factoring to"},{"line_number":925,"context_line":"            icehouse is currently in progress \"\"\""},{"line_number":926,"context_line":""},{"line_number":927,"context_line":"    def floating_ip_removed_dist(self, ri, ip_cidr):"},{"line_number":928,"context_line":"        \"\"\" FIP rule handling was based on havana and re-factoring to"},{"line_number":929,"context_line":"            icehouse is currently in progress \"\"\""},{"line_number":930,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FWiY%3D","line":927,"updated":"2014-04-22 11:20:44.000000000","message":"ditto","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"187f1aa110b839442bd13d53bad0c13abcd3792f","unresolved":false,"context_lines":[{"line_number":924,"context_line":"        \"\"\" FIP rule handling was based on havana and re-factoring to"},{"line_number":925,"context_line":"            icehouse is currently in progress \"\"\""},{"line_number":926,"context_line":""},{"line_number":927,"context_line":"    def floating_ip_removed_dist(self, ri, ip_cidr):"},{"line_number":928,"context_line":"        \"\"\" FIP rule handling was based on havana and re-factoring to"},{"line_number":929,"context_line":"            icehouse is currently in progress \"\"\""},{"line_number":930,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FTCs%3D","line":927,"in_reply_to":"AAAAXH%2F%2FWiY%3D","updated":"2014-04-23 17:56:24.000000000","message":"same response above - this method will be updated","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"008aaf63a9844f21e4fff08177f16732d8cfa2b5","unresolved":false,"context_lines":[{"line_number":941,"context_line":"        LOG.debug(_(\u0027Got router deleted notification for %s\u0027), router_id)"},{"line_number":942,"context_line":"        self.removed_routers.add(router_id)"},{"line_number":943,"context_line":""},{"line_number":944,"context_line":"    def _update_arp_entry(self, payload, operation):"},{"line_number":945,"context_line":"        LOG.debug(_(\u0027DVR: _update_arp_entry operation: %s payload: %s\u0027),"},{"line_number":946,"context_line":"                  operation, payload)"},{"line_number":947,"context_line":"        arp_table \u003d payload[\u0027arp_table\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXX%2F%2F8wE%3D","line":944,"updated":"2014-04-25 05:36:25.000000000","message":"Suggestion:  Instead of passing operation, return net version, ip, mac, etc. and call the appropriate device.neigh operation in the caller.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"4d491584a082482d11968e7e2cede14108e1fede","unresolved":false,"context_lines":[{"line_number":941,"context_line":"        LOG.debug(_(\u0027Got router deleted notification for %s\u0027), router_id)"},{"line_number":942,"context_line":"        self.removed_routers.add(router_id)"},{"line_number":943,"context_line":""},{"line_number":944,"context_line":"    def _update_arp_entry(self, payload, operation):"},{"line_number":945,"context_line":"        LOG.debug(_(\u0027DVR: _update_arp_entry operation: %s payload: %s\u0027),"},{"line_number":946,"context_line":"                  operation, payload)"},{"line_number":947,"context_line":"        arp_table \u003d payload[\u0027arp_table\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXX%2F%2F4dU%3D","line":944,"in_reply_to":"AAAAXX%2F%2F8wE%3D","updated":"2014-04-25 15:24:53.000000000","message":"I\u0027ll try that out.","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5037f10623f094c62bcfb6cb3c36f6b1c39b0b47","unresolved":false,"context_lines":[{"line_number":942,"context_line":"        self.removed_routers.add(router_id)"},{"line_number":943,"context_line":""},{"line_number":944,"context_line":"    def _update_arp_entry(self, payload, operation):"},{"line_number":945,"context_line":"        LOG.debug(_(\u0027DVR: _update_arp_entry operation: %s payload: %s\u0027),"},{"line_number":946,"context_line":"                  operation, payload)"},{"line_number":947,"context_line":"        arp_table \u003d payload[\u0027arp_table\u0027]"},{"line_number":948,"context_line":"        router_id \u003d payload[\u0027router_id\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FWhk%3D","line":945,"updated":"2014-04-22 11:20:44.000000000","message":"with \u003e1 parameter for string, use named format specifiers and dict:\n\nLOG.debug(_(\u0027DVR: _update_arp_entry operation: %(operation)s payload: %(payload)s\u0027), {\u0027operation\u0027: operation, \u0027payload\u0027: payload})","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"187f1aa110b839442bd13d53bad0c13abcd3792f","unresolved":false,"context_lines":[{"line_number":942,"context_line":"        self.removed_routers.add(router_id)"},{"line_number":943,"context_line":""},{"line_number":944,"context_line":"    def _update_arp_entry(self, payload, operation):"},{"line_number":945,"context_line":"        LOG.debug(_(\u0027DVR: _update_arp_entry operation: %s payload: %s\u0027),"},{"line_number":946,"context_line":"                  operation, payload)"},{"line_number":947,"context_line":"        arp_table \u003d payload[\u0027arp_table\u0027]"},{"line_number":948,"context_line":"        router_id \u003d payload[\u0027router_id\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FJRk%3D","line":945,"in_reply_to":"AAAAXH%2F%2FWhk%3D","updated":"2014-04-23 17:56:24.000000000","message":"understood","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5037f10623f094c62bcfb6cb3c36f6b1c39b0b47","unresolved":false,"context_lines":[{"line_number":953,"context_line":"        port \u003d self.get_internal_port(ri, subnet_id)"},{"line_number":954,"context_line":"        if \u0027id\u0027 in port:"},{"line_number":955,"context_line":"            ip_cidr \u003d str(ip) + \u0027/32\u0027"},{"line_number":956,"context_line":"            net \u003d netaddr.IPNetwork(ip_cidr)"},{"line_number":957,"context_line":"            interface_name \u003d self.get_internal_device_name(port[\u0027id\u0027])"},{"line_number":958,"context_line":"            device \u003d ip_lib.IPDevice(interface_name, self.root_helper,"},{"line_number":959,"context_line":"                                     namespace\u003dri.ns_name())"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FWhQ%3D","line":956,"updated":"2014-04-22 11:20:44.000000000","message":"Do we need to catch any exceptions raised here or will that never occur?","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"187f1aa110b839442bd13d53bad0c13abcd3792f","unresolved":false,"context_lines":[{"line_number":953,"context_line":"        port \u003d self.get_internal_port(ri, subnet_id)"},{"line_number":954,"context_line":"        if \u0027id\u0027 in port:"},{"line_number":955,"context_line":"            ip_cidr \u003d str(ip) + \u0027/32\u0027"},{"line_number":956,"context_line":"            net \u003d netaddr.IPNetwork(ip_cidr)"},{"line_number":957,"context_line":"            interface_name \u003d self.get_internal_device_name(port[\u0027id\u0027])"},{"line_number":958,"context_line":"            device \u003d ip_lib.IPDevice(interface_name, self.root_helper,"},{"line_number":959,"context_line":"                                     namespace\u003dri.ns_name())"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FJRs%3D","line":956,"in_reply_to":"AAAAXH%2F%2FWhQ%3D","updated":"2014-04-23 17:56:24.000000000","message":"try/catch will be added","commit_id":"4977cded31b59ce6c4c329188e8a44feee23b903"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"a42ace9486e784d6535294b3deb708c2aec8fdc4","unresolved":false,"context_lines":[{"line_number":42,"context_line":"from neutron.openstack.common import service"},{"line_number":43,"context_line":"from neutron import service as neutron_service"},{"line_number":44,"context_line":"from neutron.services.firewall.agents.l3reference import firewall_l3_agent"},{"line_number":45,"context_line":"import re"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":48,"context_line":"NS_PREFIX \u003d \u0027qrouter-\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_0f48f9b1","line":45,"updated":"2014-06-11 20:55:48.000000000","message":"This should go above the project imports","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"76195e7c709dfb995e49c6d179b0997df12c99d4","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                         version\u003d\u00271.1\u0027)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def get_ports_by_subnet(self, context, subnet_id):"},{"line_number":110,"context_line":"        \"\"\"Make a remote process call to retrieve ports by subnet id.\"\"\""},{"line_number":111,"context_line":"        return self.call(context,"},{"line_number":112,"context_line":"                         self.make_msg(\u0027get_ports_by_subnet\u0027, host\u003dself.host,"},{"line_number":113,"context_line":"                                       subnet_id\u003dsubnet_id),"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_8dd508e7","line":110,"updated":"2014-06-11 11:37:30.000000000","message":"Nit: Don\u0027t really need \"Make a remote process call to\". Can just say \"Retrieve ports by subnet id.\".\n\nDitto on other three methods.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ed444067c1b4ad75d9bf719dc4e8e43ef7eb99bd","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                         version\u003d\u00271.1\u0027)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def get_ports_by_subnet(self, context, subnet_id):"},{"line_number":110,"context_line":"        \"\"\"Make a remote process call to retrieve ports by subnet id.\"\"\""},{"line_number":111,"context_line":"        return self.call(context,"},{"line_number":112,"context_line":"                         self.make_msg(\u0027get_ports_by_subnet\u0027, host\u003dself.host,"},{"line_number":113,"context_line":"                                       subnet_id\u003dsubnet_id),"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_9c244a0e","line":110,"in_reply_to":"1ae5cdf2_8dd508e7","updated":"2014-06-11 17:32:15.000000000","message":"I see - it should be implied in this context that they are RPC... got it.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"76195e7c709dfb995e49c6d179b0997df12c99d4","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                    help\u003d_(\"Enables distributed router agent function.\")),"},{"line_number":205,"context_line":"        cfg.BoolOpt(\u0027centralized_snat\u0027, default\u003dFalse,"},{"line_number":206,"context_line":"                    help\u003d_(\"Enables centralized SNAT in dvr mode.\")),"},{"line_number":207,"context_line":"        cfg.BoolOpt(\u0027centralized\u0027, default\u003dTrue,"},{"line_number":208,"context_line":"                    help\u003d_(\"Enables centralized router in dvr mode.\")),"},{"line_number":209,"context_line":"        cfg.StrOpt(\u0027external_network_bridge\u0027, default\u003d\u0027br-ex\u0027,"},{"line_number":210,"context_line":"                   help\u003d_(\"Name of bridge used for external network \""}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_4d3dc02a","line":207,"updated":"2014-06-11 11:37:30.000000000","message":"centralized_router?","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ed444067c1b4ad75d9bf719dc4e8e43ef7eb99bd","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                    help\u003d_(\"Enables distributed router agent function.\")),"},{"line_number":205,"context_line":"        cfg.BoolOpt(\u0027centralized_snat\u0027, default\u003dFalse,"},{"line_number":206,"context_line":"                    help\u003d_(\"Enables centralized SNAT in dvr mode.\")),"},{"line_number":207,"context_line":"        cfg.BoolOpt(\u0027centralized\u0027, default\u003dTrue,"},{"line_number":208,"context_line":"                    help\u003d_(\"Enables centralized router in dvr mode.\")),"},{"line_number":209,"context_line":"        cfg.StrOpt(\u0027external_network_bridge\u0027, default\u003d\u0027br-ex\u0027,"},{"line_number":210,"context_line":"                   help\u003d_(\"Name of bridge used for external network \""}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_fc61ce39","line":207,"in_reply_to":"1ae5cdf2_4d3dc02a","updated":"2014-06-11 17:32:15.000000000","message":"Kyle already commented on a better name - \u0027centralized_router\u0027.  I will make the change.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"76195e7c709dfb995e49c6d179b0997df12c99d4","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        # delete internal interfaces"},{"line_number":362,"context_line":"        for d in ns_ip.get_devices(exclude_loopback\u003dTrue):"},{"line_number":363,"context_line":"            if d.name.startswith(SNAT_INT_DEV_PREFIX):"},{"line_number":364,"context_line":"                LOG.debug(_(\u0027DVR: unplug: %s\u0027), d.name)"},{"line_number":365,"context_line":"                self.driver.unplug(d.name, namespace\u003dns_name,"},{"line_number":366,"context_line":"                                   prefix\u003dSNAT_INT_DEV_PREFIX)"},{"line_number":367,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_c8753e99","line":364,"updated":"2014-06-11 11:37:30.000000000","message":"No i18n for debug LOG messages. Check other debug logs in change set.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ed444067c1b4ad75d9bf719dc4e8e43ef7eb99bd","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        # delete internal interfaces"},{"line_number":362,"context_line":"        for d in ns_ip.get_devices(exclude_loopback\u003dTrue):"},{"line_number":363,"context_line":"            if d.name.startswith(SNAT_INT_DEV_PREFIX):"},{"line_number":364,"context_line":"                LOG.debug(_(\u0027DVR: unplug: %s\u0027), d.name)"},{"line_number":365,"context_line":"                self.driver.unplug(d.name, namespace\u003dns_name,"},{"line_number":366,"context_line":"                                   prefix\u003dSNAT_INT_DEV_PREFIX)"},{"line_number":367,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_ff2d4047","line":364,"in_reply_to":"1ae5cdf2_c8753e99","updated":"2014-06-11 17:32:15.000000000","message":"I\u0027ll have to look at that - seems like a new requirement","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"76195e7c709dfb995e49c6d179b0997df12c99d4","unresolved":false,"context_lines":[{"line_number":695,"context_line":""},{"line_number":696,"context_line":"    def _handle_router_fip_nat_rules(self, ri, interface_name, action):"},{"line_number":697,"context_line":"        \"\"\"Configures NAT rules for Floating IPs for DVR.\"\"\""},{"line_number":698,"context_line":"        # Remove all the rules"},{"line_number":699,"context_line":"        # This is safe because if use_namespaces is set as False"},{"line_number":700,"context_line":"        # then the agent can only configure one router, otherwise"},{"line_number":701,"context_line":"        # each router\u0027s NAT rules will be in their own namespace"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_c8d45e22","line":698,"updated":"2014-06-11 11:37:30.000000000","message":"Consider making these comments part of docstring.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ed444067c1b4ad75d9bf719dc4e8e43ef7eb99bd","unresolved":false,"context_lines":[{"line_number":695,"context_line":""},{"line_number":696,"context_line":"    def _handle_router_fip_nat_rules(self, ri, interface_name, action):"},{"line_number":697,"context_line":"        \"\"\"Configures NAT rules for Floating IPs for DVR.\"\"\""},{"line_number":698,"context_line":"        # Remove all the rules"},{"line_number":699,"context_line":"        # This is safe because if use_namespaces is set as False"},{"line_number":700,"context_line":"        # then the agent can only configure one router, otherwise"},{"line_number":701,"context_line":"        # each router\u0027s NAT rules will be in their own namespace"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_ff5f00e3","line":698,"in_reply_to":"1ae5cdf2_c8d45e22","updated":"2014-06-11 17:32:15.000000000","message":"Sure","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"76195e7c709dfb995e49c6d179b0997df12c99d4","unresolved":false,"context_lines":[{"line_number":787,"context_line":"                    LOG.warn(_(\"Unable to configure IP address for \""},{"line_number":788,"context_line":"                               \"floating IP: %s\"), fip[\u0027id\u0027])"},{"line_number":789,"context_line":"                    continue"},{"line_number":790,"context_line":"                if ri.router[\u0027distributed\u0027] is True:"},{"line_number":791,"context_line":"                    # Special Handling for DVR - TBD"},{"line_number":792,"context_line":"                    self.floating_ip_added_dist(ri, fip)"},{"line_number":793,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_687a6a25","line":790,"updated":"2014-06-11 11:37:30.000000000","message":"if ri.router[\u0027distributed\u0027]:","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2663ab3f8085b29ba6ff5f9f31f4251f7adb9e90","unresolved":false,"context_lines":[{"line_number":787,"context_line":"                    LOG.warn(_(\"Unable to configure IP address for \""},{"line_number":788,"context_line":"                               \"floating IP: %s\"), fip[\u0027id\u0027])"},{"line_number":789,"context_line":"                    continue"},{"line_number":790,"context_line":"                if ri.router[\u0027distributed\u0027] is True:"},{"line_number":791,"context_line":"                    # Special Handling for DVR - TBD"},{"line_number":792,"context_line":"                    self.floating_ip_added_dist(ri, fip)"},{"line_number":793,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_b2b04a8c","line":790,"in_reply_to":"1ae5cdf2_3c9df60a","updated":"2014-06-11 21:28:44.000000000","message":"If you depend on a mock evaluating to True or False in a context like this then the mock needs to be configured to do so.  For example, one can get a mock to return False in boolean context like this:\n\n\u003e\u003e\u003e bool(m[\u0027distributed\u0027])\nTrue\n\u003e\u003e\u003e m[\u0027distributed\u0027].__nonzero__ \u003d lambda self: False\n\u003e\u003e\u003e bool(m[\u0027distributed\u0027])\nFalse","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ed444067c1b4ad75d9bf719dc4e8e43ef7eb99bd","unresolved":false,"context_lines":[{"line_number":787,"context_line":"                    LOG.warn(_(\"Unable to configure IP address for \""},{"line_number":788,"context_line":"                               \"floating IP: %s\"), fip[\u0027id\u0027])"},{"line_number":789,"context_line":"                    continue"},{"line_number":790,"context_line":"                if ri.router[\u0027distributed\u0027] is True:"},{"line_number":791,"context_line":"                    # Special Handling for DVR - TBD"},{"line_number":792,"context_line":"                    self.floating_ip_added_dist(ri, fip)"},{"line_number":793,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_3c9df60a","line":790,"in_reply_to":"1ae5cdf2_687a6a25","updated":"2014-06-11 17:32:15.000000000","message":"I\u0027ve had probs in the past with the unit tests mocking the ri.router object and then having your logic work.  Essentially the statement is true since it is non-zero.  But when the boolean is used, it works better (True and False) from the type.  I know the preference is not having \"is [True|False]\" - I\u0027ll work on the unit tests to enable this.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"76195e7c709dfb995e49c6d179b0997df12c99d4","unresolved":false,"context_lines":[{"line_number":876,"context_line":"    def get_floating_ips(self, ri):"},{"line_number":877,"context_line":"        \"\"\"Filters Floating IPs for DVR to be hosted on this agent.\"\"\""},{"line_number":878,"context_line":"        floating_ips \u003d ri.router.get(l3_constants.FLOATINGIP_KEY, [])"},{"line_number":879,"context_line":"        if ri.router[\u0027distributed\u0027] is True:"},{"line_number":880,"context_line":"            floating_ips \u003d [i for i in floating_ips if i[\u0027host\u0027] \u003d\u003d self.host]"},{"line_number":881,"context_line":"        return floating_ips"},{"line_number":882,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_e8bcbabd","line":879,"updated":"2014-06-11 11:37:30.000000000","message":"if ri.router[\u0027distributed\u0027]:","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ed444067c1b4ad75d9bf719dc4e8e43ef7eb99bd","unresolved":false,"context_lines":[{"line_number":876,"context_line":"    def get_floating_ips(self, ri):"},{"line_number":877,"context_line":"        \"\"\"Filters Floating IPs for DVR to be hosted on this agent.\"\"\""},{"line_number":878,"context_line":"        floating_ips \u003d ri.router.get(l3_constants.FLOATINGIP_KEY, [])"},{"line_number":879,"context_line":"        if ri.router[\u0027distributed\u0027] is True:"},{"line_number":880,"context_line":"            floating_ips \u003d [i for i in floating_ips if i[\u0027host\u0027] \u003d\u003d self.host]"},{"line_number":881,"context_line":"        return floating_ips"},{"line_number":882,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_5f44741a","line":879,"in_reply_to":"1ae5cdf2_e8bcbabd","updated":"2014-06-11 17:32:15.000000000","message":"Same mock/unit test issue","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"76195e7c709dfb995e49c6d179b0997df12c99d4","unresolved":false,"context_lines":[{"line_number":882,"context_line":""},{"line_number":883,"context_line":"    def _map_internal_interfaces(self, ri, int_port, snat_ports):"},{"line_number":884,"context_line":"        \"\"\"Returns the SNAT port for the given internal interface port.\"\"\""},{"line_number":885,"context_line":"        fixed_ip \u003d int_port[\u0027fixed_ips\u0027][0]"},{"line_number":886,"context_line":"        subnet_id \u003d fixed_ip[\u0027subnet_id\u0027]"},{"line_number":887,"context_line":"        match_port \u003d [p for p in snat_ports if"},{"line_number":888,"context_line":"                      p[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027] \u003d\u003d subnet_id]"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_4855ae4e","line":885,"updated":"2014-06-11 11:37:30.000000000","message":"I\u0027m not sure of the context, but are you guaranteed to always have fixed_ips key for int_port and snat_ports?","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ed444067c1b4ad75d9bf719dc4e8e43ef7eb99bd","unresolved":false,"context_lines":[{"line_number":882,"context_line":""},{"line_number":883,"context_line":"    def _map_internal_interfaces(self, ri, int_port, snat_ports):"},{"line_number":884,"context_line":"        \"\"\"Returns the SNAT port for the given internal interface port.\"\"\""},{"line_number":885,"context_line":"        fixed_ip \u003d int_port[\u0027fixed_ips\u0027][0]"},{"line_number":886,"context_line":"        subnet_id \u003d fixed_ip[\u0027subnet_id\u0027]"},{"line_number":887,"context_line":"        match_port \u003d [p for p in snat_ports if"},{"line_number":888,"context_line":"                      p[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027] \u003d\u003d subnet_id]"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_bc9026ee","line":885,"in_reply_to":"1ae5cdf2_4855ae4e","updated":"2014-06-11 17:32:15.000000000","message":"It might be worth a check","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"76195e7c709dfb995e49c6d179b0997df12c99d4","unresolved":false,"context_lines":[{"line_number":928,"context_line":""},{"line_number":929,"context_line":"            if self.conf.centralized_snat and ("},{"line_number":930,"context_line":"                    ri.router[\u0027gw_port_host\u0027] \u003d\u003d self.host):"},{"line_number":931,"context_line":"                if snat_ports:"},{"line_number":932,"context_line":"                    self._create_dvr_gateway(ri, ex_gw_port, interface_name,"},{"line_number":933,"context_line":"                                             internal_cidrs, snat_ports)"},{"line_number":934,"context_line":"            for port in snat_ports:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_e8691afa","line":931,"updated":"2014-06-11 11:37:30.000000000","message":"Could include with enclosing if clause.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ed444067c1b4ad75d9bf719dc4e8e43ef7eb99bd","unresolved":false,"context_lines":[{"line_number":928,"context_line":""},{"line_number":929,"context_line":"            if self.conf.centralized_snat and ("},{"line_number":930,"context_line":"                    ri.router[\u0027gw_port_host\u0027] \u003d\u003d self.host):"},{"line_number":931,"context_line":"                if snat_ports:"},{"line_number":932,"context_line":"                    self._create_dvr_gateway(ri, ex_gw_port, interface_name,"},{"line_number":933,"context_line":"                                             internal_cidrs, snat_ports)"},{"line_number":934,"context_line":"            for port in snat_ports:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_1ff02cfd","line":931,"in_reply_to":"1ae5cdf2_e8691afa","updated":"2014-06-11 17:32:15.000000000","message":"I\u0027ll try that.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"76195e7c709dfb995e49c6d179b0997df12c99d4","unresolved":false,"context_lines":[{"line_number":936,"context_line":"                    self._update_arp_entry(ri, ip[\u0027ip_address\u0027],"},{"line_number":937,"context_line":"                                           port[\u0027mac_address\u0027],"},{"line_number":938,"context_line":"                                           ip[\u0027subnet_id\u0027], \u0027add\u0027)"},{"line_number":939,"context_line":"            return"},{"line_number":940,"context_line":""},{"line_number":941,"context_line":"        # Compute a list of addresses this router is supposed to have."},{"line_number":942,"context_line":"        # This avoids unnecessarily removing those addresses and"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_a87b92bc","line":939,"updated":"2014-06-11 11:37:30.000000000","message":"Not needed","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ed444067c1b4ad75d9bf719dc4e8e43ef7eb99bd","unresolved":false,"context_lines":[{"line_number":936,"context_line":"                    self._update_arp_entry(ri, ip[\u0027ip_address\u0027],"},{"line_number":937,"context_line":"                                           port[\u0027mac_address\u0027],"},{"line_number":938,"context_line":"                                           ip[\u0027subnet_id\u0027], \u0027add\u0027)"},{"line_number":939,"context_line":"            return"},{"line_number":940,"context_line":""},{"line_number":941,"context_line":"        # Compute a list of addresses this router is supposed to have."},{"line_number":942,"context_line":"        # This avoids unnecessarily removing those addresses and"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_df8a4463","line":939,"in_reply_to":"1ae5cdf2_a87b92bc","updated":"2014-06-11 17:32:15.000000000","message":"We don\u0027t want to fall through below if this is a distributed router.  The gateway is created in plugged via the _create_dvr_gateway() method.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"76195e7c709dfb995e49c6d179b0997df12c99d4","unresolved":false,"context_lines":[{"line_number":1085,"context_line":"            ns_ip.netns.execute([\u0027sysctl\u0027, \u0027-w\u0027, \u0027net.ipv4.conf.%s.\u0027"},{"line_number":1086,"context_line":"                                 \u0027send_redirects\u003d0\u0027 % interface])"},{"line_number":1087,"context_line":"        except Exception:"},{"line_number":1088,"context_line":"            LOG.debug(_(\u0027DVR: error adding redirection logic\u0027))"},{"line_number":1089,"context_line":""},{"line_number":1090,"context_line":"    def _snat_redirect_remove(self, ri, sn_port):"},{"line_number":1091,"context_line":"        \"\"\"Removes rules and routes for SNAT redirection.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_680a6a27","line":1088,"updated":"2014-06-11 11:37:30.000000000","message":"Is debug level log OK here?","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ed444067c1b4ad75d9bf719dc4e8e43ef7eb99bd","unresolved":false,"context_lines":[{"line_number":1085,"context_line":"            ns_ip.netns.execute([\u0027sysctl\u0027, \u0027-w\u0027, \u0027net.ipv4.conf.%s.\u0027"},{"line_number":1086,"context_line":"                                 \u0027send_redirects\u003d0\u0027 % interface])"},{"line_number":1087,"context_line":"        except Exception:"},{"line_number":1088,"context_line":"            LOG.debug(_(\u0027DVR: error adding redirection logic\u0027))"},{"line_number":1089,"context_line":""},{"line_number":1090,"context_line":"    def _snat_redirect_remove(self, ri, sn_port):"},{"line_number":1091,"context_line":"        \"\"\"Removes rules and routes for SNAT redirection.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_dfe1642b","line":1088,"in_reply_to":"1ae5cdf2_680a6a27","updated":"2014-06-11 17:32:15.000000000","message":"I\u0027ll bump it up","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"76195e7c709dfb995e49c6d179b0997df12c99d4","unresolved":false,"context_lines":[{"line_number":1095,"context_line":"            ns_ip.delete_route_default(snat_idx)"},{"line_number":1096,"context_line":"            ns_ip.delete_rule_priority(snat_idx)"},{"line_number":1097,"context_line":"        except Exception:"},{"line_number":1098,"context_line":"            LOG.debug(_(\u0027DVR: removed snat failed\u0027))"},{"line_number":1099,"context_line":""},{"line_number":1100,"context_line":"    def _internal_network_added(self, ns_name, network_id, port_id,"},{"line_number":1101,"context_line":"                                internal_cidr, mac_address,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_8803360f","line":1098,"updated":"2014-06-11 11:37:30.000000000","message":"Ditto.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ed444067c1b4ad75d9bf719dc4e8e43ef7eb99bd","unresolved":false,"context_lines":[{"line_number":1095,"context_line":"            ns_ip.delete_route_default(snat_idx)"},{"line_number":1096,"context_line":"            ns_ip.delete_rule_priority(snat_idx)"},{"line_number":1097,"context_line":"        except Exception:"},{"line_number":1098,"context_line":"            LOG.debug(_(\u0027DVR: removed snat failed\u0027))"},{"line_number":1099,"context_line":""},{"line_number":1100,"context_line":"    def _internal_network_added(self, ns_name, network_id, port_id,"},{"line_number":1101,"context_line":"                                internal_cidr, mac_address,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_ffd1c057","line":1098,"in_reply_to":"1ae5cdf2_8803360f","updated":"2014-06-11 17:32:15.000000000","message":"Ditto","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"27765c3f39f79b733540968b5936dddc0684b113","unresolved":false,"context_lines":[{"line_number":1284,"context_line":"                                     namespace\u003dri.ns_name)"},{"line_number":1285,"context_line":"            device.route.delete_gateway(ri.fip_2_rtr, table\u003dFIP_RT_TBL)"},{"line_number":1286,"context_line":"            vals \u003d re.split(r\u0027(\\D)\u0027, ri.rtr_2_fip)"},{"line_number":1287,"context_line":"            self.local_ips.add(vals[6])"},{"line_number":1288,"context_line":"            ri.rtr_2_fip \u003d None"},{"line_number":1289,"context_line":"            vals \u003d re.split(r\u0027(\\D)\u0027, ri.fip_2_rtr)"},{"line_number":1290,"context_line":"            self.local_ips.add(vals[6])"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_a7d9dc58","line":1287,"updated":"2014-06-12 08:50:42.000000000","message":"This code snippet isn\u0027t quite readable, please use the following instead.\n\n    self.local_ips.add(ri.rtr_2_fip.rsplit(\u0027.\u0027, 1)[1])","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"4251558c22adc29cbeecc8a17a6324c1bfebded8","unresolved":false,"context_lines":[{"line_number":1284,"context_line":"                                     namespace\u003dri.ns_name)"},{"line_number":1285,"context_line":"            device.route.delete_gateway(ri.fip_2_rtr, table\u003dFIP_RT_TBL)"},{"line_number":1286,"context_line":"            vals \u003d re.split(r\u0027(\\D)\u0027, ri.rtr_2_fip)"},{"line_number":1287,"context_line":"            self.local_ips.add(vals[6])"},{"line_number":1288,"context_line":"            ri.rtr_2_fip \u003d None"},{"line_number":1289,"context_line":"            vals \u003d re.split(r\u0027(\\D)\u0027, ri.fip_2_rtr)"},{"line_number":1290,"context_line":"            self.local_ips.add(vals[6])"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_fb1a827b","line":1287,"in_reply_to":"1ae5cdf2_a7d9dc58","updated":"2014-06-13 00:48:00.000000000","message":"Will do, thanks.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"369abf5e8ab1fd50e7845df59e2ab4eb9293329b","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from neutron.agent.linux import interface"},{"line_number":25,"context_line":"from neutron.agent.linux import ip_lib"},{"line_number":26,"context_line":"from neutron.agent.linux import iptables_manager"},{"line_number":27,"context_line":"from neutron.agent.linux import ovs_lib  # noqa"},{"line_number":28,"context_line":"from neutron.agent import rpc as agent_rpc"},{"line_number":29,"context_line":"from neutron.common import constants as l3_constants"},{"line_number":30,"context_line":"from neutron.common import rpc_compat"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_8933f312","side":"PARENT","line":27,"updated":"2014-06-13 07:14:07.000000000","message":"is this related?","commit_id":"026c8d93198b4877da14049c18397654fbbfec84"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"369abf5e8ab1fd50e7845df59e2ab4eb9293329b","unresolved":false,"context_lines":[{"line_number":57,"context_line":"FIP_LL_PREFIX \u003d \u0027169.254.30.\u0027"},{"line_number":58,"context_line":"FIP_RT_TBL \u003d 16"},{"line_number":59,"context_line":"FIP_PR_ST \u003d 32768"},{"line_number":60,"context_line":"FIP_PR_END \u003d FIP_PR_ST + 40000"},{"line_number":61,"context_line":"RPC_LOOP_INTERVAL \u003d 1"},{"line_number":62,"context_line":"FLOATING_IP_CIDR_SUFFIX \u003d \u0027/32\u0027"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_44e55236","line":60,"updated":"2014-06-13 07:14:07.000000000","message":"can you add a comment to explain the rationale of these constants?","commit_id":"e91947c5df107db2db184e011328a6ddbb99cc9a"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"9967ea84e56a8c1430c7db6bfa0974641026814a","unresolved":false,"context_lines":[{"line_number":57,"context_line":"FIP_LL_PREFIX \u003d \u0027169.254.30.\u0027"},{"line_number":58,"context_line":"FIP_RT_TBL \u003d 16"},{"line_number":59,"context_line":"FIP_PR_ST \u003d 32768"},{"line_number":60,"context_line":"FIP_PR_END \u003d FIP_PR_ST + 40000"},{"line_number":61,"context_line":"RPC_LOOP_INTERVAL \u003d 1"},{"line_number":62,"context_line":"FLOATING_IP_CIDR_SUFFIX \u003d \u0027/32\u0027"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_7c7ac777","line":60,"in_reply_to":"1ae5cdf2_44e55236","updated":"2014-06-14 00:22:40.000000000","message":"Will do.","commit_id":"e91947c5df107db2db184e011328a6ddbb99cc9a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"e124b5c2173f017c5183d4b02c46074abdef9a7c","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                         version\u003d\u00271.1\u0027)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def get_ports_by_subnet(self, context, subnet_id):"},{"line_number":110,"context_line":"        \"\"\"Make a remote process call to retrieve ports by subnet id.\"\"\""},{"line_number":111,"context_line":"        return self.call(context,"},{"line_number":112,"context_line":"                         self.make_msg(\u0027get_ports_by_subnet\u0027, host\u003dself.host,"},{"line_number":113,"context_line":"                                       subnet_id\u003dsubnet_id),"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_77bcb906","line":110,"updated":"2014-06-13 11:22:50.000000000","message":"Apply comments from patch set 2?","commit_id":"e91947c5df107db2db184e011328a6ddbb99cc9a"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"369abf5e8ab1fd50e7845df59e2ab4eb9293329b","unresolved":false,"context_lines":[{"line_number":281,"context_line":"        # dvr data"},{"line_number":282,"context_line":"        self.agent_gateway_port \u003d None"},{"line_number":283,"context_line":"        self.agent_fip_count \u003d 0"},{"line_number":284,"context_line":"        self.local_ips \u003d set(xrange(2, 251))"},{"line_number":285,"context_line":"        self.fip_priorities \u003d set(xrange(FIP_PR_ST, FIP_PR_END))"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        self.rpc_loop \u003d loopingcall.FixedIntervalLoopingCall("}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_e459fefd","line":284,"updated":"2014-06-13 07:14:07.000000000","message":"the name \u0027local_ips\u0027 made me think something like [\u0027169.254.30.2\u0027, \u0027169.254.30.3\u0027, ...].\nIMO it\u0027s easier to understand that way.","commit_id":"e91947c5df107db2db184e011328a6ddbb99cc9a"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"9967ea84e56a8c1430c7db6bfa0974641026814a","unresolved":false,"context_lines":[{"line_number":281,"context_line":"        # dvr data"},{"line_number":282,"context_line":"        self.agent_gateway_port \u003d None"},{"line_number":283,"context_line":"        self.agent_fip_count \u003d 0"},{"line_number":284,"context_line":"        self.local_ips \u003d set(xrange(2, 251))"},{"line_number":285,"context_line":"        self.fip_priorities \u003d set(xrange(FIP_PR_ST, FIP_PR_END))"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        self.rpc_loop \u003d loopingcall.FixedIntervalLoopingCall("}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_fc8df77c","line":284,"in_reply_to":"1ae5cdf2_e459fefd","updated":"2014-06-14 00:22:40.000000000","message":"Didn\u0027t understand your comment, please reply if you are asking for any change here. Thanks.","commit_id":"e91947c5df107db2db184e011328a6ddbb99cc9a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"e124b5c2173f017c5183d4b02c46074abdef9a7c","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        # delete internal interfaces"},{"line_number":362,"context_line":"        for d in ns_ip.get_devices(exclude_loopback\u003dTrue):"},{"line_number":363,"context_line":"            if d.name.startswith(SNAT_INT_DEV_PREFIX):"},{"line_number":364,"context_line":"                LOG.debug(_(\u0027DVR: unplug: %s\u0027), d.name)"},{"line_number":365,"context_line":"                self.driver.unplug(d.name, namespace\u003dns_name,"},{"line_number":366,"context_line":"                                   prefix\u003dSNAT_INT_DEV_PREFIX)"},{"line_number":367,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_974ea536","line":364,"updated":"2014-06-13 11:22:50.000000000","message":"Please apply comments from patchset 2. This is a new requirement.","commit_id":"e91947c5df107db2db184e011328a6ddbb99cc9a"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"9967ea84e56a8c1430c7db6bfa0974641026814a","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        # delete internal interfaces"},{"line_number":362,"context_line":"        for d in ns_ip.get_devices(exclude_loopback\u003dTrue):"},{"line_number":363,"context_line":"            if d.name.startswith(SNAT_INT_DEV_PREFIX):"},{"line_number":364,"context_line":"                LOG.debug(_(\u0027DVR: unplug: %s\u0027), d.name)"},{"line_number":365,"context_line":"                self.driver.unplug(d.name, namespace\u003dns_name,"},{"line_number":366,"context_line":"                                   prefix\u003dSNAT_INT_DEV_PREFIX)"},{"line_number":367,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_bcde0f6b","line":364,"in_reply_to":"1ae5cdf2_974ea536","updated":"2014-06-14 00:22:40.000000000","message":"Paul, can you please provide an example or link to what is the new requirement? We will work through your comments from Patch 2 in a subsequent Patch.","commit_id":"e91947c5df107db2db184e011328a6ddbb99cc9a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"57c47ed991c7588a671b72a7383201cf3ecb0339","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        # delete internal interfaces"},{"line_number":362,"context_line":"        for d in ns_ip.get_devices(exclude_loopback\u003dTrue):"},{"line_number":363,"context_line":"            if d.name.startswith(SNAT_INT_DEV_PREFIX):"},{"line_number":364,"context_line":"                LOG.debug(_(\u0027DVR: unplug: %s\u0027), d.name)"},{"line_number":365,"context_line":"                self.driver.unplug(d.name, namespace\u003dns_name,"},{"line_number":366,"context_line":"                                   prefix\u003dSNAT_INT_DEV_PREFIX)"},{"line_number":367,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_f33ee6b8","line":364,"in_reply_to":"1ae5cdf2_bcde0f6b","updated":"2014-06-16 10:34:05.000000000","message":"So the new requirement is not to perform i18n translation on debug level logs. The above would be:\n\n    LOG.debug(\u0027DVR: unplug: %s\u0027, d.name)\n\nThere is a bug on this: https://bugs.launchpad.net/neutron/+bug/1320867 \nand a wiki: https://wiki.openstack.org/wiki/LoggingStandards#Log_Translation\n\nYou could opt to do this as a separate bug, I\u0027d imagine. Just thought that since you\u0027re introducing new code, you could do it for that code.","commit_id":"e91947c5df107db2db184e011328a6ddbb99cc9a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"e124b5c2173f017c5183d4b02c46074abdef9a7c","unresolved":false,"context_lines":[{"line_number":695,"context_line":""},{"line_number":696,"context_line":"    def _handle_router_fip_nat_rules(self, ri, interface_name, action):"},{"line_number":697,"context_line":"        \"\"\"Configures NAT rules for Floating IPs for DVR.\"\"\""},{"line_number":698,"context_line":"        # Remove all the rules"},{"line_number":699,"context_line":"        # This is safe because if use_namespaces is set as False"},{"line_number":700,"context_line":"        # then the agent can only configure one router, otherwise"},{"line_number":701,"context_line":"        # each router\u0027s NAT rules will be in their own namespace"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_37223152","line":698,"updated":"2014-06-13 11:22:50.000000000","message":"Suggestion from patchset 2?","commit_id":"e91947c5df107db2db184e011328a6ddbb99cc9a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"e124b5c2173f017c5183d4b02c46074abdef9a7c","unresolved":false,"context_lines":[{"line_number":882,"context_line":""},{"line_number":883,"context_line":"    def _map_internal_interfaces(self, ri, int_port, snat_ports):"},{"line_number":884,"context_line":"        \"\"\"Returns the SNAT port for the given internal interface port.\"\"\""},{"line_number":885,"context_line":"        fixed_ip \u003d int_port[\u0027fixed_ips\u0027][0]"},{"line_number":886,"context_line":"        subnet_id \u003d fixed_ip[\u0027subnet_id\u0027]"},{"line_number":887,"context_line":"        match_port \u003d [p for p in snat_ports if"},{"line_number":888,"context_line":"                      p[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027] \u003d\u003d subnet_id]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_1711b503","line":885,"updated":"2014-06-13 11:22:50.000000000","message":"Did you look at concern posted in patchset 2?","commit_id":"e91947c5df107db2db184e011328a6ddbb99cc9a"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"9967ea84e56a8c1430c7db6bfa0974641026814a","unresolved":false,"context_lines":[{"line_number":882,"context_line":""},{"line_number":883,"context_line":"    def _map_internal_interfaces(self, ri, int_port, snat_ports):"},{"line_number":884,"context_line":"        \"\"\"Returns the SNAT port for the given internal interface port.\"\"\""},{"line_number":885,"context_line":"        fixed_ip \u003d int_port[\u0027fixed_ips\u0027][0]"},{"line_number":886,"context_line":"        subnet_id \u003d fixed_ip[\u0027subnet_id\u0027]"},{"line_number":887,"context_line":"        match_port \u003d [p for p in snat_ports if"},{"line_number":888,"context_line":"                      p[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027] \u003d\u003d subnet_id]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_dccd9b5e","line":885,"in_reply_to":"1ae5cdf2_1711b503","updated":"2014-06-14 00:22:40.000000000","message":"Thanks for the reminder, yes both internal ports and snat ports should have fixed_ips because otherwise no routing can be setup using these ports.","commit_id":"e91947c5df107db2db184e011328a6ddbb99cc9a"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"369abf5e8ab1fd50e7845df59e2ab4eb9293329b","unresolved":false,"context_lines":[{"line_number":1004,"context_line":"                ip_wrapper.netns.execute(cmd, check_exit_code\u003dFalse)"},{"line_number":1005,"context_line":"            else:"},{"line_number":1006,"context_line":"                utils.execute(cmd, check_exit_code\u003dFalse,"},{"line_number":1007,"context_line":"                              root_helper\u003dself.root_helper)"},{"line_number":1008,"context_line":"        cmd \u003d [\u0027sysctl\u0027, \u0027-w\u0027, \u0027net.ipv4.conf.%s.proxy_arp\u003d1\u0027 % interface_name]"},{"line_number":1009,"context_line":"        ip_wrapper \u003d ip_lib.IPWrapper(self.root_helper, namespace\u003dns_name)"},{"line_number":1010,"context_line":"        ip_wrapper.netns.execute(cmd, check_exit_code\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_2493e6a3","line":1007,"updated":"2014-06-13 07:14:07.000000000","message":"is this different from ip_wrapper with namespace\u003dNone?","commit_id":"e91947c5df107db2db184e011328a6ddbb99cc9a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"e124b5c2173f017c5183d4b02c46074abdef9a7c","unresolved":false,"context_lines":[{"line_number":1085,"context_line":"            ns_ip.netns.execute([\u0027sysctl\u0027, \u0027-w\u0027, \u0027net.ipv4.conf.%s.\u0027"},{"line_number":1086,"context_line":"                                 \u0027send_redirects\u003d0\u0027 % interface])"},{"line_number":1087,"context_line":"        except Exception:"},{"line_number":1088,"context_line":"            LOG.debug(_(\u0027DVR: error adding redirection logic\u0027))"},{"line_number":1089,"context_line":""},{"line_number":1090,"context_line":"    def _snat_redirect_remove(self, ri, sn_port):"},{"line_number":1091,"context_line":"        \"\"\"Removes rules and routes for SNAT redirection.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_57e41d0c","line":1088,"updated":"2014-06-13 11:22:50.000000000","message":"patch set 2 comment?","commit_id":"e91947c5df107db2db184e011328a6ddbb99cc9a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"e124b5c2173f017c5183d4b02c46074abdef9a7c","unresolved":false,"context_lines":[{"line_number":1095,"context_line":"            ns_ip.delete_route_default(snat_idx)"},{"line_number":1096,"context_line":"            ns_ip.delete_rule_priority(snat_idx)"},{"line_number":1097,"context_line":"        except Exception:"},{"line_number":1098,"context_line":"            LOG.debug(_(\u0027DVR: removed snat failed\u0027))"},{"line_number":1099,"context_line":""},{"line_number":1100,"context_line":"    def _internal_network_added(self, ns_name, network_id, port_id,"},{"line_number":1101,"context_line":"                                internal_cidr, mac_address,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_97ea25d6","line":1098,"updated":"2014-06-13 11:22:50.000000000","message":"patch set 2 comment?","commit_id":"e91947c5df107db2db184e011328a6ddbb99cc9a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5905896bdea139bd1b04f7da2d4817b226965575","unresolved":false,"context_lines":[{"line_number":1066,"context_line":"            ns_ip.netns.execute([\u0027sysctl\u0027, \u0027-w\u0027, \u0027net.ipv4.conf.%s.\u0027"},{"line_number":1067,"context_line":"                                 \u0027send_redirects\u003d0\u0027 % interface])"},{"line_number":1068,"context_line":"        except Exception:"},{"line_number":1069,"context_line":"            LOG.debug(\u0027DVR: error adding redirection logic\u0027)"},{"line_number":1070,"context_line":""},{"line_number":1071,"context_line":"    def _snat_redirect_remove(self, ri, sn_port):"},{"line_number":1072,"context_line":"        \"\"\"Removes rules and routes for SNAT redirection.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_57755930","line":1069,"updated":"2014-06-18 11:17:14.000000000","message":"Is debug level OK here (see rev 2 comments), and on line 1079?","commit_id":"7e13631f5c9801df038256a2f85dab22e3fb00ac"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"28e36447225a9ca7d1489feee55b986dc35defee","unresolved":false,"context_lines":[{"line_number":1066,"context_line":"            ns_ip.netns.execute([\u0027sysctl\u0027, \u0027-w\u0027, \u0027net.ipv4.conf.%s.\u0027"},{"line_number":1067,"context_line":"                                 \u0027send_redirects\u003d0\u0027 % interface])"},{"line_number":1068,"context_line":"        except Exception:"},{"line_number":1069,"context_line":"            LOG.debug(\u0027DVR: error adding redirection logic\u0027)"},{"line_number":1070,"context_line":""},{"line_number":1071,"context_line":"    def _snat_redirect_remove(self, ri, sn_port):"},{"line_number":1072,"context_line":"        \"\"\"Removes rules and routes for SNAT redirection.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_d97eeee3","line":1069,"in_reply_to":"1ae5cdf2_57755930","updated":"2014-06-18 16:57:30.000000000","message":"Good point/reminder.  I\u0027ll increase the LOG level on these.","commit_id":"7e13631f5c9801df038256a2f85dab22e3fb00ac"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"b0ed6969fa39040780cb885a2e929f104f137ac5","unresolved":false,"context_lines":[{"line_number":56,"context_line":"FIP_2_RTR_DEV_PREFIX \u003d \u0027fpr-\u0027"},{"line_number":57,"context_line":"RTR_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":58,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"},{"line_number":59,"context_line":"FIP_LL_PREFIX \u003d \u0027169.254.30.\u0027"},{"line_number":60,"context_line":"# Route Table index for FIPs"},{"line_number":61,"context_line":"FIP_RT_TBL \u003d 16"},{"line_number":62,"context_line":"# Rule priority range for FIPs"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_0402980b","line":59,"updated":"2014-06-19 06:29:57.000000000","message":"is this arbitrarily chosen link-local addresses?","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"fd53d43bb5b6dcbf87e5d34be5356cfb367efc29","unresolved":false,"context_lines":[{"line_number":56,"context_line":"FIP_2_RTR_DEV_PREFIX \u003d \u0027fpr-\u0027"},{"line_number":57,"context_line":"RTR_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":58,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"},{"line_number":59,"context_line":"FIP_LL_PREFIX \u003d \u0027169.254.30.\u0027"},{"line_number":60,"context_line":"# Route Table index for FIPs"},{"line_number":61,"context_line":"FIP_RT_TBL \u003d 16"},{"line_number":62,"context_line":"# Rule priority range for FIPs"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_226be3f1","line":59,"in_reply_to":"1ae5cdf2_0402980b","updated":"2014-06-20 00:47:08.000000000","message":"This was picked up to make sure the range is different from metadata server so that we don\u0027t have a conflict. Other than that no specific reason for this number.","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"b0ed6969fa39040780cb885a2e929f104f137ac5","unresolved":false,"context_lines":[{"line_number":61,"context_line":"FIP_RT_TBL \u003d 16"},{"line_number":62,"context_line":"# Rule priority range for FIPs"},{"line_number":63,"context_line":"FIP_PR_ST \u003d 32768"},{"line_number":64,"context_line":"FIP_PR_END \u003d FIP_PR_ST + 40000"},{"line_number":65,"context_line":"RPC_LOOP_INTERVAL \u003d 1"},{"line_number":66,"context_line":"FLOATING_IP_CIDR_SUFFIX \u003d \u0027/32\u0027"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_a413a463","line":64,"updated":"2014-06-19 06:29:57.000000000","message":"why 40000?","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"fd53d43bb5b6dcbf87e5d34be5356cfb367efc29","unresolved":false,"context_lines":[{"line_number":61,"context_line":"FIP_RT_TBL \u003d 16"},{"line_number":62,"context_line":"# Rule priority range for FIPs"},{"line_number":63,"context_line":"FIP_PR_ST \u003d 32768"},{"line_number":64,"context_line":"FIP_PR_END \u003d FIP_PR_ST + 40000"},{"line_number":65,"context_line":"RPC_LOOP_INTERVAL \u003d 1"},{"line_number":66,"context_line":"FLOATING_IP_CIDR_SUFFIX \u003d \u0027/32\u0027"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_22420368","line":64,"in_reply_to":"1ae5cdf2_a413a463","updated":"2014-06-20 00:47:08.000000000","message":"YAMAMOTO Takashi,\n\neach floating ip on the agent takes up one number out of this pool so went for a  large enough range such that the agent doesn\u0027t run out. 40 thousand simultaneous floating IPs would be large enough to not worry about exhaustion of the range.","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"change_message_id":"338a8de2fb4d833289228faaa04b8b2abdd8d519","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        return self.call(context,"},{"line_number":116,"context_line":"                         self.make_msg(\u0027get_ports_by_subnet\u0027, host\u003dself.host,"},{"line_number":117,"context_line":"                                       subnet_id\u003dsubnet_id),"},{"line_number":118,"context_line":"                         topic\u003dself.topic)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def get_agent_gateway_port(self, context, fip_net):"},{"line_number":121,"context_line":"        \"\"\"Get or create a agent_gateway_port.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_a4e804b4","line":118,"updated":"2014-06-19 06:28:30.000000000","message":"version\u003d\u00271.2\u0027 ?","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"a1a5351b3ae698dad02028d6183475ea9d6af9be","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        return self.call(context,"},{"line_number":116,"context_line":"                         self.make_msg(\u0027get_ports_by_subnet\u0027, host\u003dself.host,"},{"line_number":117,"context_line":"                                       subnet_id\u003dsubnet_id),"},{"line_number":118,"context_line":"                         topic\u003dself.topic)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def get_agent_gateway_port(self, context, fip_net):"},{"line_number":121,"context_line":"        \"\"\"Get or create a agent_gateway_port.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_fe3602e6","line":118,"in_reply_to":"1ae5cdf2_a4e804b4","updated":"2014-06-19 16:14:44.000000000","message":"Seems like a good idea - add a comment at L75 as well?","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"b0ed6969fa39040780cb885a2e929f104f137ac5","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        # dvr data"},{"line_number":277,"context_line":"        self.agent_gateway_port \u003d None"},{"line_number":278,"context_line":"        self.agent_fip_count \u003d 0"},{"line_number":279,"context_line":"        self.local_ips \u003d set(xrange(2, 251))"},{"line_number":280,"context_line":"        self.fip_priorities \u003d set(xrange(FIP_PR_ST, FIP_PR_END))"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"        self.rpc_loop \u003d loopingcall.FixedIntervalLoopingCall("}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_840ea83b","line":279,"updated":"2014-06-19 06:29:57.000000000","message":"in patch set 3, i meant something like this.\n\nself.local_ips \u003d [FIP_LL_PREFIX + str(x) for x in xrange(2, 251)]\n\nin this way regex stuff in floating_ip_removed_dist is unnecessary.","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"fd53d43bb5b6dcbf87e5d34be5356cfb367efc29","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        # dvr data"},{"line_number":277,"context_line":"        self.agent_gateway_port \u003d None"},{"line_number":278,"context_line":"        self.agent_fip_count \u003d 0"},{"line_number":279,"context_line":"        self.local_ips \u003d set(xrange(2, 251))"},{"line_number":280,"context_line":"        self.fip_priorities \u003d set(xrange(FIP_PR_ST, FIP_PR_END))"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"        self.rpc_loop \u003d loopingcall.FixedIntervalLoopingCall("}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_e513c5b5","line":279,"in_reply_to":"1ae5cdf2_840ea83b","updated":"2014-06-20 00:47:08.000000000","message":"YAMAMOTO Takashi,\n\nwe considered that but then allocation and de-allocation requires special logic. With this \u0027pop\u0027 and \u0027add\u0027 operations can be used effectively.\nWe also need a pair of consecutive values to be allocated so that the subnet is real small. With a pre-populated list fragmentation and re-allocation would need to be dealt with.","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"change_message_id":"338a8de2fb4d833289228faaa04b8b2abdd8d519","unresolved":false,"context_lines":[{"line_number":516,"context_line":""},{"line_number":517,"context_line":"        for p in subnet_ports:"},{"line_number":518,"context_line":"            for fip in p[\u0027fixed_ips\u0027]:"},{"line_number":519,"context_line":"                if (p[\u0027device_owner\u0027] not in ("},{"line_number":520,"context_line":"                    \u0027network:router_interface\u0027,"},{"line_number":521,"context_line":"                    \u0027network:router_interface_distributed\u0027)):"},{"line_number":522,"context_line":"                    self._update_arp_entry(ri, fip[\u0027ip_address\u0027],"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_24eb14a5","line":519,"updated":"2014-06-19 06:28:30.000000000","message":"518 and 519 should be reversed.","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"a1a5351b3ae698dad02028d6183475ea9d6af9be","unresolved":false,"context_lines":[{"line_number":516,"context_line":""},{"line_number":517,"context_line":"        for p in subnet_ports:"},{"line_number":518,"context_line":"            for fip in p[\u0027fixed_ips\u0027]:"},{"line_number":519,"context_line":"                if (p[\u0027device_owner\u0027] not in ("},{"line_number":520,"context_line":"                    \u0027network:router_interface\u0027,"},{"line_number":521,"context_line":"                    \u0027network:router_interface_distributed\u0027)):"},{"line_number":522,"context_line":"                    self._update_arp_entry(ri, fip[\u0027ip_address\u0027],"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_de406637","line":519,"in_reply_to":"1ae5cdf2_24eb14a5","updated":"2014-06-19 16:14:44.000000000","message":"Good optimization - I\u0027ll try that out thanks.","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"change_message_id":"338a8de2fb4d833289228faaa04b8b2abdd8d519","unresolved":false,"context_lines":[{"line_number":739,"context_line":"            # filter out only FIPs for this host/agent"},{"line_number":740,"context_line":"            floating_ips \u003d [i for i in floating_ips if i[\u0027host\u0027] \u003d\u003d self.host]"},{"line_number":741,"context_line":"            if floating_ips and self.agent_gateway_port is None:"},{"line_number":742,"context_line":"                self._create_agent_gateway_port(ri, floating_ips[0])"},{"line_number":743,"context_line":""},{"line_number":744,"context_line":"            if self.agent_gateway_port:"},{"line_number":745,"context_line":"                if floating_ips and ri.dist_fip_count \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_044a98ac","line":742,"updated":"2014-06-19 06:28:30.000000000","message":"It seems _create_agent_gateway_port refers fip[\u0027floating_network_id\u0027] only. I think it is better to pass floating_network_id rather than fip.\ncreate_rtr_2_fip_link too.","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"a1a5351b3ae698dad02028d6183475ea9d6af9be","unresolved":false,"context_lines":[{"line_number":739,"context_line":"            # filter out only FIPs for this host/agent"},{"line_number":740,"context_line":"            floating_ips \u003d [i for i in floating_ips if i[\u0027host\u0027] \u003d\u003d self.host]"},{"line_number":741,"context_line":"            if floating_ips and self.agent_gateway_port is None:"},{"line_number":742,"context_line":"                self._create_agent_gateway_port(ri, floating_ips[0])"},{"line_number":743,"context_line":""},{"line_number":744,"context_line":"            if self.agent_gateway_port:"},{"line_number":745,"context_line":"                if floating_ips and ri.dist_fip_count \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_5e2c564a","line":742,"in_reply_to":"1ae5cdf2_044a98ac","updated":"2014-06-19 16:14:44.000000000","message":"understood","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"b0ed6969fa39040780cb885a2e929f104f137ac5","unresolved":false,"context_lines":[{"line_number":777,"context_line":"                               \"floating IP: %s\"), fip[\u0027id\u0027])"},{"line_number":778,"context_line":"                    continue"},{"line_number":779,"context_line":"                if ri.router[\u0027distributed\u0027]:"},{"line_number":780,"context_line":"                    # Special Handling for DVR - TBD"},{"line_number":781,"context_line":"                    self.floating_ip_added_dist(ri, fip)"},{"line_number":782,"context_line":"                else:"},{"line_number":783,"context_line":"                    # As GARP is processed in a distinct thread the call below"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_9839a8da","line":780,"updated":"2014-06-19 06:29:57.000000000","message":"please describe.","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"a1a5351b3ae698dad02028d6183475ea9d6af9be","unresolved":false,"context_lines":[{"line_number":777,"context_line":"                               \"floating IP: %s\"), fip[\u0027id\u0027])"},{"line_number":778,"context_line":"                    continue"},{"line_number":779,"context_line":"                if ri.router[\u0027distributed\u0027]:"},{"line_number":780,"context_line":"                    # Special Handling for DVR - TBD"},{"line_number":781,"context_line":"                    self.floating_ip_added_dist(ri, fip)"},{"line_number":782,"context_line":"                else:"},{"line_number":783,"context_line":"                    # As GARP is processed in a distinct thread the call below"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_bea63a0d","line":780,"in_reply_to":"1ae5cdf2_9839a8da","updated":"2014-06-19 16:14:44.000000000","message":"I\u0027ll update with a better comment.","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"b2c0c86480546b26fcd6d5a106863bce03921d54","unresolved":false,"context_lines":[{"line_number":925,"context_line":"                    self._update_arp_entry(ri, ip[\u0027ip_address\u0027],"},{"line_number":926,"context_line":"                                           port[\u0027mac_address\u0027],"},{"line_number":927,"context_line":"                                           ip[\u0027subnet_id\u0027], \u0027add\u0027)"},{"line_number":928,"context_line":"            return"},{"line_number":929,"context_line":""},{"line_number":930,"context_line":"        # Compute a list of addresses this router is supposed to have."},{"line_number":931,"context_line":"        # This avoids unnecessarily removing those addresses and"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_be670324","line":928,"updated":"2014-06-20 08:43:58.000000000","message":"If self.conf.distributed_agent is true and ri.router[\u0027distributed\u0027] is false, almost nothing is done.\nIs that intended?","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"07b319d3cb4c27dd0e366fa162d69866741bddb5","unresolved":false,"context_lines":[{"line_number":925,"context_line":"                    self._update_arp_entry(ri, ip[\u0027ip_address\u0027],"},{"line_number":926,"context_line":"                                           port[\u0027mac_address\u0027],"},{"line_number":927,"context_line":"                                           ip[\u0027subnet_id\u0027], \u0027add\u0027)"},{"line_number":928,"context_line":"            return"},{"line_number":929,"context_line":""},{"line_number":930,"context_line":"        # Compute a list of addresses this router is supposed to have."},{"line_number":931,"context_line":"        # This avoids unnecessarily removing those addresses and"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_7509e883","line":928,"in_reply_to":"1ae5cdf2_2173c6e7","updated":"2014-06-23 09:03:28.000000000","message":"fallthru doesn\u0027t happen because of this return sentence.","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"650367ecfe614f513cc15db190135e5f911cafcf","unresolved":false,"context_lines":[{"line_number":925,"context_line":"                    self._update_arp_entry(ri, ip[\u0027ip_address\u0027],"},{"line_number":926,"context_line":"                                           port[\u0027mac_address\u0027],"},{"line_number":927,"context_line":"                                           ip[\u0027subnet_id\u0027], \u0027add\u0027)"},{"line_number":928,"context_line":"            return"},{"line_number":929,"context_line":""},{"line_number":930,"context_line":"        # Compute a list of addresses this router is supposed to have."},{"line_number":931,"context_line":"        # This avoids unnecessarily removing those addresses and"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_a75418ff","line":928,"in_reply_to":"1ae5cdf2_7509e883","updated":"2014-06-24 00:52:17.000000000","message":"OK - I see the issue now.  I will update soon.  Thanks.","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1ffea457cfdd63b84c0c1f04f2f5121270067907","unresolved":false,"context_lines":[{"line_number":925,"context_line":"                    self._update_arp_entry(ri, ip[\u0027ip_address\u0027],"},{"line_number":926,"context_line":"                                           port[\u0027mac_address\u0027],"},{"line_number":927,"context_line":"                                           ip[\u0027subnet_id\u0027], \u0027add\u0027)"},{"line_number":928,"context_line":"            return"},{"line_number":929,"context_line":""},{"line_number":930,"context_line":"        # Compute a list of addresses this router is supposed to have."},{"line_number":931,"context_line":"        # This avoids unnecessarily removing those addresses and"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_2173c6e7","line":928,"in_reply_to":"1ae5cdf2_be670324","updated":"2014-06-20 18:28:56.000000000","message":"Yes.  This could be refactored some, but SNAT handling will be done differently for legacy (fall thru), dvr-enabled NOT hosting centralized snat and dvr-enabled hosting centralized snat (see host check at L919).","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"8fa6bcacc7ee51347b2af4786bb4cf2bb440e6ec","unresolved":false,"context_lines":[{"line_number":959,"context_line":"        self._send_gratuitous_arp_packet(ns_name,"},{"line_number":960,"context_line":"                                         interface_name, ip_address)"},{"line_number":961,"context_line":""},{"line_number":962,"context_line":"        gw_ip \u003d ex_gw_port[\u0027subnet\u0027][\u0027gateway_ip\u0027]"},{"line_number":963,"context_line":"        if ex_gw_port[\u0027subnet\u0027][\u0027gateway_ip\u0027]:"},{"line_number":964,"context_line":"            cmd \u003d [\u0027route\u0027, \u0027add\u0027, \u0027default\u0027, \u0027gw\u0027, gw_ip]"},{"line_number":965,"context_line":"            ip_wrapper \u003d ip_lib.IPWrapper(self.root_helper,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_47c27454","line":962,"updated":"2014-06-23 16:18:17.000000000","message":"Use the following for cases where there are no gateway_ip included in ex_gw_port as you are testing for that condition in the line right after this.\ngw_ip \u003d ex_gw_port[\u0027subnet\u0027].get(\u0027gateway_ip\u0027)","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"c5573cd76da5455a0fab858b5b6a66f4f94c7421","unresolved":false,"context_lines":[{"line_number":959,"context_line":"        self._send_gratuitous_arp_packet(ns_name,"},{"line_number":960,"context_line":"                                         interface_name, ip_address)"},{"line_number":961,"context_line":""},{"line_number":962,"context_line":"        gw_ip \u003d ex_gw_port[\u0027subnet\u0027][\u0027gateway_ip\u0027]"},{"line_number":963,"context_line":"        if ex_gw_port[\u0027subnet\u0027][\u0027gateway_ip\u0027]:"},{"line_number":964,"context_line":"            cmd \u003d [\u0027route\u0027, \u0027add\u0027, \u0027default\u0027, \u0027gw\u0027, gw_ip]"},{"line_number":965,"context_line":"            ip_wrapper \u003d ip_lib.IPWrapper(self.root_helper,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_8f2e4eaa","line":962,"in_reply_to":"1ae5cdf2_47c27454","updated":"2014-06-23 18:27:09.000000000","message":"Mohammad,\n\n thanks, incorporated the change. It should show up in next Patch.","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"8fa6bcacc7ee51347b2af4786bb4cf2bb440e6ec","unresolved":false,"context_lines":[{"line_number":960,"context_line":"                                         interface_name, ip_address)"},{"line_number":961,"context_line":""},{"line_number":962,"context_line":"        gw_ip \u003d ex_gw_port[\u0027subnet\u0027][\u0027gateway_ip\u0027]"},{"line_number":963,"context_line":"        if ex_gw_port[\u0027subnet\u0027][\u0027gateway_ip\u0027]:"},{"line_number":964,"context_line":"            cmd \u003d [\u0027route\u0027, \u0027add\u0027, \u0027default\u0027, \u0027gw\u0027, gw_ip]"},{"line_number":965,"context_line":"            ip_wrapper \u003d ip_lib.IPWrapper(self.root_helper,"},{"line_number":966,"context_line":"                                          namespace\u003dns_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_270008ab","line":963,"updated":"2014-06-23 16:18:17.000000000","message":"if gw_ip:","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"c5573cd76da5455a0fab858b5b6a66f4f94c7421","unresolved":false,"context_lines":[{"line_number":960,"context_line":"                                         interface_name, ip_address)"},{"line_number":961,"context_line":""},{"line_number":962,"context_line":"        gw_ip \u003d ex_gw_port[\u0027subnet\u0027][\u0027gateway_ip\u0027]"},{"line_number":963,"context_line":"        if ex_gw_port[\u0027subnet\u0027][\u0027gateway_ip\u0027]:"},{"line_number":964,"context_line":"            cmd \u003d [\u0027route\u0027, \u0027add\u0027, \u0027default\u0027, \u0027gw\u0027, gw_ip]"},{"line_number":965,"context_line":"            ip_wrapper \u003d ip_lib.IPWrapper(self.root_helper,"},{"line_number":966,"context_line":"                                          namespace\u003dns_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_cf3856f1","line":963,"in_reply_to":"1ae5cdf2_270008ab","updated":"2014-06-23 18:27:09.000000000","message":"Done","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"b2c0c86480546b26fcd6d5a106863bce03921d54","unresolved":false,"context_lines":[{"line_number":1055,"context_line":"        ip_str \u003d ip.split(\u0027.\u0027)"},{"line_number":1056,"context_line":"        ip_num \u003d (((int(ip_str[0])) \u003c\u003c 24) + ((int(ip_str[1])) \u003c\u003c 16)"},{"line_number":1057,"context_line":"                  + ((int(ip_str[2])) \u003c\u003c 8) + (int(ip_str[3])))"},{"line_number":1058,"context_line":"        hex_str \u003d \"%s\" % hex(ip_num)"},{"line_number":1059,"context_line":"        return hex_str.split(\u0027L\u0027)[0]"},{"line_number":1060,"context_line":""},{"line_number":1061,"context_line":"    def _snat_redirect_add(self, ri, gateway, sn_port, interface):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_71e9577e","line":1058,"updated":"2014-06-20 08:43:58.000000000","message":"This sentence seems meaningless. hex(number) is already string.\nMoreover, what\u0027s the point of converting to hex?  Iproute command seems to handle int just fine.","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"624e8476cfb8e86a8aeae40f3c3c803cd15b3342","unresolved":false,"context_lines":[{"line_number":1055,"context_line":"        ip_str \u003d ip.split(\u0027.\u0027)"},{"line_number":1056,"context_line":"        ip_num \u003d (((int(ip_str[0])) \u003c\u003c 24) + ((int(ip_str[1])) \u003c\u003c 16)"},{"line_number":1057,"context_line":"                  + ((int(ip_str[2])) \u003c\u003c 8) + (int(ip_str[3])))"},{"line_number":1058,"context_line":"        hex_str \u003d \"%s\" % hex(ip_num)"},{"line_number":1059,"context_line":"        return hex_str.split(\u0027L\u0027)[0]"},{"line_number":1060,"context_line":""},{"line_number":1061,"context_line":"    def _snat_redirect_add(self, ri, gateway, sn_port, interface):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_06d89b1c","line":1058,"in_reply_to":"1ae5cdf2_71e9577e","updated":"2014-06-20 23:39:38.000000000","message":"Done","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"b2c0c86480546b26fcd6d5a106863bce03921d54","unresolved":false,"context_lines":[{"line_number":1269,"context_line":"                                     namespace\u003dri.ns_name)"},{"line_number":1270,"context_line":"            device.route.delete_gateway(ri.fip_2_rtr, table\u003dFIP_RT_TBL)"},{"line_number":1271,"context_line":"            vals \u003d re.split(r\u0027(\\D)\u0027, ri.rtr_2_fip)"},{"line_number":1272,"context_line":"            self.local_ips.add(vals[6])"},{"line_number":1273,"context_line":"            ri.rtr_2_fip \u003d None"},{"line_number":1274,"context_line":"            vals \u003d re.split(r\u0027(\\D)\u0027, ri.fip_2_rtr)"},{"line_number":1275,"context_line":"            self.local_ips.add(vals[6])"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_2ebbeec4","line":1272,"updated":"2014-06-20 08:43:58.000000000","message":"My comment in patchset #2?","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"624e8476cfb8e86a8aeae40f3c3c803cd15b3342","unresolved":false,"context_lines":[{"line_number":1269,"context_line":"                                     namespace\u003dri.ns_name)"},{"line_number":1270,"context_line":"            device.route.delete_gateway(ri.fip_2_rtr, table\u003dFIP_RT_TBL)"},{"line_number":1271,"context_line":"            vals \u003d re.split(r\u0027(\\D)\u0027, ri.rtr_2_fip)"},{"line_number":1272,"context_line":"            self.local_ips.add(vals[6])"},{"line_number":1273,"context_line":"            ri.rtr_2_fip \u003d None"},{"line_number":1274,"context_line":"            vals \u003d re.split(r\u0027(\\D)\u0027, ri.fip_2_rtr)"},{"line_number":1275,"context_line":"            self.local_ips.add(vals[6])"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_46054378","line":1272,"in_reply_to":"1ae5cdf2_2ebbeec4","updated":"2014-06-20 23:39:38.000000000","message":"IWAMOTO Toshihiro,\n\n thanks. I tried it out, works will incorporate it in next patch.","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"change_message_id":"3b568847c8213dfc01d84ee3898f74ec2b5c0ff7","unresolved":false,"context_lines":[{"line_number":862,"context_line":"        return (SNAT_NS_PREFIX + ext_gw_port_id)"},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"    def get_snat_interfaces(self, ri):"},{"line_number":865,"context_line":"        return ri.router.get(l3_constants.SNAT_ROUTER_INTF_KEY, [])"},{"line_number":866,"context_line":""},{"line_number":867,"context_line":"    def get_floating_ips(self, ri):"},{"line_number":868,"context_line":"        \"\"\"Filters Floating IPs for DVR to be hosted on this agent.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_9c175845","line":865,"updated":"2014-06-24 03:57:14.000000000","message":"It seems it is inconsistent with https://review.openstack.org/#/c/84223/.\n\nThis l3_agent seems never get snat_ports.","commit_id":"ad775150b5c7058027013a83c5207c0b334483a9"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"change_message_id":"13a1f70501f3a1b612d5708182364c297008831d","unresolved":false,"context_lines":[{"line_number":862,"context_line":"        return (SNAT_NS_PREFIX + ext_gw_port_id)"},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"    def get_snat_interfaces(self, ri):"},{"line_number":865,"context_line":"        return ri.router.get(l3_constants.SNAT_ROUTER_INTF_KEY, [])"},{"line_number":866,"context_line":""},{"line_number":867,"context_line":"    def get_floating_ips(self, ri):"},{"line_number":868,"context_line":"        \"\"\"Filters Floating IPs for DVR to be hosted on this agent.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_cd09d0de","line":865,"in_reply_to":"1ae5cdf2_2aa21a9a","updated":"2014-06-26 05:17:26.000000000","message":"supplement:\n\n113 get_ports_by_subnet is not used nor is not defined in server side.\n\nserver side defines get_snat_router_interface_ports and expected calling explicitly like get_agent_gateway_port.","commit_id":"ad775150b5c7058027013a83c5207c0b334483a9"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"5909a6f90ae073d7ced3c6b94ffda69529337f79","unresolved":false,"context_lines":[{"line_number":862,"context_line":"        return (SNAT_NS_PREFIX + ext_gw_port_id)"},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"    def get_snat_interfaces(self, ri):"},{"line_number":865,"context_line":"        return ri.router.get(l3_constants.SNAT_ROUTER_INTF_KEY, [])"},{"line_number":866,"context_line":""},{"line_number":867,"context_line":"    def get_floating_ips(self, ri):"},{"line_number":868,"context_line":"        \"\"\"Filters Floating IPs for DVR to be hosted on this agent.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_2aa21a9a","line":865,"in_reply_to":"1ae5cdf2_9c175845","updated":"2014-06-26 04:35:17.000000000","message":"The l3-plugin patch needs to be updated with this functionality.","commit_id":"ad775150b5c7058027013a83c5207c0b334483a9"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"change_message_id":"e2a13d716d0b3372bbd8bf29aba5a6f193565c59","unresolved":false,"context_lines":[{"line_number":908,"context_line":"        if self.conf.distributed_agent:"},{"line_number":909,"context_line":"            if ri.router[\u0027distributed\u0027]:"},{"line_number":910,"context_line":"                for p in ri.internal_ports:"},{"line_number":911,"context_line":"                    snat_ports \u003d self.get_snat_interfaces(ri)"},{"line_number":912,"context_line":"                    gateway \u003d self._map_internal_interfaces(ri, p, snat_ports)"},{"line_number":913,"context_line":"                    id_name \u003d self.get_internal_device_name(p[\u0027id\u0027])"},{"line_number":914,"context_line":"                    self._snat_redirect_add(ri, gateway[\u0027fixed_ips\u0027][0]"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_08386a3c","line":911,"updated":"2014-06-24 01:09:39.000000000","message":"move before 908 and remove 916.","commit_id":"ad775150b5c7058027013a83c5207c0b334483a9"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"5909a6f90ae073d7ced3c6b94ffda69529337f79","unresolved":false,"context_lines":[{"line_number":908,"context_line":"        if self.conf.distributed_agent:"},{"line_number":909,"context_line":"            if ri.router[\u0027distributed\u0027]:"},{"line_number":910,"context_line":"                for p in ri.internal_ports:"},{"line_number":911,"context_line":"                    snat_ports \u003d self.get_snat_interfaces(ri)"},{"line_number":912,"context_line":"                    gateway \u003d self._map_internal_interfaces(ri, p, snat_ports)"},{"line_number":913,"context_line":"                    id_name \u003d self.get_internal_device_name(p[\u0027id\u0027])"},{"line_number":914,"context_line":"                    self._snat_redirect_add(ri, gateway[\u0027fixed_ips\u0027][0]"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_8aa5eea0","line":911,"in_reply_to":"1ae5cdf2_08386a3c","updated":"2014-06-26 04:35:17.000000000","message":"Understood.","commit_id":"ad775150b5c7058027013a83c5207c0b334483a9"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"change_message_id":"e2a13d716d0b3372bbd8bf29aba5a6f193565c59","unresolved":false,"context_lines":[{"line_number":1104,"context_line":""},{"line_number":1105,"context_line":"        interface_name \u003d self.get_internal_device_name(port_id)"},{"line_number":1106,"context_line":""},{"line_number":1107,"context_line":"        self._internal_network_added(ri.ns_name, network_id, port_id,"},{"line_number":1108,"context_line":"                                     internal_cidr, mac_address,"},{"line_number":1109,"context_line":"                                     interface_name, INTERNAL_DEV_PREFIX)"},{"line_number":1110,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_08eb0a79","line":1107,"updated":"2014-06-24 01:09:39.000000000","message":"I think it is not necessary if \"not distributed_agent and ri.router[\u0027distributed\u0027]\".","commit_id":"ad775150b5c7058027013a83c5207c0b334483a9"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"5909a6f90ae073d7ced3c6b94ffda69529337f79","unresolved":false,"context_lines":[{"line_number":1104,"context_line":""},{"line_number":1105,"context_line":"        interface_name \u003d self.get_internal_device_name(port_id)"},{"line_number":1106,"context_line":""},{"line_number":1107,"context_line":"        self._internal_network_added(ri.ns_name, network_id, port_id,"},{"line_number":1108,"context_line":"                                     internal_cidr, mac_address,"},{"line_number":1109,"context_line":"                                     interface_name, INTERNAL_DEV_PREFIX)"},{"line_number":1110,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_8a188ece","line":1107,"in_reply_to":"1ae5cdf2_08eb0a79","updated":"2014-06-26 04:35:17.000000000","message":"Which lines are you refering to?","commit_id":"ad775150b5c7058027013a83c5207c0b334483a9"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"change_message_id":"13a1f70501f3a1b612d5708182364c297008831d","unresolved":false,"context_lines":[{"line_number":1104,"context_line":""},{"line_number":1105,"context_line":"        interface_name \u003d self.get_internal_device_name(port_id)"},{"line_number":1106,"context_line":""},{"line_number":1107,"context_line":"        self._internal_network_added(ri.ns_name, network_id, port_id,"},{"line_number":1108,"context_line":"                                     internal_cidr, mac_address,"},{"line_number":1109,"context_line":"                                     interface_name, INTERNAL_DEV_PREFIX)"},{"line_number":1110,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_ad8e4425","line":1107,"in_reply_to":"1ae5cdf2_8a188ece","updated":"2014-06-26 05:17:26.000000000","message":"I mean if l3_agent runs as centralized mode on a network node and the router is distributed, it(1107) is not necessary to create \u0027qrouter-\u0027 namespace nor interfaces inside the namespace.","commit_id":"ad775150b5c7058027013a83c5207c0b334483a9"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"change_message_id":"e2a13d716d0b3372bbd8bf29aba5a6f193565c59","unresolved":false,"context_lines":[{"line_number":1116,"context_line":"                                    [\u0027ip_address\u0027], port, interface_name)"},{"line_number":1117,"context_line":"            if self.conf.centralized_snat and ("},{"line_number":1118,"context_line":"                    ri.router[\u0027gw_port_host\u0027] \u003d\u003d self.host):"},{"line_number":1119,"context_line":"                snat_ports \u003d ("},{"line_number":1120,"context_line":"                    self.get_snat_interfaces(ri)"},{"line_number":1121,"context_line":"                )"},{"line_number":1122,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_a8c4d60e","line":1119,"updated":"2014-06-24 01:09:39.000000000","message":"remove. already set by 1113.","commit_id":"ad775150b5c7058027013a83c5207c0b334483a9"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"change_message_id":"13a1f70501f3a1b612d5708182364c297008831d","unresolved":false,"context_lines":[{"line_number":1116,"context_line":"                                    [\u0027ip_address\u0027], port, interface_name)"},{"line_number":1117,"context_line":"            if self.conf.centralized_snat and ("},{"line_number":1118,"context_line":"                    ri.router[\u0027gw_port_host\u0027] \u003d\u003d self.host):"},{"line_number":1119,"context_line":"                snat_ports \u003d ("},{"line_number":1120,"context_line":"                    self.get_snat_interfaces(ri)"},{"line_number":1121,"context_line":"                )"},{"line_number":1122,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_cde1d0d1","line":1119,"in_reply_to":"1ae5cdf2_6ad6e2f3","updated":"2014-06-26 05:17:26.000000000","message":"getting snat ports need to refactor. see 865. I added a comment.","commit_id":"ad775150b5c7058027013a83c5207c0b334483a9"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"5909a6f90ae073d7ced3c6b94ffda69529337f79","unresolved":false,"context_lines":[{"line_number":1116,"context_line":"                                    [\u0027ip_address\u0027], port, interface_name)"},{"line_number":1117,"context_line":"            if self.conf.centralized_snat and ("},{"line_number":1118,"context_line":"                    ri.router[\u0027gw_port_host\u0027] \u003d\u003d self.host):"},{"line_number":1119,"context_line":"                snat_ports \u003d ("},{"line_number":1120,"context_line":"                    self.get_snat_interfaces(ri)"},{"line_number":1121,"context_line":"                )"},{"line_number":1122,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_6ad6e2f3","line":1119,"in_reply_to":"1ae5cdf2_a8c4d60e","updated":"2014-06-26 04:35:17.000000000","message":"Agreed.","commit_id":"ad775150b5c7058027013a83c5207c0b334483a9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"99589d28c448c6407997663e0d54437d511a2a43","unresolved":false,"context_lines":[{"line_number":55,"context_line":"FIP_2_RTR_DEV_PREFIX \u003d \u0027fpr-\u0027"},{"line_number":56,"context_line":"RTR_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":57,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"},{"line_number":58,"context_line":"FIP_LL_PREFIX \u003d \u0027169.254.30.\u0027"},{"line_number":59,"context_line":"# Route Table index for FIPs"},{"line_number":60,"context_line":"FIP_RT_TBL \u003d 16"},{"line_number":61,"context_line":"# Rule priority range for FIPs"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_456e7e97","line":58,"updated":"2014-06-26 15:20:52.000000000","message":"I think I\u0027d like to see this address range handled with the python netaddr library.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"aca182311d14307f74d5d2d0f9474a6397b44562","unresolved":false,"context_lines":[{"line_number":55,"context_line":"FIP_2_RTR_DEV_PREFIX \u003d \u0027fpr-\u0027"},{"line_number":56,"context_line":"RTR_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":57,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"},{"line_number":58,"context_line":"FIP_LL_PREFIX \u003d \u0027169.254.30.\u0027"},{"line_number":59,"context_line":"# Route Table index for FIPs"},{"line_number":60,"context_line":"FIP_RT_TBL \u003d 16"},{"line_number":61,"context_line":"# Rule priority range for FIPs"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_a4863a63","line":58,"in_reply_to":"1ae5cdf2_456e7e97","updated":"2014-06-27 01:05:17.000000000","message":"Carl, what is the functionality out of netaddr library are you thinking of that can be used here? Will help understand your thought.\nthanks.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"194dd38df3b7bd73fd3aecbec7e27deeaaebdce6","unresolved":false,"context_lines":[{"line_number":55,"context_line":"FIP_2_RTR_DEV_PREFIX \u003d \u0027fpr-\u0027"},{"line_number":56,"context_line":"RTR_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":57,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"},{"line_number":58,"context_line":"FIP_LL_PREFIX \u003d \u0027169.254.30.\u0027"},{"line_number":59,"context_line":"# Route Table index for FIPs"},{"line_number":60,"context_line":"FIP_RT_TBL \u003d 16"},{"line_number":61,"context_line":"# Rule priority range for FIPs"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_c08329c9","line":58,"in_reply_to":"1ae5cdf2_a4863a63","updated":"2014-06-27 10:32:22.000000000","message":"Also, there a few place where we use chunks of link-local address space for \u0027internal\u0027 functions. This is not related to this patch but from an API perspective we either forbids its use or warn of \"possible unexpected behaviours\" in the documentation when creating tenant networks on this.\n\nTo be even more annoying, since addresses from 169.254.0.0/16 can be used by different agents and plugins, we should do something in order to avoid conflicts of any kind. But again, this is not something which pertains this patch.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"41a3f849463090cd3191ea1dd56aef6f40377730","unresolved":false,"context_lines":[{"line_number":55,"context_line":"FIP_2_RTR_DEV_PREFIX \u003d \u0027fpr-\u0027"},{"line_number":56,"context_line":"RTR_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":57,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"},{"line_number":58,"context_line":"FIP_LL_PREFIX \u003d \u0027169.254.30.\u0027"},{"line_number":59,"context_line":"# Route Table index for FIPs"},{"line_number":60,"context_line":"FIP_RT_TBL \u003d 16"},{"line_number":61,"context_line":"# Rule priority range for FIPs"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_241be61c","line":58,"in_reply_to":"1ae5cdf2_c08329c9","updated":"2014-06-27 22:04:10.000000000","message":"+1 to have some guidelines and to \u0027 not related to this patch\u0027\n\nIt will be good idea to reserve an IP address space for use of neutron and have guidelines for developers as well as users. As more L-3 services and functionality comes about having an IP address space available for use by neutron would benefit solutions.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e783dc05f3b7ec7758e2b9b4b64fa15b96788678","unresolved":false,"context_lines":[{"line_number":55,"context_line":"FIP_2_RTR_DEV_PREFIX \u003d \u0027fpr-\u0027"},{"line_number":56,"context_line":"RTR_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":57,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"},{"line_number":58,"context_line":"FIP_LL_PREFIX \u003d \u0027169.254.30.\u0027"},{"line_number":59,"context_line":"# Route Table index for FIPs"},{"line_number":60,"context_line":"FIP_RT_TBL \u003d 16"},{"line_number":61,"context_line":"# Rule priority range for FIPs"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_7817539d","line":58,"in_reply_to":"1ae5cdf2_c08329c9","updated":"2014-06-27 20:06:39.000000000","message":"Rajeev, Salvatore beat me to it.  He gives some sample code below.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"bfa1057a15e1d51602069491c1d97efc48070682","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                         topic\u003dself.topic,"},{"line_number":111,"context_line":"                         version\u003d\u00271.1\u0027)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def get_ports_by_subnet(self, context, subnet_id):"},{"line_number":114,"context_line":"        \"\"\"Retrieve ports by subnet id.\"\"\""},{"line_number":115,"context_line":"        return self.call(context,"},{"line_number":116,"context_line":"                         self.make_msg(\u0027get_ports_by_subnet\u0027, host\u003dself.host,"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_766849ba","line":113,"updated":"2014-06-27 18:31:26.000000000","message":"There should be a get_ports_by_subnet function definition that is used by the receiver of this rpc message.  I don\u0027t see it in neutron/db/l3_rpc_base.py.  Where is it?","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"67f3aacd2c3043aa3300317d8470c60c8ea20971","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                         topic\u003dself.topic,"},{"line_number":111,"context_line":"                         version\u003d\u00271.1\u0027)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def get_ports_by_subnet(self, context, subnet_id):"},{"line_number":114,"context_line":"        \"\"\"Retrieve ports by subnet id.\"\"\""},{"line_number":115,"context_line":"        return self.call(context,"},{"line_number":116,"context_line":"                         self.make_msg(\u0027get_ports_by_subnet\u0027, host\u003dself.host,"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_5e47df4b","line":113,"in_reply_to":"1ae5cdf2_766849ba","updated":"2014-06-27 20:51:39.000000000","message":"+1.  I can\u0027t find it.  It isn\u0027t define in any of the DVR patches as far as I can tell.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"2e4bac39e1e1708afc2fec50f97ac6c554c993ba","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                         topic\u003dself.topic,"},{"line_number":111,"context_line":"                         version\u003d\u00271.1\u0027)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def get_ports_by_subnet(self, context, subnet_id):"},{"line_number":114,"context_line":"        \"\"\"Retrieve ports by subnet id.\"\"\""},{"line_number":115,"context_line":"        return self.call(context,"},{"line_number":116,"context_line":"                         self.make_msg(\u0027get_ports_by_subnet\u0027, host\u003dself.host,"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_beec632a","line":113,"in_reply_to":"1ae5cdf2_766849ba","updated":"2014-06-27 21:56:48.000000000","message":"It *should* be in the separate l3-plugin extension for dvr patch that is currently under review under the same topic as this patch.  I looked there as well and it is missing.  Looks like it got lost in the various patch sets.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"194dd38df3b7bd73fd3aecbec7e27deeaaebdce6","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        cfg.BoolOpt(\u0027centralized_snat\u0027, default\u003dFalse,"},{"line_number":203,"context_line":"                    help\u003d_(\"Enables centralized SNAT in dvr mode.\")),"},{"line_number":204,"context_line":"        cfg.BoolOpt(\u0027centralized_router\u0027, default\u003dTrue,"},{"line_number":205,"context_line":"                    help\u003d_(\"Enables centralized router in dvr mode.\")),"},{"line_number":206,"context_line":"        cfg.StrOpt(\u0027external_network_bridge\u0027, default\u003d\u0027br-ex\u0027,"},{"line_number":207,"context_line":"                   help\u003d_(\"Name of bridge used for external network \""},{"line_number":208,"context_line":"                          \"traffic.\")),"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_54d27734","line":205,"updated":"2014-06-27 10:32:22.000000000","message":"this option is never used in this patch - not a big deal but it might belong to another patch.\n\nI tend to be picky about configuration options and introduce them only when they\u0027re really used.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"2e4bac39e1e1708afc2fec50f97ac6c554c993ba","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        cfg.BoolOpt(\u0027centralized_snat\u0027, default\u003dFalse,"},{"line_number":203,"context_line":"                    help\u003d_(\"Enables centralized SNAT in dvr mode.\")),"},{"line_number":204,"context_line":"        cfg.BoolOpt(\u0027centralized_router\u0027, default\u003dTrue,"},{"line_number":205,"context_line":"                    help\u003d_(\"Enables centralized router in dvr mode.\")),"},{"line_number":206,"context_line":"        cfg.StrOpt(\u0027external_network_bridge\u0027, default\u003d\u0027br-ex\u0027,"},{"line_number":207,"context_line":"                   help\u003d_(\"Name of bridge used for external network \""},{"line_number":208,"context_line":"                          \"traffic.\")),"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_203bdb9c","line":205,"in_reply_to":"1ae5cdf2_54d27734","updated":"2014-06-27 21:56:48.000000000","message":"Its used at L1509 to report back to the l3-plugin (scheduler) which is used to determine if this agent will host legacy, centralized routers.  It really is more of a l3-agent-scheduler dependency.  As you know, if a router comes to an agent, it is going to host it.  If this flag is configured to \u0027false\u0027, it will only host dvr based routers.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"194dd38df3b7bd73fd3aecbec7e27deeaaebdce6","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                              if ns.startswith(SNAT_NS_PREFIX))"},{"line_number":271,"context_line":"        self._destroy_stale_router_namespaces(snat_namespaces)"},{"line_number":272,"context_line":"        fip_namespaces \u003d set(ns for ns in host_namespaces"},{"line_number":273,"context_line":"                             if ns.startswith(FIP_NS_PREFIX))"},{"line_number":274,"context_line":"        self._destroy_stale_router_namespaces(fip_namespaces)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        self._clean_stale_namespaces \u003d self.conf.use_namespaces"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_c0e8897d","line":273,"updated":"2014-06-27 10:32:22.000000000","message":"minor comment - instead of iterating twice on host_namespaces you can iterate only once and build the two sets in this way.\nYou probably won\u0027t be able to use anymore list comprehensions but I think that\u0027s acceptable.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"2e4bac39e1e1708afc2fec50f97ac6c554c993ba","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                              if ns.startswith(SNAT_NS_PREFIX))"},{"line_number":271,"context_line":"        self._destroy_stale_router_namespaces(snat_namespaces)"},{"line_number":272,"context_line":"        fip_namespaces \u003d set(ns for ns in host_namespaces"},{"line_number":273,"context_line":"                             if ns.startswith(FIP_NS_PREFIX))"},{"line_number":274,"context_line":"        self._destroy_stale_router_namespaces(fip_namespaces)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        self._clean_stale_namespaces \u003d self.conf.use_namespaces"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_0006dfcd","line":273,"in_reply_to":"1ae5cdf2_c0e8897d","updated":"2014-06-27 21:56:48.000000000","message":"Agreed - the double iterating is not ideal.  This will get improved.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"194dd38df3b7bd73fd3aecbec7e27deeaaebdce6","unresolved":false,"context_lines":[{"line_number":344,"context_line":"        self._clean_stale_namespaces \u003d False"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"    def _destroy_namespace(self, ns):"},{"line_number":347,"context_line":"        if ns.startswith(NS_PREFIX):"},{"line_number":348,"context_line":"            if self.conf.enable_metadata_proxy:"},{"line_number":349,"context_line":"                self._destroy_metadata_proxy(ns[len(NS_PREFIX):], ns)"},{"line_number":350,"context_line":"            self._destroy_router_namespace(ns)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_408b99bf","line":347,"updated":"2014-06-27 10:32:22.000000000","message":"another boring comment - with this patch you might want to consider renaming this from NS_PREFIX to ROUTER_NS_PREFIX","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"2e4bac39e1e1708afc2fec50f97ac6c554c993ba","unresolved":false,"context_lines":[{"line_number":344,"context_line":"        self._clean_stale_namespaces \u003d False"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"    def _destroy_namespace(self, ns):"},{"line_number":347,"context_line":"        if ns.startswith(NS_PREFIX):"},{"line_number":348,"context_line":"            if self.conf.enable_metadata_proxy:"},{"line_number":349,"context_line":"                self._destroy_metadata_proxy(ns[len(NS_PREFIX):], ns)"},{"line_number":350,"context_line":"            self._destroy_router_namespace(ns)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_a0f44bcf","line":347,"in_reply_to":"1ae5cdf2_408b99bf","updated":"2014-06-27 21:56:48.000000000","message":"Yes - more explicit.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"d5833d302fc5f7d1d508bc450465e0383abf673e","unresolved":false,"context_lines":[{"line_number":344,"context_line":"        self._clean_stale_namespaces \u003d False"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"    def _destroy_namespace(self, ns):"},{"line_number":347,"context_line":"        if ns.startswith(NS_PREFIX):"},{"line_number":348,"context_line":"            if self.conf.enable_metadata_proxy:"},{"line_number":349,"context_line":"                self._destroy_metadata_proxy(ns[len(NS_PREFIX):], ns)"},{"line_number":350,"context_line":"            self._destroy_router_namespace(ns)"}],"source_content_type":"text/x-python","patch_set":7,"id":"dab895d6_7f0e2736","line":347,"in_reply_to":"1ae5cdf2_a0f44bcf","updated":"2014-06-28 20:28:19.000000000","message":"Actually as I looked into this, I\u0027d have to modify more files outside this patch.  I\u0027d rather leave that for later or a different patch.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"194dd38df3b7bd73fd3aecbec7e27deeaaebdce6","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        # delete internal interfaces"},{"line_number":359,"context_line":"        for d in ns_ip.get_devices(exclude_loopback\u003dTrue):"},{"line_number":360,"context_line":"            if d.name.startswith(SNAT_INT_DEV_PREFIX):"},{"line_number":361,"context_line":"                LOG.debug(\u0027DVR: unplug: %s\u0027, d.name)"},{"line_number":362,"context_line":"                self.driver.unplug(d.name, namespace\u003dns_name,"},{"line_number":363,"context_line":"                                   prefix\u003dSNAT_INT_DEV_PREFIX)"},{"line_number":364,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_c06de904","line":361,"updated":"2014-06-27 10:32:22.000000000","message":"for logging purposes it might good to print ns_name as well (unless the interface name identifies also the namespace).","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"2e4bac39e1e1708afc2fec50f97ac6c554c993ba","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        # delete internal interfaces"},{"line_number":359,"context_line":"        for d in ns_ip.get_devices(exclude_loopback\u003dTrue):"},{"line_number":360,"context_line":"            if d.name.startswith(SNAT_INT_DEV_PREFIX):"},{"line_number":361,"context_line":"                LOG.debug(\u0027DVR: unplug: %s\u0027, d.name)"},{"line_number":362,"context_line":"                self.driver.unplug(d.name, namespace\u003dns_name,"},{"line_number":363,"context_line":"                                   prefix\u003dSNAT_INT_DEV_PREFIX)"},{"line_number":364,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_c0ff97a9","line":361,"in_reply_to":"1ae5cdf2_c06de904","updated":"2014-06-27 21:56:48.000000000","message":"Good point.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"d5833d302fc5f7d1d508bc450465e0383abf673e","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        # delete internal interfaces"},{"line_number":359,"context_line":"        for d in ns_ip.get_devices(exclude_loopback\u003dTrue):"},{"line_number":360,"context_line":"            if d.name.startswith(SNAT_INT_DEV_PREFIX):"},{"line_number":361,"context_line":"                LOG.debug(\u0027DVR: unplug: %s\u0027, d.name)"},{"line_number":362,"context_line":"                self.driver.unplug(d.name, namespace\u003dns_name,"},{"line_number":363,"context_line":"                                   prefix\u003dSNAT_INT_DEV_PREFIX)"},{"line_number":364,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"dab895d6_d9767306","line":361,"in_reply_to":"1ae5cdf2_c0ff97a9","updated":"2014-06-28 20:28:19.000000000","message":"Actually the ns is logged below.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"194dd38df3b7bd73fd3aecbec7e27deeaaebdce6","unresolved":false,"context_lines":[{"line_number":520,"context_line":"            if (p[\u0027device_owner\u0027] not in ("},{"line_number":521,"context_line":"                \u0027network:router_interface\u0027,"},{"line_number":522,"context_line":"                \u0027network:router_interface_distributed\u0027)):"},{"line_number":523,"context_line":"                for fip in p[\u0027fixed_ips\u0027]:"},{"line_number":524,"context_line":"                    self._update_arp_entry(ri, fip[\u0027ip_address\u0027],"},{"line_number":525,"context_line":"                                           p[\u0027mac_address\u0027],"},{"line_number":526,"context_line":"                                           subnet_id, \u0027add\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_f46383da","line":523,"updated":"2014-06-27 10:32:22.000000000","message":"more pedantry... i don\u0027t think here you mean floating ip with fip, but fixed ip. Can you rename fip to fixed_ip in this case just to avoid confusing dumb readers like me?","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"2e4bac39e1e1708afc2fec50f97ac6c554c993ba","unresolved":false,"context_lines":[{"line_number":520,"context_line":"            if (p[\u0027device_owner\u0027] not in ("},{"line_number":521,"context_line":"                \u0027network:router_interface\u0027,"},{"line_number":522,"context_line":"                \u0027network:router_interface_distributed\u0027)):"},{"line_number":523,"context_line":"                for fip in p[\u0027fixed_ips\u0027]:"},{"line_number":524,"context_line":"                    self._update_arp_entry(ri, fip[\u0027ip_address\u0027],"},{"line_number":525,"context_line":"                                           p[\u0027mac_address\u0027],"},{"line_number":526,"context_line":"                                           subnet_id, \u0027add\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_e011f3f8","line":523,"in_reply_to":"1ae5cdf2_f46383da","updated":"2014-06-27 21:56:48.000000000","message":"Ya - thats bothered me also.  I\u0027ll update.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"78bb60d3e79b147bf28c3a8d0f7995d8d60b7b86","unresolved":false,"context_lines":[{"line_number":820,"context_line":"        except Exception as e:"},{"line_number":821,"context_line":"            LOG.error(_(\"Failed sending gratuitous ARP: %s\"), str(e))"},{"line_number":822,"context_line":"        if dist:"},{"line_number":823,"context_line":"                device.addr.delete(net.version, ip_cidr)"},{"line_number":824,"context_line":""},{"line_number":825,"context_line":"    def _send_gratuitous_arp_packet(self, ns_name, interface_name, ip_address,"},{"line_number":826,"context_line":"                                    dist\u003dNone):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_c9789b80","line":823,"updated":"2014-06-27 21:47:59.000000000","message":"Sorry, maybe I\u0027m a bit naive about this change, but why are you adding an address, sending a gratuitous ARP, then deleting the address?  If the ARP is to let things know the address is here, it isn\u0027t any more...","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"194dd38df3b7bd73fd3aecbec7e27deeaaebdce6","unresolved":false,"context_lines":[{"line_number":878,"context_line":"        match_port \u003d [p for p in snat_ports if"},{"line_number":879,"context_line":"                      p[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027] \u003d\u003d subnet_id]"},{"line_number":880,"context_line":"        if match_port:"},{"line_number":881,"context_line":"            return match_port[0]"},{"line_number":882,"context_line":""},{"line_number":883,"context_line":"    def _create_dvr_gateway(self, ri, ex_gw_port, gw_interface_name,"},{"line_number":884,"context_line":"                            internal_cidrs, snat_ports):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_23fe97af","line":881,"updated":"2014-06-27 10:32:22.000000000","message":"should there be a casa for raising an exception in case of multiple match ports  and deal with this condition?","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"2e4bac39e1e1708afc2fec50f97ac6c554c993ba","unresolved":false,"context_lines":[{"line_number":878,"context_line":"        match_port \u003d [p for p in snat_ports if"},{"line_number":879,"context_line":"                      p[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027] \u003d\u003d subnet_id]"},{"line_number":880,"context_line":"        if match_port:"},{"line_number":881,"context_line":"            return match_port[0]"},{"line_number":882,"context_line":""},{"line_number":883,"context_line":"    def _create_dvr_gateway(self, ri, ex_gw_port, gw_interface_name,"},{"line_number":884,"context_line":"                            internal_cidrs, snat_ports):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_a0e28bfe","line":881,"in_reply_to":"1ae5cdf2_23fe97af","updated":"2014-06-27 21:56:48.000000000","message":"Not sure - it does cause problems if there is no match.  We should at least log.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"78bb60d3e79b147bf28c3a8d0f7995d8d60b7b86","unresolved":false,"context_lines":[{"line_number":914,"context_line":"                    self._snat_redirect_add(ri, gateway[\u0027fixed_ips\u0027][0]"},{"line_number":915,"context_line":"                                            [\u0027ip_address\u0027], p, id_name)"},{"line_number":916,"context_line":"            snat_ports \u003d ("},{"line_number":917,"context_line":"                self.get_snat_interfaces(ri)"},{"line_number":918,"context_line":"            )"},{"line_number":919,"context_line":""},{"line_number":920,"context_line":"            if self.conf.centralized_snat and ("}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_3efdb33b","line":917,"updated":"2014-06-27 21:47:59.000000000","message":"This was done up at line 911, perhaps this was meant to be under an \u0027else\u0027 ?","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"d5833d302fc5f7d1d508bc450465e0383abf673e","unresolved":false,"context_lines":[{"line_number":914,"context_line":"                    self._snat_redirect_add(ri, gateway[\u0027fixed_ips\u0027][0]"},{"line_number":915,"context_line":"                                            [\u0027ip_address\u0027], p, id_name)"},{"line_number":916,"context_line":"            snat_ports \u003d ("},{"line_number":917,"context_line":"                self.get_snat_interfaces(ri)"},{"line_number":918,"context_line":"            )"},{"line_number":919,"context_line":""},{"line_number":920,"context_line":"            if self.conf.centralized_snat and ("}],"source_content_type":"text/x-python","patch_set":7,"id":"dab895d6_99531b6c","line":917,"in_reply_to":"1ae5cdf2_3efdb33b","updated":"2014-06-28 20:28:19.000000000","message":"This was mentioned in a previous patch - it will get updated.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"194dd38df3b7bd73fd3aecbec7e27deeaaebdce6","unresolved":false,"context_lines":[{"line_number":1051,"context_line":"        ip_str \u003d ip.split(\u0027.\u0027)"},{"line_number":1052,"context_line":"        ip_num \u003d (((int(ip_str[0])) \u003c\u003c 24) + ((int(ip_str[1])) \u003c\u003c 16)"},{"line_number":1053,"context_line":"                  + ((int(ip_str[2])) \u003c\u003c 8) + (int(ip_str[3])))"},{"line_number":1054,"context_line":"        return ip_num"},{"line_number":1055,"context_line":""},{"line_number":1056,"context_line":"    def _snat_redirect_add(self, ri, gateway, sn_port, sn_int):"},{"line_number":1057,"context_line":"        \"\"\"Adds rules and routes for SNAT redirection.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_c3b093de","line":1054,"updated":"2014-06-27 10:32:22.000000000","message":"as already advised here - please consider using netaddr\nsee below\n\n\u003e\u003e\u003e import netaddr\n\n\u003e\u003e\u003e addr\u003dnetaddr.IPNetwork(\u0027192.168.0.0/24\u0027)\n\n\u003e\u003e\u003e addr\n\nIPNetwork(\u0027192.168.0.0/24\u0027)\n\n\u003e\u003e\u003e addr.value\n\n3232235520\n\n\n\u003e\u003e\u003e text\u003d\u0027192.168.0.0/24\u0027\n\n\u003e\u003e\u003e text1\u003dtext.split(\u0027/\u0027)[0]\n\n\u003e\u003e\u003e stuff\u003dtext1.split(\u0027.\u0027)\n\n\u003e\u003e\u003e stuff\n\n[\u0027192\u0027, \u0027168\u0027, \u00270\u0027, \u00270\u0027]\n\n\u003e\u003e\u003e (int(stuff[0]) \u003c\u003c 24) + (int(stuff[1]) \u003c\u003c 16) + (int(stuff[2]) \u003c\u003c 8) + int(stuff[3])\n\n3232235520\n\n\u003e\u003e\u003e","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"41a3f849463090cd3191ea1dd56aef6f40377730","unresolved":false,"context_lines":[{"line_number":1051,"context_line":"        ip_str \u003d ip.split(\u0027.\u0027)"},{"line_number":1052,"context_line":"        ip_num \u003d (((int(ip_str[0])) \u003c\u003c 24) + ((int(ip_str[1])) \u003c\u003c 16)"},{"line_number":1053,"context_line":"                  + ((int(ip_str[2])) \u003c\u003c 8) + (int(ip_str[3])))"},{"line_number":1054,"context_line":"        return ip_num"},{"line_number":1055,"context_line":""},{"line_number":1056,"context_line":"    def _snat_redirect_add(self, ri, gateway, sn_port, sn_int):"},{"line_number":1057,"context_line":"        \"\"\"Adds rules and routes for SNAT redirection.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_698a27bd","line":1054,"in_reply_to":"1ae5cdf2_c3b093de","updated":"2014-06-27 22:04:10.000000000","message":"Thanks, Like your IPNetwork suggestion, we will incorporate it in a subsequent Patch.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"194dd38df3b7bd73fd3aecbec7e27deeaaebdce6","unresolved":false,"context_lines":[{"line_number":1065,"context_line":"            ns_ipr.netns.execute([\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":1066,"context_line":"                                 \u0027net.ipv4.conf.all.send_redirects\u003d0\u0027])"},{"line_number":1067,"context_line":"            ns_ipr.netns.execute([\u0027sysctl\u0027, \u0027-w\u0027, \u0027net.ipv4.conf.%s.\u0027"},{"line_number":1068,"context_line":"                                 \u0027send_redirects\u003d0\u0027 % sn_int])"},{"line_number":1069,"context_line":"        except Exception:"},{"line_number":1070,"context_line":"            LOG.exception(_(\u0027DVR: error adding redirection logic\u0027))"},{"line_number":1071,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_a3554753","line":1068,"updated":"2014-06-27 10:32:22.000000000","message":"these operations are not undone on snat_redirect_remove - I guess because there\u0027s no need for that. So why not execute them when a router namespace is created? This way they won\u0027t be executed multiple times if _snat_redirect_add is called more than once for a router namespace","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"41a3f849463090cd3191ea1dd56aef6f40377730","unresolved":false,"context_lines":[{"line_number":1065,"context_line":"            ns_ipr.netns.execute([\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":1066,"context_line":"                                 \u0027net.ipv4.conf.all.send_redirects\u003d0\u0027])"},{"line_number":1067,"context_line":"            ns_ipr.netns.execute([\u0027sysctl\u0027, \u0027-w\u0027, \u0027net.ipv4.conf.%s.\u0027"},{"line_number":1068,"context_line":"                                 \u0027send_redirects\u003d0\u0027 % sn_int])"},{"line_number":1069,"context_line":"        except Exception:"},{"line_number":1070,"context_line":"            LOG.exception(_(\u0027DVR: error adding redirection logic\u0027))"},{"line_number":1071,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_e4a49e08","line":1068,"in_reply_to":"1ae5cdf2_a3554753","updated":"2014-06-27 22:04:10.000000000","message":"Correct, they don\u0027t need to be removed. Since one of them is interface specific, it can\u0027t be called at namespace creation. For better readability and code cohesion kept the call for \u0027all\u0027 also here.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"194dd38df3b7bd73fd3aecbec7e27deeaaebdce6","unresolved":false,"context_lines":[{"line_number":1117,"context_line":"            if self.conf.centralized_snat and ("},{"line_number":1118,"context_line":"                    ri.router[\u0027gw_port_host\u0027] \u003d\u003d self.host):"},{"line_number":1119,"context_line":"                snat_ports \u003d ("},{"line_number":1120,"context_line":"                    self.get_snat_interfaces(ri)"},{"line_number":1121,"context_line":"                )"},{"line_number":1122,"context_line":""},{"line_number":1123,"context_line":"                for port in snat_ports:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_c320939c","line":1120,"updated":"2014-06-27 10:32:22.000000000","message":"does this statement need wrapping? Seems length on a single line \u003c 80 chars\n\nAlso - the statement is exactly the same executed 6 lines above. Are you sure you need that again? If yes, please add a comment for that - it\u0027s not obvious","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"2e4bac39e1e1708afc2fec50f97ac6c554c993ba","unresolved":false,"context_lines":[{"line_number":1117,"context_line":"            if self.conf.centralized_snat and ("},{"line_number":1118,"context_line":"                    ri.router[\u0027gw_port_host\u0027] \u003d\u003d self.host):"},{"line_number":1119,"context_line":"                snat_ports \u003d ("},{"line_number":1120,"context_line":"                    self.get_snat_interfaces(ri)"},{"line_number":1121,"context_line":"                )"},{"line_number":1122,"context_line":""},{"line_number":1123,"context_line":"                for port in snat_ports:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_e0e813e1","line":1120,"in_reply_to":"1ae5cdf2_c320939c","updated":"2014-06-27 21:56:48.000000000","message":"This was mentioned on a previous patch comment.  I plan to update with a fix soon.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"194dd38df3b7bd73fd3aecbec7e27deeaaebdce6","unresolved":false,"context_lines":[{"line_number":1164,"context_line":"        return rules"},{"line_number":1165,"context_line":""},{"line_number":1166,"context_line":"    def _create_agent_gateway_port(self, ri, network_id):"},{"line_number":1167,"context_line":"        \"\"\"Creates Floatin IP gateway port."},{"line_number":1168,"context_line":""},{"line_number":1169,"context_line":"           Request port creation from Plugin then creates"},{"line_number":1170,"context_line":"           Floating IP namespace and adds gateway port."}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_5e2b7632","line":1167,"updated":"2014-06-27 10:32:22.000000000","message":"nit: Floating lost the \u0027g\u0027","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e783dc05f3b7ec7758e2b9b4b64fa15b96788678","unresolved":false,"context_lines":[{"line_number":1164,"context_line":"        return rules"},{"line_number":1165,"context_line":""},{"line_number":1166,"context_line":"    def _create_agent_gateway_port(self, ri, network_id):"},{"line_number":1167,"context_line":"        \"\"\"Creates Floatin IP gateway port."},{"line_number":1168,"context_line":""},{"line_number":1169,"context_line":"           Request port creation from Plugin then creates"},{"line_number":1170,"context_line":"           Floating IP namespace and adds gateway port."}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_f88283c5","line":1167,"in_reply_to":"1ae5cdf2_5e2b7632","updated":"2014-06-27 20:06:39.000000000","message":"Or Floatin\u0027\n\n;)","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"2e4bac39e1e1708afc2fec50f97ac6c554c993ba","unresolved":false,"context_lines":[{"line_number":1164,"context_line":"        return rules"},{"line_number":1165,"context_line":""},{"line_number":1166,"context_line":"    def _create_agent_gateway_port(self, ri, network_id):"},{"line_number":1167,"context_line":"        \"\"\"Creates Floatin IP gateway port."},{"line_number":1168,"context_line":""},{"line_number":1169,"context_line":"           Request port creation from Plugin then creates"},{"line_number":1170,"context_line":"           Floating IP namespace and adds gateway port."}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_20be7bd4","line":1167,"in_reply_to":"1ae5cdf2_5e2b7632","updated":"2014-06-27 21:56:48.000000000","message":"understood","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"194dd38df3b7bd73fd3aecbec7e27deeaaebdce6","unresolved":false,"context_lines":[{"line_number":1293,"context_line":"        \"\"\"Add or delete arp entry into router namespace.\"\"\""},{"line_number":1294,"context_line":"        port \u003d self.get_internal_port(ri, subnet_id)"},{"line_number":1295,"context_line":"        if \u0027id\u0027 in port:"},{"line_number":1296,"context_line":"            ip_cidr \u003d str(ip) + \u0027/32\u0027"},{"line_number":1297,"context_line":"            try:"},{"line_number":1298,"context_line":"                # TODO(mrsmith): optimize the calls below for bulk calls"},{"line_number":1299,"context_line":"                net \u003d netaddr.IPNetwork(ip_cidr)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_34b6cb25","line":1296,"updated":"2014-06-27 10:32:22.000000000","message":"this is probably unnecessary: \n\n\u003e\u003e\u003e addr2\u003dnetaddr.IPAddress(\u0027192.168.0.1\u0027)\n\n\u003e\u003e\u003e addr2.version\n\n4","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"2e4bac39e1e1708afc2fec50f97ac6c554c993ba","unresolved":false,"context_lines":[{"line_number":1293,"context_line":"        \"\"\"Add or delete arp entry into router namespace.\"\"\""},{"line_number":1294,"context_line":"        port \u003d self.get_internal_port(ri, subnet_id)"},{"line_number":1295,"context_line":"        if \u0027id\u0027 in port:"},{"line_number":1296,"context_line":"            ip_cidr \u003d str(ip) + \u0027/32\u0027"},{"line_number":1297,"context_line":"            try:"},{"line_number":1298,"context_line":"                # TODO(mrsmith): optimize the calls below for bulk calls"},{"line_number":1299,"context_line":"                net \u003d netaddr.IPNetwork(ip_cidr)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_29201faf","line":1296,"in_reply_to":"1ae5cdf2_34b6cb25","updated":"2014-06-27 21:56:48.000000000","message":"Don\u0027t sure what you\u0027re asking - do you mean we should check for ipv4?","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"194dd38df3b7bd73fd3aecbec7e27deeaaebdce6","unresolved":false,"context_lines":[{"line_number":1308,"context_line":"                LOG.exception(_(\"DVR: Failed updating arp entry\"))"},{"line_number":1309,"context_line":"                self.fullsync \u003d True"},{"line_number":1310,"context_line":""},{"line_number":1311,"context_line":"    def add_arp_entry(self, context, payload):"},{"line_number":1312,"context_line":"        \"\"\"Adds arp entry into router namespace from RPC.\"\"\""},{"line_number":1313,"context_line":"        arp_table \u003d payload[\u0027arp_table\u0027]"},{"line_number":1314,"context_line":"        router_id \u003d payload[\u0027router_id\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_545d17eb","line":1311,"updated":"2014-06-27 10:32:22.000000000","message":"as this method and the method below are not used in any other place in this patch I wonder whether it would be better to place them in another patch (this obviously does not apply to _update_arp_entry)","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"2e4bac39e1e1708afc2fec50f97ac6c554c993ba","unresolved":false,"context_lines":[{"line_number":1308,"context_line":"                LOG.exception(_(\"DVR: Failed updating arp entry\"))"},{"line_number":1309,"context_line":"                self.fullsync \u003d True"},{"line_number":1310,"context_line":""},{"line_number":1311,"context_line":"    def add_arp_entry(self, context, payload):"},{"line_number":1312,"context_line":"        \"\"\"Adds arp entry into router namespace from RPC.\"\"\""},{"line_number":1313,"context_line":"        arp_table \u003d payload[\u0027arp_table\u0027]"},{"line_number":1314,"context_line":"        router_id \u003d payload[\u0027router_id\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_80958f41","line":1311,"in_reply_to":"1ae5cdf2_545d17eb","updated":"2014-06-27 21:56:48.000000000","message":"These are RPC handlers for calls from the l3-plugin which should be in the l3-plugin extension patch related to DVR.  When VMs are added by nova, the l3-plugin will notify the proper l3-agents hosting the subnets the VMs are on.","commit_id":"421250048bc50e20e0d9cebc7de1a207db6ce2cd"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"24862ccbd8299d410b873f68fb373f582570fcd3","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    def get_ports_by_subnet(self, context, subnet_id):"},{"line_number":114,"context_line":"        \"\"\"Retrieve ports by subnet id.\"\"\""},{"line_number":115,"context_line":"        return self.call(context,"},{"line_number":116,"context_line":"                         self.make_msg(\u0027get_ports_by_subnet\u0027, host\u003dself.host,"},{"line_number":117,"context_line":"                                       subnet_id\u003dsubnet_id),"},{"line_number":118,"context_line":"                         topic\u003dself.topic,"},{"line_number":119,"context_line":"                         version\u003d\u00271.2\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_e6e2849e","line":116,"updated":"2014-07-01 15:32:17.000000000","message":"There doesn\u0027t seem to be an implementation for this anywhere in any of the DVR patches.","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"bfdc89279298521e70ad760118b436978aea8018","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    def get_ports_by_subnet(self, context, subnet_id):"},{"line_number":114,"context_line":"        \"\"\"Retrieve ports by subnet id.\"\"\""},{"line_number":115,"context_line":"        return self.call(context,"},{"line_number":116,"context_line":"                         self.make_msg(\u0027get_ports_by_subnet\u0027, host\u003dself.host,"},{"line_number":117,"context_line":"                                       subnet_id\u003dsubnet_id),"},{"line_number":118,"context_line":"                         topic\u003dself.topic,"},{"line_number":119,"context_line":"                         version\u003d\u00271.2\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_ed4a5c82","line":116,"in_reply_to":"baada198_8c89e9cc","updated":"2014-07-01 18:59:07.000000000","message":"All of the DVR patches are interelated,  We could add the l3-plugin code for rpc in this patch but it would just be a duplicate of what should be in the l3-plugin patch.  We already rebased this patch to be dependent on the l3-plugin patch for constants.py.  Wouldn\u0027t this be similar?","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"8b0df3c38f9837768cc93c5253eb006f815cdac4","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    def get_ports_by_subnet(self, context, subnet_id):"},{"line_number":114,"context_line":"        \"\"\"Retrieve ports by subnet id.\"\"\""},{"line_number":115,"context_line":"        return self.call(context,"},{"line_number":116,"context_line":"                         self.make_msg(\u0027get_ports_by_subnet\u0027, host\u003dself.host,"},{"line_number":117,"context_line":"                                       subnet_id\u003dsubnet_id),"},{"line_number":118,"context_line":"                         topic\u003dself.topic,"},{"line_number":119,"context_line":"                         version\u003d\u00271.2\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_8c89e9cc","line":116,"in_reply_to":"baada198_e6e2849e","updated":"2014-07-01 16:21:42.000000000","message":"+1 Both the RPC call and its actual implementation should be in the same patch. Don\u0027t separate them.","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"7485843b06c36a257e7cfaeccdbbbf1925a9be11","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    def get_ports_by_subnet(self, context, subnet_id):"},{"line_number":114,"context_line":"        \"\"\"Retrieve ports by subnet id.\"\"\""},{"line_number":115,"context_line":"        return self.call(context,"},{"line_number":116,"context_line":"                         self.make_msg(\u0027get_ports_by_subnet\u0027, host\u003dself.host,"},{"line_number":117,"context_line":"                                       subnet_id\u003dsubnet_id),"},{"line_number":118,"context_line":"                         topic\u003dself.topic,"},{"line_number":119,"context_line":"                         version\u003d\u00271.2\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_1037a300","line":116,"in_reply_to":"baada198_ed4a5c82","updated":"2014-07-01 22:03:07.000000000","message":"Withdrawn my objection -- PS 47 of patch 84223 now has the implementation of get_ports_by_subnet.","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"24862ccbd8299d410b873f68fb373f582570fcd3","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                         topic\u003dself.topic,"},{"line_number":119,"context_line":"                         version\u003d\u00271.2\u0027)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def get_agent_gateway_port(self, context, fip_net):"},{"line_number":122,"context_line":"        \"\"\"Get or create a agent_gateway_port.\"\"\""},{"line_number":123,"context_line":"        return self.call(context,"},{"line_number":124,"context_line":"                         self.make_msg(\u0027get_agent_gateway_port\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_a6ffac33","line":121,"updated":"2014-07-01 15:32:17.000000000","message":"Same with this method.","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"bc5728fd46736d50c93e345b8cd3752cab901940","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                         topic\u003dself.topic,"},{"line_number":119,"context_line":"                         version\u003d\u00271.2\u0027)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def get_agent_gateway_port(self, context, fip_net):"},{"line_number":122,"context_line":"        \"\"\"Get or create a agent_gateway_port.\"\"\""},{"line_number":123,"context_line":"        return self.call(context,"},{"line_number":124,"context_line":"                         self.make_msg(\u0027get_agent_gateway_port\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_3c180081","line":121,"in_reply_to":"baada198_3c2640b8","updated":"2014-07-01 21:43:28.000000000","message":"I\u0027ve added get_ports_by_subnet next to the other methods as defined in review 84223. So once this is rebased the problems goes away.\n\nAs Stephen pointed out it\u0027d be best to get caller and called next to each other but I really don\u0027t have a strong opinion here.","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"8b0df3c38f9837768cc93c5253eb006f815cdac4","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                         topic\u003dself.topic,"},{"line_number":119,"context_line":"                         version\u003d\u00271.2\u0027)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def get_agent_gateway_port(self, context, fip_net):"},{"line_number":122,"context_line":"        \"\"\"Get or create a agent_gateway_port.\"\"\""},{"line_number":123,"context_line":"        return self.call(context,"},{"line_number":124,"context_line":"                         self.make_msg(\u0027get_agent_gateway_port\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_ccdbe119","line":121,"in_reply_to":"baada198_a6ffac33","updated":"2014-07-01 16:21:42.000000000","message":"Actually the implementation is found in l3_rpc_base.py, in patch 84223.","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"5e40b60dbe519b1330b1f05910f61a40b60827d9","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                         topic\u003dself.topic,"},{"line_number":119,"context_line":"                         version\u003d\u00271.2\u0027)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def get_agent_gateway_port(self, context, fip_net):"},{"line_number":122,"context_line":"        \"\"\"Get or create a agent_gateway_port.\"\"\""},{"line_number":123,"context_line":"        return self.call(context,"},{"line_number":124,"context_line":"                         self.make_msg(\u0027get_agent_gateway_port\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_3c2640b8","line":121,"in_reply_to":"baada198_ccdbe119","updated":"2014-07-01 21:00:15.000000000","message":"Stephen, you\u0027re right.  My bad.  I see it now.","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"a8825031878c6aed1d38d48e158658b7cb46aba7","unresolved":false,"context_lines":[{"line_number":879,"context_line":"                      p[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027] \u003d\u003d subnet_id]"},{"line_number":880,"context_line":"        if match_port:"},{"line_number":881,"context_line":"            return match_port[0]"},{"line_number":882,"context_line":"        else:"},{"line_number":883,"context_line":"            LOG.debug(\u0027DVR: no map match_port found!\u0027)"},{"line_number":884,"context_line":""},{"line_number":885,"context_line":"    def _create_dvr_gateway(self, ri, ex_gw_port, gw_interface_name,"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab895d6_85dd6545","line":882,"updated":"2014-06-29 19:23:38.000000000","message":"nit: don\u0027t need else.","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"3b555bf1854c681c5817e08fff59392491d2be46","unresolved":false,"context_lines":[{"line_number":879,"context_line":"                      p[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027] \u003d\u003d subnet_id]"},{"line_number":880,"context_line":"        if match_port:"},{"line_number":881,"context_line":"            return match_port[0]"},{"line_number":882,"context_line":"        else:"},{"line_number":883,"context_line":"            LOG.debug(\u0027DVR: no map match_port found!\u0027)"},{"line_number":884,"context_line":""},{"line_number":885,"context_line":"    def _create_dvr_gateway(self, ri, ex_gw_port, gw_interface_name,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_71d98c82","line":882,"in_reply_to":"dab895d6_85dd6545","updated":"2014-07-03 00:34:12.000000000","message":"got it","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"fd827f1e053302de71d554f4f398094b5f8d9095","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            It is now a list of router IDs only."},{"line_number":195,"context_line":"            Per rpc versioning rules,  it is backwards compatible."},{"line_number":196,"context_line":"    \"\"\""},{"line_number":197,"context_line":"    RPC_API_VERSION \u003d \u00271.1\u0027"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    OPTS \u003d ["},{"line_number":200,"context_line":"        cfg.StrOpt(\u0027agent_mode\u0027, default\u003d\u0027legacy\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_4e8e0c29","line":197,"updated":"2014-07-08 16:22:21.000000000","message":"this should bumped as 2 more methods have been added","commit_id":"f0d2a9ce8bf606b895874a541a806194ac03d568"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"5447750fb18fa62ca0e5c0153caf565c7f1e18ba","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                          \"Use \u0027legacy\u0027 for existing deployments without \""},{"line_number":203,"context_line":"                          \"DVR; \u0027dvr\u0027 for L3 agents running on compute hosts; \""},{"line_number":204,"context_line":"                          \"\u0027dvr_snat\u0027 for L3 agents running on dedicated \""},{"line_number":205,"context_line":"                          \"network nodes\")),"},{"line_number":206,"context_line":"        cfg.StrOpt(\u0027external_network_bridge\u0027, default\u003d\u0027br-ex\u0027,"},{"line_number":207,"context_line":"                   help\u003d_(\"Name of bridge used for external network \""},{"line_number":208,"context_line":"                          \"traffic.\")),"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_6e0f372f","line":205,"updated":"2014-07-09 08:19:56.000000000","message":"missing period in the help text.","commit_id":"f0d2a9ce8bf606b895874a541a806194ac03d568"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f1da47508a62f02783c89d38c3ca8b64f21f447b","unresolved":false,"context_lines":[{"line_number":274,"context_line":"                    self._destroy_snat_namespace(ns)"},{"line_number":275,"context_line":"            except RuntimeError:"},{"line_number":276,"context_line":"                LOG.exception(_(\u0027Failed to destroy stale namespace \u0027"},{"line_number":277,"context_line":"                                \u0027%s\u0027), ns)"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"        self._clean_stale_namespaces \u003d self.conf.use_namespaces"},{"line_number":280,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_fe7faba8","line":277,"updated":"2014-07-08 04:36:27.000000000","message":"I think this code above should be removed.  It is disruptive to testing because it deletes the snat and fip namespaces every time I restart the agent.","commit_id":"f0d2a9ce8bf606b895874a541a806194ac03d568"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"ae1a2e320c1e7df3032eb7d09dfc6120dd01d984","unresolved":false,"context_lines":[{"line_number":915,"context_line":"            for p in ri.internal_ports:"},{"line_number":916,"context_line":"                gateway \u003d self._map_internal_interfaces(ri, p, snat_ports)"},{"line_number":917,"context_line":"                id_name \u003d self.get_internal_device_name(p[\u0027id\u0027])"},{"line_number":918,"context_line":"                self._snat_redirect_add(ri, gateway[\u0027fixed_ips\u0027][0]"},{"line_number":919,"context_line":"                                        [\u0027ip_address\u0027], p, id_name)"},{"line_number":920,"context_line":""},{"line_number":921,"context_line":"            if self.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027 and ("}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_15a9837b","line":918,"updated":"2014-07-08 15:01:56.000000000","message":"After looking at _map_internal_interfaces, gateway[\u0027fixed_ips\u0027] can potentially be None. Would we need to test if gateway is None first?\n\nAlso, from _map_internal_interfaces docstring I understand that the returned value is not supposed to be a list.","commit_id":"f0d2a9ce8bf606b895874a541a806194ac03d568"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f1da47508a62f02783c89d38c3ca8b64f21f447b","unresolved":false,"context_lines":[{"line_number":1110,"context_line":"                                     internal_cidr, mac_address,"},{"line_number":1111,"context_line":"                                     interface_name, INTERNAL_DEV_PREFIX)"},{"line_number":1112,"context_line":""},{"line_number":1113,"context_line":"        if ri.router[\u0027distributed\u0027] and ri.ex_gw_port:"},{"line_number":1114,"context_line":"            ex_gw_port \u003d ri.ex_gw_port"},{"line_number":1115,"context_line":"            snat_ports \u003d self.get_snat_interfaces(ri)"},{"line_number":1116,"context_line":"            snat_ip \u003d self._map_internal_interfaces(ri, port, snat_ports)"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_58e347d8","line":1113,"updated":"2014-07-08 04:36:27.000000000","message":"I found a problem here.  ri.ex_gw_port is not the current gw port.  \nOr, use \u0027ex_gw_port \u003d self._get_ex_gw_port(ri)\u0027 just before this line.","commit_id":"f0d2a9ce8bf606b895874a541a806194ac03d568"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f1da47508a62f02783c89d38c3ca8b64f21f447b","unresolved":false,"context_lines":[{"line_number":1111,"context_line":"                                     interface_name, INTERNAL_DEV_PREFIX)"},{"line_number":1112,"context_line":""},{"line_number":1113,"context_line":"        if ri.router[\u0027distributed\u0027] and ri.ex_gw_port:"},{"line_number":1114,"context_line":"            ex_gw_port \u003d ri.ex_gw_port"},{"line_number":1115,"context_line":"            snat_ports \u003d self.get_snat_interfaces(ri)"},{"line_number":1116,"context_line":"            snat_ip \u003d self._map_internal_interfaces(ri, port, snat_ports)"},{"line_number":1117,"context_line":"            self._snat_redirect_add(ri, snat_ip[\u0027fixed_ips\u0027][0]"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_b8d38302","line":1114,"updated":"2014-07-08 04:36:27.000000000","message":"Remove this line.","commit_id":"f0d2a9ce8bf606b895874a541a806194ac03d568"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"fd827f1e053302de71d554f4f398094b5f8d9095","unresolved":false,"context_lines":[{"line_number":1316,"context_line":"        ri \u003d self.router_info.get(router_id)"},{"line_number":1317,"context_line":"        self._update_arp_entry(ri, ip, mac, subnet_id, \u0027add\u0027)"},{"line_number":1318,"context_line":""},{"line_number":1319,"context_line":"    def delete_arp_entry(self, context, payload):"},{"line_number":1320,"context_line":"        \"\"\"Deletes arp entry into router namespace from RPC.\"\"\""},{"line_number":1321,"context_line":"        arp_table \u003d payload[\u0027arp_table\u0027]"},{"line_number":1322,"context_line":"        router_id \u003d payload[\u0027router_id\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_4e5d2cec","line":1319,"updated":"2014-07-08 16:22:21.000000000","message":"it looks like there\u0027s a naming mismatch here. This should be called del_arp_entry","commit_id":"f0d2a9ce8bf606b895874a541a806194ac03d568"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7b878e0ab65c9d2270ba8f55e1d73b7cb383c1e0","unresolved":false,"context_lines":[{"line_number":1096,"context_line":"                                     internal_cidr, mac_address,"},{"line_number":1097,"context_line":"                                     interface_name, INTERNAL_DEV_PREFIX)"},{"line_number":1098,"context_line":""},{"line_number":1099,"context_line":"        ex_gw_port \u003d self._get_ex_gw_port(ri)"},{"line_number":1100,"context_line":"        if ri.router[\u0027distributed\u0027] and ex_gw_port:"},{"line_number":1101,"context_line":"            snat_ports \u003d self.get_snat_interfaces(ri)"},{"line_number":1102,"context_line":"            snat_ip \u003d self._map_internal_interfaces(ri, port, snat_ports)"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_fa404137","line":1099,"updated":"2014-07-10 04:46:13.000000000","message":"Changing this from ri.ex_gw_port to this has caused a UT failure.  I\u0027ll look in to it.","commit_id":"de68c9bbdd4d92771ddc0c958446e4bfc6a13c98"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7b81918da1d668c193b7684bae322d075e2dd550","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            It is now a list of router IDs only."},{"line_number":195,"context_line":"            Per rpc versioning rules,  it is backwards compatible."},{"line_number":196,"context_line":"    \"\"\""},{"line_number":197,"context_line":"    RPC_API_VERSION \u003d \u00271.1\u0027"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    OPTS \u003d ["},{"line_number":200,"context_line":"        cfg.StrOpt(\u0027agent_mode\u0027, default\u003d\u0027legacy\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_32f827e5","line":197,"updated":"2014-07-09 19:47:37.000000000","message":"bump this to 1.2 (don\u0027t forget about the history)","commit_id":"96b40e51000a1f41b8be64a82ba00728d26a539d"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"aa5dd82abf0f0d73ffe1937167c690d0878bf2d3","unresolved":false,"context_lines":[{"line_number":51,"context_line":"EXTERNAL_DEV_PREFIX \u003d \u0027qg-\u0027"},{"line_number":52,"context_line":"SNAT_INT_DEV_PREFIX \u003d \u0027sg-\u0027"},{"line_number":53,"context_line":"FIP_NS_PREFIX \u003d \u0027fip-\u0027"},{"line_number":54,"context_line":"SNAT_NS_PREFIX \u003d \u0027snat-\u0027"},{"line_number":55,"context_line":"FIP_2_RTR_DEV_PREFIX \u003d \u0027fpr-\u0027"},{"line_number":56,"context_line":"RTR_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":57,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_bc206df8","line":54,"updated":"2014-07-10 14:56:36.000000000","message":"Keeping with the naming convention of the other neutron related namespaces (qdhcp, qrouter, qlbaas), fip- should be \"qfip-\" and \"snat\" should be \"qsnat-\".","commit_id":"f3fff1b767b977f3f339197a7738b7915eb6eb74"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c13ae81bf7fdb186e8cc63c1981e971da2c6c090","unresolved":false,"context_lines":[{"line_number":51,"context_line":"EXTERNAL_DEV_PREFIX \u003d \u0027qg-\u0027"},{"line_number":52,"context_line":"SNAT_INT_DEV_PREFIX \u003d \u0027sg-\u0027"},{"line_number":53,"context_line":"FIP_NS_PREFIX \u003d \u0027fip-\u0027"},{"line_number":54,"context_line":"SNAT_NS_PREFIX \u003d \u0027snat-\u0027"},{"line_number":55,"context_line":"FIP_2_RTR_DEV_PREFIX \u003d \u0027fpr-\u0027"},{"line_number":56,"context_line":"RTR_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":57,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_c2c45a42","line":54,"in_reply_to":"baada198_bc206df8","updated":"2014-07-10 15:30:19.000000000","message":"the q is left there for \u0027legacy\u0027 reasons, not sure whether we would want to stick to the old convention, but I don\u0027t have a strong opinion either way. Admin can educate themselves over time...","commit_id":"f3fff1b767b977f3f339197a7738b7915eb6eb74"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"acf9cadeb71d09d98661327e12f84d8c5d59f3e6","unresolved":false,"context_lines":[{"line_number":51,"context_line":"EXTERNAL_DEV_PREFIX \u003d \u0027qg-\u0027"},{"line_number":52,"context_line":"SNAT_INT_DEV_PREFIX \u003d \u0027sg-\u0027"},{"line_number":53,"context_line":"FIP_NS_PREFIX \u003d \u0027fip-\u0027"},{"line_number":54,"context_line":"SNAT_NS_PREFIX \u003d \u0027snat-\u0027"},{"line_number":55,"context_line":"FIP_2_RTR_DEV_PREFIX \u003d \u0027fpr-\u0027"},{"line_number":56,"context_line":"RTR_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":57,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_9cc47e41","line":54,"in_reply_to":"baada198_c2c45a42","updated":"2014-07-10 18:45:15.000000000","message":"Good point, Stephen.  But, I think I\u0027d prefer to keep it the way it is.","commit_id":"f3fff1b767b977f3f339197a7738b7915eb6eb74"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"01f4dd0682b9aeceadfbc613385c256fce085bdd","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            It is now a list of router IDs only."},{"line_number":195,"context_line":"            Per rpc versioning rules,  it is backwards compatible."},{"line_number":196,"context_line":"    \"\"\""},{"line_number":197,"context_line":"    RPC_API_VERSION \u003d \u00271.1\u0027"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    OPTS \u003d ["},{"line_number":200,"context_line":"        cfg.StrOpt(\u0027agent_mode\u0027, default\u003d\u0027legacy\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_76398c40","line":197,"updated":"2014-07-10 16:47:20.000000000","message":"RPC_API_VERSION should be \u00271.2\u0027.","commit_id":"f3fff1b767b977f3f339197a7738b7915eb6eb74"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"6aaa3ecc70fc08b8e6b5d448bb50982d8a45d011","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            It is now a list of router IDs only."},{"line_number":195,"context_line":"            Per rpc versioning rules,  it is backwards compatible."},{"line_number":196,"context_line":"    \"\"\""},{"line_number":197,"context_line":"    RPC_API_VERSION \u003d \u00271.1\u0027"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    OPTS \u003d ["},{"line_number":200,"context_line":"        cfg.StrOpt(\u0027agent_mode\u0027, default\u003d\u0027legacy\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_06649f47","line":197,"in_reply_to":"baada198_46869714","updated":"2014-07-10 20:27:18.000000000","message":"actually you\u0027re right. It looks like this still hasn\u0027t been addressed. See comment on:\n\nhttps://review.openstack.org/#/c/89413/13/neutron/agent/l3_agent.py","commit_id":"f3fff1b767b977f3f339197a7738b7915eb6eb74"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"704d1fc34b62c7e8e4c196293f5d7a8c72fc7bb3","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            It is now a list of router IDs only."},{"line_number":195,"context_line":"            Per rpc versioning rules,  it is backwards compatible."},{"line_number":196,"context_line":"    \"\"\""},{"line_number":197,"context_line":"    RPC_API_VERSION \u003d \u00271.1\u0027"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    OPTS \u003d ["},{"line_number":200,"context_line":"        cfg.StrOpt(\u0027agent_mode\u0027, default\u003d\u0027legacy\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_46869714","line":197,"in_reply_to":"baada198_76398c40","updated":"2014-07-10 18:00:42.000000000","message":"see bug fix: https://review.openstack.org/#/c/105517","commit_id":"f3fff1b767b977f3f339197a7738b7915eb6eb74"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"880bd74bde6bf554d0348d82e95940a23201fe3a","unresolved":false,"context_lines":[{"line_number":999,"context_line":""},{"line_number":1000,"context_line":"            if self.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027 and ("},{"line_number":1001,"context_line":"                ex_gw_port[\u0027binding:host_id\u0027] \u003d\u003d self.host):"},{"line_number":1002,"context_line":"                ns_name \u003d self.get_snat_ns_name(ex_gw_port[\u0027id\u0027])"},{"line_number":1003,"context_line":"            else:"},{"line_number":1004,"context_line":"                # not hosting agent - no work to do"},{"line_number":1005,"context_line":"                LOG.debug(\u0027DVR: CSNAT not hosted: %s\u0027, ex_gw_port)"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_e4521534","line":1002,"updated":"2014-07-11 19:58:00.000000000","message":"Can the SNAT namespaces be named snat-\u003crouter-id\u003e instead of the snat-\u003cext-gw-port-id\u003e? \n\nThere will be a need to cleanup after stale snat namespaces after a L3-agent restart. Stale router namespaces are being cleaned up after a restart today. A step in the calculating the stale router namespace is finding the router-ids of routers supposed to be hosted on the node. With the SNAT namespace named with the router-id means there is no need to do extra DB query to get the ext-gw-port-ids.\n\nAlso it will make debugging customer VM problem easier because once we have the router-id we know the NS names of the qrouter- and the snat- namespaces.\n\nI think there can only be 1 ext-gw-port per router.","commit_id":"6b8e9a16bb3658ee3ff3c00610493e9c70d27fae"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3bef64916dd3e4df4086062578b55de5298f20be","unresolved":false,"context_lines":[{"line_number":999,"context_line":""},{"line_number":1000,"context_line":"            if self.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027 and ("},{"line_number":1001,"context_line":"                ex_gw_port[\u0027binding:host_id\u0027] \u003d\u003d self.host):"},{"line_number":1002,"context_line":"                ns_name \u003d self.get_snat_ns_name(ex_gw_port[\u0027id\u0027])"},{"line_number":1003,"context_line":"            else:"},{"line_number":1004,"context_line":"                # not hosting agent - no work to do"},{"line_number":1005,"context_line":"                LOG.debug(\u0027DVR: CSNAT not hosted: %s\u0027, ex_gw_port)"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_e242d066","line":1002,"in_reply_to":"baada198_2bcf782a","updated":"2014-07-14 16:39:49.000000000","message":"I double checked with Michael today.  snat-\u003cext-gw-port-id\u003e was a hold-over from when there were plans to use a snat namespace to support multiple routers.  We discussed and agreed that the benefits that Stephen highlights here are more important than the possibility of one day doing that sort of thing.\n\nI\u0027ll post a new patch to fix this up as soon as I can confirm it is working correctly.","commit_id":"6b8e9a16bb3658ee3ff3c00610493e9c70d27fae"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8251c52f9d3a0ddb5409f7026949fe6d5528fd5b","unresolved":false,"context_lines":[{"line_number":999,"context_line":""},{"line_number":1000,"context_line":"            if self.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027 and ("},{"line_number":1001,"context_line":"                ex_gw_port[\u0027binding:host_id\u0027] \u003d\u003d self.host):"},{"line_number":1002,"context_line":"                ns_name \u003d self.get_snat_ns_name(ex_gw_port[\u0027id\u0027])"},{"line_number":1003,"context_line":"            else:"},{"line_number":1004,"context_line":"                # not hosting agent - no work to do"},{"line_number":1005,"context_line":"                LOG.debug(\u0027DVR: CSNAT not hosted: %s\u0027, ex_gw_port)"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_2bcf782a","line":1002,"in_reply_to":"baada198_e4521534","updated":"2014-07-11 20:29:25.000000000","message":"Stephen, I have a placeholder for cleaning up the namespace cleanup story.\n\nI agree that snat should use the router id.  I\u0027ll see what I can do.","commit_id":"6b8e9a16bb3658ee3ff3c00610493e9c70d27fae"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"880bd74bde6bf554d0348d82e95940a23201fe3a","unresolved":false,"context_lines":[{"line_number":1114,"context_line":"                for port in snat_ports:"},{"line_number":1115,"context_line":"                    self._set_subnet_info(port)"},{"line_number":1116,"context_line":"                    interface_name \u003d self.get_snat_int_device_name(port[\u0027id\u0027])"},{"line_number":1117,"context_line":"                    ns_name \u003d self.get_snat_ns_name(ex_gw_port[\u0027id\u0027])"},{"line_number":1118,"context_line":"                    self._internal_network_added(ns_name, port[\u0027network_id\u0027],"},{"line_number":1119,"context_line":"                                                 port[\u0027id\u0027], internal_cidr,"},{"line_number":1120,"context_line":"                                                 port[\u0027mac_address\u0027],"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_b71a0d6d","line":1117,"updated":"2014-07-11 19:58:00.000000000","message":"This line can be moved to before the start of the for-loop (line 1114).  ex_gw_port is a key in ri, not port.","commit_id":"6b8e9a16bb3658ee3ff3c00610493e9c70d27fae"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8251c52f9d3a0ddb5409f7026949fe6d5528fd5b","unresolved":false,"context_lines":[{"line_number":1114,"context_line":"                for port in snat_ports:"},{"line_number":1115,"context_line":"                    self._set_subnet_info(port)"},{"line_number":1116,"context_line":"                    interface_name \u003d self.get_snat_int_device_name(port[\u0027id\u0027])"},{"line_number":1117,"context_line":"                    ns_name \u003d self.get_snat_ns_name(ex_gw_port[\u0027id\u0027])"},{"line_number":1118,"context_line":"                    self._internal_network_added(ns_name, port[\u0027network_id\u0027],"},{"line_number":1119,"context_line":"                                                 port[\u0027id\u0027], internal_cidr,"},{"line_number":1120,"context_line":"                                                 port[\u0027mac_address\u0027],"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_ebef4085","line":1117,"in_reply_to":"baada198_b71a0d6d","updated":"2014-07-11 20:29:25.000000000","message":"Done","commit_id":"6b8e9a16bb3658ee3ff3c00610493e9c70d27fae"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4433968dd411cfb301c0583c44b0bbdb43ad06de","unresolved":false,"context_lines":[{"line_number":1126,"context_line":"        interface_name \u003d self.get_internal_device_name(port_id)"},{"line_number":1127,"context_line":"        if ri.router[\u0027distributed\u0027] and ri.ex_gw_port:"},{"line_number":1128,"context_line":"            # DVR handling code for SNAT"},{"line_number":1129,"context_line":"            ex_gw_port \u003d ri.ex_gw_port"},{"line_number":1130,"context_line":"            self._snat_redirect_remove(ri, port, interface_name)"},{"line_number":1131,"context_line":"            if self.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027 and ("},{"line_number":1132,"context_line":"                ri.ex_gw_port[\u0027binding:host_id\u0027] \u003d\u003d self.host):"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_2946687b","line":1129,"updated":"2014-07-14 20:01:43.000000000","message":"Unused variable.  Caught by pep8 on Jenkins but doesn\u0027t show up locally when I run pep8.","commit_id":"8062a3a0c3630c4ded59342eca06ff366da475df"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":52,"context_line":"SNAT_INT_DEV_PREFIX \u003d \u0027sg-\u0027"},{"line_number":53,"context_line":"FIP_NS_PREFIX \u003d \u0027fip-\u0027"},{"line_number":54,"context_line":"SNAT_NS_PREFIX \u003d \u0027snat-\u0027"},{"line_number":55,"context_line":"FIP_2_RTR_DEV_PREFIX \u003d \u0027fpr-\u0027"},{"line_number":56,"context_line":"RTR_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":57,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"},{"line_number":58,"context_line":"FIP_LL_PREFIX \u003d \u0027169.254.30.\u0027"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_0d1b41cb","line":55,"updated":"2014-07-15 19:01:06.000000000","message":"In Neutron code, xxx_2_yyy style naming is not used so far. How about FIP_TO_ROUTER_PREFIX?\n\n\"RTR\" is not obvious to me, but it seems okay because it is already used in some code (though I prefer to ROUTER).","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8be176ad8aadaab7cd27af6ea2e9219e6d6b2fd7","unresolved":false,"context_lines":[{"line_number":52,"context_line":"SNAT_INT_DEV_PREFIX \u003d \u0027sg-\u0027"},{"line_number":53,"context_line":"FIP_NS_PREFIX \u003d \u0027fip-\u0027"},{"line_number":54,"context_line":"SNAT_NS_PREFIX \u003d \u0027snat-\u0027"},{"line_number":55,"context_line":"FIP_2_RTR_DEV_PREFIX \u003d \u0027fpr-\u0027"},{"line_number":56,"context_line":"RTR_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":57,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"},{"line_number":58,"context_line":"FIP_LL_PREFIX \u003d \u0027169.254.30.\u0027"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_b33e2fd9","line":55,"in_reply_to":"baada198_0d1b41cb","updated":"2014-07-15 21:31:32.000000000","message":"Agreed.  I think that will be easier on the readers\u0027 eyes.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":59,"context_line":"# Route Table index for FIPs"},{"line_number":60,"context_line":"FIP_RT_TBL \u003d 16"},{"line_number":61,"context_line":"# Rule priority range for FIPs"},{"line_number":62,"context_line":"FIP_PR_ST \u003d 32768"},{"line_number":63,"context_line":"FIP_PR_END \u003d FIP_PR_ST + 40000"},{"line_number":64,"context_line":"RPC_LOOP_INTERVAL \u003d 1"},{"line_number":65,"context_line":"FLOATING_IP_CIDR_SUFFIX \u003d \u0027/32\u0027"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_ecb6133e","line":62,"updated":"2014-07-15 19:01:06.000000000","message":"\"ST\" is not a clear var name. I prefer to START.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8be176ad8aadaab7cd27af6ea2e9219e6d6b2fd7","unresolved":false,"context_lines":[{"line_number":59,"context_line":"# Route Table index for FIPs"},{"line_number":60,"context_line":"FIP_RT_TBL \u003d 16"},{"line_number":61,"context_line":"# Rule priority range for FIPs"},{"line_number":62,"context_line":"FIP_PR_ST \u003d 32768"},{"line_number":63,"context_line":"FIP_PR_END \u003d FIP_PR_ST + 40000"},{"line_number":64,"context_line":"RPC_LOOP_INTERVAL \u003d 1"},{"line_number":65,"context_line":"FLOATING_IP_CIDR_SUFFIX \u003d \u0027/32\u0027"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_f3cb4748","line":62,"in_reply_to":"baada198_ecb6133e","updated":"2014-07-15 21:31:32.000000000","message":"Done","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4db17805ae62f0c1cc845662303c5af1647fe8db","unresolved":false,"context_lines":[{"line_number":59,"context_line":"# Route Table index for FIPs"},{"line_number":60,"context_line":"FIP_RT_TBL \u003d 16"},{"line_number":61,"context_line":"# Rule priority range for FIPs"},{"line_number":62,"context_line":"FIP_PR_ST \u003d 32768"},{"line_number":63,"context_line":"FIP_PR_END \u003d FIP_PR_ST + 40000"},{"line_number":64,"context_line":"RPC_LOOP_INTERVAL \u003d 1"},{"line_number":65,"context_line":"FLOATING_IP_CIDR_SUFFIX \u003d \u0027/32\u0027"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_a42347a6","line":62,"in_reply_to":"baada198_f3cb4748","updated":"2014-07-15 22:33:17.000000000","message":"Some of the changes where I marked Done are not applied until PS 22.  Keep that in mind.  I meant to address them here but I messed up and lost them.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    \"\"\""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    BASE_RPC_API_VERSION \u003d \u00271.2\u0027"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def __init__(self, topic, host):"},{"line_number":84,"context_line":"        super(L3PluginApi, self).__init__("}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_2772e4b0","line":81,"updated":"2014-07-15 19:01:06.000000000","message":"We should keep BASE_RPC_API_VERSION\u003d1.0. If we change BASE_RPC_API_VERSION, the versions of all RPC calls including existing calls will be changed. It affects monolithic plugins with router support.\n\nInstead, please specify version\u003d1.2 for new/updated calls. update_floatingip_statuses below is a good example.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ced2587adc02aed0ea17508a37136cd10a8492cd","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    \"\"\""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    BASE_RPC_API_VERSION \u003d \u00271.2\u0027"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def __init__(self, topic, host):"},{"line_number":84,"context_line":"        super(L3PluginApi, self).__init__("}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_29463250","line":81,"in_reply_to":"baada198_2772e4b0","updated":"2014-07-15 22:02:41.000000000","message":"Done","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                          \"Use \u0027legacy\u0027 for existing deployments without \""},{"line_number":210,"context_line":"                          \"DVR; \u0027dvr\u0027 for L3 agents running on compute hosts; \""},{"line_number":211,"context_line":"                          \"\u0027dvr_snat\u0027 for L3 agents running on dedicated \""},{"line_number":212,"context_line":"                          \"network nodes\")),"},{"line_number":213,"context_line":"        cfg.StrOpt(\u0027external_network_bridge\u0027, default\u003d\u0027br-ex\u0027,"},{"line_number":214,"context_line":"                   help\u003d_(\"Name of bridge used for external network \""},{"line_number":215,"context_line":"                          \"traffic.\")),"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_41a428b9","line":212,"updated":"2014-07-15 19:01:06.000000000","message":"The sample l3_agent.ini has more detail description of this option. Now the configuration guide is generated from the code, so it is better the help string here has a detail description.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"94aa9053135087558fb7df6ec2063769027d6b08","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                          \"Use \u0027legacy\u0027 for existing deployments without \""},{"line_number":210,"context_line":"                          \"DVR; \u0027dvr\u0027 for L3 agents running on compute hosts; \""},{"line_number":211,"context_line":"                          \"\u0027dvr_snat\u0027 for L3 agents running on dedicated \""},{"line_number":212,"context_line":"                          \"network nodes\")),"},{"line_number":213,"context_line":"        cfg.StrOpt(\u0027external_network_bridge\u0027, default\u003d\u0027br-ex\u0027,"},{"line_number":214,"context_line":"                   help\u003d_(\"Name of bridge used for external network \""},{"line_number":215,"context_line":"                          \"traffic.\")),"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_29b9d215","line":212,"in_reply_to":"baada198_41a428b9","updated":"2014-07-15 22:44:05.000000000","message":"Agreed","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        # dvr data"},{"line_number":275,"context_line":"        self.agent_gateway_port \u003d None"},{"line_number":276,"context_line":"        self.agent_fip_count \u003d 0"},{"line_number":277,"context_line":"        self.local_ips \u003d set(xrange(2, 251))"},{"line_number":278,"context_line":"        self.fip_priorities \u003d set(xrange(FIP_PR_ST, FIP_PR_END))"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        self.rpc_loop \u003d loopingcall.FixedIntervalLoopingCall("}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_87cd70ba","line":277,"updated":"2014-07-15 19:01:06.000000000","message":"xrange does not exist in python3. \"range\" is recommended here instead. An array generated by range(2, 251) is not big and it is only called once, so there is no performance impact.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8be176ad8aadaab7cd27af6ea2e9219e6d6b2fd7","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        # dvr data"},{"line_number":275,"context_line":"        self.agent_gateway_port \u003d None"},{"line_number":276,"context_line":"        self.agent_fip_count \u003d 0"},{"line_number":277,"context_line":"        self.local_ips \u003d set(xrange(2, 251))"},{"line_number":278,"context_line":"        self.fip_priorities \u003d set(xrange(FIP_PR_ST, FIP_PR_END))"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        self.rpc_loop \u003d loopingcall.FixedIntervalLoopingCall("}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_f31a6717","line":277,"in_reply_to":"baada198_87cd70ba","updated":"2014-07-15 21:31:32.000000000","message":"Done","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        self.agent_gateway_port \u003d None"},{"line_number":276,"context_line":"        self.agent_fip_count \u003d 0"},{"line_number":277,"context_line":"        self.local_ips \u003d set(xrange(2, 251))"},{"line_number":278,"context_line":"        self.fip_priorities \u003d set(xrange(FIP_PR_ST, FIP_PR_END))"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        self.rpc_loop \u003d loopingcall.FixedIntervalLoopingCall("},{"line_number":281,"context_line":"            self._rpc_loop)"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_c7be8800","line":278,"updated":"2014-07-15 19:01:06.000000000","message":"Same as the above.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8be176ad8aadaab7cd27af6ea2e9219e6d6b2fd7","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        self.agent_gateway_port \u003d None"},{"line_number":276,"context_line":"        self.agent_fip_count \u003d 0"},{"line_number":277,"context_line":"        self.local_ips \u003d set(xrange(2, 251))"},{"line_number":278,"context_line":"        self.fip_priorities \u003d set(xrange(FIP_PR_ST, FIP_PR_END))"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        self.rpc_loop \u003d loopingcall.FixedIntervalLoopingCall("},{"line_number":281,"context_line":"            self._rpc_loop)"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_53d1532e","line":278,"in_reply_to":"baada198_c7be8800","updated":"2014-07-15 21:31:32.000000000","message":"Done","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":348,"context_line":"            self._destroy_fip_namespace(ns)"},{"line_number":349,"context_line":"        elif ns.startswith(SNAT_NS_PREFIX):"},{"line_number":350,"context_line":"            self._destroy_snat_namespace(ns)"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"    def _destroy_snat_namespace(self, ns_name):"},{"line_number":353,"context_line":"        ns_ip \u003d ip_lib.IPWrapper(self.root_helper, namespace\u003dns_name)"},{"line_number":354,"context_line":"        # delete internal interfaces"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_a7c7d445","line":351,"updated":"2014-07-15 19:01:06.000000000","message":"All three _destroy_xxxx_namespace below have very similar pattern. It is better to prepare a common method.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8be176ad8aadaab7cd27af6ea2e9219e6d6b2fd7","unresolved":false,"context_lines":[{"line_number":348,"context_line":"            self._destroy_fip_namespace(ns)"},{"line_number":349,"context_line":"        elif ns.startswith(SNAT_NS_PREFIX):"},{"line_number":350,"context_line":"            self._destroy_snat_namespace(ns)"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"    def _destroy_snat_namespace(self, ns_name):"},{"line_number":353,"context_line":"        ns_ip \u003d ip_lib.IPWrapper(self.root_helper, namespace\u003dns_name)"},{"line_number":354,"context_line":"        # delete internal interfaces"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_f36c27a0","line":351,"in_reply_to":"baada198_a7c7d445","updated":"2014-07-15 21:31:32.000000000","message":"I will follow up with a refactor when I clean up more of this in https://review.openstack.org/#/c/106153/.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":349,"context_line":"        elif ns.startswith(SNAT_NS_PREFIX):"},{"line_number":350,"context_line":"            self._destroy_snat_namespace(ns)"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"    def _destroy_snat_namespace(self, ns_name):"},{"line_number":353,"context_line":"        ns_ip \u003d ip_lib.IPWrapper(self.root_helper, namespace\u003dns_name)"},{"line_number":354,"context_line":"        # delete internal interfaces"},{"line_number":355,"context_line":"        for d in ns_ip.get_devices(exclude_loopback\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_8738103f","line":352,"updated":"2014-07-15 19:01:06.000000000","message":"To pass netns name, we use three names: ns (L.342), ns_name (here and L.365) and namespace (L.365). It is better to be consistent.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8be176ad8aadaab7cd27af6ea2e9219e6d6b2fd7","unresolved":false,"context_lines":[{"line_number":349,"context_line":"        elif ns.startswith(SNAT_NS_PREFIX):"},{"line_number":350,"context_line":"            self._destroy_snat_namespace(ns)"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"    def _destroy_snat_namespace(self, ns_name):"},{"line_number":353,"context_line":"        ns_ip \u003d ip_lib.IPWrapper(self.root_helper, namespace\u003dns_name)"},{"line_number":354,"context_line":"        # delete internal interfaces"},{"line_number":355,"context_line":"        for d in ns_ip.get_devices(exclude_loopback\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_b3cd4fba","line":352,"in_reply_to":"baada198_8738103f","updated":"2014-07-15 21:31:32.000000000","message":"I will follow this up in my refactor mentioned above.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":360,"context_line":""},{"line_number":361,"context_line":"        # TODO(mrsmith): delete ext-gw-port"},{"line_number":362,"context_line":"        LOG.debug(\u0027DVR: destroy snat ns: %s\u0027, ns_name)"},{"line_number":363,"context_line":"        ns_ip.netns.delete(ns_name)"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"    def _destroy_fip_namespace(self, ns_name):"},{"line_number":366,"context_line":"        ns_ip \u003d ip_lib.IPWrapper(self.root_helper, namespace\u003dns_name)"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_278d842b","line":363,"updated":"2014-07-15 19:01:06.000000000","message":"It is better to wrap this with try/except as _destroy_router_namespace does (around L.399).","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8be176ad8aadaab7cd27af6ea2e9219e6d6b2fd7","unresolved":false,"context_lines":[{"line_number":360,"context_line":""},{"line_number":361,"context_line":"        # TODO(mrsmith): delete ext-gw-port"},{"line_number":362,"context_line":"        LOG.debug(\u0027DVR: destroy snat ns: %s\u0027, ns_name)"},{"line_number":363,"context_line":"        ns_ip.netns.delete(ns_name)"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"    def _destroy_fip_namespace(self, ns_name):"},{"line_number":366,"context_line":"        ns_ip \u003d ip_lib.IPWrapper(self.root_helper, namespace\u003dns_name)"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_587c12ec","line":363,"in_reply_to":"baada198_278d842b","updated":"2014-07-15 21:31:32.000000000","message":"Done\n\nI had done this in a follow on patch but it is better here.\n\nI will follow up with a more comprehensive refactor of this code in https://review.openstack.org/#/c/106153/.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":405,"context_line":"    def _create_namespace(self, name):"},{"line_number":406,"context_line":"        ip_wrapper_root \u003d ip_lib.IPWrapper(self.root_helper)"},{"line_number":407,"context_line":"        ip_wrapper \u003d ip_wrapper_root.ensure_namespace(name)"},{"line_number":408,"context_line":"        LOG.debug(\u0027DVR: ns-name: %s\u0027, name)"},{"line_number":409,"context_line":"        ip_wrapper.netns.execute([\u0027sysctl\u0027, \u0027-w\u0027, \u0027net.ipv4.ip_forward\u003d1\u0027])"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"    def _create_router_namespace(self, ri):"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_4715189a","line":408,"updated":"2014-07-15 19:01:06.000000000","message":"I think this method is not specific to DVR.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8be176ad8aadaab7cd27af6ea2e9219e6d6b2fd7","unresolved":false,"context_lines":[{"line_number":405,"context_line":"    def _create_namespace(self, name):"},{"line_number":406,"context_line":"        ip_wrapper_root \u003d ip_lib.IPWrapper(self.root_helper)"},{"line_number":407,"context_line":"        ip_wrapper \u003d ip_wrapper_root.ensure_namespace(name)"},{"line_number":408,"context_line":"        LOG.debug(\u0027DVR: ns-name: %s\u0027, name)"},{"line_number":409,"context_line":"        ip_wrapper.netns.execute([\u0027sysctl\u0027, \u0027-w\u0027, \u0027net.ipv4.ip_forward\u003d1\u0027])"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"    def _create_router_namespace(self, ri):"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_98014a6d","line":408,"in_reply_to":"baada198_4715189a","updated":"2014-07-15 21:31:32.000000000","message":"Done","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":849,"context_line":"        return (FIP_2_RTR_DEV_PREFIX + router_id)[:self.driver.DEV_NAME_LEN]"},{"line_number":850,"context_line":""},{"line_number":851,"context_line":"    def get_snat_int_device_name(self, port_id):"},{"line_number":852,"context_line":"        return (SNAT_INT_DEV_PREFIX + port_id)[:self.driver.DEV_NAME_LEN]"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"    def get_fip_ns_name(self, ext_net_id):"},{"line_number":855,"context_line":"        return (FIP_NS_PREFIX + ext_net_id)"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_b279d032","line":852,"updated":"2014-07-15 19:01:06.000000000","message":"Hmmm... too many similar pattern. How about defining a common method?\n\n  def _get_device_name(self, name):\n      return name[:self.driver.DEV_NAME_LEN]\n\n  def get_snat_int_device_name(self, port_id):\n      return self._get_device_name(SNAT_INT_DEV_PREFIX + port_id)","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8be176ad8aadaab7cd27af6ea2e9219e6d6b2fd7","unresolved":false,"context_lines":[{"line_number":849,"context_line":"        return (FIP_2_RTR_DEV_PREFIX + router_id)[:self.driver.DEV_NAME_LEN]"},{"line_number":850,"context_line":""},{"line_number":851,"context_line":"    def get_snat_int_device_name(self, port_id):"},{"line_number":852,"context_line":"        return (SNAT_INT_DEV_PREFIX + port_id)[:self.driver.DEV_NAME_LEN]"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"    def get_fip_ns_name(self, ext_net_id):"},{"line_number":855,"context_line":"        return (FIP_NS_PREFIX + ext_net_id)"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_ae0c083d","line":852,"in_reply_to":"baada198_b279d032","updated":"2014-07-15 21:31:32.000000000","message":"In this case, I think the extra redirection adds little value.  Can we leave it for now?","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":861,"context_line":"        return ri.router.get(l3_constants.SNAT_ROUTER_INTF_KEY, [])"},{"line_number":862,"context_line":""},{"line_number":863,"context_line":"    def get_floating_ips(self, ri):"},{"line_number":864,"context_line":"        \"\"\"Filters Floating IPs for DVR to be hosted on this agent.\"\"\""},{"line_number":865,"context_line":"        floating_ips \u003d ri.router.get(l3_constants.FLOATINGIP_KEY, [])"},{"line_number":866,"context_line":"        if ri.router[\u0027distributed\u0027]:"},{"line_number":867,"context_line":"            floating_ips \u003d [i for i in floating_ips if i[\u0027host\u0027] \u003d\u003d self.host]"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_d26c84a0","line":864,"updated":"2014-07-15 19:01:06.000000000","message":"The method is not specific to DVR. The docstring needs to be updated.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8be176ad8aadaab7cd27af6ea2e9219e6d6b2fd7","unresolved":false,"context_lines":[{"line_number":861,"context_line":"        return ri.router.get(l3_constants.SNAT_ROUTER_INTF_KEY, [])"},{"line_number":862,"context_line":""},{"line_number":863,"context_line":"    def get_floating_ips(self, ri):"},{"line_number":864,"context_line":"        \"\"\"Filters Floating IPs for DVR to be hosted on this agent.\"\"\""},{"line_number":865,"context_line":"        floating_ips \u003d ri.router.get(l3_constants.FLOATINGIP_KEY, [])"},{"line_number":866,"context_line":"        if ri.router[\u0027distributed\u0027]:"},{"line_number":867,"context_line":"            floating_ips \u003d [i for i in floating_ips if i[\u0027host\u0027] \u003d\u003d self.host]"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_78e556db","line":864,"in_reply_to":"baada198_d26c84a0","updated":"2014-07-15 21:31:32.000000000","message":"Done","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":864,"context_line":"        \"\"\"Filters Floating IPs for DVR to be hosted on this agent.\"\"\""},{"line_number":865,"context_line":"        floating_ips \u003d ri.router.get(l3_constants.FLOATINGIP_KEY, [])"},{"line_number":866,"context_line":"        if ri.router[\u0027distributed\u0027]:"},{"line_number":867,"context_line":"            floating_ips \u003d [i for i in floating_ips if i[\u0027host\u0027] \u003d\u003d self.host]"},{"line_number":868,"context_line":"        return floating_ips"},{"line_number":869,"context_line":""},{"line_number":870,"context_line":"    def _map_internal_interfaces(self, ri, int_port, snat_ports):"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_d21ac417","line":867,"updated":"2014-07-15 19:01:06.000000000","message":"Question: Does ri.router[FLOATINGIP_KEY] stores all floating IPs for the specific router (including FIPs not hosted by this agent)?","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8be176ad8aadaab7cd27af6ea2e9219e6d6b2fd7","unresolved":false,"context_lines":[{"line_number":864,"context_line":"        \"\"\"Filters Floating IPs for DVR to be hosted on this agent.\"\"\""},{"line_number":865,"context_line":"        floating_ips \u003d ri.router.get(l3_constants.FLOATINGIP_KEY, [])"},{"line_number":866,"context_line":"        if ri.router[\u0027distributed\u0027]:"},{"line_number":867,"context_line":"            floating_ips \u003d [i for i in floating_ips if i[\u0027host\u0027] \u003d\u003d self.host]"},{"line_number":868,"context_line":"        return floating_ips"},{"line_number":869,"context_line":""},{"line_number":870,"context_line":"    def _map_internal_interfaces(self, ri, int_port, snat_ports):"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_38dbde22","line":867,"in_reply_to":"baada198_d21ac417","updated":"2014-07-15 21:31:32.000000000","message":"Yes it does in its current form.  It would take some work to personalize the message from the API server.  I\u0027m not sure this would be right way to go.  If the message is generic then we could potentially optimize by sending one message to a broadcast group or something like that.  What do you think?","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":876,"context_line":"        if match_port:"},{"line_number":877,"context_line":"            return match_port[0]"},{"line_number":878,"context_line":"        else:"},{"line_number":879,"context_line":"            LOG.debug(\u0027DVR: no map match_port found!\u0027)"},{"line_number":880,"context_line":""},{"line_number":881,"context_line":"    def _create_dvr_gateway(self, ri, ex_gw_port, gw_interface_name,"},{"line_number":882,"context_line":"                            internal_cidrs, snat_ports):"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_b2ce305a","line":879,"updated":"2014-07-15 19:01:06.000000000","message":"Is it a usual case or an error?","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"94aa9053135087558fb7df6ec2063769027d6b08","unresolved":false,"context_lines":[{"line_number":876,"context_line":"        if match_port:"},{"line_number":877,"context_line":"            return match_port[0]"},{"line_number":878,"context_line":"        else:"},{"line_number":879,"context_line":"            LOG.debug(\u0027DVR: no map match_port found!\u0027)"},{"line_number":880,"context_line":""},{"line_number":881,"context_line":"    def _create_dvr_gateway(self, ri, ex_gw_port, gw_interface_name,"},{"line_number":882,"context_line":"                            internal_cidrs, snat_ports):"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_a9296239","line":879,"in_reply_to":"baada198_b2ce305a","updated":"2014-07-15 22:44:05.000000000","message":"I\u0027ll change it to LOG.error","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":906,"context_line":"        if ri.router[\u0027distributed\u0027]:"},{"line_number":907,"context_line":"            snat_ports \u003d self.get_snat_interfaces(ri)"},{"line_number":908,"context_line":"            for p in ri.internal_ports:"},{"line_number":909,"context_line":"                gateway \u003d self._map_internal_interfaces(ri, p, snat_ports)"},{"line_number":910,"context_line":"                id_name \u003d self.get_internal_device_name(p[\u0027id\u0027])"},{"line_number":911,"context_line":"                self._snat_redirect_add(ri, gateway[\u0027fixed_ips\u0027][0]"},{"line_number":912,"context_line":"                                        [\u0027ip_address\u0027], p, id_name)"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_b23c7032","line":909,"updated":"2014-07-15 19:01:06.000000000","message":"_map_internal_interfaces can return None. We need to deal with the case.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"94aa9053135087558fb7df6ec2063769027d6b08","unresolved":false,"context_lines":[{"line_number":906,"context_line":"        if ri.router[\u0027distributed\u0027]:"},{"line_number":907,"context_line":"            snat_ports \u003d self.get_snat_interfaces(ri)"},{"line_number":908,"context_line":"            for p in ri.internal_ports:"},{"line_number":909,"context_line":"                gateway \u003d self._map_internal_interfaces(ri, p, snat_ports)"},{"line_number":910,"context_line":"                id_name \u003d self.get_internal_device_name(p[\u0027id\u0027])"},{"line_number":911,"context_line":"                self._snat_redirect_add(ri, gateway[\u0027fixed_ips\u0027][0]"},{"line_number":912,"context_line":"                                        [\u0027ip_address\u0027], p, id_name)"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_49d1a62e","line":909,"in_reply_to":"baada198_b23c7032","updated":"2014-07-15 22:44:05.000000000","message":"I\u0027ll add code to handle None","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":1107,"context_line":"        if ri.router[\u0027distributed\u0027] and ex_gw_port:"},{"line_number":1108,"context_line":"            snat_ports \u003d self.get_snat_interfaces(ri)"},{"line_number":1109,"context_line":"            snat_ip \u003d self._map_internal_interfaces(ri, port, snat_ports)"},{"line_number":1110,"context_line":"            self._snat_redirect_add(ri, snat_ip[\u0027fixed_ips\u0027][0]"},{"line_number":1111,"context_line":"                                    [\u0027ip_address\u0027], port, interface_name)"},{"line_number":1112,"context_line":"            if self.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027 and ("},{"line_number":1113,"context_line":"                    ri.router[\u0027gw_port_host\u0027] \u003d\u003d self.host):"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_3277800a","line":1110,"updated":"2014-07-15 19:01:06.000000000","message":"_map_internal_interfaces can return None. We need to deal with the case.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"94aa9053135087558fb7df6ec2063769027d6b08","unresolved":false,"context_lines":[{"line_number":1107,"context_line":"        if ri.router[\u0027distributed\u0027] and ex_gw_port:"},{"line_number":1108,"context_line":"            snat_ports \u003d self.get_snat_interfaces(ri)"},{"line_number":1109,"context_line":"            snat_ip \u003d self._map_internal_interfaces(ri, port, snat_ports)"},{"line_number":1110,"context_line":"            self._snat_redirect_add(ri, snat_ip[\u0027fixed_ips\u0027][0]"},{"line_number":1111,"context_line":"                                    [\u0027ip_address\u0027], port, interface_name)"},{"line_number":1112,"context_line":"            if self.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027 and ("},{"line_number":1113,"context_line":"                    ri.router[\u0027gw_port_host\u0027] \u003d\u003d self.host):"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_89dbbe4e","line":1110,"in_reply_to":"baada198_3277800a","updated":"2014-07-15 22:44:05.000000000","message":"I\u0027ll add code to handle None","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":1132,"context_line":"                snat_port \u003d self._map_internal_interfaces(ri, port,"},{"line_number":1133,"context_line":"                                                          ri.snat_ports)"},{"line_number":1134,"context_line":"                snat_interface \u003d ("},{"line_number":1135,"context_line":"                    self.get_snat_int_device_name(snat_port[\u0027id\u0027])"},{"line_number":1136,"context_line":"                )"},{"line_number":1137,"context_line":"                ns_name \u003d self.get_snat_ns_name(ri.router[\u0027id\u0027])"},{"line_number":1138,"context_line":"                prefix \u003d SNAT_INT_DEV_PREFIX"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_920f6c88","line":1135,"updated":"2014-07-15 19:01:06.000000000","message":"_map_internal_interfaces can return None. We need to deal with the case.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"94aa9053135087558fb7df6ec2063769027d6b08","unresolved":false,"context_lines":[{"line_number":1132,"context_line":"                snat_port \u003d self._map_internal_interfaces(ri, port,"},{"line_number":1133,"context_line":"                                                          ri.snat_ports)"},{"line_number":1134,"context_line":"                snat_interface \u003d ("},{"line_number":1135,"context_line":"                    self.get_snat_int_device_name(snat_port[\u0027id\u0027])"},{"line_number":1136,"context_line":"                )"},{"line_number":1137,"context_line":"                ns_name \u003d self.get_snat_ns_name(ri.router[\u0027id\u0027])"},{"line_number":1138,"context_line":"                prefix \u003d SNAT_INT_DEV_PREFIX"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_c9e4d610","line":1135,"in_reply_to":"baada198_920f6c88","updated":"2014-07-15 22:44:05.000000000","message":"I\u0027ll add code to handle None","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"           Request port creation from Plugin then creates"},{"line_number":1160,"context_line":"           Floating IP namespace and adds gateway port."},{"line_number":1161,"context_line":"        \"\"\""},{"line_number":1162,"context_line":"        # Port does not exist, request port from plugin"},{"line_number":1163,"context_line":"        self.agent_gateway_port \u003d ("},{"line_number":1164,"context_line":"            self.plugin_rpc.get_agent_gateway_port("},{"line_number":1165,"context_line":"                self.context, network_id))"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_32930002","line":1162,"updated":"2014-07-15 19:01:06.000000000","message":"This comment seems unnecessary. The docstring says the same.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8be176ad8aadaab7cd27af6ea2e9219e6d6b2fd7","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"           Request port creation from Plugin then creates"},{"line_number":1160,"context_line":"           Floating IP namespace and adds gateway port."},{"line_number":1161,"context_line":"        \"\"\""},{"line_number":1162,"context_line":"        # Port does not exist, request port from plugin"},{"line_number":1163,"context_line":"        self.agent_gateway_port \u003d ("},{"line_number":1164,"context_line":"            self.plugin_rpc.get_agent_gateway_port("},{"line_number":1165,"context_line":"                self.context, network_id))"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_d81ae217","line":1162,"in_reply_to":"baada198_32930002","updated":"2014-07-15 21:31:32.000000000","message":"Done","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":1185,"context_line":""},{"line_number":1186,"context_line":"        # add link local IP to interface"},{"line_number":1187,"context_line":"        if ri.rtr_2_fip is None:"},{"line_number":1188,"context_line":"            ri.rtr_2_fip \u003d FIP_LL_PREFIX + str(self.local_ips.pop())"},{"line_number":1189,"context_line":"        if ri.fip_2_rtr is None:"},{"line_number":1190,"context_line":"            ri.fip_2_rtr \u003d FIP_LL_PREFIX + str(self.local_ips.pop())"},{"line_number":1191,"context_line":"        ip_wrapper \u003d ip_lib.IPWrapper(self.root_helper,"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_6df11d01","line":1188,"updated":"2014-07-15 19:01:06.000000000","message":"What happens if all local_ips are used. The size of self.local_ips is static and hardcoded. though ~250 may be enough, it is better to be more flexible/adaptive and we should not hard-code such limitation in the code.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8be176ad8aadaab7cd27af6ea2e9219e6d6b2fd7","unresolved":false,"context_lines":[{"line_number":1185,"context_line":""},{"line_number":1186,"context_line":"        # add link local IP to interface"},{"line_number":1187,"context_line":"        if ri.rtr_2_fip is None:"},{"line_number":1188,"context_line":"            ri.rtr_2_fip \u003d FIP_LL_PREFIX + str(self.local_ips.pop())"},{"line_number":1189,"context_line":"        if ri.fip_2_rtr is None:"},{"line_number":1190,"context_line":"            ri.fip_2_rtr \u003d FIP_LL_PREFIX + str(self.local_ips.pop())"},{"line_number":1191,"context_line":"        ip_wrapper \u003d ip_lib.IPWrapper(self.root_helper,"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_98122a08","line":1188,"in_reply_to":"baada198_6df11d01","updated":"2014-07-15 21:31:32.000000000","message":"I plan to take care of this in a follow-up.  I will post that patch soon.  Could this be deferred?  My follow up will also persist the allocation to an on disk file so that it will be consistent across agents restarts.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":1187,"context_line":"        if ri.rtr_2_fip is None:"},{"line_number":1188,"context_line":"            ri.rtr_2_fip \u003d FIP_LL_PREFIX + str(self.local_ips.pop())"},{"line_number":1189,"context_line":"        if ri.fip_2_rtr is None:"},{"line_number":1190,"context_line":"            ri.fip_2_rtr \u003d FIP_LL_PREFIX + str(self.local_ips.pop())"},{"line_number":1191,"context_line":"        ip_wrapper \u003d ip_lib.IPWrapper(self.root_helper,"},{"line_number":1192,"context_line":"                                      namespace\u003dri.ns_name)"},{"line_number":1193,"context_line":"        int_dev \u003d ip_wrapper.add_veth(rtr_2_fip_name,"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_2d3565a8","line":1190,"updated":"2014-07-15 19:01:06.000000000","message":"We need to consider MTU to allow jumbo frames in a tenant.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"d6e442164f16f20a632fd80bc62645f83bf7292a","unresolved":false,"context_lines":[{"line_number":1187,"context_line":"        if ri.rtr_2_fip is None:"},{"line_number":1188,"context_line":"            ri.rtr_2_fip \u003d FIP_LL_PREFIX + str(self.local_ips.pop())"},{"line_number":1189,"context_line":"        if ri.fip_2_rtr is None:"},{"line_number":1190,"context_line":"            ri.fip_2_rtr \u003d FIP_LL_PREFIX + str(self.local_ips.pop())"},{"line_number":1191,"context_line":"        ip_wrapper \u003d ip_lib.IPWrapper(self.root_helper,"},{"line_number":1192,"context_line":"                                      namespace\u003dri.ns_name)"},{"line_number":1193,"context_line":"        int_dev \u003d ip_wrapper.add_veth(rtr_2_fip_name,"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_4a2a7591","line":1190,"in_reply_to":"baada198_2d3565a8","updated":"2014-07-16 00:08:11.000000000","message":"Akihiro Motoki,\n \n can you clarify whether this is a generic comment or there is a specific concern about MTU on these interfaces ?\nthanks.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":1212,"context_line":"        rule_pr \u003d self.fip_priorities.pop()"},{"line_number":1213,"context_line":"        ri.floating_ips_dict[floating_ip] \u003d rule_pr"},{"line_number":1214,"context_line":"        fip_2_rtr_name \u003d self.get_fip_int_device_name(ri.router_id)"},{"line_number":1215,"context_line":"        ipRule \u003d ip_lib.IpRule(self.root_helper, namespace\u003dri.ns_name)"},{"line_number":1216,"context_line":"        ipRule.add_rule_from(fixed_ip, FIP_RT_TBL, rule_pr)"},{"line_number":1217,"context_line":""},{"line_number":1218,"context_line":"        #Add routing rule in fip namespace"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_ad6fb592","line":1215,"updated":"2014-07-15 19:01:06.000000000","message":"It is better to use \"ip_rule\" instead of ipRule. As a variable name, underscore is used to concatenate words.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8be176ad8aadaab7cd27af6ea2e9219e6d6b2fd7","unresolved":false,"context_lines":[{"line_number":1212,"context_line":"        rule_pr \u003d self.fip_priorities.pop()"},{"line_number":1213,"context_line":"        ri.floating_ips_dict[floating_ip] \u003d rule_pr"},{"line_number":1214,"context_line":"        fip_2_rtr_name \u003d self.get_fip_int_device_name(ri.router_id)"},{"line_number":1215,"context_line":"        ipRule \u003d ip_lib.IpRule(self.root_helper, namespace\u003dri.ns_name)"},{"line_number":1216,"context_line":"        ipRule.add_rule_from(fixed_ip, FIP_RT_TBL, rule_pr)"},{"line_number":1217,"context_line":""},{"line_number":1218,"context_line":"        #Add routing rule in fip namespace"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_f8bb260d","line":1215,"in_reply_to":"baada198_ad6fb592","updated":"2014-07-15 21:31:32.000000000","message":"Done","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":1299,"context_line":"                self.fullsync \u003d True"},{"line_number":1300,"context_line":""},{"line_number":1301,"context_line":"    def add_arp_entry(self, context, payload):"},{"line_number":1302,"context_line":"        \"\"\"Adds arp entry into router namespace from RPC.\"\"\""},{"line_number":1303,"context_line":"        arp_table \u003d payload[\u0027arp_table\u0027]"},{"line_number":1304,"context_line":"        router_id \u003d payload[\u0027router_id\u0027]"},{"line_number":1305,"context_line":"        ip \u003d arp_table[\u0027ip_address\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_edee0ded","line":1302,"updated":"2014-07-15 19:01:06.000000000","message":"\"from RPC\" is a bit ambiguous.\n\n  \"\"\"Adds ARP entry into router namespace.\n\n  Called from RPC.\n  \"\"\"","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8be176ad8aadaab7cd27af6ea2e9219e6d6b2fd7","unresolved":false,"context_lines":[{"line_number":1299,"context_line":"                self.fullsync \u003d True"},{"line_number":1300,"context_line":""},{"line_number":1301,"context_line":"    def add_arp_entry(self, context, payload):"},{"line_number":1302,"context_line":"        \"\"\"Adds arp entry into router namespace from RPC.\"\"\""},{"line_number":1303,"context_line":"        arp_table \u003d payload[\u0027arp_table\u0027]"},{"line_number":1304,"context_line":"        router_id \u003d payload[\u0027router_id\u0027]"},{"line_number":1305,"context_line":"        ip \u003d arp_table[\u0027ip_address\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_b8c1ae83","line":1302,"in_reply_to":"baada198_edee0ded","updated":"2014-07-15 21:31:32.000000000","message":"Done","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"        self._update_arp_entry(ri, ip, mac, subnet_id, \u0027add\u0027)"},{"line_number":1310,"context_line":""},{"line_number":1311,"context_line":"    def del_arp_entry(self, context, payload):"},{"line_number":1312,"context_line":"        \"\"\"Deletes arp entry into router namespace from RPC.\"\"\""},{"line_number":1313,"context_line":"        arp_table \u003d payload[\u0027arp_table\u0027]"},{"line_number":1314,"context_line":"        router_id \u003d payload[\u0027router_id\u0027]"},{"line_number":1315,"context_line":"        ip \u003d arp_table[\u0027ip_address\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_2d9f2567","line":1312,"updated":"2014-07-15 19:01:06.000000000","message":"into -\u003e from\n\nAlso same comment as the above\n\n   \"\"\"Deletes ARP entry from router namespace.\n\n   Called from RPC.\n   \"\"\"","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8be176ad8aadaab7cd27af6ea2e9219e6d6b2fd7","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"        self._update_arp_entry(ri, ip, mac, subnet_id, \u0027add\u0027)"},{"line_number":1310,"context_line":""},{"line_number":1311,"context_line":"    def del_arp_entry(self, context, payload):"},{"line_number":1312,"context_line":"        \"\"\"Deletes arp entry into router namespace from RPC.\"\"\""},{"line_number":1313,"context_line":"        arp_table \u003d payload[\u0027arp_table\u0027]"},{"line_number":1314,"context_line":"        router_id \u003d payload[\u0027router_id\u0027]"},{"line_number":1315,"context_line":"        ip \u003d arp_table[\u0027ip_address\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_18e29a2f","line":1312,"in_reply_to":"baada198_2d9f2567","updated":"2014-07-15 21:31:32.000000000","message":"Done","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":1315,"context_line":"        ip \u003d arp_table[\u0027ip_address\u0027]"},{"line_number":1316,"context_line":"        mac \u003d arp_table[\u0027mac_address\u0027]"},{"line_number":1317,"context_line":"        subnet_id \u003d arp_table[\u0027subnet_id\u0027]"},{"line_number":1318,"context_line":"        ri \u003d self.router_info.get(router_id)"},{"line_number":1319,"context_line":"        self._update_arp_entry(ri, ip, mac, subnet_id, \u0027delete\u0027)"},{"line_number":1320,"context_line":""},{"line_number":1321,"context_line":"    def routers_updated(self, context, routers):"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_6d975d3b","line":1318,"updated":"2014-07-15 19:01:06.000000000","message":"If router_info does not contain the specified router_id, ri will be None. Don\u0027t we need to handle a case where ri \u003d\u003d None?","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8be176ad8aadaab7cd27af6ea2e9219e6d6b2fd7","unresolved":false,"context_lines":[{"line_number":1315,"context_line":"        ip \u003d arp_table[\u0027ip_address\u0027]"},{"line_number":1316,"context_line":"        mac \u003d arp_table[\u0027mac_address\u0027]"},{"line_number":1317,"context_line":"        subnet_id \u003d arp_table[\u0027subnet_id\u0027]"},{"line_number":1318,"context_line":"        ri \u003d self.router_info.get(router_id)"},{"line_number":1319,"context_line":"        self._update_arp_entry(ri, ip, mac, subnet_id, \u0027delete\u0027)"},{"line_number":1320,"context_line":""},{"line_number":1321,"context_line":"    def routers_updated(self, context, routers):"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_188b7a69","line":1318,"in_reply_to":"baada198_6d975d3b","updated":"2014-07-15 21:31:32.000000000","message":"Done","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"84e8a742cc5ee7249a0dd9e49cf5ecc6f66f09a2","unresolved":false,"context_lines":[{"line_number":672,"context_line":"        for p in subnet_ports:"},{"line_number":673,"context_line":"            if (p[\u0027device_owner\u0027] not in ("},{"line_number":674,"context_line":"                \u0027network:router_interface\u0027,"},{"line_number":675,"context_line":"                \u0027network:router_interface_distributed\u0027)):"},{"line_number":676,"context_line":"                for fixed_ip in p[\u0027fixed_ips\u0027]:"},{"line_number":677,"context_line":"                    self._update_arp_entry(ri, fixed_ip[\u0027ip_address\u0027],"},{"line_number":678,"context_line":"                                           p[\u0027mac_address\u0027],"}],"source_content_type":"text/x-python","patch_set":22,"id":"baada198_d9101d52","line":675,"updated":"2014-07-16 03:25:25.000000000","message":"Use (l3_constants.DEVICE_OWNER_ROUTER_INTF, l3_constants.DEVICE_OWNER_DVR_INTERFACE) instead.","commit_id":"76d9dede99abe9eaca4b31e68d0103c5fe6cbea3"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"b262bbf2093cb774cf3cbc0893b17ee73daf90b0","unresolved":false,"context_lines":[{"line_number":672,"context_line":"        for p in subnet_ports:"},{"line_number":673,"context_line":"            if (p[\u0027device_owner\u0027] not in ("},{"line_number":674,"context_line":"                \u0027network:router_interface\u0027,"},{"line_number":675,"context_line":"                \u0027network:router_interface_distributed\u0027)):"},{"line_number":676,"context_line":"                for fixed_ip in p[\u0027fixed_ips\u0027]:"},{"line_number":677,"context_line":"                    self._update_arp_entry(ri, fixed_ip[\u0027ip_address\u0027],"},{"line_number":678,"context_line":"                                           p[\u0027mac_address\u0027],"}],"source_content_type":"text/x-python","patch_set":22,"id":"baada198_ff3b01c6","line":675,"in_reply_to":"baada198_d9101d52","updated":"2014-07-16 15:18:12.000000000","message":"got it","commit_id":"76d9dede99abe9eaca4b31e68d0103c5fe6cbea3"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"83f8bd578e70f281330603bb615c0864696cdd61","unresolved":false,"context_lines":[{"line_number":55,"context_line":"FIP_NS_PREFIX \u003d \u0027fip-\u0027"},{"line_number":56,"context_line":"SNAT_NS_PREFIX \u003d \u0027snat-\u0027"},{"line_number":57,"context_line":"FIP_2_ROUTER_DEV_PREFIX \u003d \u0027fpr-\u0027"},{"line_number":58,"context_line":"ROUTER_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":59,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"},{"line_number":60,"context_line":"FIP_LL_PREFIX \u003d \u0027169.254.30.\u0027"},{"line_number":61,"context_line":"# Route Table index for FIPs"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_558ad41a","line":58,"updated":"2014-07-17 09:35:50.000000000","message":"How about changing these \"_2_\" to \"_TO_\" as Akihiro said earlier?","commit_id":"53dfc8a8decbb40181a4b8b407fe43b30cffeef0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"46c0df64f5ab4034be933f692849b327f1ee0722","unresolved":false,"context_lines":[{"line_number":55,"context_line":"FIP_NS_PREFIX \u003d \u0027fip-\u0027"},{"line_number":56,"context_line":"SNAT_NS_PREFIX \u003d \u0027snat-\u0027"},{"line_number":57,"context_line":"FIP_2_ROUTER_DEV_PREFIX \u003d \u0027fpr-\u0027"},{"line_number":58,"context_line":"ROUTER_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":59,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"},{"line_number":60,"context_line":"FIP_LL_PREFIX \u003d \u0027169.254.30.\u0027"},{"line_number":61,"context_line":"# Route Table index for FIPs"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_88f27899","line":58,"in_reply_to":"baada198_558ad41a","updated":"2014-07-17 20:18:45.000000000","message":"We start to run in to some line length problems below I think (L1012).  We\u0027re splitting hairs now and the time for that has passed.  I\u0027d say if we have to break lines to do this then it is not worth it.","commit_id":"53dfc8a8decbb40181a4b8b407fe43b30cffeef0"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"83f8bd578e70f281330603bb615c0864696cdd61","unresolved":false,"context_lines":[{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    OPTS \u003d ["},{"line_number":351,"context_line":"        cfg.StrOpt(\u0027agent_mode\u0027, default\u003d\u0027legacy\u0027,"},{"line_number":352,"context_line":"                   help\u003d_(\"The working mode for the agent. Allowed modes are:\""},{"line_number":353,"context_line":"                          \"\u0027legacy\u0027 - this preserves the existing behavior \""},{"line_number":354,"context_line":"                          \"where the L3 agent is deployed on a centralized \""},{"line_number":355,"context_line":"                          \"networking node to provide L3 services like DNAT, \""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_780eefe6","line":352,"updated":"2014-07-17 09:35:50.000000000","message":"I think the help text here doesn\u0027t need to be that long.","commit_id":"53dfc8a8decbb40181a4b8b407fe43b30cffeef0"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ba20aa86f8ba1a3d0b3486d1cd5a5c2352ff60d6","unresolved":false,"context_lines":[{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    OPTS \u003d ["},{"line_number":351,"context_line":"        cfg.StrOpt(\u0027agent_mode\u0027, default\u003d\u0027legacy\u0027,"},{"line_number":352,"context_line":"                   help\u003d_(\"The working mode for the agent. Allowed modes are:\""},{"line_number":353,"context_line":"                          \"\u0027legacy\u0027 - this preserves the existing behavior \""},{"line_number":354,"context_line":"                          \"where the L3 agent is deployed on a centralized \""},{"line_number":355,"context_line":"                          \"networking node to provide L3 services like DNAT, \""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_c2da9a16","line":352,"in_reply_to":"baada198_28ec1ebb","updated":"2014-07-17 15:19:25.000000000","message":"This was in response to a previous comment wanting more detail here.  I\u0027m sure there is a balance somewhere.","commit_id":"53dfc8a8decbb40181a4b8b407fe43b30cffeef0"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"b6fe54f5c806df65f6b6ba2cf4f74f16b1816217","unresolved":false,"context_lines":[{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    OPTS \u003d ["},{"line_number":351,"context_line":"        cfg.StrOpt(\u0027agent_mode\u0027, default\u003d\u0027legacy\u0027,"},{"line_number":352,"context_line":"                   help\u003d_(\"The working mode for the agent. Allowed modes are:\""},{"line_number":353,"context_line":"                          \"\u0027legacy\u0027 - this preserves the existing behavior \""},{"line_number":354,"context_line":"                          \"where the L3 agent is deployed on a centralized \""},{"line_number":355,"context_line":"                          \"networking node to provide L3 services like DNAT, \""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_d1625815","line":352,"in_reply_to":"baada198_683e042b","updated":"2014-07-17 21:31:42.000000000","message":"Carl, I agree. The text here is descriptive enough to be useful.  If this really breaks something it can be taken up as a bug and discussed out in detail as a specific item then.","commit_id":"53dfc8a8decbb40181a4b8b407fe43b30cffeef0"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"47e4d6134ba594eb7c4d2854cd2de9e076beccfe","unresolved":false,"context_lines":[{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    OPTS \u003d ["},{"line_number":351,"context_line":"        cfg.StrOpt(\u0027agent_mode\u0027, default\u003d\u0027legacy\u0027,"},{"line_number":352,"context_line":"                   help\u003d_(\"The working mode for the agent. Allowed modes are:\""},{"line_number":353,"context_line":"                          \"\u0027legacy\u0027 - this preserves the existing behavior \""},{"line_number":354,"context_line":"                          \"where the L3 agent is deployed on a centralized \""},{"line_number":355,"context_line":"                          \"networking node to provide L3 services like DNAT, \""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_28ec1ebb","line":352,"in_reply_to":"baada198_780eefe6","updated":"2014-07-17 14:08:14.000000000","message":"+1, in addition, spaces are missing/extra on some lines L352, 359 (missing), 356-358,360, 363-364 (extra).  Remember, this will be displayed on one line.","commit_id":"53dfc8a8decbb40181a4b8b407fe43b30cffeef0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"46c0df64f5ab4034be933f692849b327f1ee0722","unresolved":false,"context_lines":[{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    OPTS \u003d ["},{"line_number":351,"context_line":"        cfg.StrOpt(\u0027agent_mode\u0027, default\u003d\u0027legacy\u0027,"},{"line_number":352,"context_line":"                   help\u003d_(\"The working mode for the agent. Allowed modes are:\""},{"line_number":353,"context_line":"                          \"\u0027legacy\u0027 - this preserves the existing behavior \""},{"line_number":354,"context_line":"                          \"where the L3 agent is deployed on a centralized \""},{"line_number":355,"context_line":"                          \"networking node to provide L3 services like DNAT, \""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_683e042b","line":352,"in_reply_to":"baada198_c2da9a16","updated":"2014-07-17 20:18:45.000000000","message":"Keep the text, fix the spacing is my suggestion.","commit_id":"53dfc8a8decbb40181a4b8b407fe43b30cffeef0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"46c0df64f5ab4034be933f692849b327f1ee0722","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                          \"\u0027dvr_snat\u0027 - this enables centralized SNAT support \""},{"line_number":362,"context_line":"                          \"in conjunction with DVR.  This mode must be used  \""},{"line_number":363,"context_line":"                          \"for an L3 agent running on centralized node       \""},{"line_number":364,"context_line":"                          \"(or in single-host deployments, e.g. devstack)    \""},{"line_number":365,"context_line":"                          )),"},{"line_number":366,"context_line":"        cfg.StrOpt(\u0027external_network_bridge\u0027, default\u003d\u0027br-ex\u0027,"},{"line_number":367,"context_line":"                   help\u003d_(\"Name of bridge used for external network \""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_e87854fa","line":364,"updated":"2014-07-17 20:18:45.000000000","message":"nit:  L364 and L365 should be joined.","commit_id":"53dfc8a8decbb40181a4b8b407fe43b30cffeef0"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"ffc584fd82704bbdba5750552da86e76e017dba1","unresolved":false,"context_lines":[{"line_number":574,"context_line":"        ip_wrapper \u003d ip_wrapper_root.ensure_namespace(name)"},{"line_number":575,"context_line":"        ip_wrapper.netns.execute([\u0027sysctl\u0027, \u0027-w\u0027, \u0027net.ipv4.ip_forward\u003d1\u0027])"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"    def _create_router_namespace(self, ri):"},{"line_number":578,"context_line":"        self._create_namespace(ri.ns_name)"},{"line_number":579,"context_line":""},{"line_number":580,"context_line":"    def _fetch_external_net_id(self, force\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_310f148a","line":577,"updated":"2014-07-17 21:36:48.000000000","message":"Only varmour_router.py overrides this, can you not just fix up that and remove this since it\u0027s never called?","commit_id":"53dfc8a8decbb40181a4b8b407fe43b30cffeef0"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"ffc584fd82704bbdba5750552da86e76e017dba1","unresolved":false,"context_lines":[{"line_number":1225,"context_line":"            ns_ipd.route.add_gateway(gateway, table\u003dsnat_idx)"},{"line_number":1226,"context_line":"            ns_ipr.add_rule_from(sn_port[\u0027ip_cidr\u0027], snat_idx, snat_idx)"},{"line_number":1227,"context_line":"            ns_ipr.netns.execute([\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":1228,"context_line":"                                 \u0027net.ipv4.conf.all.send_redirects\u003d0\u0027])"},{"line_number":1229,"context_line":"            ns_ipr.netns.execute([\u0027sysctl\u0027, \u0027-w\u0027, \u0027net.ipv4.conf.%s.\u0027"},{"line_number":1230,"context_line":"                                 \u0027send_redirects\u003d0\u0027 % sn_int])"},{"line_number":1231,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_11b6908a","line":1228,"updated":"2014-07-17 21:36:48.000000000","message":"You\u0027re setting this again and again to zero whenever this is called, should see if there\u0027s some way to only to it once when the namespace is created, but not critical.","commit_id":"53dfc8a8decbb40181a4b8b407fe43b30cffeef0"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"6c1ebf22920ff641e1938384696f00a0870af315","unresolved":false,"context_lines":[{"line_number":1225,"context_line":"            ns_ipd.route.add_gateway(gateway, table\u003dsnat_idx)"},{"line_number":1226,"context_line":"            ns_ipr.add_rule_from(sn_port[\u0027ip_cidr\u0027], snat_idx, snat_idx)"},{"line_number":1227,"context_line":"            ns_ipr.netns.execute([\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":1228,"context_line":"                                 \u0027net.ipv4.conf.all.send_redirects\u003d0\u0027])"},{"line_number":1229,"context_line":"            ns_ipr.netns.execute([\u0027sysctl\u0027, \u0027-w\u0027, \u0027net.ipv4.conf.%s.\u0027"},{"line_number":1230,"context_line":"                                 \u0027send_redirects\u003d0\u0027 % sn_int])"},{"line_number":1231,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_4a3ca393","line":1228,"in_reply_to":"baada198_11b6908a","updated":"2014-07-19 01:01:10.000000000","message":"Done","commit_id":"53dfc8a8decbb40181a4b8b407fe43b30cffeef0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"252a8931a9ea503cceae4a83a69b32f1d8644a21","unresolved":false,"context_lines":[{"line_number":57,"context_line":"FIP_2_ROUTER_DEV_PREFIX \u003d \u0027fpr-\u0027"},{"line_number":58,"context_line":"ROUTER_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":59,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"},{"line_number":60,"context_line":"FIP_LL_PREFIX \u003d \u0027169.254.30.\u0027"},{"line_number":61,"context_line":"# Route Table index for FIPs"},{"line_number":62,"context_line":"FIP_RT_TBL \u003d 16"},{"line_number":63,"context_line":"# Rule priority range for FIPs"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_24316d5a","line":60,"updated":"2014-07-18 19:18:00.000000000","message":"I think I put this comment in an older patch.  It probably got lost in the churn.  I really think this subnet should be handled with netaddr.  Here should be something like:\n\nFIP_LL_SUBNET \u003d \u0027169.254.30.0/24\u0027\n\nAnd then the netaddr library should be used to work with it.\n\nIdeally it would be configurable, but we can make it configurable in a follow up if the need arises.  I have slight feeling that a /24 might not be quite big enough for any conceivable compute node and we might want to make it a /23.\n\nThe pool should probably be handled using an IPSet (local_ips).","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"eb8b82d99fbde1d92c6f6895e7a10b0b251e8328","unresolved":false,"context_lines":[{"line_number":57,"context_line":"FIP_2_ROUTER_DEV_PREFIX \u003d \u0027fpr-\u0027"},{"line_number":58,"context_line":"ROUTER_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":59,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"},{"line_number":60,"context_line":"FIP_LL_PREFIX \u003d \u0027169.254.30.\u0027"},{"line_number":61,"context_line":"# Route Table index for FIPs"},{"line_number":62,"context_line":"FIP_RT_TBL \u003d 16"},{"line_number":63,"context_line":"# Rule priority range for FIPs"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_0d4e4538","line":60,"in_reply_to":"baada198_24316d5a","updated":"2014-07-19 02:37:15.000000000","message":"Carl: thought you and Salvatore had the same suggestion that has been incorporated in Patch 26, but will look into this one too. How many IRs that have Floating IPs are expected on a single node? would 100 be a good number for now ?","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1cfdf25f4df74676d9f760e3a8f380325352c170","unresolved":false,"context_lines":[{"line_number":128,"context_line":"                         version\u003d\u00271.2\u0027)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def get_agent_gateway_port(self, context, fip_net):"},{"line_number":131,"context_line":"        \"\"\"Get or create a agent_gateway_port.\"\"\""},{"line_number":132,"context_line":"        return self.call(context,"},{"line_number":133,"context_line":"                         self.make_msg(\u0027get_agent_gateway_port\u0027,"},{"line_number":134,"context_line":"                                       network_id\u003dfip_net, host\u003dself.host),"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_4fdbdfec","line":131,"updated":"2014-07-18 18:45:45.000000000","message":"a/an","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1fc932ddb1ce957867c21bf581c128e234217c4b","unresolved":false,"context_lines":[{"line_number":128,"context_line":"                         version\u003d\u00271.2\u0027)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def get_agent_gateway_port(self, context, fip_net):"},{"line_number":131,"context_line":"        \"\"\"Get or create a agent_gateway_port.\"\"\""},{"line_number":132,"context_line":"        return self.call(context,"},{"line_number":133,"context_line":"                         self.make_msg(\u0027get_agent_gateway_port\u0027,"},{"line_number":134,"context_line":"                                       network_id\u003dfip_net, host\u003dself.host),"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_b5e1259d","line":131,"in_reply_to":"baada198_4fdbdfec","updated":"2014-07-18 21:26:16.000000000","message":"got it","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1cfdf25f4df74676d9f760e3a8f380325352c170","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        self.internal_ports \u003d []"},{"line_number":147,"context_line":"        self.snat_ports \u003d []"},{"line_number":148,"context_line":"        self.floating_ips \u003d set()"},{"line_number":149,"context_line":"        # TODO(mrsmith): DVR merge cleanup"},{"line_number":150,"context_line":"        self.floating_ips_dict \u003d {}"},{"line_number":151,"context_line":"        self.root_helper \u003d root_helper"},{"line_number":152,"context_line":"        self.use_namespaces \u003d use_namespaces"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_8fe1779d","line":149,"updated":"2014-07-18 18:45:45.000000000","message":"what does this mean? Could you elaborate?","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1fc932ddb1ce957867c21bf581c128e234217c4b","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        self.internal_ports \u003d []"},{"line_number":147,"context_line":"        self.snat_ports \u003d []"},{"line_number":148,"context_line":"        self.floating_ips \u003d set()"},{"line_number":149,"context_line":"        # TODO(mrsmith): DVR merge cleanup"},{"line_number":150,"context_line":"        self.floating_ips_dict \u003d {}"},{"line_number":151,"context_line":"        self.root_helper \u003d root_helper"},{"line_number":152,"context_line":"        self.use_namespaces \u003d use_namespaces"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_35cef52d","line":149,"in_reply_to":"baada198_8fe1779d","updated":"2014-07-18 21:26:16.000000000","message":"stale comment... I\u0027ll remove it","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1cfdf25f4df74676d9f760e3a8f380325352c170","unresolved":false,"context_lines":[{"line_number":494,"context_line":"                                \u0027%s\u0027), ns)"},{"line_number":495,"context_line":"        self._clean_stale_namespaces \u003d False"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"    def _destroy_namespace(self, ns):"},{"line_number":498,"context_line":"        if ns.startswith(NS_PREFIX):"},{"line_number":499,"context_line":"            if self.conf.enable_metadata_proxy:"},{"line_number":500,"context_line":"                self._destroy_metadata_proxy(ns[len(NS_PREFIX):], ns)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_01a29bad","line":497,"updated":"2014-07-18 18:45:45.000000000","message":"I think lines 497-548 can do with a bit of improvement as there\u0027s lots of duplicated code; for instance, I\u0027d break the destroy_*_namespace function in two methods: one that does the unplugging and one that does the cleanup. For now, please go ahead and address my comments below. We can work out a better shape of the code later.","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1cfdf25f4df74676d9f760e3a8f380325352c170","unresolved":false,"context_lines":[{"line_number":509,"context_line":"        # delete internal interfaces"},{"line_number":510,"context_line":"        for d in ns_ip.get_devices(exclude_loopback\u003dTrue):"},{"line_number":511,"context_line":"            if d.name.startswith(SNAT_INT_DEV_PREFIX):"},{"line_number":512,"context_line":"                LOG.debug(\u0027DVR: unplug: %s\u0027, d.name)"},{"line_number":513,"context_line":"                self.driver.unplug(d.name, namespace\u003dns_name,"},{"line_number":514,"context_line":"                                   prefix\u003dSNAT_INT_DEV_PREFIX)"},{"line_number":515,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_8f7df7b4","line":512,"updated":"2014-07-18 18:45:45.000000000","message":"I\u0027d say: \u0027Unplugging DVR device %s\u0027","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1fc932ddb1ce957867c21bf581c128e234217c4b","unresolved":false,"context_lines":[{"line_number":509,"context_line":"        # delete internal interfaces"},{"line_number":510,"context_line":"        for d in ns_ip.get_devices(exclude_loopback\u003dTrue):"},{"line_number":511,"context_line":"            if d.name.startswith(SNAT_INT_DEV_PREFIX):"},{"line_number":512,"context_line":"                LOG.debug(\u0027DVR: unplug: %s\u0027, d.name)"},{"line_number":513,"context_line":"                self.driver.unplug(d.name, namespace\u003dns_name,"},{"line_number":514,"context_line":"                                   prefix\u003dSNAT_INT_DEV_PREFIX)"},{"line_number":515,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_55ea8974","line":512,"in_reply_to":"baada198_8f7df7b4","updated":"2014-07-18 21:26:16.000000000","message":"got it","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1cfdf25f4df74676d9f760e3a8f380325352c170","unresolved":false,"context_lines":[{"line_number":513,"context_line":"                self.driver.unplug(d.name, namespace\u003dns_name,"},{"line_number":514,"context_line":"                                   prefix\u003dSNAT_INT_DEV_PREFIX)"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"        # TODO(mrsmith): delete ext-gw-port"},{"line_number":517,"context_line":"        LOG.debug(\u0027DVR: destroy snat ns: %s\u0027, ns_name)"},{"line_number":518,"context_line":"        if self.conf.router_delete_namespaces:"},{"line_number":519,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_4f5e7f46","line":516,"updated":"2014-07-18 18:45:45.000000000","message":"what happens if we didn\u0027t? Should this be a FIXME?","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1fc932ddb1ce957867c21bf581c128e234217c4b","unresolved":false,"context_lines":[{"line_number":513,"context_line":"                self.driver.unplug(d.name, namespace\u003dns_name,"},{"line_number":514,"context_line":"                                   prefix\u003dSNAT_INT_DEV_PREFIX)"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"        # TODO(mrsmith): delete ext-gw-port"},{"line_number":517,"context_line":"        LOG.debug(\u0027DVR: destroy snat ns: %s\u0027, ns_name)"},{"line_number":518,"context_line":"        if self.conf.router_delete_namespaces:"},{"line_number":519,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_102c9f98","line":516,"in_reply_to":"baada198_4f5e7f46","updated":"2014-07-18 21:26:16.000000000","message":"The port does get deleted when the namespace is removed below.  But the safe bet would be to delete it here as well.","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1cfdf25f4df74676d9f760e3a8f380325352c170","unresolved":false,"context_lines":[{"line_number":520,"context_line":"                ns_ip.netns.delete(ns_name)"},{"line_number":521,"context_line":"            except RuntimeError:"},{"line_number":522,"context_line":"                msg \u003d _(\u0027Failed trying to delete namespace: %s\u0027)"},{"line_number":523,"context_line":"                LOG.exception(msg % ns_name)"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"    def _destroy_fip_namespace(self, ns_name):"},{"line_number":526,"context_line":"        ns_ip \u003d ip_lib.IPWrapper(self.root_helper, namespace\u003dns_name)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_0f3807ed","line":523,"updated":"2014-07-18 18:45:45.000000000","message":"do the substitution on msg:\n\n  msg \u003d _(\u0027Failed to delete namespace: %s\u0027) % ns_name\n  LOG.exception(msg)","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1fc932ddb1ce957867c21bf581c128e234217c4b","unresolved":false,"context_lines":[{"line_number":520,"context_line":"                ns_ip.netns.delete(ns_name)"},{"line_number":521,"context_line":"            except RuntimeError:"},{"line_number":522,"context_line":"                msg \u003d _(\u0027Failed trying to delete namespace: %s\u0027)"},{"line_number":523,"context_line":"                LOG.exception(msg % ns_name)"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"    def _destroy_fip_namespace(self, ns_name):"},{"line_number":526,"context_line":"        ns_ip \u003d ip_lib.IPWrapper(self.root_helper, namespace\u003dns_name)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_107adf87","line":523,"in_reply_to":"baada198_0f3807ed","updated":"2014-07-18 21:26:16.000000000","message":"got it","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1cfdf25f4df74676d9f760e3a8f380325352c170","unresolved":false,"context_lines":[{"line_number":528,"context_line":"            if d.name.startswith(FIP_2_ROUTER_DEV_PREFIX):"},{"line_number":529,"context_line":"                # internal link between IRs and FIP NS"},{"line_number":530,"context_line":"                # TODO(mrsmith): remove IR interfaces (IP pool?)"},{"line_number":531,"context_line":"                pass"},{"line_number":532,"context_line":"            elif d.name.startswith(FIP_EXT_DEV_PREFIX):"},{"line_number":533,"context_line":"                # single port from FIP NS to br-ext"},{"line_number":534,"context_line":"                # TODO(mrsmith): remove br-ext interface"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_6f2263ba","line":531,"updated":"2014-07-18 18:45:45.000000000","message":"Is there a reason where a debug statement is useful here?","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1fc932ddb1ce957867c21bf581c128e234217c4b","unresolved":false,"context_lines":[{"line_number":528,"context_line":"            if d.name.startswith(FIP_2_ROUTER_DEV_PREFIX):"},{"line_number":529,"context_line":"                # internal link between IRs and FIP NS"},{"line_number":530,"context_line":"                # TODO(mrsmith): remove IR interfaces (IP pool?)"},{"line_number":531,"context_line":"                pass"},{"line_number":532,"context_line":"            elif d.name.startswith(FIP_EXT_DEV_PREFIX):"},{"line_number":533,"context_line":"                # single port from FIP NS to br-ext"},{"line_number":534,"context_line":"                # TODO(mrsmith): remove br-ext interface"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_70415b38","line":531,"in_reply_to":"baada198_6f2263ba","updated":"2014-07-18 21:26:16.000000000","message":"similar to the TODO above at L516 - the interface gets removed currently but it probably would be safest to remove it here","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1cfdf25f4df74676d9f760e3a8f380325352c170","unresolved":false,"context_lines":[{"line_number":532,"context_line":"            elif d.name.startswith(FIP_EXT_DEV_PREFIX):"},{"line_number":533,"context_line":"                # single port from FIP NS to br-ext"},{"line_number":534,"context_line":"                # TODO(mrsmith): remove br-ext interface"},{"line_number":535,"context_line":"                LOG.debug(\u0027DVR: unplug: %s\u0027, d.name)"},{"line_number":536,"context_line":"                self.driver.unplug(d.name,"},{"line_number":537,"context_line":"                                   bridge\u003dself.conf.external_network_bridge,"},{"line_number":538,"context_line":"                                   namespace\u003dns_name,"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_af28fb97","line":535,"updated":"2014-07-18 18:45:45.000000000","message":"same suggestion as above","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1fc932ddb1ce957867c21bf581c128e234217c4b","unresolved":false,"context_lines":[{"line_number":532,"context_line":"            elif d.name.startswith(FIP_EXT_DEV_PREFIX):"},{"line_number":533,"context_line":"                # single port from FIP NS to br-ext"},{"line_number":534,"context_line":"                # TODO(mrsmith): remove br-ext interface"},{"line_number":535,"context_line":"                LOG.debug(\u0027DVR: unplug: %s\u0027, d.name)"},{"line_number":536,"context_line":"                self.driver.unplug(d.name,"},{"line_number":537,"context_line":"                                   bridge\u003dself.conf.external_network_bridge,"},{"line_number":538,"context_line":"                                   namespace\u003dns_name,"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_306b63ba","line":535,"in_reply_to":"baada198_af28fb97","updated":"2014-07-18 21:26:16.000000000","message":"ditto","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1cfdf25f4df74676d9f760e3a8f380325352c170","unresolved":false,"context_lines":[{"line_number":539,"context_line":"                                   prefix\u003dFIP_EXT_DEV_PREFIX)"},{"line_number":540,"context_line":"        LOG.debug(\u0027DVR: destroy fip ns: %s\u0027, ns_name)"},{"line_number":541,"context_line":"        # TODO(mrsmith): add LOG warn if fip count !\u003d 0"},{"line_number":542,"context_line":"        if self.conf.router_delete_namespaces:"},{"line_number":543,"context_line":"            try:"},{"line_number":544,"context_line":"                ns_ip.netns.delete(ns_name)"},{"line_number":545,"context_line":"            except RuntimeError:"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_6170b7a4","line":542,"updated":"2014-07-18 18:45:45.000000000","message":"I think lines 542-547 can go into a module function because these look exactly like 518-523.","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1fc932ddb1ce957867c21bf581c128e234217c4b","unresolved":false,"context_lines":[{"line_number":539,"context_line":"                                   prefix\u003dFIP_EXT_DEV_PREFIX)"},{"line_number":540,"context_line":"        LOG.debug(\u0027DVR: destroy fip ns: %s\u0027, ns_name)"},{"line_number":541,"context_line":"        # TODO(mrsmith): add LOG warn if fip count !\u003d 0"},{"line_number":542,"context_line":"        if self.conf.router_delete_namespaces:"},{"line_number":543,"context_line":"            try:"},{"line_number":544,"context_line":"                ns_ip.netns.delete(ns_name)"},{"line_number":545,"context_line":"            except RuntimeError:"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_b05e9311","line":542,"in_reply_to":"baada198_6170b7a4","updated":"2014-07-18 21:26:16.000000000","message":"ok","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1cfdf25f4df74676d9f760e3a8f380325352c170","unresolved":false,"context_lines":[{"line_number":560,"context_line":"                                   namespace\u003dnamespace,"},{"line_number":561,"context_line":"                                   prefix\u003dEXTERNAL_DEV_PREFIX)"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        if self.conf.router_delete_namespaces:"},{"line_number":564,"context_line":"            try:"},{"line_number":565,"context_line":"                ns_ip.netns.delete(namespace)"},{"line_number":566,"context_line":"            except RuntimeError:"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_8196ab92","line":563,"updated":"2014-07-18 18:45:45.000000000","message":"if you did as I suggested earlier, then this can be factored out too","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1fc932ddb1ce957867c21bf581c128e234217c4b","unresolved":false,"context_lines":[{"line_number":560,"context_line":"                                   namespace\u003dnamespace,"},{"line_number":561,"context_line":"                                   prefix\u003dEXTERNAL_DEV_PREFIX)"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        if self.conf.router_delete_namespaces:"},{"line_number":564,"context_line":"            try:"},{"line_number":565,"context_line":"                ns_ip.netns.delete(namespace)"},{"line_number":566,"context_line":"            except RuntimeError:"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_10057f10","line":563,"in_reply_to":"baada198_8196ab92","updated":"2014-07-18 21:26:16.000000000","message":"ok","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1cfdf25f4df74676d9f760e3a8f380325352c170","unresolved":false,"context_lines":[{"line_number":668,"context_line":"        pm.disable()"},{"line_number":669,"context_line":""},{"line_number":670,"context_line":"    def _set_subnet_arp_info(self, ri, port):"},{"line_number":671,"context_line":"        \"\"\"Get ARP info from Plugin for existing ports for subnet.\"\"\""},{"line_number":672,"context_line":"        if \u0027id\u0027 not in port[\u0027subnet\u0027] or not ri.router[\u0027distributed\u0027]:"},{"line_number":673,"context_line":"            return"},{"line_number":674,"context_line":"        subnet_id \u003d port[\u0027subnet\u0027][\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_6184370b","line":671,"updated":"2014-07-18 18:45:45.000000000","message":"A method called _set_subnet_arp_info whose docstring says: Get...\n\ndoes not seem very intuitive...what is this meant to do set or get? :)","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1fc932ddb1ce957867c21bf581c128e234217c4b","unresolved":false,"context_lines":[{"line_number":668,"context_line":"        pm.disable()"},{"line_number":669,"context_line":""},{"line_number":670,"context_line":"    def _set_subnet_arp_info(self, ri, port):"},{"line_number":671,"context_line":"        \"\"\"Get ARP info from Plugin for existing ports for subnet.\"\"\""},{"line_number":672,"context_line":"        if \u0027id\u0027 not in port[\u0027subnet\u0027] or not ri.router[\u0027distributed\u0027]:"},{"line_number":673,"context_line":"            return"},{"line_number":674,"context_line":"        subnet_id \u003d port[\u0027subnet\u0027][\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_350fd53a","line":671,"in_reply_to":"baada198_6184370b","updated":"2014-07-18 21:26:16.000000000","message":"Yes - it is a bit odd isn\u0027t it?  The end goal is to SET the arp info.  That is done by GET-ting the info from the plugin.  I\u0027ll try a better docstring wording...","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1cfdf25f4df74676d9f760e3a8f380325352c170","unresolved":false,"context_lines":[{"line_number":702,"context_line":"        return [ip_dev.name for ip_dev in ip_devs]"},{"line_number":703,"context_line":""},{"line_number":704,"context_line":"    def process_router(self, ri):"},{"line_number":705,"context_line":"        # TODO(mrsmith) - we shouldn\u0027t need to check here"},{"line_number":706,"context_line":"        if \u0027distributed\u0027 not in ri.router:"},{"line_number":707,"context_line":"            ri.router[\u0027distributed\u0027] \u003d False"},{"line_number":708,"context_line":"        ri.iptables_manager.defer_apply_on()"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_2195df32","line":705,"updated":"2014-07-18 18:45:45.000000000","message":"should we address this? If you shouldn\u0027t what would you need to do?","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1fc932ddb1ce957867c21bf581c128e234217c4b","unresolved":false,"context_lines":[{"line_number":702,"context_line":"        return [ip_dev.name for ip_dev in ip_devs]"},{"line_number":703,"context_line":""},{"line_number":704,"context_line":"    def process_router(self, ri):"},{"line_number":705,"context_line":"        # TODO(mrsmith) - we shouldn\u0027t need to check here"},{"line_number":706,"context_line":"        if \u0027distributed\u0027 not in ri.router:"},{"line_number":707,"context_line":"            ri.router[\u0027distributed\u0027] \u003d False"},{"line_number":708,"context_line":"        ri.iptables_manager.defer_apply_on()"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_3538b5ed","line":705,"in_reply_to":"baada198_2195df32","updated":"2014-07-18 21:26:16.000000000","message":"this was added from failures in unit tests (plugins, etc) that don\u0027t follow the normal process_router path and therefore don\u0027t get properly defaulted with the \u0027distributed\u0027 key value.  We can either leave this here or change all the unit tests","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1cfdf25f4df74676d9f760e3a8f380325352c170","unresolved":false,"context_lines":[{"line_number":961,"context_line":"    def _get_ex_gw_port(self, ri):"},{"line_number":962,"context_line":"        return ri.router.get(\u0027gw_port\u0027)"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"    def _arping(self, ns_name, interface_name, ip_address, dist\u003dNone):"},{"line_number":965,"context_line":"        if dist:"},{"line_number":966,"context_line":"            device \u003d ip_lib.IPDevice(interface_name, self.root_helper,"},{"line_number":967,"context_line":"                                     namespace\u003dns_name)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_41e493df","line":964,"updated":"2014-07-18 18:45:45.000000000","message":"I personally would call the last param distributed rather than dist, even though that means breaking to new line.","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1fc932ddb1ce957867c21bf581c128e234217c4b","unresolved":false,"context_lines":[{"line_number":961,"context_line":"    def _get_ex_gw_port(self, ri):"},{"line_number":962,"context_line":"        return ri.router.get(\u0027gw_port\u0027)"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"    def _arping(self, ns_name, interface_name, ip_address, dist\u003dNone):"},{"line_number":965,"context_line":"        if dist:"},{"line_number":966,"context_line":"            device \u003d ip_lib.IPDevice(interface_name, self.root_helper,"},{"line_number":967,"context_line":"                                     namespace\u003dns_name)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_356a75ed","line":964,"in_reply_to":"baada198_41e493df","updated":"2014-07-18 21:26:16.000000000","message":"got it","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1cfdf25f4df74676d9f760e3a8f380325352c170","unresolved":false,"context_lines":[{"line_number":983,"context_line":"                device.addr.delete(net.version, ip_cidr)"},{"line_number":984,"context_line":""},{"line_number":985,"context_line":"    def _send_gratuitous_arp_packet(self, ns_name, interface_name, ip_address,"},{"line_number":986,"context_line":"                                    dist\u003dNone):"},{"line_number":987,"context_line":"        if self.conf.send_arp_for_ha \u003e 0:"},{"line_number":988,"context_line":"            eventlet.spawn_n(self._arping, ns_name, interface_name, ip_address,"},{"line_number":989,"context_line":"                             dist)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_61e997b6","line":986,"updated":"2014-07-18 18:45:45.000000000","message":"ditto","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1fc932ddb1ce957867c21bf581c128e234217c4b","unresolved":false,"context_lines":[{"line_number":983,"context_line":"                device.addr.delete(net.version, ip_cidr)"},{"line_number":984,"context_line":""},{"line_number":985,"context_line":"    def _send_gratuitous_arp_packet(self, ns_name, interface_name, ip_address,"},{"line_number":986,"context_line":"                                    dist\u003dNone):"},{"line_number":987,"context_line":"        if self.conf.send_arp_for_ha \u003e 0:"},{"line_number":988,"context_line":"            eventlet.spawn_n(self._arping, ns_name, interface_name, ip_address,"},{"line_number":989,"context_line":"                             dist)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_957421d0","line":986,"in_reply_to":"baada198_61e997b6","updated":"2014-07-18 21:26:16.000000000","message":"ditto","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1cfdf25f4df74676d9f760e3a8f380325352c170","unresolved":false,"context_lines":[{"line_number":1025,"context_line":"        return ri.router.get(l3_constants.SNAT_ROUTER_INTF_KEY, [])"},{"line_number":1026,"context_line":""},{"line_number":1027,"context_line":"    def get_floating_ips(self, ri):"},{"line_number":1028,"context_line":"        \"\"\"Filters Floating IPs to be hosted on this agent.\"\"\""},{"line_number":1029,"context_line":"        floating_ips \u003d ri.router.get(l3_constants.FLOATINGIP_KEY, [])"},{"line_number":1030,"context_line":"        if ri.router[\u0027distributed\u0027]:"},{"line_number":1031,"context_line":"            floating_ips \u003d [i for i in floating_ips if i[\u0027host\u0027] \u003d\u003d self.host]"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_c1d7c3ec","line":1028,"updated":"2014-07-18 18:45:45.000000000","message":"nit: This should be Filter","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1fc932ddb1ce957867c21bf581c128e234217c4b","unresolved":false,"context_lines":[{"line_number":1025,"context_line":"        return ri.router.get(l3_constants.SNAT_ROUTER_INTF_KEY, [])"},{"line_number":1026,"context_line":""},{"line_number":1027,"context_line":"    def get_floating_ips(self, ri):"},{"line_number":1028,"context_line":"        \"\"\"Filters Floating IPs to be hosted on this agent.\"\"\""},{"line_number":1029,"context_line":"        floating_ips \u003d ri.router.get(l3_constants.FLOATINGIP_KEY, [])"},{"line_number":1030,"context_line":"        if ri.router[\u0027distributed\u0027]:"},{"line_number":1031,"context_line":"            floating_ips \u003d [i for i in floating_ips if i[\u0027host\u0027] \u003d\u003d self.host]"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_f5639d17","line":1028,"in_reply_to":"baada198_c1d7c3ec","updated":"2014-07-18 21:26:16.000000000","message":"lots of verb tense changes.... got it","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1cfdf25f4df74676d9f760e3a8f380325352c170","unresolved":false,"context_lines":[{"line_number":1032,"context_line":"        return floating_ips"},{"line_number":1033,"context_line":""},{"line_number":1034,"context_line":"    def _map_internal_interfaces(self, ri, int_port, snat_ports):"},{"line_number":1035,"context_line":"        \"\"\"Returns the SNAT port for the given internal interface port.\"\"\""},{"line_number":1036,"context_line":"        fixed_ip \u003d int_port[\u0027fixed_ips\u0027][0]"},{"line_number":1037,"context_line":"        subnet_id \u003d fixed_ip[\u0027subnet_id\u0027]"},{"line_number":1038,"context_line":"        match_port \u003d [p for p in snat_ports if"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_e1d4c7ea","line":1035,"updated":"2014-07-18 18:45:45.000000000","message":"nit: this should be Return","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1fc932ddb1ce957867c21bf581c128e234217c4b","unresolved":false,"context_lines":[{"line_number":1032,"context_line":"        return floating_ips"},{"line_number":1033,"context_line":""},{"line_number":1034,"context_line":"    def _map_internal_interfaces(self, ri, int_port, snat_ports):"},{"line_number":1035,"context_line":"        \"\"\"Returns the SNAT port for the given internal interface port.\"\"\""},{"line_number":1036,"context_line":"        fixed_ip \u003d int_port[\u0027fixed_ips\u0027][0]"},{"line_number":1037,"context_line":"        subnet_id \u003d fixed_ip[\u0027subnet_id\u0027]"},{"line_number":1038,"context_line":"        match_port \u003d [p for p in snat_ports if"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_d5a3f940","line":1035,"in_reply_to":"baada198_e1d4c7ea","updated":"2014-07-18 21:26:16.000000000","message":"got it","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1cfdf25f4df74676d9f760e3a8f380325352c170","unresolved":false,"context_lines":[{"line_number":1321,"context_line":"        return rules"},{"line_number":1322,"context_line":""},{"line_number":1323,"context_line":"    def _create_agent_gateway_port(self, ri, network_id):"},{"line_number":1324,"context_line":"        \"\"\"Creates Floating IP gateway port."},{"line_number":1325,"context_line":""},{"line_number":1326,"context_line":"           Request port creation from Plugin then creates"},{"line_number":1327,"context_line":"           Floating IP namespace and adds gateway port."}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_4132d35e","line":1324,"updated":"2014-07-18 18:45:45.000000000","message":"nit: Create","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1fc932ddb1ce957867c21bf581c128e234217c4b","unresolved":false,"context_lines":[{"line_number":1321,"context_line":"        return rules"},{"line_number":1322,"context_line":""},{"line_number":1323,"context_line":"    def _create_agent_gateway_port(self, ri, network_id):"},{"line_number":1324,"context_line":"        \"\"\"Creates Floating IP gateway port."},{"line_number":1325,"context_line":""},{"line_number":1326,"context_line":"           Request port creation from Plugin then creates"},{"line_number":1327,"context_line":"           Floating IP namespace and adds gateway port."}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_75b06d8b","line":1324,"in_reply_to":"baada198_4132d35e","updated":"2014-07-18 21:26:16.000000000","message":"got it","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1cfdf25f4df74676d9f760e3a8f380325352c170","unresolved":false,"context_lines":[{"line_number":1344,"context_line":"                                 interface_name)"},{"line_number":1345,"context_line":""},{"line_number":1346,"context_line":"    def create_rtr_2_fip_link(self, ri, network_id):"},{"line_number":1347,"context_line":"        \"\"\"Creates interface between router and Floating IP namespace.\"\"\""},{"line_number":1348,"context_line":"        rtr_2_fip_name \u003d self.get_rtr_int_device_name(ri.router_id)"},{"line_number":1349,"context_line":"        fip_2_rtr_name \u003d self.get_fip_int_device_name(ri.router_id)"},{"line_number":1350,"context_line":"        fip_ns_name \u003d self.get_fip_ns_name(str(network_id))"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_6137d74d","line":1347,"updated":"2014-07-18 18:45:45.000000000","message":"nit: Create","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1fc932ddb1ce957867c21bf581c128e234217c4b","unresolved":false,"context_lines":[{"line_number":1344,"context_line":"                                 interface_name)"},{"line_number":1345,"context_line":""},{"line_number":1346,"context_line":"    def create_rtr_2_fip_link(self, ri, network_id):"},{"line_number":1347,"context_line":"        \"\"\"Creates interface between router and Floating IP namespace.\"\"\""},{"line_number":1348,"context_line":"        rtr_2_fip_name \u003d self.get_rtr_int_device_name(ri.router_id)"},{"line_number":1349,"context_line":"        fip_2_rtr_name \u003d self.get_fip_int_device_name(ri.router_id)"},{"line_number":1350,"context_line":"        fip_ns_name \u003d self.get_fip_ns_name(str(network_id))"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_55b8c974","line":1347,"in_reply_to":"baada198_6137d74d","updated":"2014-07-18 21:26:16.000000000","message":"got it","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1cfdf25f4df74676d9f760e3a8f380325352c170","unresolved":false,"context_lines":[{"line_number":1372,"context_line":"        self._handle_router_fip_nat_rules(ri, rtr_2_fip_name, \u0027add_rules\u0027)"},{"line_number":1373,"context_line":""},{"line_number":1374,"context_line":"    def floating_ip_added_dist(self, ri, fip):"},{"line_number":1375,"context_line":"        \"\"\"Adds floating IP to FIP namespace.\"\"\""},{"line_number":1376,"context_line":"        floating_ip \u003d fip[\u0027floating_ip_address\u0027]"},{"line_number":1377,"context_line":"        fixed_ip \u003d fip[\u0027fixed_ip_address\u0027]"},{"line_number":1378,"context_line":"        rule_pr \u003d self.fip_priorities.pop()"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_a13c8f30","line":1375,"updated":"2014-07-18 18:45:45.000000000","message":"nit: Add","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1fc932ddb1ce957867c21bf581c128e234217c4b","unresolved":false,"context_lines":[{"line_number":1372,"context_line":"        self._handle_router_fip_nat_rules(ri, rtr_2_fip_name, \u0027add_rules\u0027)"},{"line_number":1373,"context_line":""},{"line_number":1374,"context_line":"    def floating_ip_added_dist(self, ri, fip):"},{"line_number":1375,"context_line":"        \"\"\"Adds floating IP to FIP namespace.\"\"\""},{"line_number":1376,"context_line":"        floating_ip \u003d fip[\u0027floating_ip_address\u0027]"},{"line_number":1377,"context_line":"        fixed_ip \u003d fip[\u0027fixed_ip_address\u0027]"},{"line_number":1378,"context_line":"        rule_pr \u003d self.fip_priorities.pop()"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_f5bc7d6e","line":1375,"in_reply_to":"baada198_a13c8f30","updated":"2014-07-18 21:26:16.000000000","message":"got it","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1cfdf25f4df74676d9f760e3a8f380325352c170","unresolved":false,"context_lines":[{"line_number":1397,"context_line":"        ri.dist_fip_count \u003d ri.dist_fip_count + 1"},{"line_number":1398,"context_line":""},{"line_number":1399,"context_line":"    def floating_ip_removed_dist(self, ri, fip_cidr):"},{"line_number":1400,"context_line":"        \"\"\"Removes floating IP from FIP namespace.\"\"\""},{"line_number":1401,"context_line":"        floating_ip \u003d fip_cidr.split(\u0027/\u0027)[0]"},{"line_number":1402,"context_line":"        rtr_2_fip_name \u003d self.get_rtr_int_device_name(ri.router_id)"},{"line_number":1403,"context_line":"        fip_2_rtr_name \u003d self.get_fip_int_device_name(ri.router_id)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_c14503b5","line":1400,"updated":"2014-07-18 18:45:45.000000000","message":"nit: Remove","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1fc932ddb1ce957867c21bf581c128e234217c4b","unresolved":false,"context_lines":[{"line_number":1397,"context_line":"        ri.dist_fip_count \u003d ri.dist_fip_count + 1"},{"line_number":1398,"context_line":""},{"line_number":1399,"context_line":"    def floating_ip_removed_dist(self, ri, fip_cidr):"},{"line_number":1400,"context_line":"        \"\"\"Removes floating IP from FIP namespace.\"\"\""},{"line_number":1401,"context_line":"        floating_ip \u003d fip_cidr.split(\u0027/\u0027)[0]"},{"line_number":1402,"context_line":"        rtr_2_fip_name \u003d self.get_rtr_int_device_name(ri.router_id)"},{"line_number":1403,"context_line":"        fip_2_rtr_name \u003d self.get_fip_int_device_name(ri.router_id)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_9586e1b7","line":1400,"in_reply_to":"baada198_c14503b5","updated":"2014-07-18 21:26:16.000000000","message":"got it","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1cfdf25f4df74676d9f760e3a8f380325352c170","unresolved":false,"context_lines":[{"line_number":1466,"context_line":"                self.fullsync \u003d True"},{"line_number":1467,"context_line":""},{"line_number":1468,"context_line":"    def add_arp_entry(self, context, payload):"},{"line_number":1469,"context_line":"        \"\"\"Adds arp entry into router namespace.  Called from RPC.\"\"\""},{"line_number":1470,"context_line":"        arp_table \u003d payload[\u0027arp_table\u0027]"},{"line_number":1471,"context_line":"        router_id \u003d payload[\u0027router_id\u0027]"},{"line_number":1472,"context_line":"        ip \u003d arp_table[\u0027ip_address\u0027]"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_01137bb8","line":1469,"updated":"2014-07-18 18:45:45.000000000","message":"nit: Add","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1fc932ddb1ce957867c21bf581c128e234217c4b","unresolved":false,"context_lines":[{"line_number":1466,"context_line":"                self.fullsync \u003d True"},{"line_number":1467,"context_line":""},{"line_number":1468,"context_line":"    def add_arp_entry(self, context, payload):"},{"line_number":1469,"context_line":"        \"\"\"Adds arp entry into router namespace.  Called from RPC.\"\"\""},{"line_number":1470,"context_line":"        arp_table \u003d payload[\u0027arp_table\u0027]"},{"line_number":1471,"context_line":"        router_id \u003d payload[\u0027router_id\u0027]"},{"line_number":1472,"context_line":"        ip \u003d arp_table[\u0027ip_address\u0027]"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_55a1a944","line":1469,"in_reply_to":"baada198_01137bb8","updated":"2014-07-18 21:26:16.000000000","message":"got it","commit_id":"b4bbc3f69aec59f59a845694be041a148d24cabe"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c37d862d224ed577160de12de298a3bdf139ad28","unresolved":false,"context_lines":[{"line_number":57,"context_line":"FIP_2_ROUTER_DEV_PREFIX \u003d \u0027fpr-\u0027"},{"line_number":58,"context_line":"ROUTER_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":59,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"},{"line_number":60,"context_line":"FIP_LL_PREFIX \u003d \u0027169.254.30.\u0027"},{"line_number":61,"context_line":"# Route Table index for FIPs"},{"line_number":62,"context_line":"FIP_RT_TBL \u003d 16"},{"line_number":63,"context_line":"# Rule priority range for FIPs"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_78e56ba2","line":60,"updated":"2014-07-22 08:46:03.000000000","message":"I will modify this to use netaddr.IPNetworks in my follow on to handle fip namespace across restarts.  I think it will help with the implementation there.  So, I will withdraw my -1 for that.","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"b9662b3dacbed419c0e82fab7aa75b29e488e0d8","unresolved":false,"context_lines":[{"line_number":57,"context_line":"FIP_2_ROUTER_DEV_PREFIX \u003d \u0027fpr-\u0027"},{"line_number":58,"context_line":"ROUTER_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":59,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"},{"line_number":60,"context_line":"FIP_LL_PREFIX \u003d \u0027169.254.30.\u0027"},{"line_number":61,"context_line":"# Route Table index for FIPs"},{"line_number":62,"context_line":"FIP_RT_TBL \u003d 16"},{"line_number":63,"context_line":"# Rule priority range for FIPs"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_3a101d4f","line":60,"in_reply_to":"baada198_78e56ba2","updated":"2014-07-22 17:23:36.000000000","message":"Carl: Great, I have sent you code that you can incorporate. I agree   with your assessment, code posted here provides sufficient functionality for now","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"0bfe6a00adeba0f74ee36bab0312d6e73950a19e","unresolved":false,"context_lines":[{"line_number":424,"context_line":"        # dvr data"},{"line_number":425,"context_line":"        self.agent_gateway_port \u003d None"},{"line_number":426,"context_line":"        self.agent_fip_count \u003d 0"},{"line_number":427,"context_line":"        self.local_ips \u003d set(range(2, 251))"},{"line_number":428,"context_line":"        self.fip_priorities \u003d set(range(FIP_PR_START, FIP_PR_END))"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"        self._queue \u003d RouterProcessingQueue()"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_b762d0aa","line":427,"updated":"2014-07-21 18:43:55.000000000","message":"Why 2-250?  Shouldn\u0027t you be able to use from 1-254?","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"b9662b3dacbed419c0e82fab7aa75b29e488e0d8","unresolved":false,"context_lines":[{"line_number":424,"context_line":"        # dvr data"},{"line_number":425,"context_line":"        self.agent_gateway_port \u003d None"},{"line_number":426,"context_line":"        self.agent_fip_count \u003d 0"},{"line_number":427,"context_line":"        self.local_ips \u003d set(range(2, 251))"},{"line_number":428,"context_line":"        self.fip_priorities \u003d set(range(FIP_PR_START, FIP_PR_END))"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"        self._queue \u003d RouterProcessingQueue()"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_fde5bfa4","line":427,"in_reply_to":"baada198_36483b5c","updated":"2014-07-22 17:23:36.000000000","message":"Brian: agreed, we will add a comment if there is another patch update before the netaddr supported code is rolled in.","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c37d862d224ed577160de12de298a3bdf139ad28","unresolved":false,"context_lines":[{"line_number":424,"context_line":"        # dvr data"},{"line_number":425,"context_line":"        self.agent_gateway_port \u003d None"},{"line_number":426,"context_line":"        self.agent_fip_count \u003d 0"},{"line_number":427,"context_line":"        self.local_ips \u003d set(range(2, 251))"},{"line_number":428,"context_line":"        self.fip_priorities \u003d set(range(FIP_PR_START, FIP_PR_END))"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"        self._queue \u003d RouterProcessingQueue()"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_88358e46","line":427,"in_reply_to":"baada198_3d43ec3f","updated":"2014-07-22 08:46:03.000000000","message":"I wondered the same thing.  It seems to start at 2 because the code use /31 subnets which are essential even/odd pairs.  There is one more pair that won\u0027t be used 252/253.  I couldn\u0027t figure out why that one couldn\u0027t be used.  Maybe it is just to make it an even 125?  I dunno.\n\nI\u0027m okay with this for now.  I don\u0027t think we\u0027re at risk of over subscribing this pool.  It is conceivable that a compute host *could* use up the entire pool in a pathological case where a large host hosted many very small VMs all from different tenants.  This would cause many routers to be hosted on the compute host.\n\nAs discussed with Rajeev and Mike, we\u0027ll clean this up in a follow on patch.  Mostly, I want the cleanup to avoid head-scratching in the future when new developers try to figure out what is going on here.","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"09a449fa26f18e5b2d069bd2acf40b7af7c8c3b1","unresolved":false,"context_lines":[{"line_number":424,"context_line":"        # dvr data"},{"line_number":425,"context_line":"        self.agent_gateway_port \u003d None"},{"line_number":426,"context_line":"        self.agent_fip_count \u003d 0"},{"line_number":427,"context_line":"        self.local_ips \u003d set(range(2, 251))"},{"line_number":428,"context_line":"        self.fip_priorities \u003d set(range(FIP_PR_START, FIP_PR_END))"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"        self._queue \u003d RouterProcessingQueue()"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_36483b5c","line":427,"in_reply_to":"baada198_88358e46","updated":"2014-07-22 15:56:56.000000000","message":"I talked to Rajeev yesterday and it seemed like we could even start at 0 and get 128 pairs if necessary, since with the /31 we\u0027re basically making a point-to-point link and the kernel might not have a problem.  As long as we add a comment, even in a follow-up, about what this is, is OK with me.","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"9408a63f619d6fada266ba95316050bb476a0ec3","unresolved":false,"context_lines":[{"line_number":424,"context_line":"        # dvr data"},{"line_number":425,"context_line":"        self.agent_gateway_port \u003d None"},{"line_number":426,"context_line":"        self.agent_fip_count \u003d 0"},{"line_number":427,"context_line":"        self.local_ips \u003d set(range(2, 251))"},{"line_number":428,"context_line":"        self.fip_priorities \u003d set(range(FIP_PR_START, FIP_PR_END))"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"        self._queue \u003d RouterProcessingQueue()"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_3d43ec3f","line":427,"in_reply_to":"baada198_b762d0aa","updated":"2014-07-22 03:24:49.000000000","message":"Brian: 2-251 gives about 125 pairs, seems enough to accommodate reasonable max number of IRs hosting floatingIPs within a node. Started from 2 for a cosmetic reason to avoid an IP address ending in  \u00270\u0027 (x.y.z.0).","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"3cd396b3f9c456f5e5568ef09afaa4cde5e7c1e4","unresolved":false,"context_lines":[{"line_number":784,"context_line":"                fip_statuses \u003d self.process_router_floating_ip_addresses("},{"line_number":785,"context_line":"                    ri, ex_gw_port)"},{"line_number":786,"context_line":"        except Exception:"},{"line_number":787,"context_line":"            # TODO(salv-orlando): Less broad catching"},{"line_number":788,"context_line":"            # All floating IPs must be put in error state"},{"line_number":789,"context_line":"            for fip in ri.router.get(l3_constants.FLOATINGIP_KEY, []):"},{"line_number":790,"context_line":"                fip_statuses[fip[\u0027id\u0027]] \u003d l3_constants.FLOATINGIP_STATUS_ERROR"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_c61ae06e","line":787,"updated":"2014-07-22 22:22:19.000000000","message":"In addition to salv-orlando\u0027s comment, there really should be a LOG.exception message here. Otherwise, errors (TypeError in L1381 for example) are not being flagged. The change may need to be in another patch.","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"c882c3bab1f1f13ef0ce45c8a45c65e6c62a25ac","unresolved":false,"context_lines":[{"line_number":784,"context_line":"                fip_statuses \u003d self.process_router_floating_ip_addresses("},{"line_number":785,"context_line":"                    ri, ex_gw_port)"},{"line_number":786,"context_line":"        except Exception:"},{"line_number":787,"context_line":"            # TODO(salv-orlando): Less broad catching"},{"line_number":788,"context_line":"            # All floating IPs must be put in error state"},{"line_number":789,"context_line":"            for fip in ri.router.get(l3_constants.FLOATINGIP_KEY, []):"},{"line_number":790,"context_line":"                fip_statuses[fip[\u0027id\u0027]] \u003d l3_constants.FLOATINGIP_STATUS_ERROR"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_695d6779","line":787,"in_reply_to":"baada198_c61ae06e","updated":"2014-07-23 05:19:52.000000000","message":"that TODO has been there a while pre-icehouse not related to DVR","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c37d862d224ed577160de12de298a3bdf139ad28","unresolved":false,"context_lines":[{"line_number":821,"context_line":"            # Add back the jump to float-snat"},{"line_number":822,"context_line":"            iptables_manager.ipv4[\u0027nat\u0027].add_rule(\u0027snat\u0027, \u0027-j $float-snat\u0027)"},{"line_number":823,"context_line":""},{"line_number":824,"context_line":"        # And add them back if the action is add_rules"},{"line_number":825,"context_line":"        if action \u003d\u003d \u0027add_rules\u0027 and ex_gw_port:"},{"line_number":826,"context_line":"            # ex_gw_port should not be None in this case"},{"line_number":827,"context_line":"            # NAT rules are added only if ex_gw_port has an IPv4 address"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_7b0c8293","line":824,"updated":"2014-07-22 08:46:03.000000000","message":"Nit:  Not really appropriate to fix this mistake in this patch.","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c37d862d224ed577160de12de298a3bdf139ad28","unresolved":false,"context_lines":[{"line_number":850,"context_line":"        # Add back the jump to float-snat"},{"line_number":851,"context_line":"        ri.iptables_manager.ipv4[\u0027nat\u0027].add_rule(\u0027snat\u0027, \u0027-j $float-snat\u0027)"},{"line_number":852,"context_line":""},{"line_number":853,"context_line":"        # And add them back if the action if add_rules"},{"line_number":854,"context_line":"        if action \u003d\u003d \u0027add_rules\u0027 and interface_name:"},{"line_number":855,"context_line":"            rule \u003d (\u0027POSTROUTING\u0027, \u0027! -i %(interface_name)s \u0027"},{"line_number":856,"context_line":"                    \u0027! -o %(interface_name)s -m conntrack ! \u0027"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_7b356243","line":853,"updated":"2014-07-22 08:46:03.000000000","message":"Nit:  s/if/is/","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"c882c3bab1f1f13ef0ce45c8a45c65e6c62a25ac","unresolved":false,"context_lines":[{"line_number":850,"context_line":"        # Add back the jump to float-snat"},{"line_number":851,"context_line":"        ri.iptables_manager.ipv4[\u0027nat\u0027].add_rule(\u0027snat\u0027, \u0027-j $float-snat\u0027)"},{"line_number":852,"context_line":""},{"line_number":853,"context_line":"        # And add them back if the action if add_rules"},{"line_number":854,"context_line":"        if action \u003d\u003d \u0027add_rules\u0027 and interface_name:"},{"line_number":855,"context_line":"            rule \u003d (\u0027POSTROUTING\u0027, \u0027! -i %(interface_name)s \u0027"},{"line_number":856,"context_line":"                    \u0027! -o %(interface_name)s -m conntrack ! \u0027"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_e94897b5","line":853,"in_reply_to":"baada198_7b356243","updated":"2014-07-23 05:19:52.000000000","message":"done","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"0bfe6a00adeba0f74ee36bab0312d6e73950a19e","unresolved":false,"context_lines":[{"line_number":852,"context_line":""},{"line_number":853,"context_line":"        # And add them back if the action if add_rules"},{"line_number":854,"context_line":"        if action \u003d\u003d \u0027add_rules\u0027 and interface_name:"},{"line_number":855,"context_line":"            rule \u003d (\u0027POSTROUTING\u0027, \u0027! -i %(interface_name)s \u0027"},{"line_number":856,"context_line":"                    \u0027! -o %(interface_name)s -m conntrack ! \u0027"},{"line_number":857,"context_line":"                    \u0027--ctstate DNAT -j ACCEPT\u0027 %"},{"line_number":858,"context_line":"                    {\u0027interface_name\u0027: interface_name})"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_7750382c","line":855,"updated":"2014-07-21 18:43:55.000000000","message":"Does this apply?  \u0027-i $interface\u0027 can\u0027t be used with POSTROUTING\n\n--\u003e iptables -t nat -A POSTROUTING ! -i eth0 ! -o eth1 -m conntrack ! --ctstate DNAT -j ACCEPT\niptables v1.4.12: Can\u0027t use -i with POSTROUTING\n\nTry `iptables -h\u0027 or \u0027iptables --help\u0027 for more information.","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"b9662b3dacbed419c0e82fab7aa75b29e488e0d8","unresolved":false,"context_lines":[{"line_number":852,"context_line":""},{"line_number":853,"context_line":"        # And add them back if the action if add_rules"},{"line_number":854,"context_line":"        if action \u003d\u003d \u0027add_rules\u0027 and interface_name:"},{"line_number":855,"context_line":"            rule \u003d (\u0027POSTROUTING\u0027, \u0027! -i %(interface_name)s \u0027"},{"line_number":856,"context_line":"                    \u0027! -o %(interface_name)s -m conntrack ! \u0027"},{"line_number":857,"context_line":"                    \u0027--ctstate DNAT -j ACCEPT\u0027 %"},{"line_number":858,"context_line":"                    {\u0027interface_name\u0027: interface_name})"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_7defefb1","line":855,"in_reply_to":"baada198_1667b752","updated":"2014-07-22 17:23:36.000000000","message":"Brian: agreed. I have verified this line to work in tests done when we originally submitted this patch","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"9408a63f619d6fada266ba95316050bb476a0ec3","unresolved":false,"context_lines":[{"line_number":852,"context_line":""},{"line_number":853,"context_line":"        # And add them back if the action if add_rules"},{"line_number":854,"context_line":"        if action \u003d\u003d \u0027add_rules\u0027 and interface_name:"},{"line_number":855,"context_line":"            rule \u003d (\u0027POSTROUTING\u0027, \u0027! -i %(interface_name)s \u0027"},{"line_number":856,"context_line":"                    \u0027! -o %(interface_name)s -m conntrack ! \u0027"},{"line_number":857,"context_line":"                    \u0027--ctstate DNAT -j ACCEPT\u0027 %"},{"line_number":858,"context_line":"                    {\u0027interface_name\u0027: interface_name})"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_7d8c8435","line":855,"in_reply_to":"baada198_7750382c","updated":"2014-07-22 03:24:49.000000000","message":"This is same rule as at L840 upstream and L1197 this patch. I could see a similar rule in my setup:\n\nChain neutron-l3-agent-POSTROUTING (1 references)\nnum   pkts bytes target     prot opt in     out     source               destination         \n1        0     0 ACCEPT     all  --  !qg-46a118a4-dd !qg-46a118a4-dd  0.0.0.0/0            0.0.0.0/0            ! ctstate DNAT","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c37d862d224ed577160de12de298a3bdf139ad28","unresolved":false,"context_lines":[{"line_number":852,"context_line":""},{"line_number":853,"context_line":"        # And add them back if the action if add_rules"},{"line_number":854,"context_line":"        if action \u003d\u003d \u0027add_rules\u0027 and interface_name:"},{"line_number":855,"context_line":"            rule \u003d (\u0027POSTROUTING\u0027, \u0027! -i %(interface_name)s \u0027"},{"line_number":856,"context_line":"                    \u0027! -o %(interface_name)s -m conntrack ! \u0027"},{"line_number":857,"context_line":"                    \u0027--ctstate DNAT -j ACCEPT\u0027 %"},{"line_number":858,"context_line":"                    {\u0027interface_name\u0027: interface_name})"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_fb6ed22a","line":855,"in_reply_to":"baada198_7d8c8435","updated":"2014-07-22 08:46:03.000000000","message":"I\u0027d like to know what the story is here.  Something looks fishy but may be outside the scope of this patch.  It seems that this rule doesn\u0027t actually apply directly to the POSTROUTING chain, but to the neutron-l3-agent-POSTROUTING chain.  That is probably why it is accepted.  However, if it is still run in the context of POSTROUTING, does the rule really make sense?  That is a question worth answering.","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"09a449fa26f18e5b2d069bd2acf40b7af7c8c3b1","unresolved":false,"context_lines":[{"line_number":852,"context_line":""},{"line_number":853,"context_line":"        # And add them back if the action if add_rules"},{"line_number":854,"context_line":"        if action \u003d\u003d \u0027add_rules\u0027 and interface_name:"},{"line_number":855,"context_line":"            rule \u003d (\u0027POSTROUTING\u0027, \u0027! -i %(interface_name)s \u0027"},{"line_number":856,"context_line":"                    \u0027! -o %(interface_name)s -m conntrack ! \u0027"},{"line_number":857,"context_line":"                    \u0027--ctstate DNAT -j ACCEPT\u0027 %"},{"line_number":858,"context_line":"                    {\u0027interface_name\u0027: interface_name})"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_1667b752","line":855,"in_reply_to":"baada198_fb6ed22a","updated":"2014-07-22 15:56:56.000000000","message":"Carl, yes this works because this is a wrapped chain (I should have known that!), I was able to apply it to a \"haley-POSTROUTING\" chain.  The \"-i $interface\" won\u0027t be used in the POSTROUTING context.  Since it\u0027s used elsewhere and works I\u0027m willing to leave it alone and open a bug to investigate cleaning it up.","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c37d862d224ed577160de12de298a3bdf139ad28","unresolved":false,"context_lines":[{"line_number":887,"context_line":"        \"\"\""},{"line_number":888,"context_line":"        fip_statuses \u003d {}"},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"        floating_ips \u003d ri.router.get(l3_constants.FLOATINGIP_KEY, [])"},{"line_number":891,"context_line":"        if ri.router[\u0027distributed\u0027]:"},{"line_number":892,"context_line":"            # filter out only FIPs for this host/agent"},{"line_number":893,"context_line":"            floating_ips \u003d [i for i in floating_ips if i[\u0027host\u0027] \u003d\u003d self.host]"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_8f3f5024","line":890,"updated":"2014-07-22 08:46:03.000000000","message":"self.get_floating_ips?  Would avoid the need for L893 which duplicates code from it.","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"b9662b3dacbed419c0e82fab7aa75b29e488e0d8","unresolved":false,"context_lines":[{"line_number":887,"context_line":"        \"\"\""},{"line_number":888,"context_line":"        fip_statuses \u003d {}"},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"        floating_ips \u003d ri.router.get(l3_constants.FLOATINGIP_KEY, [])"},{"line_number":891,"context_line":"        if ri.router[\u0027distributed\u0027]:"},{"line_number":892,"context_line":"            # filter out only FIPs for this host/agent"},{"line_number":893,"context_line":"            floating_ips \u003d [i for i in floating_ips if i[\u0027host\u0027] \u003d\u003d self.host]"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_280c573b","line":890,"in_reply_to":"baada198_8f3f5024","updated":"2014-07-22 17:23:36.000000000","message":"Good point. Doesn\u0027t seem to affect functionality, are you ok if we take it up in a follow up phase and not hold up the patch?","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c37d862d224ed577160de12de298a3bdf139ad28","unresolved":false,"context_lines":[{"line_number":955,"context_line":"    def _get_ex_gw_port(self, ri):"},{"line_number":956,"context_line":"        return ri.router.get(\u0027gw_port\u0027)"},{"line_number":957,"context_line":""},{"line_number":958,"context_line":"    def _arping(self, ns_name, interface_name, ip_address, distributed\u003dNone):"},{"line_number":959,"context_line":"        if distributed:"},{"line_number":960,"context_line":"            device \u003d ip_lib.IPDevice(interface_name, self.root_helper,"},{"line_number":961,"context_line":"                                     namespace\u003dns_name)"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_8f7750d3","line":958,"updated":"2014-07-22 08:46:03.000000000","message":"nit:  distributed\u003dFalse","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"c882c3bab1f1f13ef0ce45c8a45c65e6c62a25ac","unresolved":false,"context_lines":[{"line_number":955,"context_line":"    def _get_ex_gw_port(self, ri):"},{"line_number":956,"context_line":"        return ri.router.get(\u0027gw_port\u0027)"},{"line_number":957,"context_line":""},{"line_number":958,"context_line":"    def _arping(self, ns_name, interface_name, ip_address, distributed\u003dNone):"},{"line_number":959,"context_line":"        if distributed:"},{"line_number":960,"context_line":"            device \u003d ip_lib.IPDevice(interface_name, self.root_helper,"},{"line_number":961,"context_line":"                                     namespace\u003dns_name)"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_09c5cb09","line":958,"in_reply_to":"baada198_8f7750d3","updated":"2014-07-23 05:19:52.000000000","message":"done","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c37d862d224ed577160de12de298a3bdf139ad28","unresolved":false,"context_lines":[{"line_number":974,"context_line":"        except Exception as e:"},{"line_number":975,"context_line":"            LOG.error(_(\"Failed sending gratuitous ARP: %s\"), str(e))"},{"line_number":976,"context_line":"        if distributed:"},{"line_number":977,"context_line":"                device.addr.delete(net.version, ip_cidr)"},{"line_number":978,"context_line":""},{"line_number":979,"context_line":"    def _send_gratuitous_arp_packet(self, ns_name, interface_name, ip_address,"},{"line_number":980,"context_line":"                                    distributed\u003dNone):"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_8f5e7043","line":977,"updated":"2014-07-22 08:46:03.000000000","message":"nit:  too much indentation.","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"c882c3bab1f1f13ef0ce45c8a45c65e6c62a25ac","unresolved":false,"context_lines":[{"line_number":974,"context_line":"        except Exception as e:"},{"line_number":975,"context_line":"            LOG.error(_(\"Failed sending gratuitous ARP: %s\"), str(e))"},{"line_number":976,"context_line":"        if distributed:"},{"line_number":977,"context_line":"                device.addr.delete(net.version, ip_cidr)"},{"line_number":978,"context_line":""},{"line_number":979,"context_line":"    def _send_gratuitous_arp_packet(self, ns_name, interface_name, ip_address,"},{"line_number":980,"context_line":"                                    distributed\u003dNone):"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_29ca8f1a","line":977,"in_reply_to":"baada198_8f5e7043","updated":"2014-07-23 05:19:52.000000000","message":"done","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"3cd396b3f9c456f5e5568ef09afaa4cde5e7c1e4","unresolved":false,"context_lines":[{"line_number":977,"context_line":"                device.addr.delete(net.version, ip_cidr)"},{"line_number":978,"context_line":""},{"line_number":979,"context_line":"    def _send_gratuitous_arp_packet(self, ns_name, interface_name, ip_address,"},{"line_number":980,"context_line":"                                    distributed\u003dNone):"},{"line_number":981,"context_line":"        if self.conf.send_arp_for_ha \u003e 0:"},{"line_number":982,"context_line":"            eventlet.spawn_n(self._arping, ns_name, interface_name, ip_address,"},{"line_number":983,"context_line":"                             distributed)"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_a6908c97","line":980,"updated":"2014-07-22 22:22:19.000000000","message":"Is \u0027distributed\u0027 actually a boolean?","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"c882c3bab1f1f13ef0ce45c8a45c65e6c62a25ac","unresolved":false,"context_lines":[{"line_number":977,"context_line":"                device.addr.delete(net.version, ip_cidr)"},{"line_number":978,"context_line":""},{"line_number":979,"context_line":"    def _send_gratuitous_arp_packet(self, ns_name, interface_name, ip_address,"},{"line_number":980,"context_line":"                                    distributed\u003dNone):"},{"line_number":981,"context_line":"        if self.conf.send_arp_for_ha \u003e 0:"},{"line_number":982,"context_line":"            eventlet.spawn_n(self._arping, ns_name, interface_name, ip_address,"},{"line_number":983,"context_line":"                             distributed)"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_49cfc329","line":980,"in_reply_to":"baada198_a6908c97","updated":"2014-07-23 05:19:52.000000000","message":"done","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c37d862d224ed577160de12de298a3bdf139ad28","unresolved":false,"context_lines":[{"line_number":1099,"context_line":""},{"line_number":1100,"context_line":"    def _external_gateway_added(self, ri, ex_gw_port, interface_name,"},{"line_number":1101,"context_line":"                                internal_cidrs, ns_name, preserve_ips):"},{"line_number":1102,"context_line":"        if not ip_lib.device_exists(interface_name,"},{"line_number":1103,"context_line":"                                    root_helper\u003dself.root_helper,"},{"line_number":1104,"context_line":"                                    namespace\u003dns_name):"},{"line_number":1105,"context_line":"            self.driver.plug(ex_gw_port[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_58541dfe","line":1102,"updated":"2014-07-22 08:46:03.000000000","message":"This check shouldn\u0027t be necessary any longer.  The plugin should handle this.  This must a remnant from when this code was based on Icehouse or earlier.","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c37d862d224ed577160de12de298a3bdf139ad28","unresolved":false,"context_lines":[{"line_number":1121,"context_line":"    def agent_gateway_added(self, ns_name, ex_gw_port,"},{"line_number":1122,"context_line":"                            interface_name):"},{"line_number":1123,"context_line":"        \"\"\"Add Floating IP gateway port to FIP namespace.\"\"\""},{"line_number":1124,"context_line":"        if not ip_lib.device_exists(interface_name,"},{"line_number":1125,"context_line":"                                    root_helper\u003dself.root_helper,"},{"line_number":1126,"context_line":"                                    namespace\u003dns_name):"},{"line_number":1127,"context_line":"            self.driver.plug(ex_gw_port[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_db8ca783","line":1124,"updated":"2014-07-22 08:46:03.000000000","message":"See L1102.","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"b9662b3dacbed419c0e82fab7aa75b29e488e0d8","unresolved":false,"context_lines":[{"line_number":1121,"context_line":"    def agent_gateway_added(self, ns_name, ex_gw_port,"},{"line_number":1122,"context_line":"                            interface_name):"},{"line_number":1123,"context_line":"        \"\"\"Add Floating IP gateway port to FIP namespace.\"\"\""},{"line_number":1124,"context_line":"        if not ip_lib.device_exists(interface_name,"},{"line_number":1125,"context_line":"                                    root_helper\u003dself.root_helper,"},{"line_number":1126,"context_line":"                                    namespace\u003dns_name):"},{"line_number":1127,"context_line":"            self.driver.plug(ex_gw_port[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_c834bbae","line":1124,"in_reply_to":"baada198_db8ca783","updated":"2014-07-22 17:23:36.000000000","message":"Yes, this is how it used to be. Will opportunistically attend to it.","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"3cd396b3f9c456f5e5568ef09afaa4cde5e7c1e4","unresolved":false,"context_lines":[{"line_number":1378,"context_line":"            self.get_fip_ext_device_name(self.agent_gateway_port[\u0027id\u0027]))"},{"line_number":1379,"context_line":"        self._send_gratuitous_arp_packet(fip_ns_name,"},{"line_number":1380,"context_line":"                                         interface_name, floating_ip,"},{"line_number":1381,"context_line":"                                         dist\u003dTrue)"},{"line_number":1382,"context_line":"        # update internal structures"},{"line_number":1383,"context_line":"        self.agent_fip_count \u003d self.agent_fip_count + 1"},{"line_number":1384,"context_line":"        ri.dist_fip_count \u003d ri.dist_fip_count + 1"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_c01ac77b","line":1381,"updated":"2014-07-22 22:22:19.000000000","message":"distributed\u003dTrue.  This is causing a TypeError exception to be raised.  The exception is being caught in process_router (L788). And no error message is printed in the screen-q-l3 log.\n\nAs a result, the L3 agent is thinking that that a router has no floating ips configured on it. The result is that the agent won\u0027t carry out any new floating-ip configuration after the 1st floating-ip has been configured in the qrouter- namespace.","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"a644ab34c822ee645552acaac38f01694dbe7e8c","unresolved":false,"context_lines":[{"line_number":1378,"context_line":"            self.get_fip_ext_device_name(self.agent_gateway_port[\u0027id\u0027]))"},{"line_number":1379,"context_line":"        self._send_gratuitous_arp_packet(fip_ns_name,"},{"line_number":1380,"context_line":"                                         interface_name, floating_ip,"},{"line_number":1381,"context_line":"                                         dist\u003dTrue)"},{"line_number":1382,"context_line":"        # update internal structures"},{"line_number":1383,"context_line":"        self.agent_fip_count \u003d self.agent_fip_count + 1"},{"line_number":1384,"context_line":"        ri.dist_fip_count \u003d ri.dist_fip_count + 1"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_49b26307","line":1381,"in_reply_to":"baada198_c01ac77b","updated":"2014-07-22 22:55:22.000000000","message":"Good catch Stephen - this came from a previous review comment to spell out distributed.  I\u0027ll fix it.","commit_id":"a01e25ca98dbe60cd9308bbf1ffe30f549aabe58"}],"neutron/common/constants.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"6c1ad63de3d7a4dada4f9ffb49c875cbf4324bc1","unresolved":false,"context_lines":[{"line_number":35,"context_line":"DEVICE_OWNER_FLOATINGIP \u003d \"network:floatingip\""},{"line_number":36,"context_line":"DEVICE_OWNER_DHCP \u003d \"network:dhcp\""},{"line_number":37,"context_line":"DEVICE_OWNER_AGENT_GW \u003d \"network:floatingip_agent_gateway\""},{"line_number":38,"context_line":"DEVICE_OWNER_ROUTER_SNAT \u003d \"network:router_centralized_snat\""},{"line_number":39,"context_line":"DEVICE_ID_RESERVED_DHCP_PORT \u003d \"reserved_dhcp_port\""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"FLOATINGIP_KEY \u003d \u0027_floatingips\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_003e8db9","line":38,"updated":"2014-06-23 19:25:00.000000000","message":"These two changes are also from Swami\u0027s patch.","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cdaf7efefc346cc8a91cb8b7ee56890f35a8f106","unresolved":false,"context_lines":[{"line_number":41,"context_line":"FLOATINGIP_KEY \u003d \u0027_floatingips\u0027"},{"line_number":42,"context_line":"INTERFACE_KEY \u003d \u0027_interfaces\u0027"},{"line_number":43,"context_line":"FLOATINGIP_AGENT_INTF_KEY \u003d \u0027_floatingip_agent_interfaces\u0027"},{"line_number":44,"context_line":"SNAT_ROUTER_INTF_KEY \u003d \u0027_snat_router_interfaces\u0027"},{"line_number":45,"context_line":"METERING_LABEL_KEY \u003d \u0027_metering_labels\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"IPv4 \u003d \u0027IPv4\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_c5575759","line":44,"updated":"2014-06-23 19:16:22.000000000","message":"These two changes are made in Swami\u0027s patch.  If this patch needs these changes then it should be rebased to depend on Swami\u0027s patch.","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cdaf7efefc346cc8a91cb8b7ee56890f35a8f106","unresolved":false,"context_lines":[{"line_number":97,"context_line":"L3_AGENT_SCHEDULER_EXT_ALIAS \u003d \u0027l3_agent_scheduler\u0027"},{"line_number":98,"context_line":"DHCP_AGENT_SCHEDULER_EXT_ALIAS \u003d \u0027dhcp_agent_scheduler\u0027"},{"line_number":99,"context_line":"LBAAS_AGENT_SCHEDULER_EXT_ALIAS \u003d \u0027lbaas_agent_scheduler\u0027"},{"line_number":100,"context_line":"L3_DISTRIBUTED_EXT_ALIAS \u003d \u0027l3-dvr\u0027"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"# Protocol names and numbers for Security Groups/Firewalls"},{"line_number":103,"context_line":"PROTO_NAME_TCP \u003d \u0027tcp\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_8528efef","line":100,"updated":"2014-06-23 19:16:22.000000000","message":"This disagrees with Swami\u0027s current patch.  Also, since Swami\u0027s patch makes this change, this patch should not duplicated.  This patch should be rebased to depend on Swami\u0027s.","commit_id":"3bd8e945ec498bbf75ac6772889183b1acacc5ae"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"800e6be206704ddea0141e1db1a2109b491d744d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"1ae5cdf2_9e2e70aa","updated":"2014-06-24 03:28:50.000000000","message":"All of the changes in this file duplicate constants defined in Swami\u0027s patch.  Please rebase to depend on the most recent version of his patch that passes tests.","commit_id":"ad775150b5c7058027013a83c5207c0b334483a9"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"5909a6f90ae073d7ced3c6b94ffda69529337f79","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"1ae5cdf2_59d14b2e","in_reply_to":"1ae5cdf2_9e2e70aa","updated":"2014-06-26 04:35:17.000000000","message":"Understood.  This last commit was just resolving the differences.  But I agree, it would be best to rebase with Swami\u0027s patch.","commit_id":"ad775150b5c7058027013a83c5207c0b334483a9"}],"neutron/tests/unit/test_l3_agent.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"76195e7c709dfb995e49c6d179b0997df12c99d4","unresolved":false,"context_lines":[{"line_number":412,"context_line":"                     \u0027fixed_ips\u0027: [{\u0027subnet_id\u0027: self.subnet_id_list[0],"},{"line_number":413,"context_line":"                                    \u0027ip_address\u0027: \u0027101.12.13.14\u0027}]}"},{"line_number":414,"context_line":"        internal_ports \u003d ri.router.get(l3_constants.INTERFACE_KEY, [])"},{"line_number":415,"context_line":"        #agent.get_snat_interfaces \u003d mock.Mock()"},{"line_number":416,"context_line":"        #agent.get_snat_interfaces.return_value \u003d [test_port]"},{"line_number":417,"context_line":"        # test valid case"},{"line_number":418,"context_line":"        res_port \u003d agent._map_internal_interfaces(ri,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_e3321da6","line":415,"updated":"2014-06-11 11:37:30.000000000","message":"pull dead code","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ed444067c1b4ad75d9bf719dc4e8e43ef7eb99bd","unresolved":false,"context_lines":[{"line_number":412,"context_line":"                     \u0027fixed_ips\u0027: [{\u0027subnet_id\u0027: self.subnet_id_list[0],"},{"line_number":413,"context_line":"                                    \u0027ip_address\u0027: \u0027101.12.13.14\u0027}]}"},{"line_number":414,"context_line":"        internal_ports \u003d ri.router.get(l3_constants.INTERFACE_KEY, [])"},{"line_number":415,"context_line":"        #agent.get_snat_interfaces \u003d mock.Mock()"},{"line_number":416,"context_line":"        #agent.get_snat_interfaces.return_value \u003d [test_port]"},{"line_number":417,"context_line":"        # test valid case"},{"line_number":418,"context_line":"        res_port \u003d agent._map_internal_interfaces(ri,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_fc054e7a","line":415,"in_reply_to":"1ae5cdf2_e3321da6","updated":"2014-06-11 17:32:15.000000000","message":"Agreed.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"76195e7c709dfb995e49c6d179b0997df12c99d4","unresolved":false,"context_lines":[{"line_number":418,"context_line":"        res_port \u003d agent._map_internal_interfaces(ri,"},{"line_number":419,"context_line":"                                                  internal_ports[0],"},{"line_number":420,"context_line":"                                                  [test_port])"},{"line_number":421,"context_line":"        self.assertEqual(res_port, test_port)"},{"line_number":422,"context_line":"        # test invalid case"},{"line_number":423,"context_line":"        test_port[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027] \u003d 1234"},{"line_number":424,"context_line":"        res_ip \u003d agent._map_internal_interfaces(ri,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_43e831e2","line":421,"updated":"2014-06-11 11:37:30.000000000","message":"On all the asserts, put the expected value first. Check all in file.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ed444067c1b4ad75d9bf719dc4e8e43ef7eb99bd","unresolved":false,"context_lines":[{"line_number":418,"context_line":"        res_port \u003d agent._map_internal_interfaces(ri,"},{"line_number":419,"context_line":"                                                  internal_ports[0],"},{"line_number":420,"context_line":"                                                  [test_port])"},{"line_number":421,"context_line":"        self.assertEqual(res_port, test_port)"},{"line_number":422,"context_line":"        # test invalid case"},{"line_number":423,"context_line":"        test_port[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027] \u003d 1234"},{"line_number":424,"context_line":"        res_ip \u003d agent._map_internal_interfaces(ri,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_1c0bda8e","line":421,"in_reply_to":"1ae5cdf2_43e831e2","updated":"2014-06-11 17:32:15.000000000","message":"Got it.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"76195e7c709dfb995e49c6d179b0997df12c99d4","unresolved":false,"context_lines":[{"line_number":425,"context_line":"                                                internal_ports[0],"},{"line_number":426,"context_line":"                                                [test_port])"},{"line_number":427,"context_line":"        self.assertNotEqual(res_ip, test_port)"},{"line_number":428,"context_line":"        self.assertEqual(res_ip, None)"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"    def test_get_internal_port(self):"},{"line_number":431,"context_line":"        agent \u003d l3_agent.L3NATAgent(HOSTNAME, self.conf)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_a3c2d550","line":428,"updated":"2014-06-11 11:37:30.000000000","message":"assertNone() here and in other places in file.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ed444067c1b4ad75d9bf719dc4e8e43ef7eb99bd","unresolved":false,"context_lines":[{"line_number":425,"context_line":"                                                internal_ports[0],"},{"line_number":426,"context_line":"                                                [test_port])"},{"line_number":427,"context_line":"        self.assertNotEqual(res_ip, test_port)"},{"line_number":428,"context_line":"        self.assertEqual(res_ip, None)"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"    def test_get_internal_port(self):"},{"line_number":431,"context_line":"        agent \u003d l3_agent.L3NATAgent(HOSTNAME, self.conf)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_5c01e268","line":428,"in_reply_to":"1ae5cdf2_a3c2d550","updated":"2014-06-11 17:32:15.000000000","message":"Got it.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"76195e7c709dfb995e49c6d179b0997df12c99d4","unresolved":false,"context_lines":[{"line_number":492,"context_line":"        agent.add_arp_entry(None, payload)"},{"line_number":493,"context_line":"        self.mock_ip_dev.neigh.add.assert_called_once_with("},{"line_number":494,"context_line":"            4, \u00271.7.23.11\u0027, \u002700:11:22:33:44:55\u0027)"},{"line_number":495,"context_line":"        agent.router_deleted(None, router[\u0027id\u0027])"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"    def test_delete_arp_entry(self):"},{"line_number":498,"context_line":"        agent \u003d l3_agent.L3NATAgent(HOSTNAME, self.conf)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_23ea45ac","line":495,"updated":"2014-06-11 11:37:30.000000000","message":"If assert fails on L493, this will never run. Make sure cleanup resources in tearDown (or as addCleanup in setUp)\n\nSame for other test cases below.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"ed444067c1b4ad75d9bf719dc4e8e43ef7eb99bd","unresolved":false,"context_lines":[{"line_number":492,"context_line":"        agent.add_arp_entry(None, payload)"},{"line_number":493,"context_line":"        self.mock_ip_dev.neigh.add.assert_called_once_with("},{"line_number":494,"context_line":"            4, \u00271.7.23.11\u0027, \u002700:11:22:33:44:55\u0027)"},{"line_number":495,"context_line":"        agent.router_deleted(None, router[\u0027id\u0027])"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"    def test_delete_arp_entry(self):"},{"line_number":498,"context_line":"        agent \u003d l3_agent.L3NATAgent(HOSTNAME, self.conf)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_dcec12be","line":495,"in_reply_to":"1ae5cdf2_23ea45ac","updated":"2014-06-11 17:32:15.000000000","message":"Understood.  I\u0027ll modify.","commit_id":"1e4e47ad7f4356bb288d50eb245980ab4e24fcad"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"e124b5c2173f017c5183d4b02c46074abdef9a7c","unresolved":false,"context_lines":[{"line_number":412,"context_line":"                     \u0027fixed_ips\u0027: [{\u0027subnet_id\u0027: self.subnet_id_list[0],"},{"line_number":413,"context_line":"                                    \u0027ip_address\u0027: \u0027101.12.13.14\u0027}]}"},{"line_number":414,"context_line":"        internal_ports \u003d ri.router.get(l3_constants.INTERFACE_KEY, [])"},{"line_number":415,"context_line":"        #agent.get_snat_interfaces \u003d mock.Mock()"},{"line_number":416,"context_line":"        #agent.get_snat_interfaces.return_value \u003d [test_port]"},{"line_number":417,"context_line":"        # test valid case"},{"line_number":418,"context_line":"        res_port \u003d agent._map_internal_interfaces(ri,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_d7a66dc0","line":415,"updated":"2014-06-13 11:22:50.000000000","message":"Please look at my comments from patchset 2.","commit_id":"e91947c5df107db2db184e011328a6ddbb99cc9a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5905896bdea139bd1b04f7da2d4817b226965575","unresolved":false,"context_lines":[{"line_number":412,"context_line":"                     \u0027fixed_ips\u0027: [{\u0027subnet_id\u0027: self.subnet_id_list[0],"},{"line_number":413,"context_line":"                                    \u0027ip_address\u0027: \u0027101.12.13.14\u0027}]}"},{"line_number":414,"context_line":"        internal_ports \u003d ri.router.get(l3_constants.INTERFACE_KEY, [])"},{"line_number":415,"context_line":"        #agent.get_snat_interfaces \u003d mock.Mock()"},{"line_number":416,"context_line":"        #agent.get_snat_interfaces.return_value \u003d [test_port]"},{"line_number":417,"context_line":"        # test valid case"},{"line_number":418,"context_line":"        res_port \u003d agent._map_internal_interfaces(ri,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_17a2f199","line":415,"updated":"2014-06-18 11:17:14.000000000","message":"remove dead code","commit_id":"7e13631f5c9801df038256a2f85dab22e3fb00ac"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"28e36447225a9ca7d1489feee55b986dc35defee","unresolved":false,"context_lines":[{"line_number":412,"context_line":"                     \u0027fixed_ips\u0027: [{\u0027subnet_id\u0027: self.subnet_id_list[0],"},{"line_number":413,"context_line":"                                    \u0027ip_address\u0027: \u0027101.12.13.14\u0027}]}"},{"line_number":414,"context_line":"        internal_ports \u003d ri.router.get(l3_constants.INTERFACE_KEY, [])"},{"line_number":415,"context_line":"        #agent.get_snat_interfaces \u003d mock.Mock()"},{"line_number":416,"context_line":"        #agent.get_snat_interfaces.return_value \u003d [test_port]"},{"line_number":417,"context_line":"        # test valid case"},{"line_number":418,"context_line":"        res_port \u003d agent._map_internal_interfaces(ri,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_99de26d9","line":415,"in_reply_to":"1ae5cdf2_17a2f199","updated":"2014-06-18 16:57:30.000000000","message":"Sorry - my bad... I meant to update this file along with l3_agent.py but I missed it.  I\u0027ll get these resolved in my next patch.","commit_id":"7e13631f5c9801df038256a2f85dab22e3fb00ac"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5905896bdea139bd1b04f7da2d4817b226965575","unresolved":false,"context_lines":[{"line_number":492,"context_line":"        agent.add_arp_entry(None, payload)"},{"line_number":493,"context_line":"        self.mock_ip_dev.neigh.add.assert_called_once_with("},{"line_number":494,"context_line":"            4, \u00271.7.23.11\u0027, \u002700:11:22:33:44:55\u0027)"},{"line_number":495,"context_line":"        agent.router_deleted(None, router[\u0027id\u0027])"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"    def test_delete_arp_entry(self):"},{"line_number":498,"context_line":"        agent \u003d l3_agent.L3NATAgent(HOSTNAME, self.conf)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_b7b85dc8","line":495,"updated":"2014-06-18 11:17:14.000000000","message":"See comment in version 2 on this.","commit_id":"7e13631f5c9801df038256a2f85dab22e3fb00ac"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"8b0df3c38f9837768cc93c5253eb006f815cdac4","unresolved":false,"context_lines":[{"line_number":470,"context_line":"                      \u0027subnet_id\u0027: self.subnet_id_list[0],"},{"line_number":471,"context_line":"                      \u0027fixed_ips\u0027: [{\u0027ip_address\u0027: \u00271.2.3.4\u0027}]}]"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"        self.plugin_api.get_ports_by_subnet.return_value \u003d test_ports"},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"        # Test basic case"},{"line_number":476,"context_line":"        ports[0][\u0027subnet\u0027][\u0027id\u0027] \u003d self.subnet_id_list[0]"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_2f536f18","line":473,"updated":"2014-07-01 16:21:42.000000000","message":"Question: are tests for get_ports_by_subnet needed?  This is the only occurrance of \"get_ports_by_subnet\" string in this file.","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"3b555bf1854c681c5817e08fff59392491d2be46","unresolved":false,"context_lines":[{"line_number":470,"context_line":"                      \u0027subnet_id\u0027: self.subnet_id_list[0],"},{"line_number":471,"context_line":"                      \u0027fixed_ips\u0027: [{\u0027ip_address\u0027: \u00271.2.3.4\u0027}]}]"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"        self.plugin_api.get_ports_by_subnet.return_value \u003d test_ports"},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"        # Test basic case"},{"line_number":476,"context_line":"        ports[0][\u0027subnet\u0027][\u0027id\u0027] \u003d self.subnet_id_list[0]"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_713d0cbb","line":473,"in_reply_to":"baada198_2f536f18","updated":"2014-07-03 00:34:12.000000000","message":"get_ports_by_subnet() is an RPC handled by the l3-plugin and should be present in the separate l3-plugin review patch","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"a8825031878c6aed1d38d48e158658b7cb46aba7","unresolved":false,"context_lines":[{"line_number":1601,"context_line":"        fip_ns_name \u003d agent.get_fip_ns_name(str(fip[\u0027floating_network_id\u0027]))"},{"line_number":1602,"context_line":""},{"line_number":1603,"context_line":"        agent.create_rtr_2_fip_link(ri, fip[\u0027floating_network_id\u0027])"},{"line_number":1604,"context_line":"        # assert add_veth"},{"line_number":1605,"context_line":"        self.mock_ip.add_veth.assert_called_with(rtr_2_fip_name,"},{"line_number":1606,"context_line":"                                                 fip_2_rtr_name, fip_ns_name)"},{"line_number":1607,"context_line":"        # assert 2 interface add calls?"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab895d6_e5c62149","line":1604,"updated":"2014-06-29 19:23:38.000000000","message":"Is this comment really adding value?","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"3b555bf1854c681c5817e08fff59392491d2be46","unresolved":false,"context_lines":[{"line_number":1601,"context_line":"        fip_ns_name \u003d agent.get_fip_ns_name(str(fip[\u0027floating_network_id\u0027]))"},{"line_number":1602,"context_line":""},{"line_number":1603,"context_line":"        agent.create_rtr_2_fip_link(ri, fip[\u0027floating_network_id\u0027])"},{"line_number":1604,"context_line":"        # assert add_veth"},{"line_number":1605,"context_line":"        self.mock_ip.add_veth.assert_called_with(rtr_2_fip_name,"},{"line_number":1606,"context_line":"                                                 fip_2_rtr_name, fip_ns_name)"},{"line_number":1607,"context_line":"        # assert 2 interface add calls?"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_b15ec410","line":1604,"in_reply_to":"dab895d6_e5c62149","updated":"2014-07-03 00:34:12.000000000","message":"I\u0027ll cut it","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"a8825031878c6aed1d38d48e158658b7cb46aba7","unresolved":false,"context_lines":[{"line_number":1604,"context_line":"        # assert add_veth"},{"line_number":1605,"context_line":"        self.mock_ip.add_veth.assert_called_with(rtr_2_fip_name,"},{"line_number":1606,"context_line":"                                                 fip_2_rtr_name, fip_ns_name)"},{"line_number":1607,"context_line":"        # assert 2 interface add calls?"},{"line_number":1608,"context_line":"        # assert 2 link_set_up calls?"},{"line_number":1609,"context_line":"        # assert add_gateway call"},{"line_number":1610,"context_line":"        self.mock_ip_dev.route.add_gateway.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":8,"id":"dab895d6_8582c5fe","line":1607,"updated":"2014-06-29 19:23:38.000000000","message":"What about these two comments? Adding asserts or are they not needed? TODOs? Same w/L1612","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"3b555bf1854c681c5817e08fff59392491d2be46","unresolved":false,"context_lines":[{"line_number":1604,"context_line":"        # assert add_veth"},{"line_number":1605,"context_line":"        self.mock_ip.add_veth.assert_called_with(rtr_2_fip_name,"},{"line_number":1606,"context_line":"                                                 fip_2_rtr_name, fip_ns_name)"},{"line_number":1607,"context_line":"        # assert 2 interface add calls?"},{"line_number":1608,"context_line":"        # assert 2 link_set_up calls?"},{"line_number":1609,"context_line":"        # assert add_gateway call"},{"line_number":1610,"context_line":"        self.mock_ip_dev.route.add_gateway.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_31aab4d4","line":1607,"in_reply_to":"dab895d6_8582c5fe","updated":"2014-07-03 00:34:12.000000000","message":"I\u0027ll convert to TODOs","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"a8825031878c6aed1d38d48e158658b7cb46aba7","unresolved":false,"context_lines":[{"line_number":1634,"context_line":"               \u0027port_id\u0027: _uuid()}"},{"line_number":1635,"context_line":"        agent.agent_gateway_port \u003d agent_gw_port"},{"line_number":1636,"context_line":"        agent.floating_ip_added_dist(ri, fip)"},{"line_number":1637,"context_line":"        # assert call add_rule_from"},{"line_number":1638,"context_line":"        self.mock_rule.add_rule_from.assert_called_with(\u0027192.168.0.1\u0027,"},{"line_number":1639,"context_line":"                                                        16, FIP_PRI)"},{"line_number":1640,"context_line":"        # assert call add_route"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab895d6_45dd0d14","line":1637,"updated":"2014-06-29 19:23:38.000000000","message":"Useful?","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"3b555bf1854c681c5817e08fff59392491d2be46","unresolved":false,"context_lines":[{"line_number":1634,"context_line":"               \u0027port_id\u0027: _uuid()}"},{"line_number":1635,"context_line":"        agent.agent_gateway_port \u003d agent_gw_port"},{"line_number":1636,"context_line":"        agent.floating_ip_added_dist(ri, fip)"},{"line_number":1637,"context_line":"        # assert call add_rule_from"},{"line_number":1638,"context_line":"        self.mock_rule.add_rule_from.assert_called_with(\u0027192.168.0.1\u0027,"},{"line_number":1639,"context_line":"                                                        16, FIP_PRI)"},{"line_number":1640,"context_line":"        # assert call add_route"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_71ab4cd6","line":1637,"in_reply_to":"dab895d6_45dd0d14","updated":"2014-07-03 00:34:12.000000000","message":"I\u0027ll cut it","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"a8825031878c6aed1d38d48e158658b7cb46aba7","unresolved":false,"context_lines":[{"line_number":1637,"context_line":"        # assert call add_rule_from"},{"line_number":1638,"context_line":"        self.mock_rule.add_rule_from.assert_called_with(\u0027192.168.0.1\u0027,"},{"line_number":1639,"context_line":"                                                        16, FIP_PRI)"},{"line_number":1640,"context_line":"        # assert call add_route"},{"line_number":1641,"context_line":"        # assert call _send_gratuitous_arp_packet"},{"line_number":1642,"context_line":"        # assert internal structures updated"},{"line_number":1643,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"dab895d6_c57bdd27","line":1640,"updated":"2014-06-29 19:23:38.000000000","message":"Same here.","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"3b555bf1854c681c5817e08fff59392491d2be46","unresolved":false,"context_lines":[{"line_number":1637,"context_line":"        # assert call add_rule_from"},{"line_number":1638,"context_line":"        self.mock_rule.add_rule_from.assert_called_with(\u0027192.168.0.1\u0027,"},{"line_number":1639,"context_line":"                                                        16, FIP_PRI)"},{"line_number":1640,"context_line":"        # assert call add_route"},{"line_number":1641,"context_line":"        # assert call _send_gratuitous_arp_packet"},{"line_number":1642,"context_line":"        # assert internal structures updated"},{"line_number":1643,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_91baa021","line":1640,"in_reply_to":"dab895d6_c57bdd27","updated":"2014-07-03 00:34:12.000000000","message":"I\u0027ll update","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"a8825031878c6aed1d38d48e158658b7cb46aba7","unresolved":false,"context_lines":[{"line_number":1642,"context_line":"        # assert internal structures updated"},{"line_number":1643,"context_line":""},{"line_number":1644,"context_line":"    # TODO(mrsmith): test floating_ip_removed_dist"},{"line_number":1645,"context_line":"    def test_floating_ip_removeded_dist(self):"},{"line_number":1646,"context_line":"        agent \u003d l3_agent.L3NATAgent(HOSTNAME, self.conf)"},{"line_number":1647,"context_line":"        router \u003d self._prepare_router_data()"},{"line_number":1648,"context_line":"        agent_gw_port \u003d {\u0027fixed_ips\u0027: [{\u0027ip_address\u0027: \u002720.0.0.30\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab895d6_a59ee954","line":1645,"updated":"2014-06-29 19:23:38.000000000","message":"removeded -\u003e removed","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"3b555bf1854c681c5817e08fff59392491d2be46","unresolved":false,"context_lines":[{"line_number":1642,"context_line":"        # assert internal structures updated"},{"line_number":1643,"context_line":""},{"line_number":1644,"context_line":"    # TODO(mrsmith): test floating_ip_removed_dist"},{"line_number":1645,"context_line":"    def test_floating_ip_removeded_dist(self):"},{"line_number":1646,"context_line":"        agent \u003d l3_agent.L3NATAgent(HOSTNAME, self.conf)"},{"line_number":1647,"context_line":"        router \u003d self._prepare_router_data()"},{"line_number":1648,"context_line":"        agent_gw_port \u003d {\u0027fixed_ips\u0027: [{\u0027ip_address\u0027: \u002720.0.0.30\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_f1867c64","line":1645,"in_reply_to":"dab895d6_a59ee954","updated":"2014-07-03 00:34:12.000000000","message":"beauty!","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"a8825031878c6aed1d38d48e158658b7cb46aba7","unresolved":false,"context_lines":[{"line_number":1661,"context_line":"        ri.floating_ips_dict[\u002711.22.33.44\u0027] \u003d FIP_PRI"},{"line_number":1662,"context_line":"        agent.agent_gateway_port \u003d agent_gw_port"},{"line_number":1663,"context_line":"        agent.floating_ip_removed_dist(ri, fip_cidr)"},{"line_number":1664,"context_line":"        # assert delete_rule_priority call"},{"line_number":1665,"context_line":"        self.mock_rule.delete_rule_priority.assert_called_with(FIP_PRI)"},{"line_number":1666,"context_line":"        # assert delete_route call"},{"line_number":1667,"context_line":"        self.mock_ip_dev.route.delete_route.assert_called_with(fip_cidr,"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab895d6_65e211d7","line":1664,"updated":"2014-06-29 19:23:38.000000000","message":"Useful comment?","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"3b555bf1854c681c5817e08fff59392491d2be46","unresolved":false,"context_lines":[{"line_number":1661,"context_line":"        ri.floating_ips_dict[\u002711.22.33.44\u0027] \u003d FIP_PRI"},{"line_number":1662,"context_line":"        agent.agent_gateway_port \u003d agent_gw_port"},{"line_number":1663,"context_line":"        agent.floating_ip_removed_dist(ri, fip_cidr)"},{"line_number":1664,"context_line":"        # assert delete_rule_priority call"},{"line_number":1665,"context_line":"        self.mock_rule.delete_rule_priority.assert_called_with(FIP_PRI)"},{"line_number":1666,"context_line":"        # assert delete_route call"},{"line_number":1667,"context_line":"        self.mock_ip_dev.route.delete_route.assert_called_with(fip_cidr,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_51972890","line":1664,"in_reply_to":"dab895d6_65e211d7","updated":"2014-07-03 00:34:12.000000000","message":"I\u0027ll cut","commit_id":"eb8f9066c687491557b32a85dd84053111bcf5a4"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"fb5ed12a7d7a2f691f2eb63eae53e2627fdef9a2","unresolved":false,"context_lines":[{"line_number":1653,"context_line":"        ri.floating_ips_dict[\u002711.22.33.44\u0027] \u003d FIP_PRI"},{"line_number":1654,"context_line":"        agent.agent_gateway_port \u003d agent_gw_port"},{"line_number":1655,"context_line":"        agent.floating_ip_removed_dist(ri, fip_cidr)"},{"line_number":1656,"context_line":"        # assert delete_rule_priority call"},{"line_number":1657,"context_line":"        self.mock_rule.delete_rule_priority.assert_called_with(FIP_PRI)"},{"line_number":1658,"context_line":"        # assert delete_route call"},{"line_number":1659,"context_line":"        self.mock_ip_dev.route.delete_route.assert_called_with(fip_cidr,"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_dfea21ab","line":1656,"updated":"2014-07-04 14:09:47.000000000","message":"Nit: mentioned in rev 8. Useful? Same w/L1658","commit_id":"cae3b385609eb8377857a8c22600d7a392148fd8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"d2b8821a9592c65435ce4f419cf73108a5db418a","unresolved":false,"context_lines":[{"line_number":1653,"context_line":"        ri.floating_ips_dict[\u002711.22.33.44\u0027] \u003d FIP_PRI"},{"line_number":1654,"context_line":"        agent.agent_gateway_port \u003d agent_gw_port"},{"line_number":1655,"context_line":"        agent.floating_ip_removed_dist(ri, fip_cidr)"},{"line_number":1656,"context_line":"        # assert delete_rule_priority call"},{"line_number":1657,"context_line":"        self.mock_rule.delete_rule_priority.assert_called_with(FIP_PRI)"},{"line_number":1658,"context_line":"        # assert delete_route call"},{"line_number":1659,"context_line":"        self.mock_ip_dev.route.delete_route.assert_called_with(fip_cidr,"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_55008201","line":1656,"in_reply_to":"baada198_dfea21ab","updated":"2014-07-07 16:43:15.000000000","message":"Done","commit_id":"cae3b385609eb8377857a8c22600d7a392148fd8"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        ip_cls.return_value \u003d self.mock_ip"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        self.ip_rule_p \u003d mock.patch(\u0027neutron.agent.linux.ip_lib.IpRule\u0027)"},{"line_number":86,"context_line":"        ip_rule \u003d self.ip_rule_p.start()"},{"line_number":87,"context_line":"        self.mock_rule \u003d mock.MagicMock()"},{"line_number":88,"context_line":"        ip_rule.return_value \u003d self.mock_rule"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_ede28d9f","line":86,"updated":"2014-07-15 19:01:06.000000000","message":"We don\u0027t need to store mock.patch object in self.ip_rule_p.\n\n  ip_rule \u003d mock.patch(\u0027neutron.agent.linux.ip_lib.IpRule\u0027).start()","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8be176ad8aadaab7cd27af6ea2e9219e6d6b2fd7","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        ip_cls.return_value \u003d self.mock_ip"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        self.ip_rule_p \u003d mock.patch(\u0027neutron.agent.linux.ip_lib.IpRule\u0027)"},{"line_number":86,"context_line":"        ip_rule \u003d self.ip_rule_p.start()"},{"line_number":87,"context_line":"        self.mock_rule \u003d mock.MagicMock()"},{"line_number":88,"context_line":"        ip_rule.return_value \u003d self.mock_rule"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_5850920a","line":86,"in_reply_to":"baada198_ede28d9f","updated":"2014-07-15 21:31:32.000000000","message":"Done","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        ip_rule.return_value \u003d self.mock_rule"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        self.ip_dev_p \u003d mock.patch(\u0027neutron.agent.linux.ip_lib.IPDevice\u0027)"},{"line_number":91,"context_line":"        ip_dev \u003d self.ip_dev_p.start()"},{"line_number":92,"context_line":"        self.mock_ip_dev \u003d mock.MagicMock()"},{"line_number":93,"context_line":"        ip_dev.return_value \u003d self.mock_ip_dev"},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_0df7c15a","line":91,"updated":"2014-07-15 19:01:06.000000000","message":"Same as the above.","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8be176ad8aadaab7cd27af6ea2e9219e6d6b2fd7","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        ip_rule.return_value \u003d self.mock_rule"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        self.ip_dev_p \u003d mock.patch(\u0027neutron.agent.linux.ip_lib.IPDevice\u0027)"},{"line_number":91,"context_line":"        ip_dev \u003d self.ip_dev_p.start()"},{"line_number":92,"context_line":"        self.mock_ip_dev \u003d mock.MagicMock()"},{"line_number":93,"context_line":"        ip_dev.return_value \u003d self.mock_ip_dev"},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_786c76d1","line":91,"in_reply_to":"baada198_0df7c15a","updated":"2014-07-15 21:31:32.000000000","message":"Done","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":444,"context_line":"                                                internal_ports[0],"},{"line_number":445,"context_line":"                                                [test_port])"},{"line_number":446,"context_line":"        self.assertNotEqual(test_port, res_ip)"},{"line_number":447,"context_line":"        self.assertEqual(res_ip, None)"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"    def test_get_internal_port(self):"},{"line_number":450,"context_line":"        agent \u003d l3_agent.L3NATAgent(HOSTNAME, self.conf)"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_2dbac571","line":447,"updated":"2014-07-15 19:01:06.000000000","message":"assertIsNone","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8be176ad8aadaab7cd27af6ea2e9219e6d6b2fd7","unresolved":false,"context_lines":[{"line_number":444,"context_line":"                                                internal_ports[0],"},{"line_number":445,"context_line":"                                                [test_port])"},{"line_number":446,"context_line":"        self.assertNotEqual(test_port, res_ip)"},{"line_number":447,"context_line":"        self.assertEqual(res_ip, None)"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"    def test_get_internal_port(self):"},{"line_number":450,"context_line":"        agent \u003d l3_agent.L3NATAgent(HOSTNAME, self.conf)"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_98714aab","line":447,"in_reply_to":"baada198_2dbac571","updated":"2014-07-15 21:31:32.000000000","message":"Done","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"daf0b1a375eb83ff7eb468fcab06a621c2c90b1b","unresolved":false,"context_lines":[{"line_number":468,"context_line":""},{"line_number":469,"context_line":"        # Test miss cases"},{"line_number":470,"context_line":"        no_port \u003d agent.get_internal_port(ri, FAKE_ID)"},{"line_number":471,"context_line":"        self.assertEqual(no_port, None)"},{"line_number":472,"context_line":"        port \u003d agent.get_internal_port(ri, self.subnet_id_list[0])"},{"line_number":473,"context_line":"        fips \u003d port.get(\u0027fixed_ips\u0027, [])"},{"line_number":474,"context_line":"        subnet_id \u003d fips[0][\u0027subnet_id\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_6d391df2","line":471,"updated":"2014-07-15 19:01:06.000000000","message":"assertIsNone","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8be176ad8aadaab7cd27af6ea2e9219e6d6b2fd7","unresolved":false,"context_lines":[{"line_number":468,"context_line":""},{"line_number":469,"context_line":"        # Test miss cases"},{"line_number":470,"context_line":"        no_port \u003d agent.get_internal_port(ri, FAKE_ID)"},{"line_number":471,"context_line":"        self.assertEqual(no_port, None)"},{"line_number":472,"context_line":"        port \u003d agent.get_internal_port(ri, self.subnet_id_list[0])"},{"line_number":473,"context_line":"        fips \u003d port.get(\u0027fixed_ips\u0027, [])"},{"line_number":474,"context_line":"        subnet_id \u003d fips[0][\u0027subnet_id\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_b8652ee4","line":471,"in_reply_to":"baada198_6d391df2","updated":"2014-07-15 21:31:32.000000000","message":"Done","commit_id":"291e6f15d439ddc3be0dcdf31e83e7a46cebe805"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"83f8bd578e70f281330603bb615c0864696cdd61","unresolved":false,"context_lines":[{"line_number":540,"context_line":"        port \u003d agent.get_internal_port(ri, self.subnet_id_list[3])"},{"line_number":541,"context_line":"        fips \u003d port.get(\u0027fixed_ips\u0027, [])"},{"line_number":542,"context_line":"        subnet_id \u003d fips[0][\u0027subnet_id\u0027]"},{"line_number":543,"context_line":"        self.assertEqual(self.subnet_id_list[3], subnet_id)"},{"line_number":544,"context_line":""},{"line_number":545,"context_line":"        # Test miss cases"},{"line_number":546,"context_line":"        no_port \u003d agent.get_internal_port(ri, FAKE_ID)"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_b8aec72d","line":543,"updated":"2014-07-17 09:35:50.000000000","message":"Cannot lines 532-543 use a for loop?","commit_id":"53dfc8a8decbb40181a4b8b407fe43b30cffeef0"}]}
