)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"62520a1e6bf7f8628cdc56b18027895eab2cce85","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Ritesh Anand \u003critesh.anand@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-06-03 08:25:32 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Added 44 test cases for DVR L3 schedulers."},{"line_number":8,"context_line":"11 cases listed below are to run for Chance and Least-routers scheduler,"},{"line_number":9,"context_line":"for both auto and explicit scheduling."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3afb71cf_943145ef","line":7,"updated":"2015-06-05 20:45:05.000000000","message":"The commit title should be followed by an empty line.\n\nNo need to specify how many test cases the commit adds, it provides no useful information.\n\n\nPerhaps, you should look at: https://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"33051ec54aef816b8fba3b9192edca3115d19c20"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"62520a1e6bf7f8628cdc56b18027895eab2cce85","unresolved":false,"context_lines":[{"line_number":14,"context_line":"  2. Snat router binding removed, if it exists and"},{"line_number":15,"context_line":"     distributed router has no gateway."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"  3. Already hosted legacy router not schduled on additional dvr agent."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"  4. Distributed router not scheduled if it does not have external"},{"line_number":20,"context_line":"     gateway and agent does not handle internal only routers."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3afb71cf_d4921d57","line":17,"updated":"2015-06-05 20:45:05.000000000","message":"schduled \u003d\u003e scheduled","commit_id":"33051ec54aef816b8fba3b9192edca3115d19c20"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3b65aa292b2e7b70cd222ee3057b134084fdcf46","unresolved":false,"context_lines":[{"line_number":13,"context_line":"  2. Snat router binding removed, if it exists and"},{"line_number":14,"context_line":"     distributed router has no gateway."},{"line_number":15,"context_line":"  3. Already hosted legacy router not scheduled on additional dvr agent."},{"line_number":16,"context_line":"  4. Distributed router not scheduled if it does not have external"},{"line_number":17,"context_line":"     gateway and agent does not handle internal only routers."},{"line_number":18,"context_line":"  5. Distributed router not scheduled if it is on a different"},{"line_number":19,"context_line":"     external network than the agent."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"fa1b9901_448f44cc","line":16,"updated":"2015-08-18 21:02:09.000000000","message":"I don\u0027t think that \u0027handle_internal_only_routers\u0027 is something that we care to test. IMO you can assume it\u0027s set to True in all deployments and remove any tests or references to it.","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":15736,"name":"Ritesh Anand","email":"tellrit@gmail.com","username":"ritesh"},"change_message_id":"f20688cec030c0c5aca0736d7b43d22fe35ca013","unresolved":false,"context_lines":[{"line_number":13,"context_line":"  2. Snat router binding removed, if it exists and"},{"line_number":14,"context_line":"     distributed router has no gateway."},{"line_number":15,"context_line":"  3. Already hosted legacy router not scheduled on additional dvr agent."},{"line_number":16,"context_line":"  4. Distributed router not scheduled if it does not have external"},{"line_number":17,"context_line":"     gateway and agent does not handle internal only routers."},{"line_number":18,"context_line":"  5. Distributed router not scheduled if it is on a different"},{"line_number":19,"context_line":"     external network than the agent."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"fa1b9901_62ceb583","line":16,"in_reply_to":"fa1b9901_448f44cc","updated":"2015-08-20 00:19:53.000000000","message":"Done","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"}],"neutron/tests/functional/scheduler/test_l3_agent_scheduler.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"62520a1e6bf7f8628cdc56b18027895eab2cce85","unresolved":false,"context_lines":[{"line_number":335,"context_line":"            self.assertFalse(did_it_schedule, \u0027Agent scheduled, not expected\u0027)"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"class L3DVRSchedulerBaseTest(test_db_base_plugin_v2.NeutronDbPluginV2TestCase,"},{"line_number":339,"context_line":"                          l3_dvr_db.L3_NAT_with_dvr_db_mixin,"},{"line_number":340,"context_line":"                          test_l3_agent_scheduler.L3SchedulerBaseMixin):"},{"line_number":341,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_548d0d30","line":338,"updated":"2015-06-05 20:45:05.000000000","message":"Why defining 2 classes?","commit_id":"33051ec54aef816b8fba3b9192edca3115d19c20"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"62520a1e6bf7f8628cdc56b18027895eab2cce85","unresolved":false,"context_lines":[{"line_number":489,"context_line":"    scenarios \u003d ["},{"line_number":490,"context_line":"        (\u0027Snat router scheduled, if no such binding exists and distributed\u0027"},{"line_number":491,"context_line":"         \u0027 router has external gateway\u0027,"},{"line_number":492,"context_line":"         dict(agent_modes\u003d[\u0027dvr_snat\u0027],"},{"line_number":493,"context_line":"              agent_handle_internal\u003dTrue,"},{"line_number":494,"context_line":"              agent_has_ext_network\u003dTrue,"},{"line_number":495,"context_line":"              router_is_distributed\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_94eee5ea","line":492,"updated":"2015-06-05 20:45:05.000000000","message":"imo, it\u0027s not really readable, i would prefer you define an helper to build the dict setting common default values:\n\n  def get_config(agent_modes, agent_handle_internal\u003dTrue, ...):\n     return dict(\n       agent_modes\u003dagent_modes,\n       agent_handle_internal\u003dagent_handle_internal,\n       ...)","commit_id":"33051ec54aef816b8fba3b9192edca3115d19c20"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"dfe6d9a119819e3c25960d7803834f671e7848f5","unresolved":false,"context_lines":[{"line_number":596,"context_line":"              expected_router_scheduled\u003dTrue)),"},{"line_number":597,"context_line":""},{"line_number":598,"context_line":"        (\u0027Distributed router not scheduled on dvr_snat agent if router has \u0027"},{"line_number":599,"context_line":"         \u0027no DHCP and no dvr serviced port on any subnets\u0027,"},{"line_number":600,"context_line":"         dict(agent_modes\u003d[\u0027dvr_snat\u0027],"},{"line_number":601,"context_line":"              agent_handle_internal\u003dTrue,"},{"line_number":602,"context_line":"              agent_has_ext_network\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5afe65bd_d9a0d1a1","line":599,"updated":"2015-06-03 23:38:59.000000000","message":"What is the data in here that specified that there are no \"dvr serviced port on any subnets\". I could see the dhcp but apart from that is there any other configuration here that states the \"dvr servicable\" ports.","commit_id":"33051ec54aef816b8fba3b9192edca3115d19c20"},{"author":{"_account_id":15736,"name":"Ritesh Anand","email":"tellrit@gmail.com","username":"ritesh"},"change_message_id":"dcfc4d9241940ea1b2a61daaadb6bf779a19fa5e","unresolved":false,"context_lines":[{"line_number":596,"context_line":"              expected_router_scheduled\u003dTrue)),"},{"line_number":597,"context_line":""},{"line_number":598,"context_line":"        (\u0027Distributed router not scheduled on dvr_snat agent if router has \u0027"},{"line_number":599,"context_line":"         \u0027no DHCP and no dvr serviced port on any subnets\u0027,"},{"line_number":600,"context_line":"         dict(agent_modes\u003d[\u0027dvr_snat\u0027],"},{"line_number":601,"context_line":"              agent_handle_internal\u003dTrue,"},{"line_number":602,"context_line":"              agent_has_ext_network\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5afe65bd_88d1e059","line":599,"in_reply_to":"5afe65bd_d9a0d1a1","updated":"2015-06-04 00:42:52.000000000","message":"port[\u0027binding:host_id\u0027] is not set to the host_id of the agent\u0027s host, that is why it will fail the check_ports_exist_on_l3agent.","commit_id":"33051ec54aef816b8fba3b9192edca3115d19c20"},{"author":{"_account_id":15736,"name":"Ritesh Anand","email":"tellrit@gmail.com","username":"ritesh"},"change_message_id":"d40047efe06db63685dae282b402de651379662c","unresolved":false,"context_lines":[{"line_number":338,"context_line":"class L3DVRSchedulerBaseTest(test_db_base_plugin_v2.NeutronDbPluginV2TestCase,"},{"line_number":339,"context_line":"                          l3_dvr_db.L3_NAT_with_dvr_db_mixin,"},{"line_number":340,"context_line":"                          test_l3_agent_scheduler.L3SchedulerBaseMixin):"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    \"\"\"Base class for functional test of DVR L3 schedulers."},{"line_number":343,"context_line":"       Provides basic setup and utility functions."},{"line_number":344,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_a0fe3c69","line":341,"updated":"2015-06-05 22:29:34.000000000","message":"The base class has common methods, that makes it available for reuse by future L3 DVR scheduler test cases that do not have same test scenarios.","commit_id":"ed2f08b56c0403c82714d8cbd18537134e4b6e8d"},{"author":{"_account_id":15736,"name":"Ritesh Anand","email":"tellrit@gmail.com","username":"ritesh"},"change_message_id":"d40047efe06db63685dae282b402de651379662c","unresolved":false,"context_lines":[{"line_number":485,"context_line":"        expected_router_scheduled"},{"line_number":486,"context_line":"            To verify do we expect router to get scheduled."},{"line_number":487,"context_line":"    \"\"\""},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"    def get_default_scenario(agent_modes\u003d[constants.L3_AGENT_MODE_DVR_SNAT],"},{"line_number":490,"context_line":"                             agent_handle_internal\u003dFalse,"},{"line_number":491,"context_line":"                             agent_has_ext_network\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_c0301859","line":488,"updated":"2015-06-05 22:29:34.000000000","message":"Good comment, thanks! I have added default scenario, with all False, it definitely reads better now.","commit_id":"ed2f08b56c0403c82714d8cbd18537134e4b6e8d"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"6a305fa4997c690a0c10b2a597cdcc202cd306e0","unresolved":false,"context_lines":[{"line_number":527,"context_line":"                              router_is_distributed\u003dTrue,"},{"line_number":528,"context_line":"                              router_has_snat_binding\u003dTrue)),"},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"        (\u0027Already hosted legacy router not schduled on additional dvr agent\u0027,"},{"line_number":531,"context_line":"         get_default_scenario(agent_modes\u003d[constants.L3_AGENT_MODE_DVR,"},{"line_number":532,"context_line":"                                           constants.L3_AGENT_MODE_DVR_SNAT],"},{"line_number":533,"context_line":"                              agent_handle_internal\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_17acffeb","line":530,"updated":"2015-06-08 17:45:05.000000000","message":"nit: typo ( scheduled)","commit_id":"ed2f08b56c0403c82714d8cbd18537134e4b6e8d"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"6a305fa4997c690a0c10b2a597cdcc202cd306e0","unresolved":false,"context_lines":[{"line_number":547,"context_line":"                              router_already_hosted\u003dTrue,"},{"line_number":548,"context_line":"                              router_has_ext_gw\u003dTrue)),"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"        (\u0027Legacy router not schduled on dvr agent\u0027,"},{"line_number":551,"context_line":"         get_default_scenario(agent_modes\u003d[constants.L3_AGENT_MODE_DVR],"},{"line_number":552,"context_line":"                              agent_handle_internal\u003dTrue,"},{"line_number":553,"context_line":"                              agent_has_ext_network\u003dTrue)),"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_77f453f1","line":550,"updated":"2015-06-08 17:45:05.000000000","message":"nit: typo ( scheduled)","commit_id":"ed2f08b56c0403c82714d8cbd18537134e4b6e8d"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"6a305fa4997c690a0c10b2a597cdcc202cd306e0","unresolved":false,"context_lines":[{"line_number":552,"context_line":"                              agent_handle_internal\u003dTrue,"},{"line_number":553,"context_line":"                              agent_has_ext_network\u003dTrue)),"},{"line_number":554,"context_line":""},{"line_number":555,"context_line":"        (\u0027Legacy router schduled on legacy agent\u0027,"},{"line_number":556,"context_line":"         get_default_scenario(agent_modes\u003d[constants.L3_AGENT_MODE_LEGACY],"},{"line_number":557,"context_line":"                              agent_handle_internal\u003dTrue,"},{"line_number":558,"context_line":"                              agent_has_ext_network\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_17dabf78","line":555,"updated":"2015-06-08 17:45:05.000000000","message":"Ditto: ( typo)","commit_id":"ed2f08b56c0403c82714d8cbd18537134e4b6e8d"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"6a305fa4997c690a0c10b2a597cdcc202cd306e0","unresolved":false,"context_lines":[{"line_number":558,"context_line":"                              agent_has_ext_network\u003dTrue,"},{"line_number":559,"context_line":"                              expected_router_scheduled\u003dTrue)),"},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        (\u0027Legacy router schduled on dvr_snat agent\u0027,"},{"line_number":562,"context_line":"         get_default_scenario(agent_handle_internal\u003dTrue,"},{"line_number":563,"context_line":"                              agent_has_ext_network\u003dTrue,"},{"line_number":564,"context_line":"                              expected_router_scheduled\u003dTrue)),"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_b7d1ab59","line":561,"updated":"2015-06-08 17:45:05.000000000","message":"Ditto: ( typo)","commit_id":"ed2f08b56c0403c82714d8cbd18537134e4b6e8d"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"6a305fa4997c690a0c10b2a597cdcc202cd306e0","unresolved":false,"context_lines":[{"line_number":650,"context_line":""},{"line_number":651,"context_line":"        # Try scheduling on each host"},{"line_number":652,"context_line":"        for host in self.hosts:"},{"line_number":653,"context_line":"            did_it_schedule \u003d self.scheduler.auto_schedule_routers(self.plugin,"},{"line_number":654,"context_line":"                                                       self.adminContext, host,"},{"line_number":655,"context_line":"                                                       router_ids)"},{"line_number":656,"context_line":"            if did_it_schedule:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_5713970d","line":653,"updated":"2015-06-08 17:45:05.000000000","message":"For readability you can bring down to next line.\n           self.scheduler.auto_schedule_routers(\n               self.plugin, self.adminContext, host, router_ids)","commit_id":"ed2f08b56c0403c82714d8cbd18537134e4b6e8d"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3b65aa292b2e7b70cd222ee3057b134084fdcf46","unresolved":false,"context_lines":[{"line_number":287,"context_line":"    \"\"\""},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    def setUp(self):"},{"line_number":290,"context_line":"        ext_mgr \u003d test_l3.L3TestExtensionManager()"},{"line_number":291,"context_line":"        plugin_str \u003d (\u0027neutron.tests.unit.extensions.test_l3.\u0027"},{"line_number":292,"context_line":"                      \u0027TestL3NatAgentDVRSchedulingServicePlugin\u0027)"},{"line_number":293,"context_line":"        super(L3DVRSchedulerBaseTest, self).setUp(plugin\u003dplugin_str,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_e4b698db","line":290,"updated":"2015-08-18 21:02:09.000000000","message":"This initialization is wrong. Please see https://review.openstack.org/#/c/205770/ and its associated bug. What I think you should do is make this class inherit from neutron.tests.unit.plugins.ml2.test_plugin.Ml2PluginV2TestCase (And only that class).\n\nThe class definition and setUp then becomes:\n\nclass L3DVRSchedulerBaseTest(test_plugin.Ml2PluginV2TestCase):\n\n    \"\"\"Base class for functional test of DVR L3 schedulers.\n       Provides basic setup and utility functions.\n    \"\"\"\n\n    def setUp(self):\n        super(L3DVRSchedulerBaseTest, self).setUp()\n        self.l3_plugin \u003d l3_router_plugin.L3RouterPlugin()\n\n        self.adminContext \u003d context.get_admin_context()\n        self.adminContext.tenant_id \u003d \u0027_func_test_tenant_\u0027\n\n        self.default_net_id \u003d \u0027_test_network_id\u0027\n        self.default_ext_net_id \u003d \u0027_test_ext_network_id\u0027\n\n        self.default_subnet_id \u003d \u0027_test_subnet_id\u0027\n\nAny reference to self.plugin should change to self.l3_plugin, apart from create_port, create_network and create_subnet.","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":15736,"name":"Ritesh Anand","email":"tellrit@gmail.com","username":"ritesh"},"change_message_id":"f20688cec030c0c5aca0736d7b43d22fe35ca013","unresolved":false,"context_lines":[{"line_number":287,"context_line":"    \"\"\""},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    def setUp(self):"},{"line_number":290,"context_line":"        ext_mgr \u003d test_l3.L3TestExtensionManager()"},{"line_number":291,"context_line":"        plugin_str \u003d (\u0027neutron.tests.unit.extensions.test_l3.\u0027"},{"line_number":292,"context_line":"                      \u0027TestL3NatAgentDVRSchedulingServicePlugin\u0027)"},{"line_number":293,"context_line":"        super(L3DVRSchedulerBaseTest, self).setUp(plugin\u003dplugin_str,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_c2eb0112","line":290,"in_reply_to":"fa1b9901_e4b698db","updated":"2015-08-20 00:19:53.000000000","message":"Done","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3b65aa292b2e7b70cd222ee3057b134084fdcf46","unresolved":false,"context_lines":[{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        self.default_subnet_id \u003d \u0027_test_subnet_id\u0027"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    def _create_l3_agent(self, host, context, agent_mode\u003d\u0027legacy\u0027,"},{"line_number":305,"context_line":"                         internal_only\u003dTrue, ext_net_id\u003d\u0027\u0027):"},{"line_number":306,"context_line":"        agent \u003d helpers.register_l3_agent(host, agent_mode,"},{"line_number":307,"context_line":"                                          internal_only, ext_net_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_4473c415","line":304,"updated":"2015-08-18 21:02:09.000000000","message":"You can reuse _create_l3_agent from line 47 by extracting it to the module level and add the optional parameters you need.","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":15736,"name":"Ritesh Anand","email":"tellrit@gmail.com","username":"ritesh"},"change_message_id":"f20688cec030c0c5aca0736d7b43d22fe35ca013","unresolved":false,"context_lines":[{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        self.default_subnet_id \u003d \u0027_test_subnet_id\u0027"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    def _create_l3_agent(self, host, context, agent_mode\u003d\u0027legacy\u0027,"},{"line_number":305,"context_line":"                         internal_only\u003dTrue, ext_net_id\u003d\u0027\u0027):"},{"line_number":306,"context_line":"        agent \u003d helpers.register_l3_agent(host, agent_mode,"},{"line_number":307,"context_line":"                                          internal_only, ext_net_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_e2f08500","line":304,"in_reply_to":"fa1b9901_4473c415","updated":"2015-08-20 00:19:53.000000000","message":"Done","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3b65aa292b2e7b70cd222ee3057b134084fdcf46","unresolved":false,"context_lines":[{"line_number":309,"context_line":"        return agent"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"    def _create_agents(self):"},{"line_number":312,"context_line":"        agent_cnt \u003d len(self.agent_modes)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"        # create hosts for each agent"},{"line_number":315,"context_line":"        self.hosts \u003d [\u0027host-%s\u0027 % i for i in range(agent_cnt)]"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_b9b68d88","line":312,"updated":"2015-08-18 21:02:09.000000000","message":"Any parameter defined by L3DVRSchedulerTestCase scenarios (self.agent_modes, self.agent_has_ext_network, etc) should be made in to a parameter of these functions. There\u0027s no need to treat L3DVRSchedulerBaseTes as a mixin.","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":15736,"name":"Ritesh Anand","email":"tellrit@gmail.com","username":"ritesh"},"change_message_id":"f20688cec030c0c5aca0736d7b43d22fe35ca013","unresolved":false,"context_lines":[{"line_number":309,"context_line":"        return agent"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"    def _create_agents(self):"},{"line_number":312,"context_line":"        agent_cnt \u003d len(self.agent_modes)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"        # create hosts for each agent"},{"line_number":315,"context_line":"        self.hosts \u003d [\u0027host-%s\u0027 % i for i in range(agent_cnt)]"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_a2f60df7","line":312,"in_reply_to":"fa1b9901_b9b68d88","updated":"2015-08-20 00:19:53.000000000","message":"Done","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3b65aa292b2e7b70cd222ee3057b134084fdcf46","unresolved":false,"context_lines":[{"line_number":322,"context_line":"               self.default_ext_net_id if self.agent_has_ext_network else \u0027\u0027)"},{"line_number":323,"context_line":"               for i in range(agent_cnt)]"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def _create_router(self, name):"},{"line_number":326,"context_line":"        router \u003d {\u0027name\u0027: name, \u0027admin_state_up\u0027: True}"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        if self.router_is_distributed:"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_a4d180cf","line":325,"updated":"2015-08-18 21:02:09.000000000","message":"Same comment here. _create_router should not use test_scenario parameters should as self.router_is_distributed. We should use a single module level method that accepts the parameters of the router (Is it distributed, and if it should be connected to an external network).","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":15736,"name":"Ritesh Anand","email":"tellrit@gmail.com","username":"ritesh"},"change_message_id":"f20688cec030c0c5aca0736d7b43d22fe35ca013","unresolved":false,"context_lines":[{"line_number":322,"context_line":"               self.default_ext_net_id if self.agent_has_ext_network else \u0027\u0027)"},{"line_number":323,"context_line":"               for i in range(agent_cnt)]"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def _create_router(self, name):"},{"line_number":326,"context_line":"        router \u003d {\u0027name\u0027: name, \u0027admin_state_up\u0027: True}"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        if self.router_is_distributed:"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_42e05129","line":325,"in_reply_to":"fa1b9901_a4d180cf","updated":"2015-08-20 00:19:53.000000000","message":"Done","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3b65aa292b2e7b70cd222ee3057b134084fdcf46","unresolved":false,"context_lines":[{"line_number":334,"context_line":"            if self.router_agent_have_same_ext_net:"},{"line_number":335,"context_line":"                router[\u0027external_gateway_info\u0027] \u003d {\u0027network_id\u0027:"},{"line_number":336,"context_line":"                                                   self.default_ext_net_id}"},{"line_number":337,"context_line":"            else:"},{"line_number":338,"context_line":"                # create an external network for router"},{"line_number":339,"context_line":"                self.router_ext_net_id \u003d \u0027_test_ext_network_id2\u0027"},{"line_number":340,"context_line":"                self._create_network(self.router_ext_net_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_44e18499","line":337,"updated":"2015-08-18 21:02:09.000000000","message":"I don\u0027t know about this else clause. This is too much logic in a method called \u0027create_router\u0027. The caller of this method should create any external networks in advance.","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":15736,"name":"Ritesh Anand","email":"tellrit@gmail.com","username":"ritesh"},"change_message_id":"f20688cec030c0c5aca0736d7b43d22fe35ca013","unresolved":false,"context_lines":[{"line_number":334,"context_line":"            if self.router_agent_have_same_ext_net:"},{"line_number":335,"context_line":"                router[\u0027external_gateway_info\u0027] \u003d {\u0027network_id\u0027:"},{"line_number":336,"context_line":"                                                   self.default_ext_net_id}"},{"line_number":337,"context_line":"            else:"},{"line_number":338,"context_line":"                # create an external network for router"},{"line_number":339,"context_line":"                self.router_ext_net_id \u003d \u0027_test_ext_network_id2\u0027"},{"line_number":340,"context_line":"                self._create_network(self.router_ext_net_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_62dd556e","line":337,"in_reply_to":"fa1b9901_44e18499","updated":"2015-08-20 00:19:53.000000000","message":"Done","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3b65aa292b2e7b70cd222ee3057b134084fdcf46","unresolved":false,"context_lines":[{"line_number":429,"context_line":"            To verify do we expect router to get scheduled."},{"line_number":430,"context_line":"    \"\"\""},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    def get_default_scenario(agent_modes\u003d[constants.L3_AGENT_MODE_DVR_SNAT],"},{"line_number":433,"context_line":"                             agent_handle_internal\u003dFalse,"},{"line_number":434,"context_line":"                             agent_has_ext_network\u003dFalse,"},{"line_number":435,"context_line":"                             router_is_distributed\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_9f20499d","line":432,"updated":"2015-08-18 21:02:09.000000000","message":"get_default_scenario -\u003e get_scenario","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":15736,"name":"Ritesh Anand","email":"tellrit@gmail.com","username":"ritesh"},"change_message_id":"f20688cec030c0c5aca0736d7b43d22fe35ca013","unresolved":false,"context_lines":[{"line_number":429,"context_line":"            To verify do we expect router to get scheduled."},{"line_number":430,"context_line":"    \"\"\""},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    def get_default_scenario(agent_modes\u003d[constants.L3_AGENT_MODE_DVR_SNAT],"},{"line_number":433,"context_line":"                             agent_handle_internal\u003dFalse,"},{"line_number":434,"context_line":"                             agent_has_ext_network\u003dFalse,"},{"line_number":435,"context_line":"                             router_is_distributed\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_22e3dd34","line":432,"in_reply_to":"fa1b9901_9f20499d","updated":"2015-08-20 00:19:53.000000000","message":"Done","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3b65aa292b2e7b70cd222ee3057b134084fdcf46","unresolved":false,"context_lines":[{"line_number":452,"context_line":"                    expected_snat_binding\u003dexpected_snat_binding,"},{"line_number":453,"context_line":"                    expected_router_scheduled\u003dexpected_router_scheduled)"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"    scenarios \u003d ["},{"line_number":456,"context_line":"        (\u0027Snat router scheduled, if no such binding exists and distributed\u0027"},{"line_number":457,"context_line":"         \u0027 router has external gateway\u0027,"},{"line_number":458,"context_line":"         get_default_scenario(agent_handle_internal\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_4abaed0b","line":455,"updated":"2015-08-18 21:02:09.000000000","message":"You\u0027re missing an important scenario where you\u0027re trying to schedule a distributed router on a node that is in dvr mode (Not dvr_snat), and that node has a DVR serviced port on it. (I\u0027m thinking about l3_agentschedulers_db.L3AgentSchedulerDbMixin.get_l3_agent_candidates that invokes check_ports_exist_on_l3agent).","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":15736,"name":"Ritesh Anand","email":"tellrit@gmail.com","username":"ritesh"},"change_message_id":"f20688cec030c0c5aca0736d7b43d22fe35ca013","unresolved":false,"context_lines":[{"line_number":452,"context_line":"                    expected_snat_binding\u003dexpected_snat_binding,"},{"line_number":453,"context_line":"                    expected_router_scheduled\u003dexpected_router_scheduled)"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"    scenarios \u003d ["},{"line_number":456,"context_line":"        (\u0027Snat router scheduled, if no such binding exists and distributed\u0027"},{"line_number":457,"context_line":"         \u0027 router has external gateway\u0027,"},{"line_number":458,"context_line":"         get_default_scenario(agent_handle_internal\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_c239c1a5","line":455,"in_reply_to":"fa1b9901_4abaed0b","updated":"2015-08-20 00:19:53.000000000","message":"Agree; can I take it up in a followup patch.","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3b65aa292b2e7b70cd222ee3057b134084fdcf46","unresolved":false,"context_lines":[{"line_number":495,"context_line":"                              agent_handle_internal\u003dTrue,"},{"line_number":496,"context_line":"                              agent_has_ext_network\u003dTrue)),"},{"line_number":497,"context_line":""},{"line_number":498,"context_line":"        (\u0027Legacy router scheduled on legacy agent\u0027,"},{"line_number":499,"context_line":"         get_default_scenario(agent_modes\u003d[constants.L3_AGENT_MODE_LEGACY],"},{"line_number":500,"context_line":"                              agent_handle_internal\u003dTrue,"},{"line_number":501,"context_line":"                              agent_has_ext_network\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_24ab301f","line":498,"updated":"2015-08-18 21:02:09.000000000","message":"This is handled by the other test case in this file?","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":15736,"name":"Ritesh Anand","email":"tellrit@gmail.com","username":"ritesh"},"change_message_id":"f20688cec030c0c5aca0736d7b43d22fe35ca013","unresolved":false,"context_lines":[{"line_number":495,"context_line":"                              agent_handle_internal\u003dTrue,"},{"line_number":496,"context_line":"                              agent_has_ext_network\u003dTrue)),"},{"line_number":497,"context_line":""},{"line_number":498,"context_line":"        (\u0027Legacy router scheduled on legacy agent\u0027,"},{"line_number":499,"context_line":"         get_default_scenario(agent_modes\u003d[constants.L3_AGENT_MODE_LEGACY],"},{"line_number":500,"context_line":"                              agent_handle_internal\u003dTrue,"},{"line_number":501,"context_line":"                              agent_has_ext_network\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_22519dd8","line":498,"in_reply_to":"fa1b9901_24ab301f","updated":"2015-08-20 00:19:53.000000000","message":"Intention is to ensure legacy scheduling is not affected by DVR service plugin.","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3b65aa292b2e7b70cd222ee3057b134084fdcf46","unresolved":false,"context_lines":[{"line_number":565,"context_line":"                                                self.adminContext,"},{"line_number":566,"context_line":"                                                router_to_schedule[\u0027id\u0027])"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        # check for snat binding:"},{"line_number":569,"context_line":"        if self.expected_snat_binding:"},{"line_number":570,"context_line":"            self.assertTrue(self.plugin.get_snat_bindings("},{"line_number":571,"context_line":"                            self.adminContext, [router_to_schedule[\u0027id\u0027]]),"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_79dc75e4","line":568,"updated":"2015-08-18 21:02:09.000000000","message":"You can simplify lines 569 to 576 to:\n\nself.assertEqual(self.expected_snat_binding, self.plugin.get_snat_bindings(...))","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":15736,"name":"Ritesh Anand","email":"tellrit@gmail.com","username":"ritesh"},"change_message_id":"f20688cec030c0c5aca0736d7b43d22fe35ca013","unresolved":false,"context_lines":[{"line_number":565,"context_line":"                                                self.adminContext,"},{"line_number":566,"context_line":"                                                router_to_schedule[\u0027id\u0027])"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        # check for snat binding:"},{"line_number":569,"context_line":"        if self.expected_snat_binding:"},{"line_number":570,"context_line":"            self.assertTrue(self.plugin.get_snat_bindings("},{"line_number":571,"context_line":"                            self.adminContext, [router_to_schedule[\u0027id\u0027]]),"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_e265e5b4","line":568,"in_reply_to":"fa1b9901_79dc75e4","updated":"2015-08-20 00:19:53.000000000","message":"Done","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3b65aa292b2e7b70cd222ee3057b134084fdcf46","unresolved":false,"context_lines":[{"line_number":575,"context_line":"                             self.adminContext, [router_to_schedule[\u0027id\u0027]]),"},{"line_number":576,"context_line":"                             \u0027Expected snat binding removed, but it was not\u0027)"},{"line_number":577,"context_line":""},{"line_number":578,"context_line":"        # check for router scheduling:"},{"line_number":579,"context_line":"        if self.expected_router_scheduled:"},{"line_number":580,"context_line":"            self.assertIsNotNone(actual_scheduled_agent,"},{"line_number":581,"context_line":"                                 message\u003d\u0027Failed to schedule agent\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_1999b91f","line":578,"updated":"2015-08-18 21:02:09.000000000","message":"Same comment here:\n\nself.assertEqual(self.expected_router_scheduled, (bool(actual_scheduled_agent)))","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":15736,"name":"Ritesh Anand","email":"tellrit@gmail.com","username":"ritesh"},"change_message_id":"f20688cec030c0c5aca0736d7b43d22fe35ca013","unresolved":false,"context_lines":[{"line_number":575,"context_line":"                             self.adminContext, [router_to_schedule[\u0027id\u0027]]),"},{"line_number":576,"context_line":"                             \u0027Expected snat binding removed, but it was not\u0027)"},{"line_number":577,"context_line":""},{"line_number":578,"context_line":"        # check for router scheduling:"},{"line_number":579,"context_line":"        if self.expected_router_scheduled:"},{"line_number":580,"context_line":"            self.assertIsNotNone(actual_scheduled_agent,"},{"line_number":581,"context_line":"                                 message\u003d\u0027Failed to schedule agent\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_2268bd86","line":578,"in_reply_to":"fa1b9901_1999b91f","updated":"2015-08-20 00:19:53.000000000","message":"Had to figure out the bool([]) trick; nice; Thanks! Done.","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"9ffe43cbad72dc9acaa9ef463cabab4c94c73ebf","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _create_l3_agent(self, host, context, agent_mode\u003d\u0027legacy\u0027,"},{"line_number":53,"context_line":"                         state\u003dTrue, ext_net_id\u003d\u0027\u0027):"},{"line_number":54,"context_line":"        agent \u003d helpers.register_l3_agent(host, agent_mode, True, ext_net_id)"},{"line_number":55,"context_line":"        helpers.set_agent_admin_state(agent.id, state)"},{"line_number":56,"context_line":"        return agent"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"da85f559_bdb661f7","line":54,"updated":"2015-11-15 07:37:04.000000000","message":"nit:\n\nBy default, `register_l3_agent` function has `internal_only` argument set as True, so you don\u0027t need to pass it again. Instead of explicit passing \u0027True\u0027, you can skip it and just give kwarg for `ext_net_id`\n\n  agent \u003d helpers.register_l3_agent(host, agent_mode, ext_net_id\u003dext_net_id)\n\nIf you\u0027re still planning to pass \u0027True\u0027, would be nice to have keyword argument for this to help understand what\u0027s and why\u0027s happening:\n\n  agent \u003d helpers.register_l3_agent(host, agent_mode, internal_only\u003dTrue, ext_net_id\u003dext_net_id)\n\nThe same like you did in `L3DVRSchedulerTestCase`","commit_id":"c7c4d727dbe4e28bcc1e14ce601f70ffe667f6c2"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"9ffe43cbad72dc9acaa9ef463cabab4c94c73ebf","unresolved":false,"context_lines":[{"line_number":305,"context_line":"    def _create_router(self, name, distributed, ext_net_id\u003dNone):"},{"line_number":306,"context_line":"        router \u003d {\u0027name\u0027: name, \u0027admin_state_up\u0027: True}"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"        if distributed:"},{"line_number":309,"context_line":"            router[\u0027distributed\u0027] \u003d True"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"        if ext_net_id:"}],"source_content_type":"text/x-python","patch_set":12,"id":"da85f559_bdad019d","line":308,"updated":"2015-11-15 07:37:04.000000000","message":"Correct me, if I\u0027m wrong, but I see that `distributed` argument is just boolean value. So you don\u0027t need to do sth like this. Instead, you can write it as:\n\n router[\u0027distributed\u0027] \u003d distributed","commit_id":"c7c4d727dbe4e28bcc1e14ce601f70ffe667f6c2"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"9ffe43cbad72dc9acaa9ef463cabab4c94c73ebf","unresolved":false,"context_lines":[{"line_number":317,"context_line":"    def _create_network(self, net_id, name\u003dNone, external\u003dFalse):"},{"line_number":318,"context_line":"        network_dict \u003d {\u0027tenant_id\u0027: self.adminContext.tenant_id,"},{"line_number":319,"context_line":"                        \u0027id\u0027: net_id,"},{"line_number":320,"context_line":"                        \u0027name\u0027: name if name else \u0027_test-net\u0027,"},{"line_number":321,"context_line":"                        \u0027admin_state_up\u0027: True,"},{"line_number":322,"context_line":"                        \u0027shared\u0027: False,"},{"line_number":323,"context_line":"                        \u0027status\u0027: constants.NET_STATUS_ACTIVE}"}],"source_content_type":"text/x-python","patch_set":12,"id":"da85f559_1d9f6d60","line":320,"updated":"2015-11-15 07:37:04.000000000","message":"+1","commit_id":"c7c4d727dbe4e28bcc1e14ce601f70ffe667f6c2"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"9ffe43cbad72dc9acaa9ef463cabab4c94c73ebf","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                        \u0027status\u0027: constants.NET_STATUS_ACTIVE}"},{"line_number":324,"context_line":"        network \u003d self.plugin.create_network(self.adminContext,"},{"line_number":325,"context_line":"                                             {\u0027network\u0027: network_dict})"},{"line_number":326,"context_line":"        if external:"},{"line_number":327,"context_line":"            network \u003d external_net_db.ExternalNetwork(network_id\u003dnet_id)"},{"line_number":328,"context_line":"            self.adminContext.session.flush()"},{"line_number":329,"context_line":"            self.adminContext.session.add(network)"}],"source_content_type":"text/x-python","patch_set":12,"id":"da85f559_5da3b59e","line":326,"updated":"2015-11-15 07:37:04.000000000","message":"If \u0027external\u0027 is True, you\u0027re creating two networks. First in lines:324-325 and second, here. Would be nice to create just one network:\n\n if external:\n     network \u003d ...\n else:\n     network_dict \u003d {..}\n     network \u003d ...\n return network\n\nBut even better idea would be to have two, separated private methods, according to features:\n \n def _create_internal_network(self, net_id, name):\n     network_dict \u003d {...}\n     network \u003d self.plugin.create_network(...)\n     return network\n\n def _create_external_network(self, net_id):\n     network \u003d external_net_db.ExternalNetwork(network_id\u003dnet_id)\n     self.adminContext.session.flush()\n     self.adminContext.session.add(network)\n     return network\n\n def _create_network(self, net_id, name\u003dNone, external\u003dFalse):\n     if external:\n         network \u003d self._create_external_network(net_id)\n     else:\n         network \u003d self._create_internal_network(net_id, name)\n     return network","commit_id":"c7c4d727dbe4e28bcc1e14ce601f70ffe667f6c2"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"9ffe43cbad72dc9acaa9ef463cabab4c94c73ebf","unresolved":false,"context_lines":[{"line_number":399,"context_line":"            To verify do we expect router to get scheduled."},{"line_number":400,"context_line":"    \"\"\""},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"    def get_scenario(agent_modes\u003d[constants.L3_AGENT_MODE_DVR_SNAT],"},{"line_number":403,"context_line":"                     agent_has_ext_network\u003dFalse,"},{"line_number":404,"context_line":"                     agent_has_dvr_serviced_port\u003dFalse,"},{"line_number":405,"context_line":"                     router_is_distributed\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":12,"id":"da85f559_5dcad550","line":402,"updated":"2015-11-15 07:37:04.000000000","message":"It won\u0027t work. garyk merged hook for checking mutables in functions: \"[N329] Method\u0027s default argument shouldn\u0027t be mutable\"\n\nhttps://github.com/openstack/neutron/blob/master/HACKING.rst\n\nPlease update this.","commit_id":"c7c4d727dbe4e28bcc1e14ce601f70ffe667f6c2"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"9ffe43cbad72dc9acaa9ef463cabab4c94c73ebf","unresolved":false,"context_lines":[{"line_number":517,"context_line":"                            \u0027_test-ext-net-subnet\u0027)"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"        if self.router_has_ext_gw and not self.router_agent_have_same_ext_net:"},{"line_number":520,"context_line":"            # for  the test cases in which router ann agent are not on same"},{"line_number":521,"context_line":"            # external network, we create an external network for router"},{"line_number":522,"context_line":"            self._create_network(self.router_ext_net_id,"},{"line_number":523,"context_line":"                                 name\u003d\u0027_test-ext-net2\u0027, external\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":12,"id":"da85f559_1dc44d3e","line":520,"updated":"2015-11-15 07:37:04.000000000","message":"nit: extra space between \"for  the\", typo: \"ann\"","commit_id":"c7c4d727dbe4e28bcc1e14ce601f70ffe667f6c2"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"9ffe43cbad72dc9acaa9ef463cabab4c94c73ebf","unresolved":false,"context_lines":[{"line_number":554,"context_line":"    def _create_router_to_schedule(self):"},{"line_number":555,"context_line":"        if self.router_has_ext_gw:"},{"line_number":556,"context_line":"            if self.router_agent_have_same_ext_net:"},{"line_number":557,"context_line":"                return self._create_router(\u0027schd_rtr\u0027,"},{"line_number":558,"context_line":"                    self.router_is_distributed,"},{"line_number":559,"context_line":"                    self.default_ext_net_id)"},{"line_number":560,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"da85f559_dddc851a","line":557,"updated":"2015-11-15 07:37:04.000000000","message":"Would be nice to have just one `return` in this method.","commit_id":"c7c4d727dbe4e28bcc1e14ce601f70ffe667f6c2"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"6362353c130e5654e3af4bd7e629593b9d9f4e6a","unresolved":false,"context_lines":[{"line_number":321,"context_line":"                        \u0027admin_state_up\u0027: True,"},{"line_number":322,"context_line":"                        \u0027shared\u0027: False,"},{"line_number":323,"context_line":"                        \u0027status\u0027: constants.NET_STATUS_ACTIVE}"},{"line_number":324,"context_line":"        network \u003d self.plugin.create_network(self.adminContext,"},{"line_number":325,"context_line":"                                             {\u0027network\u0027: network_dict})"},{"line_number":326,"context_line":"        if external:"},{"line_number":327,"context_line":"            network \u003d external_net_db.ExternalNetwork(network_id\u003dnet_id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_7e4f96bd","line":324,"updated":"2015-11-17 13:57:48.000000000","message":"I\u0027m looking for occurrences of \u0027def create_network\u0027 and I\u0027ve failed with this. Could you show me, which one are you using and how does it work?","commit_id":"3834345cf36b630758d47dd76ca22e9f08204ae8"},{"author":{"_account_id":15736,"name":"Ritesh Anand","email":"tellrit@gmail.com","username":"ritesh"},"change_message_id":"bfa9a6ced13a01c76701b2dad84855458912ec47","unresolved":false,"context_lines":[{"line_number":321,"context_line":"                        \u0027admin_state_up\u0027: True,"},{"line_number":322,"context_line":"                        \u0027shared\u0027: False,"},{"line_number":323,"context_line":"                        \u0027status\u0027: constants.NET_STATUS_ACTIVE}"},{"line_number":324,"context_line":"        network \u003d self.plugin.create_network(self.adminContext,"},{"line_number":325,"context_line":"                                             {\u0027network\u0027: network_dict})"},{"line_number":326,"context_line":"        if external:"},{"line_number":327,"context_line":"            network \u003d external_net_db.ExternalNetwork(network_id\u003dnet_id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_ca7d8be8","line":324,"in_reply_to":"ba8a016a_7e4f96bd","updated":"2015-11-17 20:07:36.000000000","message":"To my best understanding, this is coming from base class, NeutronDbPluginV2TestCase \u003c- WebTestCase \u003c- SqlTestCase using SqlFixture in neutron/tests/unit/testlib_api.py\nSome fine sql alchemy may be tying it to:\nneutron/db/db_base_plugin_v2.py:    def create_network(self, context, network)","commit_id":"3834345cf36b630758d47dd76ca22e9f08204ae8"},{"author":{"_account_id":15736,"name":"Ritesh Anand","email":"tellrit@gmail.com","username":"ritesh"},"change_message_id":"f98df38591c91dcf42871e5c1fd791fa061357c9","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                        \u0027status\u0027: constants.NET_STATUS_ACTIVE}"},{"line_number":324,"context_line":"        network \u003d self.plugin.create_network(self.adminContext,"},{"line_number":325,"context_line":"                                             {\u0027network\u0027: network_dict})"},{"line_number":326,"context_line":"        if external:"},{"line_number":327,"context_line":"            network \u003d external_net_db.ExternalNetwork(network_id\u003dnet_id)"},{"line_number":328,"context_line":"            self.adminContext.session.flush()"},{"line_number":329,"context_line":"            self.adminContext.session.add(network)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_fb2c0aad","line":326,"updated":"2015-11-17 07:49:12.000000000","message":"Only this part of the code needs to be done only for external networks, rest everything needs to be done for both internal and external.","commit_id":"3834345cf36b630758d47dd76ca22e9f08204ae8"},{"author":{"_account_id":15736,"name":"Ritesh Anand","email":"tellrit@gmail.com","username":"ritesh"},"change_message_id":"bfa9a6ced13a01c76701b2dad84855458912ec47","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                        \u0027status\u0027: constants.NET_STATUS_ACTIVE}"},{"line_number":324,"context_line":"        network \u003d self.plugin.create_network(self.adminContext,"},{"line_number":325,"context_line":"                                             {\u0027network\u0027: network_dict})"},{"line_number":326,"context_line":"        if external:"},{"line_number":327,"context_line":"            network \u003d external_net_db.ExternalNetwork(network_id\u003dnet_id)"},{"line_number":328,"context_line":"            self.adminContext.session.flush()"},{"line_number":329,"context_line":"            self.adminContext.session.add(network)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_4d6535df","line":326,"in_reply_to":"ba8a016a_03acf59e","updated":"2015-11-17 20:07:36.000000000","message":"It is more like I am re using network variable for keeping one return for the function. In the first usage (network \u003d self.plugin...) network db entry is created and in the second usage (network \u003d external) a new entry for external network db is created and linked to the network db entry. Notice that net_id created in first usage is reused in the second usage.","commit_id":"3834345cf36b630758d47dd76ca22e9f08204ae8"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"6362353c130e5654e3af4bd7e629593b9d9f4e6a","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                        \u0027status\u0027: constants.NET_STATUS_ACTIVE}"},{"line_number":324,"context_line":"        network \u003d self.plugin.create_network(self.adminContext,"},{"line_number":325,"context_line":"                                             {\u0027network\u0027: network_dict})"},{"line_number":326,"context_line":"        if external:"},{"line_number":327,"context_line":"            network \u003d external_net_db.ExternalNetwork(network_id\u003dnet_id)"},{"line_number":328,"context_line":"            self.adminContext.session.flush()"},{"line_number":329,"context_line":"            self.adminContext.session.add(network)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_03acf59e","line":326,"in_reply_to":"ba8a016a_fb2c0aad","updated":"2015-11-17 13:57:48.000000000","message":"OK, now I get it. Sorry for my lack of knowledge.\nBoth things seems to be not connected, especially when you\u0027re reassigning `network` variable.\n\nCould you give an extra description, why are you doing this?","commit_id":"3834345cf36b630758d47dd76ca22e9f08204ae8"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"bcfaee6d8480ea190b359d0e96b34eee70ffad5e","unresolved":false,"context_lines":[{"line_number":421,"context_line":"                    router_is_distributed\u003drouter_is_distributed,"},{"line_number":422,"context_line":"                    router_already_hosted\u003drouter_already_hosted,"},{"line_number":423,"context_line":"                    router_has_ext_gw\u003drouter_has_ext_gw,"},{"line_number":424,"context_line":"                router_agent_have_same_ext_net\u003drouter_agent_have_same_ext_net,"},{"line_number":425,"context_line":"                    router_has_snat_binding\u003drouter_has_snat_binding,"},{"line_number":426,"context_line":"                    router_subnet_has_dhcp\u003drouter_subnet_has_dhcp,"},{"line_number":427,"context_line":"                    expected_snat_binding\u003dexpected_snat_binding,"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_31938a51","line":424,"updated":"2015-11-17 10:54:42.000000000","message":"indentation here is dodgy","commit_id":"3834345cf36b630758d47dd76ca22e9f08204ae8"},{"author":{"_account_id":15736,"name":"Ritesh Anand","email":"tellrit@gmail.com","username":"ritesh"},"change_message_id":"bfa9a6ced13a01c76701b2dad84855458912ec47","unresolved":false,"context_lines":[{"line_number":421,"context_line":"                    router_is_distributed\u003drouter_is_distributed,"},{"line_number":422,"context_line":"                    router_already_hosted\u003drouter_already_hosted,"},{"line_number":423,"context_line":"                    router_has_ext_gw\u003drouter_has_ext_gw,"},{"line_number":424,"context_line":"                router_agent_have_same_ext_net\u003drouter_agent_have_same_ext_net,"},{"line_number":425,"context_line":"                    router_has_snat_binding\u003drouter_has_snat_binding,"},{"line_number":426,"context_line":"                    router_subnet_has_dhcp\u003drouter_subnet_has_dhcp,"},{"line_number":427,"context_line":"                    expected_snat_binding\u003dexpected_snat_binding,"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba8a016a_6df4b9f1","line":424,"in_reply_to":"ba8a016a_31938a51","updated":"2015-11-17 20:07:36.000000000","message":"Done","commit_id":"3834345cf36b630758d47dd76ca22e9f08204ae8"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b6782ce27108118e9ed3c436e4875c5e2c92e0f9","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                        \u0027status\u0027: constants.NET_STATUS_ACTIVE}"},{"line_number":324,"context_line":"        network \u003d self.plugin.create_network(self.adminContext,"},{"line_number":325,"context_line":"                                             {\u0027network\u0027: network_dict})"},{"line_number":326,"context_line":"        if external:"},{"line_number":327,"context_line":"            network \u003d external_net_db.ExternalNetwork(network_id\u003dnet_id)"},{"line_number":328,"context_line":"            self.adminContext.session.flush()"},{"line_number":329,"context_line":"            self.adminContext.session.add(network)"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa69d971_9efc26b9","line":326,"updated":"2016-01-06 23:13:38.000000000","message":"the pattern to add records to the DB that we use is to use transactions.\n\nwith self.adminContext.session.begin():\n    network \u003d external_net_db.ExternalNetwork(network_id\u003dnet_id)\n    self.adminContext.session.add(network)\n\n\nThis will prevent you from having to call flush().","commit_id":"060122817cbd9f2eda980d3d83d0689c7796f6e8"}],"neutron/tests/unit/extensions/test_l3.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"62520a1e6bf7f8628cdc56b18027895eab2cce85","unresolved":false,"context_lines":[{"line_number":316,"context_line":""},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"class TestL3NatAgentDVRSchedulingServicePlugin(TestL3NatBasePlugin,"},{"line_number":319,"context_line":"                                           l3_dvr_db.L3_NAT_with_dvr_db_mixin,"},{"line_number":320,"context_line":"                                           l3_dvrscheduler_db."},{"line_number":321,"context_line":"                                           L3_DVRsch_db_mixin):"},{"line_number":322,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_74d00954","line":319,"updated":"2015-06-05 20:45:05.000000000","message":"lines are incorrectly indented, moreover this modification seems unrelated to modifications in test_l3_agent_scheduler, the change should be splitted in 2 changes","commit_id":"33051ec54aef816b8fba3b9192edca3115d19c20"},{"author":{"_account_id":15736,"name":"Ritesh Anand","email":"tellrit@gmail.com","username":"ritesh"},"change_message_id":"d40047efe06db63685dae282b402de651379662c","unresolved":false,"context_lines":[{"line_number":316,"context_line":""},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"class TestL3NatAgentDVRSchedulingServicePlugin(TestL3NatBasePlugin,"},{"line_number":319,"context_line":"                                l3_dvr_db.L3_NAT_with_dvr_db_mixin,"},{"line_number":320,"context_line":"                                l3_dvrscheduler_db.L3_DVRsch_db_mixin):"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    supported_extension_aliases \u003d [\"router\", \"l3_agent_scheduler\"]"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_00abd075","line":319,"updated":"2015-06-05 22:29:34.000000000","message":"Indentation addressed, this plugin is used in L3 DVR scheduler functional test.","commit_id":"ed2f08b56c0403c82714d8cbd18537134e4b6e8d"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3b65aa292b2e7b70cd222ee3057b134084fdcf46","unresolved":false,"context_lines":[{"line_number":315,"context_line":"            {l3_constants.AGENT_TYPE_L3: l3_rpc_agent_api.L3AgentNotifyAPI()})"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"class TestL3NatAgentDVRSchedulingServicePlugin(TestL3NatBasePlugin,"},{"line_number":319,"context_line":"                                l3_dvr_db.L3_NAT_with_dvr_db_mixin,"},{"line_number":320,"context_line":"                                l3_dvrscheduler_db.L3_DVRsch_db_mixin):"},{"line_number":321,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_44f8a449","line":318,"updated":"2015-08-18 21:02:09.000000000","message":"This entire class is unneeded.","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"},{"author":{"_account_id":15736,"name":"Ritesh Anand","email":"tellrit@gmail.com","username":"ritesh"},"change_message_id":"f20688cec030c0c5aca0736d7b43d22fe35ca013","unresolved":false,"context_lines":[{"line_number":315,"context_line":"            {l3_constants.AGENT_TYPE_L3: l3_rpc_agent_api.L3AgentNotifyAPI()})"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"class TestL3NatAgentDVRSchedulingServicePlugin(TestL3NatBasePlugin,"},{"line_number":319,"context_line":"                                l3_dvr_db.L3_NAT_with_dvr_db_mixin,"},{"line_number":320,"context_line":"                                l3_dvrscheduler_db.L3_DVRsch_db_mixin):"},{"line_number":321,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_82dbc94e","line":318,"in_reply_to":"fa1b9901_44f8a449","updated":"2015-08-20 00:19:53.000000000","message":"Done","commit_id":"74a079bd6992f0e0fa5732ea1180a101e0464534"}]}
