)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"cc8419450046dccb9534a8ab1251597ac46ea881","unresolved":false,"context_lines":[{"line_number":3,"context_line":"AuthorDate: 2015-05-01 04:05:05 -0700"},{"line_number":4,"context_line":"Commit:     lynn li \u003clynnli@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-01 04:05:05 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"provide snat dvr host name during FIP association with unbound port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I8e94063009b29fab4f990674292989aaca572491"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3acd31a7_620ff82e","line":6,"updated":"2015-05-01 18:33:28.000000000","message":"Can you please add a bug or describe here something on why is this needed?","commit_id":"d9072a6800108dbb3c89fd81bc22e76a747b1432"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"97e6d1b92290e2fe3916d9f4ac85e4b3dda50655","unresolved":false,"context_lines":[{"line_number":3,"context_line":"AuthorDate: 2015-05-01 04:05:05 -0700"},{"line_number":4,"context_line":"Commit:     lynn li \u003clynnli@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-01 04:05:05 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"provide snat dvr host name during FIP association with unbound port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I8e94063009b29fab4f990674292989aaca572491"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3acd31a7_23a9027c","line":6,"in_reply_to":"3acd31a7_620ff82e","updated":"2015-05-01 20:58:00.000000000","message":"sure","commit_id":"d9072a6800108dbb3c89fd81bc22e76a747b1432"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"ed5c103e7dd94b8b407ce586a7be361a7f01dc17","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2015-05-01 04:05:05 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"provide snat dvr host name during FIP association with unbound port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I8e94063009b29fab4f990674292989aaca572491"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3acd31a7_e22f883c","line":8,"updated":"2015-05-01 18:52:59.000000000","message":"Can you provide a detailed description of the bug.\n\nAlso add the bug number to the commit message.\n\nCloses-Bug: #bug-no.","commit_id":"d9072a6800108dbb3c89fd81bc22e76a747b1432"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"97e6d1b92290e2fe3916d9f4ac85e4b3dda50655","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2015-05-01 04:05:05 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"provide snat dvr host name during FIP association with unbound port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I8e94063009b29fab4f990674292989aaca572491"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3acd31a7_e3b9cacc","line":8,"in_reply_to":"3acd31a7_e22f883c","updated":"2015-05-01 20:58:00.000000000","message":"sure","commit_id":"d9072a6800108dbb3c89fd81bc22e76a747b1432"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"0ab46b4752237c8033958cf504d5c6d2c1fc5ad2","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2015-05-01 07:57:38 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"provide snat dvr host name during FIP association with unbound port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I8e94063009b29fab4f990674292989aaca572491"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3acd31a7_e45aed82","line":8,"updated":"2015-05-02 09:58:13.000000000","message":"You still need to add here this line:\n\"Closes-Bug: #1447034\"\n\nYou will notice that this also effect the relevant launchpad status and update it accordingly","commit_id":"b21e60bba9dd1ca25a3045f6b145d2f5b36baa77"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"beeeb06fc87888eead94b7cf76acc20754aaea5c","unresolved":false,"context_lines":[{"line_number":22,"context_line":"port.  And fip namespace can be created successfully after VM is on that unbund port."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: I8e94063009b29fab4f990674292989aaca572491"},{"line_number":25,"context_line":"bug-id: #1447034"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1aca2d91_4911e751","line":25,"updated":"2015-05-06 22:28:37.000000000","message":"Please use the proper line [1]:\n\n  Closes-Bug: #1447034\n  - or -\n  Related-Bug: #1447034\n\n[1] https://wiki.openstack.org/wiki/GitCommitMessages#Including_external_references","commit_id":"f48fa0b351468bf80e9dada8f7899193bac10a2e"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"e9b068a910a9b3b91f58bac6f08a8dd2db83e808","unresolved":false,"context_lines":[{"line_number":22,"context_line":"port.  And fip namespace can be created successfully after VM is on that unbund port."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: I8e94063009b29fab4f990674292989aaca572491"},{"line_number":25,"context_line":"bug-id: #1447034"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1aca2d91_e960b337","line":25,"in_reply_to":"1aca2d91_4911e751","updated":"2015-05-07 07:03:39.000000000","message":"I didn\u0027t know there is a convention to follow.. Great info.  Thanks.","commit_id":"f48fa0b351468bf80e9dada8f7899193bac10a2e"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"6038ae8e773cf0d594c289b4b81e2c3928d9514c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     lynn li \u003clynnli@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-07 09:07:43 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"provide snat dvr host name during FIP association with unbound port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Floating agent gw port is only created for compute host when floating ip is associated"},{"line_number":10,"context_line":"with a VM resided on this host. If associate neutron port with floating IP before booting"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"1aca2d91_d409d6de","line":7,"updated":"2015-05-08 03:53:49.000000000","message":"Provide","commit_id":"6ae8cc548b2cf7ff29defbc4335ebb76364add91"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"04da026ffa12cabbdfbda3b2a53e7987822d0f76","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     lynn li \u003clynnli@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-07 09:07:43 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"provide snat dvr host name during FIP association with unbound port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Floating agent gw port is only created for compute host when floating ip is associated"},{"line_number":10,"context_line":"with a VM resided on this host. If associate neutron port with floating IP before booting"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"1aca2d91_46a2a4fe","line":7,"in_reply_to":"1aca2d91_d409d6de","updated":"2015-05-08 18:32:04.000000000","message":"will be corrected on next patch.","commit_id":"6ae8cc548b2cf7ff29defbc4335ebb76364add91"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"6038ae8e773cf0d594c289b4b81e2c3928d9514c","unresolved":false,"context_lines":[{"line_number":18,"context_line":"In order to have floating agent gw port created in unbound port scenario, a host has to"},{"line_number":19,"context_line":"be assigned to the unbound port during floating IP assocaiton process. The fix is to pick the"},{"line_number":20,"context_line":"first snat dvr host name as there is no compute host at this point.  Once this issue gets taken"},{"line_number":21,"context_line":"care of, floating agent gw port will be created when floating Ip associated with this unbound"},{"line_number":22,"context_line":"port.  And fip namespace can be created successfully after VM is on that unbund port."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: I8e94063009b29fab4f990674292989aaca572491"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"1aca2d91_f40612cd","line":21,"updated":"2015-05-08 03:53:49.000000000","message":"Ip --\u003e IP (or ip).","commit_id":"6ae8cc548b2cf7ff29defbc4335ebb76364add91"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"04da026ffa12cabbdfbda3b2a53e7987822d0f76","unresolved":false,"context_lines":[{"line_number":18,"context_line":"In order to have floating agent gw port created in unbound port scenario, a host has to"},{"line_number":19,"context_line":"be assigned to the unbound port during floating IP assocaiton process. The fix is to pick the"},{"line_number":20,"context_line":"first snat dvr host name as there is no compute host at this point.  Once this issue gets taken"},{"line_number":21,"context_line":"care of, floating agent gw port will be created when floating Ip associated with this unbound"},{"line_number":22,"context_line":"port.  And fip namespace can be created successfully after VM is on that unbund port."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: I8e94063009b29fab4f990674292989aaca572491"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"1aca2d91_06a82cda","line":21,"in_reply_to":"1aca2d91_f40612cd","updated":"2015-05-08 18:32:04.000000000","message":"will be corrected on next patch.","commit_id":"6ae8cc548b2cf7ff29defbc4335ebb76364add91"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"8ad8b5197468e9c194734a650fb6a24caaa7f648","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     lynn li \u003clynnli@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-08 10:55:01 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Provide snat dvr host name during FIP association with unbound port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Floating agent gw port is only created for compute host when floating ip is associated"},{"line_number":10,"context_line":"with a VM resided on this host. If associate neutron port with floating IP before booting"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"9af37de9_640086ab","line":7,"updated":"2015-05-11 08:53:49.000000000","message":"line length in commit message should be \u003c\u003d 72 characters","commit_id":"0841dc0ec94d2bb65151517f6a2521bc12ef7a87"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"9a0e26cfd3eb3555f1f2e34a4ff25c2978702cd9","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     lynn li \u003clynnli@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-08 10:55:01 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Provide snat dvr host name during FIP association with unbound port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Floating agent gw port is only created for compute host when floating ip is associated"},{"line_number":10,"context_line":"with a VM resided on this host. If associate neutron port with floating IP before booting"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"7ad8896b_3dc4db3e","line":7,"in_reply_to":"7ad8896b_623cfe2f","updated":"2015-05-11 19:16:52.000000000","message":"Thanks Paul.","commit_id":"0841dc0ec94d2bb65151517f6a2521bc12ef7a87"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"3943aef9bb81f53f53bc695f940cb88f3b839a56","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     lynn li \u003clynnli@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-08 10:55:01 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Provide snat dvr host name during FIP association with unbound port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Floating agent gw port is only created for compute host when floating ip is associated"},{"line_number":10,"context_line":"with a VM resided on this host. If associate neutron port with floating IP before booting"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"7ad8896b_623cfe2f","line":7,"in_reply_to":"9af37de9_640086ab","updated":"2015-05-11 18:27:51.000000000","message":"Lynn, FYI;  https://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"0841dc0ec94d2bb65151517f6a2521bc12ef7a87"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"9a0e26cfd3eb3555f1f2e34a4ff25c2978702cd9","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     lynn li \u003clynnli@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-08 10:55:01 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Provide snat dvr host name during FIP association with unbound port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Floating agent gw port is only created for compute host when floating ip is associated"},{"line_number":10,"context_line":"with a VM resided on this host. If associate neutron port with floating IP before booting"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"7ad8896b_5dd8c7ef","line":7,"in_reply_to":"9af37de9_640086ab","updated":"2015-05-11 19:16:52.000000000","message":"will correct that.  Thanks.","commit_id":"0841dc0ec94d2bb65151517f6a2521bc12ef7a87"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b6b1211b0c0eeca938cdf51ed04eba63294e5055","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     lynn li \u003clynnli@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-11 16:45:58 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Provide snat dvr host name during FIP association with unbound port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Floating agent gw port is only created for compute host when floating"},{"line_number":10,"context_line":"ip is associated with a VM resided on this host. If associate neutron"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"9a0c5dc1_df7131e2","line":7,"updated":"2015-05-12 12:02:32.000000000","message":"Nit: suggestion is for summary line to be \u003c\u003d 50 chars. Maybe...\n\n\"Use 1st SNAT DVR host name for FIP assoc w/unbound\"","commit_id":"9122e4927bfbe52fe6e90090986e77afffea05d7"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"1ccb6f52afdc408fffb1e03ec01a0e11346c7865","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     lynn li \u003clynnli@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-11 16:45:58 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Provide snat dvr host name during FIP association with unbound port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Floating agent gw port is only created for compute host when floating"},{"line_number":10,"context_line":"ip is associated with a VM resided on this host. If associate neutron"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"9a0c5dc1_77049c14","line":7,"in_reply_to":"9a0c5dc1_df7131e2","updated":"2015-05-12 17:21:35.000000000","message":"OK.  Thanks good.","commit_id":"9122e4927bfbe52fe6e90090986e77afffea05d7"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"96c555a32415707d5b7f13183e15506be906f127","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"In order to have floating agent gw port created in unbound port"},{"line_number":20,"context_line":"scenario, a host has to be assigned to the unbound port during"},{"line_number":21,"context_line":"floating IP assocaiton process. The fix is to pick the first snat dvr"},{"line_number":22,"context_line":"host name as there is no compute host at this point.  Once this issue"},{"line_number":23,"context_line":"gets taken care of, floating agent gw port will be created when"},{"line_number":24,"context_line":"floating IP associated with this unbound port. And fip namespace can"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"9a0c5dc1_8e845fd4","line":21,"updated":"2015-05-13 22:20:19.000000000","message":"assocaition --\u003e association","commit_id":"e57e56e7edca139eedbc90bd32a6cee6585a96b0"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"96c555a32415707d5b7f13183e15506be906f127","unresolved":false,"context_lines":[{"line_number":22,"context_line":"host name as there is no compute host at this point.  Once this issue"},{"line_number":23,"context_line":"gets taken care of, floating agent gw port will be created when"},{"line_number":24,"context_line":"floating IP associated with this unbound port. And fip namespace can"},{"line_number":25,"context_line":"be created successfully after VM is on that unbund port."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Change-Id: I8e94063009b29fab4f990674292989aaca572491"},{"line_number":28,"context_line":"Partial-Bug: #1447034"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"9a0c5dc1_0e798ff6","line":25,"updated":"2015-05-13 22:20:19.000000000","message":"unbund --\u003e unbound.","commit_id":"e57e56e7edca139eedbc90bd32a6cee6585a96b0"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d3a987175e2617f218bd63072d2520cae6c3410c","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Use 1st SNAT DVR host name for FIP assoc w/unbound"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Floating agent gw port is only created for compute host when floating"},{"line_number":10,"context_line":"IP is associated with a VM resided on this host. If associate neutron"},{"line_number":11,"context_line":"port with floating IP before booting a VM with that port, floating"},{"line_number":12,"context_line":"agent gw port won\u0027t be created (in case this is the first VM scheduled"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"3a50d1a3_af182885","line":9,"updated":"2015-08-03 13:11:05.000000000","message":"9 - 17 is not trurh anymore after commit 0a82b8ae1951073ff5f9b096485b3acf1a541428","commit_id":"2e6caafaadfd2decff23c69409053ded39cec827"}],"neutron/db/l3_dvr_db.py":[{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"ed5c103e7dd94b8b407ce586a7be361a7f01dc17","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from oslo_config import cfg"},{"line_number":16,"context_line":"from oslo_log import log as logging"},{"line_number":17,"context_line":"from oslo_utils import excutils"},{"line_number":18,"context_line":"from oslo_serialization import jsonutils"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from neutron.api.v2 import attributes"},{"line_number":21,"context_line":"from neutron.callbacks import events"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_2216a0f1","line":18,"updated":"2015-05-01 18:52:59.000000000","message":"I don\u0027t think you need to import jsonutils to find out the configuration details of the agent.\nThere is an API to do that.","commit_id":"d9072a6800108dbb3c89fd81bc22e76a747b1432"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"ed5c103e7dd94b8b407ce586a7be361a7f01dc17","unresolved":false,"context_lines":[{"line_number":244,"context_line":"                    vm_hostid \u003d self._get_first_dvr_snat_host("},{"line_number":245,"context_line":"                        context, router_id)"},{"line_number":246,"context_line":"                    LOG.debug(\"get_first_dvr_snat_host return: %s\", vm_hostid)"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"                if vm_hostid:"},{"line_number":249,"context_line":"                    # FIXME (Swami): This FIP Agent Gateway port should be"},{"line_number":250,"context_line":"                    # created only once and there should not be a duplicate"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_42775c3a","line":247,"updated":"2015-05-01 18:52:59.000000000","message":"I would suggest that you need to update the \"host_binding\" for the private port after you identify the host.","commit_id":"d9072a6800108dbb3c89fd81bc22e76a747b1432"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"97e6d1b92290e2fe3916d9f4ac85e4b3dda50655","unresolved":false,"context_lines":[{"line_number":244,"context_line":"                    vm_hostid \u003d self._get_first_dvr_snat_host("},{"line_number":245,"context_line":"                        context, router_id)"},{"line_number":246,"context_line":"                    LOG.debug(\"get_first_dvr_snat_host return: %s\", vm_hostid)"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"                if vm_hostid:"},{"line_number":249,"context_line":"                    # FIXME (Swami): This FIP Agent Gateway port should be"},{"line_number":250,"context_line":"                    # created only once and there should not be a duplicate"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_83d216ff","line":247,"in_reply_to":"3acd31a7_42775c3a","updated":"2015-05-01 20:58:00.000000000","message":"yes.  will do that.","commit_id":"d9072a6800108dbb3c89fd81bc22e76a747b1432"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"ed5c103e7dd94b8b407ce586a7be361a7f01dc17","unresolved":false,"context_lines":[{"line_number":523,"context_line":"        \"\"\"Query all floating_ips and filter on host and external net.\"\"\""},{"line_number":524,"context_line":"        fip_count_on_host \u003d 0"},{"line_number":525,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":526,"context_line":"            routers \u003d self._get_sync_routers(context, router_ids\u003dNone)"},{"line_number":527,"context_line":"            router_ids \u003d [router[\u0027id\u0027] for router in routers]"},{"line_number":528,"context_line":"            floating_ips \u003d self._get_sync_floating_ips(context, router_ids)"},{"line_number":529,"context_line":"            # Check for the active floatingip in the host"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_e2a428ba","line":526,"updated":"2015-05-01 18:52:59.000000000","message":"I don\u0027t understand this line.\nCan you explain why do you call _get_sync_routers to get the router_ids.","commit_id":"d9072a6800108dbb3c89fd81bc22e76a747b1432"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"97e6d1b92290e2fe3916d9f4ac85e4b3dda50655","unresolved":false,"context_lines":[{"line_number":523,"context_line":"        \"\"\"Query all floating_ips and filter on host and external net.\"\"\""},{"line_number":524,"context_line":"        fip_count_on_host \u003d 0"},{"line_number":525,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":526,"context_line":"            routers \u003d self._get_sync_routers(context, router_ids\u003dNone)"},{"line_number":527,"context_line":"            router_ids \u003d [router[\u0027id\u0027] for router in routers]"},{"line_number":528,"context_line":"            floating_ips \u003d self._get_sync_floating_ips(context, router_ids)"},{"line_number":529,"context_line":"            # Check for the active floatingip in the host"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_c335ae46","line":526,"in_reply_to":"3acd31a7_e2a428ba","updated":"2015-05-01 20:58:00.000000000","message":"I think I may not get this file merged correctly.  I will redo it on patch2.  This is not my changes.  My changes are only related to fip association previously.  sorry about that.","commit_id":"d9072a6800108dbb3c89fd81bc22e76a747b1432"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"f4e9508a648535325f023d4079cc302c29fe2c4a","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                default\u003dFalse,"},{"line_number":50,"context_line":"                help\u003d_(\"System-wide flag to determine the type of router \""},{"line_number":51,"context_line":"                       \"that tenants can create. Only admin can override.\")),"},{"line_number":52,"context_line":"    ]"},{"line_number":53,"context_line":"cfg.CONF.register_opts(router_distributed_opts)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3acd31a7_8ab9df17","line":52,"updated":"2015-05-04 20:54:30.000000000","message":"This line doesn\u0027t need to be changed.","commit_id":"b21e60bba9dd1ca25a3045f6b145d2f5b36baa77"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"56c943df801e397efb9aa9336c6f608e80b261fc","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                default\u003dFalse,"},{"line_number":50,"context_line":"                help\u003d_(\"System-wide flag to determine the type of router \""},{"line_number":51,"context_line":"                       \"that tenants can create. Only admin can override.\")),"},{"line_number":52,"context_line":"    ]"},{"line_number":53,"context_line":"cfg.CONF.register_opts(router_distributed_opts)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3acd31a7_8a531f39","line":52,"in_reply_to":"3acd31a7_8ab9df17","updated":"2015-05-05 04:36:23.000000000","message":"will be fixed in the next patch.","commit_id":"b21e60bba9dd1ca25a3045f6b145d2f5b36baa77"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"f4e9508a648535325f023d4079cc302c29fe2c4a","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        l3_attrs_db.ExtraAttributesMixin.extra_attributes + [{"},{"line_number":68,"context_line":"                                                                 \u0027name\u0027: \"distributed\","},{"line_number":69,"context_line":"                                                                 \u0027default\u0027: cfg.CONF.router_distributed"},{"line_number":70,"context_line":"                                                             }])"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _create_router_db(self, context, router, tenant_id):"},{"line_number":73,"context_line":"        \"\"\"Create a router db object with dvr additions.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"3acd31a7_ea4df33e","line":70,"updated":"2015-05-04 20:54:30.000000000","message":"Thee changes are not needed.","commit_id":"b21e60bba9dd1ca25a3045f6b145d2f5b36baa77"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"56c943df801e397efb9aa9336c6f608e80b261fc","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        l3_attrs_db.ExtraAttributesMixin.extra_attributes + [{"},{"line_number":68,"context_line":"                                                                 \u0027name\u0027: \"distributed\","},{"line_number":69,"context_line":"                                                                 \u0027default\u0027: cfg.CONF.router_distributed"},{"line_number":70,"context_line":"                                                             }])"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _create_router_db(self, context, router, tenant_id):"},{"line_number":73,"context_line":"        \"\"\"Create a router db object with dvr additions.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"3acd31a7_4a3867ef","line":70,"in_reply_to":"3acd31a7_ea4df33e","updated":"2015-05-05 04:36:23.000000000","message":"will be fixed in the next patch.","commit_id":"b21e60bba9dd1ca25a3045f6b145d2f5b36baa77"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"f35aca06274952fc4593e36f116101bb45ccc1c6","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                # will work and FIP name space will be created successfully."},{"line_number":240,"context_line":"                if not vm_hostid:"},{"line_number":241,"context_line":"                    vm_hostid \u003d self._get_first_dvr_snat_host("},{"line_number":242,"context_line":"                        context, router_id)"},{"line_number":243,"context_line":"                    LOG.debug(\"get_first_dvr_snat_host return: %s\", vm_hostid)"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"                if vm_hostid:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3acd31a7_6a84435d","line":242,"updated":"2015-05-04 20:48:46.000000000","message":"router_id should be floatingip_db[\u0027router_id\u0027].\n\nPlease cover this piece of code with a unit test","commit_id":"b21e60bba9dd1ca25a3045f6b145d2f5b36baa77"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"56c943df801e397efb9aa9336c6f608e80b261fc","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                # will work and FIP name space will be created successfully."},{"line_number":240,"context_line":"                if not vm_hostid:"},{"line_number":241,"context_line":"                    vm_hostid \u003d self._get_first_dvr_snat_host("},{"line_number":242,"context_line":"                        context, router_id)"},{"line_number":243,"context_line":"                    LOG.debug(\"get_first_dvr_snat_host return: %s\", vm_hostid)"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"                if vm_hostid:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3acd31a7_4a1f476c","line":242,"in_reply_to":"3acd31a7_6a84435d","updated":"2015-05-05 04:36:23.000000000","message":"good catch.  I missed to merge that from patch 1.\nwill cover that in UT.","commit_id":"b21e60bba9dd1ca25a3045f6b145d2f5b36baa77"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"80f861bba40d00ee1029529abbd4ad6910b11c08","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        for l3_agent in l3_agents:"},{"line_number":192,"context_line":"            l3_agent_conf \u003d l3_agent[\u0027configurations\u0027]"},{"line_number":193,"context_line":"            if l3_agent_conf:"},{"line_number":194,"context_line":"                conf \u003d jsonutils.loads(l3_agent_conf)"},{"line_number":195,"context_line":"                if conf:"},{"line_number":196,"context_line":"                    mode \u003d conf.get(l3_const.L3_AGENT_MODE,"},{"line_number":197,"context_line":"                                    l3_const.L3_AGENT_MODE_LEGACY)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1aca2d91_dc8b4f1d","line":194,"updated":"2015-05-07 17:40:13.000000000","message":"Can you utilize the agent functions in here instead of the using the jsonutils to load the config. \nagent_conf \u003d l3_agent.get_configuration_dict(l3_agent)\nagent_mode \u003d agent_conf.get(constants.L3_AGENT_MODE,\n                                            constants.L3_AGENT_MODE_LEGACY)","commit_id":"e850a001ff6c849d0693b1c6c8ca94e94b3c4a61"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"1f12bc9797ac7dbc9f55128c6059d81ebbeb0dbf","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        for l3_agent in l3_agents:"},{"line_number":192,"context_line":"            l3_agent_conf \u003d l3_agent[\u0027configurations\u0027]"},{"line_number":193,"context_line":"            if l3_agent_conf:"},{"line_number":194,"context_line":"                conf \u003d jsonutils.loads(l3_agent_conf)"},{"line_number":195,"context_line":"                if conf:"},{"line_number":196,"context_line":"                    mode \u003d conf.get(l3_const.L3_AGENT_MODE,"},{"line_number":197,"context_line":"                                    l3_const.L3_AGENT_MODE_LEGACY)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1aca2d91_22ed7eef","line":194,"in_reply_to":"1aca2d91_dc8b4f1d","updated":"2015-05-07 18:28:59.000000000","message":"okay.  will enhance this part.","commit_id":"e850a001ff6c849d0693b1c6c8ca94e94b3c4a61"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"e1898bf43b742c99ca6f036f33ab470074716f8c","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from oslo_config import cfg"},{"line_number":17,"context_line":"from oslo_log import log as logging"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from oslo_utils import excutils"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from neutron.api.v2 import attributes"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aca2d91_8502126e","line":18,"updated":"2015-05-07 23:46:24.000000000","message":"unrelated/unneeded change, please remove","commit_id":"6ae8cc548b2cf7ff29defbc4335ebb76364add91"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"04da026ffa12cabbdfbda3b2a53e7987822d0f76","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from oslo_config import cfg"},{"line_number":17,"context_line":"from oslo_log import log as logging"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from oslo_utils import excutils"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from neutron.api.v2 import attributes"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aca2d91_c6aeb4e5","line":18,"in_reply_to":"1aca2d91_8502126e","updated":"2015-05-08 18:32:04.000000000","message":"will be corrected on next patch.","commit_id":"6ae8cc548b2cf7ff29defbc4335ebb76364add91"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"e1898bf43b742c99ca6f036f33ab470074716f8c","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            agent_conf \u003d self.get_configuration_dict(l3_agent)"},{"line_number":194,"context_line":"            agent_mode \u003d agent_conf.get(l3_const.L3_AGENT_MODE,"},{"line_number":195,"context_line":"                                        l3_const.L3_AGENT_MODE_LEGACY)"},{"line_number":196,"context_line":"            LOG.debug(\"l3_agent_mode \u003d %s\", agent_mode)"},{"line_number":197,"context_line":"            if agent_mode:"},{"line_number":198,"context_line":"                if agent_mode \u003d\u003d l3_const.L3_AGENT_MODE_DVR_SNAT:"},{"line_number":199,"context_line":"                        return l3_agent.host"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aca2d91_054602bf","line":196,"updated":"2015-05-07 23:46:24.000000000","message":"nit: useless log line, even for debugging.","commit_id":"6ae8cc548b2cf7ff29defbc4335ebb76364add91"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"04da026ffa12cabbdfbda3b2a53e7987822d0f76","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            agent_conf \u003d self.get_configuration_dict(l3_agent)"},{"line_number":194,"context_line":"            agent_mode \u003d agent_conf.get(l3_const.L3_AGENT_MODE,"},{"line_number":195,"context_line":"                                        l3_const.L3_AGENT_MODE_LEGACY)"},{"line_number":196,"context_line":"            LOG.debug(\"l3_agent_mode \u003d %s\", agent_mode)"},{"line_number":197,"context_line":"            if agent_mode:"},{"line_number":198,"context_line":"                if agent_mode \u003d\u003d l3_const.L3_AGENT_MODE_DVR_SNAT:"},{"line_number":199,"context_line":"                        return l3_agent.host"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aca2d91_a6b73839","line":196,"in_reply_to":"1aca2d91_054602bf","updated":"2015-05-08 18:32:04.000000000","message":"ok. will be removed on next patch.","commit_id":"6ae8cc548b2cf7ff29defbc4335ebb76364add91"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"e1898bf43b742c99ca6f036f33ab470074716f8c","unresolved":false,"context_lines":[{"line_number":231,"context_line":"                # If vm_host already created, host will be returned."},{"line_number":232,"context_line":"                vm_hostid \u003d self._get_vm_port_hostid("},{"line_number":233,"context_line":"                    context, fip_port)"},{"line_number":234,"context_line":"                LOG.debug(\"vm_hostid\u003d%s\", vm_hostid)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"                # Case of vm_host not yet created."},{"line_number":237,"context_line":"                # Get the first dvr_snat host and still create FIP agent"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aca2d91_8880e747","line":234,"updated":"2015-05-07 23:46:24.000000000","message":"same as above: that log line doesn\u0027t provide much info about the context.","commit_id":"6ae8cc548b2cf7ff29defbc4335ebb76364add91"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"04da026ffa12cabbdfbda3b2a53e7987822d0f76","unresolved":false,"context_lines":[{"line_number":231,"context_line":"                # If vm_host already created, host will be returned."},{"line_number":232,"context_line":"                vm_hostid \u003d self._get_vm_port_hostid("},{"line_number":233,"context_line":"                    context, fip_port)"},{"line_number":234,"context_line":"                LOG.debug(\"vm_hostid\u003d%s\", vm_hostid)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"                # Case of vm_host not yet created."},{"line_number":237,"context_line":"                # Get the first dvr_snat host and still create FIP agent"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aca2d91_46898474","line":234,"in_reply_to":"1aca2d91_8880e747","updated":"2015-05-08 18:32:04.000000000","message":"ok. will be removed on next patch.","commit_id":"6ae8cc548b2cf7ff29defbc4335ebb76364add91"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"e1898bf43b742c99ca6f036f33ab470074716f8c","unresolved":false,"context_lines":[{"line_number":249,"context_line":""},{"line_number":250,"context_line":"                    except exceptions.PortNotFound:"},{"line_number":251,"context_line":"                        LOG.debug(\"Port %(port)s not found while\""},{"line_number":252,"context_line":"                                  \"updating host ID during FIP association\""},{"line_number":253,"context_line":"                                  \" with unbound port %(router)s.\","},{"line_number":254,"context_line":"                                  {\"port\": fip_port, \"router\":"},{"line_number":255,"context_line":"                                      floatingip_db[\u0027router_id\u0027]})"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aca2d91_4893efa3","line":252,"updated":"2015-05-07 23:46:24.000000000","message":"nit: better to leave space on the previous line","commit_id":"6ae8cc548b2cf7ff29defbc4335ebb76364add91"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"04da026ffa12cabbdfbda3b2a53e7987822d0f76","unresolved":false,"context_lines":[{"line_number":249,"context_line":""},{"line_number":250,"context_line":"                    except exceptions.PortNotFound:"},{"line_number":251,"context_line":"                        LOG.debug(\"Port %(port)s not found while\""},{"line_number":252,"context_line":"                                  \"updating host ID during FIP association\""},{"line_number":253,"context_line":"                                  \" with unbound port %(router)s.\","},{"line_number":254,"context_line":"                                  {\"port\": fip_port, \"router\":"},{"line_number":255,"context_line":"                                      floatingip_db[\u0027router_id\u0027]})"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aca2d91_c6959487","line":252,"in_reply_to":"1aca2d91_4893efa3","updated":"2015-05-08 18:32:04.000000000","message":"good catch. will be done on next patch.","commit_id":"6ae8cc548b2cf7ff29defbc4335ebb76364add91"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c2d00000227594dd22804c4af7a53f291d00fc1d","unresolved":false,"context_lines":[{"line_number":192,"context_line":"            agent_conf \u003d self.get_configuration_dict(l3_agent)"},{"line_number":193,"context_line":"            agent_mode \u003d agent_conf.get(l3_const.L3_AGENT_MODE,"},{"line_number":194,"context_line":"                                        l3_const.L3_AGENT_MODE_LEGACY)"},{"line_number":195,"context_line":"            if agent_mode:"},{"line_number":196,"context_line":"                if agent_mode \u003d\u003d l3_const.L3_AGENT_MODE_DVR_SNAT:"},{"line_number":197,"context_line":"                        return l3_agent.host"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1aca2d91_2681e8c3","line":195,"updated":"2015-05-08 18:52:00.000000000","message":"You might not require this extra \"if agent_mode\", since you are passing a default value of \"legacy_mode\".","commit_id":"c5182462888237c48f43a66c1954b5d0ef03eadd"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"d3b9333c4b9db369a750a5732d1f5a8d909c8fab","unresolved":false,"context_lines":[{"line_number":192,"context_line":"            agent_conf \u003d self.get_configuration_dict(l3_agent)"},{"line_number":193,"context_line":"            agent_mode \u003d agent_conf.get(l3_const.L3_AGENT_MODE,"},{"line_number":194,"context_line":"                                        l3_const.L3_AGENT_MODE_LEGACY)"},{"line_number":195,"context_line":"            if agent_mode:"},{"line_number":196,"context_line":"                if agent_mode \u003d\u003d l3_const.L3_AGENT_MODE_DVR_SNAT:"},{"line_number":197,"context_line":"                        return l3_agent.host"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1aca2d91_09e03df9","line":195,"in_reply_to":"1aca2d91_2681e8c3","updated":"2015-05-08 19:07:58.000000000","message":"will remove that","commit_id":"c5182462888237c48f43a66c1954b5d0ef03eadd"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"3943aef9bb81f53f53bc695f940cb88f3b839a56","unresolved":false,"context_lines":[{"line_number":248,"context_line":"                                  \"updating host ID during FIP association \""},{"line_number":249,"context_line":"                                  \"with unbound port %(router)s.\","},{"line_number":250,"context_line":"                                  {\"port\": fip_port, \"router\":"},{"line_number":251,"context_line":"                                      floatingip_db[\u0027router_id\u0027]})"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"                if vm_hostid:"},{"line_number":254,"context_line":"                    # FIXME (Swami): This FIP Agent Gateway port should be"}],"source_content_type":"text/x-python","patch_set":10,"id":"7ad8896b_62519e62","line":251,"updated":"2015-05-11 18:27:51.000000000","message":"nit: if space allows, it would be nice to have key and value on same line. Align with \"port\"\n\n    ...\n    {\"port\": fip_port,\n     \"router\": floatingip_db[\u0027router_id\u0027]})","commit_id":"0841dc0ec94d2bb65151517f6a2521bc12ef7a87"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"9a0e26cfd3eb3555f1f2e34a4ff25c2978702cd9","unresolved":false,"context_lines":[{"line_number":248,"context_line":"                                  \"updating host ID during FIP association \""},{"line_number":249,"context_line":"                                  \"with unbound port %(router)s.\","},{"line_number":250,"context_line":"                                  {\"port\": fip_port, \"router\":"},{"line_number":251,"context_line":"                                      floatingip_db[\u0027router_id\u0027]})"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"                if vm_hostid:"},{"line_number":254,"context_line":"                    # FIXME (Swami): This FIP Agent Gateway port should be"}],"source_content_type":"text/x-python","patch_set":10,"id":"7ad8896b_9d486f89","line":251,"in_reply_to":"7ad8896b_62519e62","updated":"2015-05-11 19:16:52.000000000","message":"Yes. it could.  It\u0027s better layout.  Will correct that on the next patch.","commit_id":"0841dc0ec94d2bb65151517f6a2521bc12ef7a87"},{"author":{"_account_id":11682,"name":"Ryan Moats","email":"rmoats@us.ibm.com","username":"regXboi"},"change_message_id":"f7878afab47982604dc3edf70dd5058a804407b2","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            agent_mode \u003d agent_conf.get(l3_const.L3_AGENT_MODE,"},{"line_number":195,"context_line":"                                        l3_const.L3_AGENT_MODE_LEGACY)"},{"line_number":196,"context_line":"            if agent_mode \u003d\u003d l3_const.L3_AGENT_MODE_DVR_SNAT:"},{"line_number":197,"context_line":"                    return l3_agent.host"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def _update_fip_assoc(self, context, fip, floatingip_db, external_port):"},{"line_number":200,"context_line":"        \"\"\"Override to create and delete floating agent gw port for DVR."}],"source_content_type":"text/x-python","patch_set":18,"id":"9a41bdd9_eea11d95","line":197,"updated":"2015-07-15 20:57:21.000000000","message":"nit: this looks like wrong indentation?","commit_id":"2e6caafaadfd2decff23c69409053ded39cec827"}],"neutron/tests/unit/db/test_l3_dvr_db.py":[{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"6038ae8e773cf0d594c289b4b81e2c3928d9514c","unresolved":false,"context_lines":[{"line_number":512,"context_line":"        self.assertTrue(delete_fip.called)"},{"line_number":513,"context_line":"        self.assertFalse(create_fip.called)"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"    def test_create_floatingip_agent_gw_port_with_unbound_port(self):"},{"line_number":516,"context_line":"        floatingip \u003d {"},{"line_number":517,"context_line":"            \u0027id\u0027: _uuid(),"},{"line_number":518,"context_line":"            \u0027router_id\u0027: \u0027foo_router_id\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aca2d91_d4d79621","line":515,"updated":"2015-05-08 03:53:49.000000000","message":"Combine _setup_test_create_delete_floatingip_with_unbound_port iwith this function because it is only called once.","commit_id":"6ae8cc548b2cf7ff29defbc4335ebb76364add91"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"04da026ffa12cabbdfbda3b2a53e7987822d0f76","unresolved":false,"context_lines":[{"line_number":512,"context_line":"        self.assertTrue(delete_fip.called)"},{"line_number":513,"context_line":"        self.assertFalse(create_fip.called)"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"    def test_create_floatingip_agent_gw_port_with_unbound_port(self):"},{"line_number":516,"context_line":"        floatingip \u003d {"},{"line_number":517,"context_line":"            \u0027id\u0027: _uuid(),"},{"line_number":518,"context_line":"            \u0027router_id\u0027: \u0027foo_router_id\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aca2d91_a6e5f838","line":515,"in_reply_to":"1aca2d91_d4d79621","updated":"2015-05-08 18:32:04.000000000","message":"ok.  will be done on next patch.","commit_id":"6ae8cc548b2cf7ff29defbc4335ebb76364add91"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c2d00000227594dd22804c4af7a53f291d00fc1d","unresolved":false,"context_lines":[{"line_number":513,"context_line":"            pg.return_value \u003d plugin"},{"line_number":514,"context_line":"            self.mixin.manager \u003d manager"},{"line_number":515,"context_line":"            grtr.return_value \u003d router_db"},{"line_number":516,"context_line":"            vmp.return_value \u003d \u0027\u0027"},{"line_number":517,"context_line":"            dvrsnat_host.return_value \u003d \u0027host1\u0027"},{"line_number":518,"context_line":"            self.mixin._update_fip_assoc("},{"line_number":519,"context_line":"                self.ctx, fip, floatingip_db, port)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aca2d91_26e688b0","line":516,"updated":"2015-05-08 18:52:00.000000000","message":"return_value here can be a \"None\"","commit_id":"c5182462888237c48f43a66c1954b5d0ef03eadd"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"d3b9333c4b9db369a750a5732d1f5a8d909c8fab","unresolved":false,"context_lines":[{"line_number":513,"context_line":"            pg.return_value \u003d plugin"},{"line_number":514,"context_line":"            self.mixin.manager \u003d manager"},{"line_number":515,"context_line":"            grtr.return_value \u003d router_db"},{"line_number":516,"context_line":"            vmp.return_value \u003d \u0027\u0027"},{"line_number":517,"context_line":"            dvrsnat_host.return_value \u003d \u0027host1\u0027"},{"line_number":518,"context_line":"            self.mixin._update_fip_assoc("},{"line_number":519,"context_line":"                self.ctx, fip, floatingip_db, port)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aca2d91_6907b1ca","line":516,"in_reply_to":"1aca2d91_26e688b0","updated":"2015-05-08 19:07:58.000000000","message":"will change to None.  both would trigger the same logic though.","commit_id":"c5182462888237c48f43a66c1954b5d0ef03eadd"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"3943aef9bb81f53f53bc695f940cb88f3b839a56","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        plugin.update_port.return_value \u003d mock.Mock("},{"line_number":494,"context_line":"            return_value\u003d[mock.MagicMock()])"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"        with contextlib.nested("},{"line_number":497,"context_line":"                mock.patch.object(manager.NeutronManager,"},{"line_number":498,"context_line":"                                  \u0027get_plugin\u0027),"},{"line_number":499,"context_line":"                mock.patch.object(self.mixin,"}],"source_content_type":"text/x-python","patch_set":10,"id":"7ad8896b_c23a92e7","line":496,"updated":"2015-05-11 18:27:51.000000000","message":"Just curious, rather than mocking out a bunch of items to be able to test _update_fip_assoc(), could you instead put most of the new code in a new method, and then just test that logic?\n\nI\u0027m also having trouble understanding how this test is validating that the new code is all called.  The assertTrue at the end, is for create_fip_agent_gw_port_if_not_exists, which is called before the new code.","commit_id":"0841dc0ec94d2bb65151517f6a2521bc12ef7a87"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"dc1794dee4b518d8b756d94c3a50415551608988","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        plugin.update_port.return_value \u003d mock.Mock("},{"line_number":494,"context_line":"            return_value\u003d[mock.MagicMock()])"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"        with contextlib.nested("},{"line_number":497,"context_line":"                mock.patch.object(manager.NeutronManager,"},{"line_number":498,"context_line":"                                  \u0027get_plugin\u0027),"},{"line_number":499,"context_line":"                mock.patch.object(self.mixin,"}],"source_content_type":"text/x-python","patch_set":10,"id":"5ad58531_f0879e10","line":496,"updated":"2015-05-11 19:46:49.000000000","message":"plz, avoid contextlib.nested use as it\u0027s deprecated and not py3K compliant","commit_id":"0841dc0ec94d2bb65151517f6a2521bc12ef7a87"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"57a1ce98c04cfbc88c948ffbc9b64eb0b071fde1","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        plugin.update_port.return_value \u003d mock.Mock("},{"line_number":494,"context_line":"            return_value\u003d[mock.MagicMock()])"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"        with contextlib.nested("},{"line_number":497,"context_line":"                mock.patch.object(manager.NeutronManager,"},{"line_number":498,"context_line":"                                  \u0027get_plugin\u0027),"},{"line_number":499,"context_line":"                mock.patch.object(self.mixin,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a0c5dc1_7caffde3","line":496,"in_reply_to":"5ad58531_f0879e10","updated":"2015-05-12 06:50:22.000000000","message":"Remove contextlib.nested usage in next patch.  Please verify.  Thanks.","commit_id":"0841dc0ec94d2bb65151517f6a2521bc12ef7a87"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"9a0e26cfd3eb3555f1f2e34a4ff25c2978702cd9","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        plugin.update_port.return_value \u003d mock.Mock("},{"line_number":494,"context_line":"            return_value\u003d[mock.MagicMock()])"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"        with contextlib.nested("},{"line_number":497,"context_line":"                mock.patch.object(manager.NeutronManager,"},{"line_number":498,"context_line":"                                  \u0027get_plugin\u0027),"},{"line_number":499,"context_line":"                mock.patch.object(self.mixin,"}],"source_content_type":"text/x-python","patch_set":10,"id":"5ad58531_4d10194f","line":496,"in_reply_to":"7ad8896b_c23a92e7","updated":"2015-05-11 19:16:52.000000000","message":"This test case is mainly to validate FIP agent gateway port creation is called for unbound port.  Before the code changes, the FIP agent gateway port creation will always get skipped in unbound port case because \"create_fip_agent_gw_port_if_not_exists\" will only be visited if vm_host has a value (not None).  For unbound port case, the vm_host value will be \"None\" before it get attached to a host vm.\n\nThe fix is to assign dvr_snat host name on this unbound port.  After the host name is assigned, \"create_fip_agent_gw_port_if_not_exists\" will get visited.","commit_id":"0841dc0ec94d2bb65151517f6a2521bc12ef7a87"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"608ac50487d929d88fde16451a3c8f62ed832957","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        plugin.update_port.return_value \u003d mock.Mock("},{"line_number":494,"context_line":"            return_value\u003d[mock.MagicMock()])"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"        with mock.patch.object("},{"line_number":497,"context_line":"                manager.NeutronManager,"},{"line_number":498,"context_line":"                \u0027get_plugin\u0027) as pg:"},{"line_number":499,"context_line":"            pg.return_value \u003d plugin"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a0c5dc1_a9ce54b2","line":496,"updated":"2015-05-12 09:04:06.000000000","message":"outch, it\u0027s really difficult to read, you should use the \"new\" nested:\n\n\n with mock.patch.object(...) as pg,\\\n        mock.patch.object(....) as ...,\\\n        mock.patch.object(....) as ...,\\\n        ...\n        ...:\n    self.mixin.update_fip_assoc(...)\n    ...","commit_id":"9122e4927bfbe52fe6e90090986e77afffea05d7"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"1ccb6f52afdc408fffb1e03ec01a0e11346c7865","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        plugin.update_port.return_value \u003d mock.Mock("},{"line_number":494,"context_line":"            return_value\u003d[mock.MagicMock()])"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"        with mock.patch.object("},{"line_number":497,"context_line":"                manager.NeutronManager,"},{"line_number":498,"context_line":"                \u0027get_plugin\u0027) as pg:"},{"line_number":499,"context_line":"            pg.return_value \u003d plugin"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a0c5dc1_57575802","line":496,"in_reply_to":"9a0c5dc1_a9ce54b2","updated":"2015-05-12 17:21:35.000000000","message":"OK.  Thanks for the suggestion.","commit_id":"9122e4927bfbe52fe6e90090986e77afffea05d7"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9543727a6cf60039d1e6e6a5b1bc3be02871c85b","unresolved":false,"context_lines":[{"line_number":503,"context_line":"                    self.mixin,"},{"line_number":504,"context_line":"                    \u0027get_router\u0027) as grtr:"},{"line_number":505,"context_line":"                grtr.return_value \u003d router_db"},{"line_number":506,"context_line":""},{"line_number":507,"context_line":"                with mock.patch.object("},{"line_number":508,"context_line":"                        self.mixin,"},{"line_number":509,"context_line":"                        \u0027_get_vm_port_hostid\u0027) as vmp:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a0c5dc1_4cf34a74","line":506,"updated":"2015-05-12 19:03:22.000000000","message":"You can use \"nested.contextlib\" in here because you have too many intends in here with the \"with:","commit_id":"9122e4927bfbe52fe6e90090986e77afffea05d7"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"490c48e7dd291e2373262e713c3f2b99760815e6","unresolved":false,"context_lines":[{"line_number":503,"context_line":"                    self.mixin,"},{"line_number":504,"context_line":"                    \u0027get_router\u0027) as grtr:"},{"line_number":505,"context_line":"                grtr.return_value \u003d router_db"},{"line_number":506,"context_line":""},{"line_number":507,"context_line":"                with mock.patch.object("},{"line_number":508,"context_line":"                        self.mixin,"},{"line_number":509,"context_line":"                        \u0027_get_vm_port_hostid\u0027) as vmp:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a0c5dc1_655e21eb","line":506,"in_reply_to":"9a0c5dc1_4cf34a74","updated":"2015-05-12 20:05:35.000000000","message":"contextlib.nested was used before but it was suggested to be removed from previous patch\u0027s comment.  It is deprecated method and not py3k compliant.  Therefore, I made the changes in this patch.","commit_id":"9122e4927bfbe52fe6e90090986e77afffea05d7"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b6b1211b0c0eeca938cdf51ed04eba63294e5055","unresolved":false,"context_lines":[{"line_number":525,"context_line":""},{"line_number":526,"context_line":"                                self.mixin._update_fip_assoc("},{"line_number":527,"context_line":"                                    self.ctx, fip, floatingip_db, port)"},{"line_number":528,"context_line":"                                "},{"line_number":529,"context_line":"                                self.assertTrue(c_fip.called)"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def test_delete_floatingip_agent_gw_port_with_non_dvr_router(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a0c5dc1_7f2fe5a1","line":528,"updated":"2015-05-12 12:02:32.000000000","message":"nit: trailing whitespace.","commit_id":"9122e4927bfbe52fe6e90090986e77afffea05d7"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"1ccb6f52afdc408fffb1e03ec01a0e11346c7865","unresolved":false,"context_lines":[{"line_number":525,"context_line":""},{"line_number":526,"context_line":"                                self.mixin._update_fip_assoc("},{"line_number":527,"context_line":"                                    self.ctx, fip, floatingip_db, port)"},{"line_number":528,"context_line":"                                "},{"line_number":529,"context_line":"                                self.assertTrue(c_fip.called)"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def test_delete_floatingip_agent_gw_port_with_non_dvr_router(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a0c5dc1_f73e4cb7","line":528,"in_reply_to":"9a0c5dc1_7f2fe5a1","updated":"2015-05-12 17:21:35.000000000","message":"ok","commit_id":"9122e4927bfbe52fe6e90090986e77afffea05d7"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"608ac50487d929d88fde16451a3c8f62ed832957","unresolved":false,"context_lines":[{"line_number":526,"context_line":"                                self.mixin._update_fip_assoc("},{"line_number":527,"context_line":"                                    self.ctx, fip, floatingip_db, port)"},{"line_number":528,"context_line":"                                "},{"line_number":529,"context_line":"                                self.assertTrue(c_fip.called)"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def test_delete_floatingip_agent_gw_port_with_non_dvr_router(self):"},{"line_number":532,"context_line":"        floatingip \u003d {"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a0c5dc1_e9620cad","line":529,"updated":"2015-05-12 09:04:06.000000000","message":"should we check arguments provided to c_fip?","commit_id":"9122e4927bfbe52fe6e90090986e77afffea05d7"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"1ccb6f52afdc408fffb1e03ec01a0e11346c7865","unresolved":false,"context_lines":[{"line_number":526,"context_line":"                                self.mixin._update_fip_assoc("},{"line_number":527,"context_line":"                                    self.ctx, fip, floatingip_db, port)"},{"line_number":528,"context_line":"                                "},{"line_number":529,"context_line":"                                self.assertTrue(c_fip.called)"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def test_delete_floatingip_agent_gw_port_with_non_dvr_router(self):"},{"line_number":532,"context_line":"        floatingip \u003d {"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a0c5dc1_37b984ea","line":529,"in_reply_to":"9a0c5dc1_c2683abd","updated":"2015-05-12 17:21:35.000000000","message":"agree.  will create a negative test case for exception case. thanks.","commit_id":"9122e4927bfbe52fe6e90090986e77afffea05d7"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b6b1211b0c0eeca938cdf51ed04eba63294e5055","unresolved":false,"context_lines":[{"line_number":526,"context_line":"                                self.mixin._update_fip_assoc("},{"line_number":527,"context_line":"                                    self.ctx, fip, floatingip_db, port)"},{"line_number":528,"context_line":"                                "},{"line_number":529,"context_line":"                                self.assertTrue(c_fip.called)"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def test_delete_floatingip_agent_gw_port_with_non_dvr_router(self):"},{"line_number":532,"context_line":"        floatingip \u003d {"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a0c5dc1_c2683abd","line":529,"in_reply_to":"9a0c5dc1_e9620cad","updated":"2015-05-12 12:02:32.000000000","message":"Shouldn\u0027t this test verify that _get_first_dvr_snat_host() was called?\n\nShould a test be created to execute the negative case (exception)? That would check the path of when _get_first_dvr_snat_host() does not find the vm host id.\n\nIn this test case, I don\u0027t see where the new code paths in l3_dvr_db.py are exercised fully.","commit_id":"9122e4927bfbe52fe6e90090986e77afffea05d7"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"1ccb6f52afdc408fffb1e03ec01a0e11346c7865","unresolved":false,"context_lines":[{"line_number":526,"context_line":"                                self.mixin._update_fip_assoc("},{"line_number":527,"context_line":"                                    self.ctx, fip, floatingip_db, port)"},{"line_number":528,"context_line":"                                "},{"line_number":529,"context_line":"                                self.assertTrue(c_fip.called)"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def test_delete_floatingip_agent_gw_port_with_non_dvr_router(self):"},{"line_number":532,"context_line":"        floatingip \u003d {"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a0c5dc1_770a5cd4","line":529,"in_reply_to":"9a0c5dc1_e9620cad","updated":"2015-05-12 17:21:35.000000000","message":"probably not.  This unit test is to verify the c_fip function will get visited in caes of unbound port case. The rest of functionality should already got covered on other test cases.","commit_id":"9122e4927bfbe52fe6e90090986e77afffea05d7"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"3b2548c6002cfedc3c53dbba6236d293860c4da5","unresolved":false,"context_lines":[{"line_number":474,"context_line":"        self.assertTrue(delete_fip.called)"},{"line_number":475,"context_line":"        self.assertFalse(create_fip.called)"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    def test_create_fip_agent_gw_port_with_unbound_port_host_found(self):"},{"line_number":478,"context_line":"        floatingip_db \u003d {"},{"line_number":479,"context_line":"            \u0027id\u0027: _uuid(),"},{"line_number":480,"context_line":"            \u0027router_id\u0027: \u0027foo_router_id\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a0c5dc1_9e694928","line":477,"updated":"2015-05-13 11:51:44.000000000","message":"Two general comments on these new/updated tests. First, there is a lot of very similar setup logic for these test cases. You could pull them out into a new class and use setUp to prepare for the test and then just tweak per test items in the test cases (e.g. port_id set in L562, fst_host set to none, etc).\n\nSecond, since there is a bunch of mocking going on here, it would really help readers to have a docstring comment that elaborates on what the test is attempting to verify.\n\nFor example, on this test case you could say that when there is no vm host that it gets the host ID from the first DVR SNAT host (fst_host called), and that it creates the port (c_fip called).","commit_id":"e57e56e7edca139eedbc90bd32a6cee6585a96b0"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"3b2548c6002cfedc3c53dbba6236d293860c4da5","unresolved":false,"context_lines":[{"line_number":593,"context_line":"            grtr.return_value \u003d router_db"},{"line_number":594,"context_line":"            vmp.return_value \u003d None"},{"line_number":595,"context_line":"            dshost.return_value \u003d \u0027host1\u0027"},{"line_number":596,"context_line":"            u_fip.side_effect \u003d exceptions.PortNotFound(port_id\u003dport_id)"},{"line_number":597,"context_line":"            try:"},{"line_number":598,"context_line":"                self.mixin._update_fip_assoc("},{"line_number":599,"context_line":"                    self.ctx, fip, floatingip_db, port)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a0c5dc1_deb341e8","line":596,"updated":"2015-05-13 11:51:44.000000000","message":"This is setting an exception to be thrown by the mixin class, which is called on L218 of l3_dvr_db.py. I would think you\u0027d want to have self._core_plugin.update_port()  mocked and raise the exception to really exercise that case.","commit_id":"e57e56e7edca139eedbc90bd32a6cee6585a96b0"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"101c695ea612ee130c05184caa5919e5390cdec8","unresolved":false,"context_lines":[{"line_number":474,"context_line":"        self.assertTrue(delete_fip.called)"},{"line_number":475,"context_line":"        self.assertFalse(create_fip.called)"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    def _setup_test_create_fip_agent_gw_port_with_unbound_port("},{"line_number":478,"context_line":"        self, first_host_name):"},{"line_number":479,"context_line":"        \"\"\"Setup: fip agent gateway port creation with unbound port"},{"line_number":480,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_e9431b6b","line":477,"updated":"2015-05-14 14:06:40.000000000","message":"I was thinking more of having a new test class, with a setUp() method that sets up all the mocks and structures, and then the tests could make any needed overriding, and perform the test desired.\n\nEssentially doing L486-520 (or L519).  Then, in the test methods, they\u0027d make the call L521-522 and assert on the results. If needed, the test cases can do additional settings, like L520 (vs passing into the setup method), by using member variables for the mocks. If you do that, you could then use the same setup for the test on L553, and have the call inside a try block in the test case. It would remove more duplication.\n\nAn alternative, is to keep this as a helper method, and not introduce a new class, but you could still have it only do setup and then for each test method have them make the actual call as done on L521-522. In that case, you probably want to make the docstring reflect what setup it is doing, as it\u0027s used differently for each test (setup_for_fip_association_test?).\n\nAs another alternative, you can keep it as-is, however, it should be named differently, as it is not doing setup, but actually setup and invocation of the code under test. Maybe something like _test_fip_association(). You could still use it for the test on L553, but would need to call it inside of a try block. Personally, that is a bit more awkward that the other two methods.","commit_id":"2669837c104465eaebf96fce95661c399f571f46"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"101c695ea612ee130c05184caa5919e5390cdec8","unresolved":false,"context_lines":[{"line_number":557,"context_line":"        when attempting to update the unbound port info during fip entry"},{"line_number":558,"context_line":"        association."},{"line_number":559,"context_line":"        \"\"\""},{"line_number":560,"context_line":"        port_id \u003d \u0027unknown_port_id\u0027"},{"line_number":561,"context_line":"        floatingip_db \u003d {"},{"line_number":562,"context_line":"            \u0027id\u0027: _uuid(),"},{"line_number":563,"context_line":"            \u0027router_id\u0027: \u0027foo_router_id\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_9b34eede","line":560,"updated":"2015-05-14 14:06:40.000000000","message":"You could use the above setup logic for this test case too, only adding the mock for _core_plugin to it, and then setting the side effect in this class and making the call to _update_fip_assoc() here (using the suggestion of having the setup only doing the setup for the test).","commit_id":"2669837c104465eaebf96fce95661c399f571f46"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"0141c2d0c1f31ba508ff511405e7df39e2e9bfbb","unresolved":false,"context_lines":[{"line_number":557,"context_line":"        when attempting to update the unbound port info during fip entry"},{"line_number":558,"context_line":"        association."},{"line_number":559,"context_line":"        \"\"\""},{"line_number":560,"context_line":"        port_id \u003d \u0027unknown_port_id\u0027"},{"line_number":561,"context_line":"        floatingip_db \u003d {"},{"line_number":562,"context_line":"            \u0027id\u0027: _uuid(),"},{"line_number":563,"context_line":"            \u0027router_id\u0027: \u0027foo_router_id\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_cdbeaf64","line":560,"in_reply_to":"7a016987_9b34eede","updated":"2015-05-19 20:20:38.000000000","message":"Paul, do you have any example codes to share? I will try to ping you again on  IRC.  I was on openstack-neutron channel.  If I need to be in a different channel, please advise.","commit_id":"2669837c104465eaebf96fce95661c399f571f46"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"24374384314103d3e7fa2b572bc434b2e01770da","unresolved":false,"context_lines":[{"line_number":544,"context_line":"        when attempting to update the unbound port info during fip entry"},{"line_number":545,"context_line":"        association."},{"line_number":546,"context_line":"        \"\"\""},{"line_number":547,"context_line":"        port_id \u003d \u0027unknown_port_id\u0027"},{"line_number":548,"context_line":"        floatingip_db \u003d {"},{"line_number":549,"context_line":"            \u0027id\u0027: _uuid(),"},{"line_number":550,"context_line":"            \u0027router_id\u0027: \u0027foo_router_id\u0027"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa32b979_2ca666ae","line":547,"updated":"2015-06-17 13:13:22.000000000","message":"You could reuse _setup_test_create_fip_agent_gw_port_with_unbound_port() here too, by doing the following:\n\n1) pass port_id into the method, so that this test can override. The default can be \u00271234\u0027, so other tests don\u0027t change\n2) pass in a first_host_port of None\n3) before calling the helper, create a mock for update_port here, and set the side effect(L583).","commit_id":"262fa78368d33122cc38487f6ad566ced31b5ff5"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"06f20748baf412256438a47b3154a4cab113f439","unresolved":false,"context_lines":[{"line_number":544,"context_line":"        when attempting to update the unbound port info during fip entry"},{"line_number":545,"context_line":"        association."},{"line_number":546,"context_line":"        \"\"\""},{"line_number":547,"context_line":"        port_id \u003d \u0027unknown_port_id\u0027"},{"line_number":548,"context_line":"        floatingip_db \u003d {"},{"line_number":549,"context_line":"            \u0027id\u0027: _uuid(),"},{"line_number":550,"context_line":"            \u0027router_id\u0027: \u0027foo_router_id\u0027"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa32b979_f7f58dec","line":547,"in_reply_to":"fa32b979_2ca666ae","updated":"2015-06-17 22:04:16.000000000","message":"this test case is no longer valid.  I deleted it in the previous patch, and for some reason the dependent patch, 181599, pull this back in. I will fix this one.\n\nthanks.","commit_id":"262fa78368d33122cc38487f6ad566ced31b5ff5"}]}
