)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"31bafea0a783fe246515f1cd95bcade50f9b7d00","unresolved":false,"context_lines":[{"line_number":12,"context_line":"are defined in a DHCPAgentOVSTestFramework"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Includes a temp hack to get around a permissions issue with"},{"line_number":15,"context_line":"the /tmp directory which contains the host/opts/addn_hosts files"},{"line_number":16,"context_line":"used by dnsmasq."},{"line_number":17,"context_line":"(fix taken from I55c8c3fb14ed91ae8570f98f19c2cdbaf89d42fc)"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3a961159_da63fd17","line":15,"updated":"2015-01-15 22:58:08.000000000","message":"Why only a temporary hack? as dnsmasq requirements and TempDir behavior won\u0027t change?","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":12,"context_line":"are defined in a DHCPAgentOVSTestFramework"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Includes a temp hack to get around a permissions issue with"},{"line_number":15,"context_line":"the /tmp directory which contains the host/opts/addn_hosts files"},{"line_number":16,"context_line":"used by dnsmasq."},{"line_number":17,"context_line":"(fix taken from I55c8c3fb14ed91ae8570f98f19c2cdbaf89d42fc)"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"1a930d6b_f5122c61","line":15,"in_reply_to":"3a961159_bdb0eb40","updated":"2015-01-21 17:43:17.000000000","message":"Done","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":12,"context_line":"are defined in a DHCPAgentOVSTestFramework"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Includes a temp hack to get around a permissions issue with"},{"line_number":15,"context_line":"the /tmp directory which contains the host/opts/addn_hosts files"},{"line_number":16,"context_line":"used by dnsmasq."},{"line_number":17,"context_line":"(fix taken from I55c8c3fb14ed91ae8570f98f19c2cdbaf89d42fc)"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3a961159_bdb0eb40","line":15,"in_reply_to":"3a961159_da63fd17","updated":"2015-01-15 23:14:45.000000000","message":"+1","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"20c276f48592d2c0d4e33aa2c827823023c2b742","unresolved":false,"context_lines":[{"line_number":15,"context_line":"the /tmp directory which contains the host/opts/addn_hosts files"},{"line_number":16,"context_line":"used by dnsmasq."},{"line_number":17,"context_line":"(fix taken from I55c8c3fb14ed91ae8570f98f19c2cdbaf89d42fc)"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: Ic9d5a2f2b8014e4d81f5e5f6fa58b119a86de075"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3a961159_a11616a5","line":18,"updated":"2015-01-15 16:21:55.000000000","message":"Marios please add\nImplements: blueprint restructure-l2-agent\n\nthanks!","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":15,"context_line":"the /tmp directory which contains the host/opts/addn_hosts files"},{"line_number":16,"context_line":"used by dnsmasq."},{"line_number":17,"context_line":"(fix taken from I55c8c3fb14ed91ae8570f98f19c2cdbaf89d42fc)"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: Ic9d5a2f2b8014e4d81f5e5f6fa58b119a86de075"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"1a930d6b_583ed5b9","line":18,"in_reply_to":"3a961159_a11616a5","updated":"2015-01-21 17:43:17.000000000","message":"didn\u0027t think this one applied Rossella (i am happy to track it there but did you mention the dhcp tests in the blueprint?)","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"213b643c0bc04bd46a6fe73bce6469f600a5ced2","unresolved":false,"context_lines":[{"line_number":12,"context_line":"are defined in a DHCPAgentOVSTestFramework"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partial-Bug: #1469065"},{"line_number":15,"context_line":"Co-Authored-By: Sergey Belous \u003csbelous@mirantis.com\u003e"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ic9d5a2f2b8014e4d81f5e5f6fa58b119a86de075"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":34,"id":"1a4dcd0f_1b933bfc","line":15,"updated":"2015-08-03 14:11:48.000000000","message":"I think we also need Cedric here  (thanks again for picking this up Sergey)","commit_id":"7b3350ef4360d071f7e931458919e7be35fdf5ff"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"a60c55b0a85c0c861429f4eb07711b755d0ba216","unresolved":false,"context_lines":[{"line_number":12,"context_line":"are defined in a DHCPAgentOVSTestFramework"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partial-Bug: #1469065"},{"line_number":15,"context_line":"Co-Authored-By: Sergey Belous \u003csbelous@mirantis.com\u003e"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ic9d5a2f2b8014e4d81f5e5f6fa58b119a86de075"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":34,"id":"1a4dcd0f_af8201c7","line":15,"in_reply_to":"1a4dcd0f_1b933bfc","updated":"2015-08-03 14:57:19.000000000","message":"Yeah, added in new patch-set.","commit_id":"7b3350ef4360d071f7e931458919e7be35fdf5ff"}],"neutron/tests/contrib/functional-testing.filters":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"b0d1f885e4edb5c5b6856f68c478cc1f7f6612ec","unresolved":false,"context_lines":[{"line_number":22,"context_line":"# enable dhclient from namespace"},{"line_number":23,"context_line":"dhclient_filter: CommandFilter, dhclient, root"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"kill_filter: CommandFilter, kill, root"},{"line_number":26,"context_line":"rm_filter: CommandFilter, rm, root"}],"source_content_type":"application/octet-stream","patch_set":32,"id":"9a41bdd9_2dc1bd2e","line":25,"updated":"2015-07-14 03:20:30.000000000","message":"please consider KillFilter.","commit_id":"d50396dc1462d5f2549484c4941f834226f4e869"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"1b3f5f352976e4fc973c590d64c460a9981250cd","unresolved":false,"context_lines":[{"line_number":22,"context_line":"# enable dhclient from namespace"},{"line_number":23,"context_line":"dhclient_filter: CommandFilter, dhclient, root"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"kill_filter: CommandFilter, kill, root"},{"line_number":26,"context_line":"rm_filter: CommandFilter, rm, root"}],"source_content_type":"application/octet-stream","patch_set":32,"id":"9a41bdd9_ee4dea3e","line":25,"in_reply_to":"9a41bdd9_2dc1bd2e","updated":"2015-07-14 16:32:43.000000000","message":"will be fixed in next patch set","commit_id":"d50396dc1462d5f2549484c4941f834226f4e869"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"b0d1f885e4edb5c5b6856f68c478cc1f7f6612ec","unresolved":false,"context_lines":[{"line_number":23,"context_line":"dhclient_filter: CommandFilter, dhclient, root"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"kill_filter: CommandFilter, kill, root"},{"line_number":26,"context_line":"rm_filter: CommandFilter, rm, root"}],"source_content_type":"application/octet-stream","patch_set":32,"id":"9a41bdd9_4d7e811a","line":26,"updated":"2015-07-14 03:20:30.000000000","message":"this seems dangerous.","commit_id":"d50396dc1462d5f2549484c4941f834226f4e869"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"1b3f5f352976e4fc973c590d64c460a9981250cd","unresolved":false,"context_lines":[{"line_number":23,"context_line":"dhclient_filter: CommandFilter, dhclient, root"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"kill_filter: CommandFilter, kill, root"},{"line_number":26,"context_line":"rm_filter: CommandFilter, rm, root"}],"source_content_type":"application/octet-stream","patch_set":32,"id":"9a41bdd9_cea8267a","line":26,"in_reply_to":"9a41bdd9_4d7e811a","updated":"2015-07-14 16:32:43.000000000","message":"will be removed in next patch set","commit_id":"d50396dc1462d5f2549484c4941f834226f4e869"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"e25bb36f3741739b172035cbd5cbdb4b67c3ed0f","unresolved":false,"context_lines":[{"line_number":24,"context_line":"dhclient_kill: KillFilter, root, dhclient, -9"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# actually, dhclient is used for test dhcp-agent, and running in dhcp-agent namespace"},{"line_number":27,"context_line":"# and if in that namespace file resolf.conf not exist, dhclient will override system /etc/resolv.conf"},{"line_number":28,"context_line":"# filters below are limit functions mkdir, rm and touch"},{"line_number":29,"context_line":"# only to create and delete file resolv.conf in the that namespace"},{"line_number":30,"context_line":"mkdir_filter: RegExpFilter, /bin/mkdir, root, mkdir, -p, /etc/netns/qdhcp-[0-9a-z./-]+"}],"source_content_type":"application/octet-stream","patch_set":44,"id":"da20952f_698611dd","line":27,"updated":"2015-09-08 23:36:40.000000000","message":"nit: mind wrapping this to 80 as well.","commit_id":"29a7779c9db25513e378e7483e1f9990a3fd2c86"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"7fa32f5c1f1fad9ea44ba03aa7e2e8e25e693990","unresolved":false,"context_lines":[{"line_number":24,"context_line":"dhclient_kill: KillFilter, root, dhclient, -9"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# actually, dhclient is used for test dhcp-agent, and running in dhcp-agent namespace"},{"line_number":27,"context_line":"# and if in that namespace file resolf.conf not exist, dhclient will override system /etc/resolv.conf"},{"line_number":28,"context_line":"# filters below are limit functions mkdir, rm and touch"},{"line_number":29,"context_line":"# only to create and delete file resolv.conf in the that namespace"},{"line_number":30,"context_line":"mkdir_filter: RegExpFilter, /bin/mkdir, root, mkdir, -p, /etc/netns/qdhcp-[0-9a-z./-]+"}],"source_content_type":"application/octet-stream","patch_set":44,"id":"da20952f_03b88829","line":27,"in_reply_to":"da20952f_698611dd","updated":"2015-09-09 08:01:56.000000000","message":"nit:+1","commit_id":"29a7779c9db25513e378e7483e1f9990a3fd2c86"},{"author":{"_account_id":14033,"name":"James Reeves","email":"james.reeves5546@gmail.com","username":"trombongod"},"change_message_id":"75eaba25a4706757f9251f184edf04ee8b275d74","unresolved":false,"context_lines":[{"line_number":25,"context_line":"dhclient_kill: KillFilter, root, dhclient, -9"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"# Actually, dhclient is used for test dhcp-agent and runs"},{"line_number":28,"context_line":"# in dhcp-agent namespace. If in that namespace resolf.conf file not exist"},{"line_number":29,"context_line":"# dhclient will override system /etc/resolv.conf"},{"line_number":30,"context_line":"# Filters below are limit functions mkdir, rm and touch"},{"line_number":31,"context_line":"# only to create and delete file resolv.conf in the that namespace"}],"source_content_type":"application/octet-stream","patch_set":48,"id":"7a2fa921_229d7c65","line":28,"updated":"2015-10-06 15:22:25.000000000","message":"resolv.conf","commit_id":"7754ad80d2c0d41ef712c8f82337936958575c16"},{"author":{"_account_id":14033,"name":"James Reeves","email":"james.reeves5546@gmail.com","username":"trombongod"},"change_message_id":"75eaba25a4706757f9251f184edf04ee8b275d74","unresolved":false,"context_lines":[{"line_number":31,"context_line":"# only to create and delete file resolv.conf in the that namespace"},{"line_number":32,"context_line":"mkdir_filter: RegExpFilter, /bin/mkdir, root, mkdir, -p, /etc/netns/qdhcp-[0-9a-z./-]+"},{"line_number":33,"context_line":"rm_filter: RegExpFilter, /bin/rm, root, rm, -r, /etc/netns/qdhcp-[0-9a-z./-]+"},{"line_number":34,"context_line":"touch_filter: RegExpFilter, /usr/bin/touch, root, touch, /etc/netns/qdhcp-[0-9a-z./-]+/resolv.conf"}],"source_content_type":"application/octet-stream","patch_set":48,"id":"7a2fa921_e27ea4e3","line":34,"updated":"2015-10-06 15:22:25.000000000","message":"In Redhat/CentOS, \u0027touch\u0027 is located at /bin/touch, not /usr/bin/touch as in Ubuntu","commit_id":"7754ad80d2c0d41ef712c8f82337936958575c16"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"f7976d5dcd13777c004a0a10496b03399f1e23c7","unresolved":false,"context_lines":[{"line_number":31,"context_line":"# only to create and delete file resolv.conf in the that namespace"},{"line_number":32,"context_line":"mkdir_filter: RegExpFilter, /bin/mkdir, root, mkdir, -p, /etc/netns/qdhcp-[0-9a-z./-]+"},{"line_number":33,"context_line":"rm_filter: RegExpFilter, /bin/rm, root, rm, -r, /etc/netns/qdhcp-[0-9a-z./-]+"},{"line_number":34,"context_line":"touch_filter: RegExpFilter, /usr/bin/touch, root, touch, /etc/netns/qdhcp-[0-9a-z./-]+/resolv.conf"}],"source_content_type":"application/octet-stream","patch_set":48,"id":"7a2fa921_fddba919","line":34,"in_reply_to":"7a2fa921_e27ea4e3","updated":"2015-10-06 15:35:40.000000000","message":"James, thanks for review. Good catch!","commit_id":"7754ad80d2c0d41ef712c8f82337936958575c16"}],"neutron/tests/functional/agent/l3/test_keepalived_state_change.py":[{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"7e98cfa58b4f12db2486c85bdc49460b252c6c19","unresolved":false,"context_lines":[{"line_number":29,"context_line":"            cfg.StrOpt(\u0027metadata_proxy_socket\u0027,"},{"line_number":30,"context_line":"                       default\u003d\u0027$state_path/metadata_proxy\u0027,"},{"line_number":31,"context_line":"                       help\u003d_(\u0027Location for Metadata Proxy UNIX domain \u0027"},{"line_number":32,"context_line":"                              \u0027socket.\u0027)))"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        self.router_id \u003d uuidutils.generate_uuid()"},{"line_number":35,"context_line":"        self.conf_dir \u003d self.get_default_temp_dir().path"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a4dcd0f_cf9bcd65","line":32,"updated":"2015-08-13 17:27:53.000000000","message":"Temporary solution. It looks like a bug in Oslo.config [1].\n\n[1] https://bugs.launchpad.net/oslo.config/+bug/1484611","commit_id":"5caf4d4b5fbece05f05cfa76c03851dac717cc99"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f22b3dd21cf82ffbebb3ee9bd07515c8661fe32b","unresolved":false,"context_lines":[{"line_number":26,"context_line":"class TestKeepalivedStateChange(base.BaseSudoTestCase):"},{"line_number":27,"context_line":"    def setUp(self):"},{"line_number":28,"context_line":"        super(TestKeepalivedStateChange, self).setUp()"},{"line_number":29,"context_line":"        self.conf_fixture \u003d self.useFixture(fixture_config.Config())"},{"line_number":30,"context_line":"        self.conf_fixture.register_opt("},{"line_number":31,"context_line":"            cfg.StrOpt(\u0027metadata_proxy_socket\u0027,"},{"line_number":32,"context_line":"                       default\u003d\u0027$state_path/metadata_proxy\u0027,"}],"source_content_type":"text/x-python","patch_set":51,"id":"7a2fa921_968f5674","line":29,"updated":"2015-10-09 13:28:03.000000000","message":"Also not sure how the change is related to the patch.","commit_id":"0d32b7c874139a13b6434c94b7d9300bcd08ff57"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"dc4b9ea83aadac912eb5cd78c4e4e576f10656f7","unresolved":false,"context_lines":[{"line_number":26,"context_line":"class TestKeepalivedStateChange(base.BaseSudoTestCase):"},{"line_number":27,"context_line":"    def setUp(self):"},{"line_number":28,"context_line":"        super(TestKeepalivedStateChange, self).setUp()"},{"line_number":29,"context_line":"        self.conf_fixture \u003d self.useFixture(fixture_config.Config())"},{"line_number":30,"context_line":"        self.conf_fixture.register_opt("},{"line_number":31,"context_line":"            cfg.StrOpt(\u0027metadata_proxy_socket\u0027,"},{"line_number":32,"context_line":"                       default\u003d\u0027$state_path/metadata_proxy\u0027,"}],"source_content_type":"text/x-python","patch_set":51,"id":"5a2ca52d_cff96eca","line":29,"in_reply_to":"7a2fa921_2d87d313","updated":"2015-10-13 16:55:57.000000000","message":"Done","commit_id":"0d32b7c874139a13b6434c94b7d9300bcd08ff57"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"f8d78896f5c489d4b387cd94ed819bb9652893c7","unresolved":false,"context_lines":[{"line_number":26,"context_line":"class TestKeepalivedStateChange(base.BaseSudoTestCase):"},{"line_number":27,"context_line":"    def setUp(self):"},{"line_number":28,"context_line":"        super(TestKeepalivedStateChange, self).setUp()"},{"line_number":29,"context_line":"        self.conf_fixture \u003d self.useFixture(fixture_config.Config())"},{"line_number":30,"context_line":"        self.conf_fixture.register_opt("},{"line_number":31,"context_line":"            cfg.StrOpt(\u0027metadata_proxy_socket\u0027,"},{"line_number":32,"context_line":"                       default\u003d\u0027$state_path/metadata_proxy\u0027,"}],"source_content_type":"text/x-python","patch_set":51,"id":"7a2fa921_2d87d313","line":29,"in_reply_to":"7a2fa921_968f5674","updated":"2015-10-12 13:38:52.000000000","message":"Ihar, OK. I will make an another patch.","commit_id":"0d32b7c874139a13b6434c94b7d9300bcd08ff57"}],"neutron/tests/functional/agent/linux/helpers.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"7fa32f5c1f1fad9ea44ba03aa7e2e8e25e693990","unresolved":false,"context_lines":[{"line_number":52,"context_line":"            tools.fail(\u0027%s already exists\u0027 % self.directory)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        create_cmd \u003d [\u0027mkdir\u0027, \u0027-p\u0027, self.directory]"},{"line_number":55,"context_line":"        delete_cmd \u003d [\u0027rm\u0027, \u0027-r\u0027, self.directory]"},{"line_number":56,"context_line":"        utils.execute(create_cmd, run_as_root\u003dTrue)"},{"line_number":57,"context_line":"        self.addCleanup(utils.execute, delete_cmd, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":44,"id":"da20952f_6347041e","line":55,"updated":"2015-09-09 08:01:56.000000000","message":"doesn\u0027t it need -f ?","commit_id":"29a7779c9db25513e378e7483e1f9990a3fd2c86"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"86ba5e1565aa7b0456abd375c1e70dda29656688","unresolved":false,"context_lines":[{"line_number":52,"context_line":"            tools.fail(\u0027%s already exists\u0027 % self.directory)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        create_cmd \u003d [\u0027mkdir\u0027, \u0027-p\u0027, self.directory]"},{"line_number":55,"context_line":"        delete_cmd \u003d [\u0027rm\u0027, \u0027-r\u0027, self.directory]"},{"line_number":56,"context_line":"        utils.execute(create_cmd, run_as_root\u003dTrue)"},{"line_number":57,"context_line":"        self.addCleanup(utils.execute, delete_cmd, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":44,"id":"da20952f_c6293ef4","line":55,"in_reply_to":"da20952f_6347041e","updated":"2015-09-09 08:43:57.000000000","message":"Miguel, rm utility will ask confirmation if the permissions of the file do not permit writing and in this case -f is necessary. In our case we create directory and remove it (and files inside) with root privileges, we have permission to write, that\u0027s why -f not necessary for rm.","commit_id":"29a7779c9db25513e378e7483e1f9990a3fd2c86"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"65052aa9bb46000ca16f4f2a502d583888c0c990","unresolved":false,"context_lines":[{"line_number":52,"context_line":"            tools.fail(\u0027%s already exists\u0027 % self.directory)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        create_cmd \u003d [\u0027mkdir\u0027, \u0027-p\u0027, self.directory]"},{"line_number":55,"context_line":"        delete_cmd \u003d [\u0027rm\u0027, \u0027-r\u0027, self.directory]"},{"line_number":56,"context_line":"        utils.execute(create_cmd, run_as_root\u003dTrue)"},{"line_number":57,"context_line":"        self.addCleanup(utils.execute, delete_cmd, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":44,"id":"da20952f_c6161e58","line":55,"in_reply_to":"da20952f_c6293ef4","updated":"2015-09-09 08:54:04.000000000","message":"-f, --force\n              ignore nonexistent files and arguments, never prompt\n\nIt\u0027s not necessary, you\u0027re right.","commit_id":"29a7779c9db25513e378e7483e1f9990a3fd2c86"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"5bd70a0c712e99d8d76e789e833fddcdb0eae683","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            current_directory \u003d os.path.dirname(current_directory)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class RootDirFixture(fixtures.Fixture):"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def __init__(self, directory):"},{"line_number":45,"context_line":"        super(RootDirFixture, self).__init__()"}],"source_content_type":"text/x-python","patch_set":49,"id":"7a2fa921_36f9144e","line":42,"updated":"2015-10-07 17:19:20.000000000","message":"I think that the \u0027Root\u0027 prefix to the name is confusing. There\u0027s nothing \u0027Rooty\u0027 about, it\u0027s just a temporary directory.","commit_id":"85fab12e68e92547dc8d35959ef99fa2b21fecfc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"910b86b907ef82bdf14fb4245e0aaf6fade25dbc","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            current_directory \u003d os.path.dirname(current_directory)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class TempDirFixture(fixtures.Fixture):"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def __init__(self, directory):"},{"line_number":45,"context_line":"        super(TempDirFixture, self).__init__()"}],"source_content_type":"text/x-python","patch_set":51,"id":"7a2fa921_50ca261c","line":42,"updated":"2015-10-09 13:27:12.000000000","message":"I don\u0027t follow why we have it implemented here while we already have get_new_temp_dir in base test class, and fixtures.TempDir.","commit_id":"0d32b7c874139a13b6434c94b7d9300bcd08ff57"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"1b1d0b87dc55fe0e2f262b6d1904b6095c7ed9de","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            current_directory \u003d os.path.dirname(current_directory)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class TempDirFixture(fixtures.Fixture):"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def __init__(self, directory):"},{"line_number":45,"context_line":"        super(TempDirFixture, self).__init__()"}],"source_content_type":"text/x-python","patch_set":51,"id":"7a2fa921_7632baa8","line":42,"in_reply_to":"7a2fa921_50ca261c","updated":"2015-10-09 13:30:13.000000000","message":"OK, sorry, I now realize why it\u0027s needed (root acess). Can we rename the fixture into something that would point to that difference, and explain why fixtures.* counterpart is not enough?","commit_id":"0d32b7c874139a13b6434c94b7d9300bcd08ff57"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f34d96317d41efcb706cf2d6e4e57c8e0cb09952","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            current_directory \u003d os.path.dirname(current_directory)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class TempDirFixture(fixtures.Fixture):"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def __init__(self, directory):"},{"line_number":45,"context_line":"        super(TempDirFixture, self).__init__()"}],"source_content_type":"text/x-python","patch_set":51,"id":"7a2fa921_cb7644d8","line":42,"in_reply_to":"7a2fa921_67764a08","updated":"2015-10-12 14:39:31.000000000","message":"Maybe AdminTempDirFixture? Or ForcedTempDirFixture? Maybe it\u0027s not enough either way, that\u0027s why we also need a docstring.","commit_id":"0d32b7c874139a13b6434c94b7d9300bcd08ff57"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"f8d78896f5c489d4b387cd94ed819bb9652893c7","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            current_directory \u003d os.path.dirname(current_directory)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class TempDirFixture(fixtures.Fixture):"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def __init__(self, directory):"},{"line_number":45,"context_line":"        super(TempDirFixture, self).__init__()"}],"source_content_type":"text/x-python","patch_set":51,"id":"7a2fa921_67764a08","line":42,"in_reply_to":"7a2fa921_7632baa8","updated":"2015-10-12 13:38:52.000000000","message":"Ihar, yes, we can rename it. Can you suggest the better name for this fixture? Before it was \"RootDirFixture\", but in PS49 Assaf wrote: \"There\u0027s nothing \u0027Rooty\u0027 about, it\u0027s just a temporary directory\" and now I don\u0027t know how to name it correctly.","commit_id":"0d32b7c874139a13b6434c94b7d9300bcd08ff57"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"dc4b9ea83aadac912eb5cd78c4e4e576f10656f7","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            current_directory \u003d os.path.dirname(current_directory)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class TempDirFixture(fixtures.Fixture):"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def __init__(self, directory):"},{"line_number":45,"context_line":"        super(TempDirFixture, self).__init__()"}],"source_content_type":"text/x-python","patch_set":51,"id":"5a2ca52d_af00b2ab","line":42,"in_reply_to":"7a2fa921_cb7644d8","updated":"2015-10-13 16:55:57.000000000","message":"Done","commit_id":"0d32b7c874139a13b6434c94b7d9300bcd08ff57"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"01ae334953e489a2d8e4c5ac24d71b07f5bd96a4","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            current_directory \u003d os.path.dirname(current_directory)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class AdminTempDirFixture(fixtures.Fixture):"},{"line_number":43,"context_line":"    \"\"\"Handle directory create/delete with admin permissions required\"\"\""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def __init__(self, directory):"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a2ca52d_66cb771f","line":42,"updated":"2015-10-14 15:06:47.000000000","message":"the name made me think something like mkdtemp.\nprobably \"Temp\" is not necessary?","commit_id":"df67e942572738857e6f88ab38a08d73a2678887"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"7c8b786aeab3c0ed35a1367b5deaa0bc3fa7f3e7","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            current_directory \u003d os.path.dirname(current_directory)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class AdminTempDirFixture(fixtures.Fixture):"},{"line_number":43,"context_line":"    \"\"\"Handle directory create/delete with admin permissions required\"\"\""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def __init__(self, directory):"}],"source_content_type":"text/x-python","patch_set":54,"id":"3a29b11f_9b645ab9","line":42,"in_reply_to":"5a2ca52d_66cb771f","updated":"2015-10-22 15:15:21.000000000","message":"Done","commit_id":"df67e942572738857e6f88ab38a08d73a2678887"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"3b27a217bfa16d497985dda908a558b39c720371","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            current_directory \u003d os.path.dirname(current_directory)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class AdminTempDirFixture(fixtures.Fixture):"},{"line_number":43,"context_line":"    \"\"\"Handle directory create/delete with admin permissions required\"\"\""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def __init__(self, directory):"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a2ca52d_d519b889","line":42,"in_reply_to":"5a2ca52d_66cb771f","updated":"2015-10-15 06:15:20.000000000","message":"May be.","commit_id":"df67e942572738857e6f88ab38a08d73a2678887"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"3b27a217bfa16d497985dda908a558b39c720371","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            current_directory \u003d os.path.dirname(current_directory)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class AdminTempDirFixture(fixtures.Fixture):"},{"line_number":43,"context_line":"    \"\"\"Handle directory create/delete with admin permissions required\"\"\""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def __init__(self, directory):"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a2ca52d_703792e3","line":42,"in_reply_to":"5a2ca52d_66cb771f","updated":"2015-10-15 06:15:20.000000000","message":"Omm, okay :)\nI really don\u0027t know what the best name for this fixture.","commit_id":"df67e942572738857e6f88ab38a08d73a2678887"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"01ae334953e489a2d8e4c5ac24d71b07f5bd96a4","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            tools.fail(\u0027%s already exists\u0027 % self.directory)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        create_cmd \u003d [\u0027mkdir\u0027, \u0027-p\u0027, self.directory]"},{"line_number":56,"context_line":"        delete_cmd \u003d [\u0027rm\u0027, \u0027-r\u0027, self.directory]"},{"line_number":57,"context_line":"        utils.execute(create_cmd, run_as_root\u003dTrue)"},{"line_number":58,"context_line":"        self.addCleanup(utils.execute, delete_cmd, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a2ca52d_e6cd475e","line":56,"updated":"2015-10-14 15:06:47.000000000","message":"if the directory is /a/b/c/d/e, the delete_cmd will only remove the \"e\" directory.  is it intended?","commit_id":"df67e942572738857e6f88ab38a08d73a2678887"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"3b27a217bfa16d497985dda908a558b39c720371","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            tools.fail(\u0027%s already exists\u0027 % self.directory)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        create_cmd \u003d [\u0027mkdir\u0027, \u0027-p\u0027, self.directory]"},{"line_number":56,"context_line":"        delete_cmd \u003d [\u0027rm\u0027, \u0027-r\u0027, self.directory]"},{"line_number":57,"context_line":"        utils.execute(create_cmd, run_as_root\u003dTrue)"},{"line_number":58,"context_line":"        self.addCleanup(utils.execute, delete_cmd, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a2ca52d_b0244aaf","line":56,"in_reply_to":"5a2ca52d_e6cd475e","updated":"2015-10-15 06:15:20.000000000","message":"Yep, this is what we need. This fixture used for create folder in /etc/netns, and then, we create resolv.conf file in this folder. After that, in cleanup, rm -r will remove this folder and all its contents","commit_id":"df67e942572738857e6f88ab38a08d73a2678887"}],"neutron/tests/functional/agent/test_dhcp_agent.py":[{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"beb3c4b6c62dbfecd1be2bb00e56fe3e7a3847b0","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def setUp(self):"},{"line_number":36,"context_line":"        super(DHCPAgentTestFramework, self).setUp()"},{"line_number":37,"context_line":"        #donno if needed yet - e.g. sudo ovs-vsctl port-to-br is invoked"},{"line_number":38,"context_line":"        #self.check_sudo_enabled()"},{"line_number":39,"context_line":"        self._configure()"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_898691b7","line":37,"updated":"2014-11-25 08:33:17.000000000","message":"Since you\u0027re making bridges, you need sudo, so this check should exist in the code.","commit_id":"4eccba3ade7af102523faf0ef0cfb412e4352a42"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"d0709cde1d738355c5c1d2664ae189670f7384bf","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def setUp(self):"},{"line_number":36,"context_line":"        super(DHCPAgentTestFramework, self).setUp()"},{"line_number":37,"context_line":"        #donno if needed yet - e.g. sudo ovs-vsctl port-to-br is invoked"},{"line_number":38,"context_line":"        #self.check_sudo_enabled()"},{"line_number":39,"context_line":"        self._configure()"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_7355a1f8","line":37,"in_reply_to":"5a890539_898691b7","updated":"2014-11-26 13:19:38.000000000","message":"thanks!","commit_id":"4eccba3ade7af102523faf0ef0cfb412e4352a42"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"6e092dfe63aa0783befc68aeeec46c421631736b","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        self.ovs \u003d ovs_lib.BaseOVS(self.root_helper)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def _get_interface_name(self, network, port):"},{"line_number":57,"context_line":"        agent_manager \u003d dhcp.DeviceManager(cfg.CONF, cfg.CONF.root_helper,"},{"line_number":58,"context_line":"                                           mock.Mock())"},{"line_number":59,"context_line":"        return agent_manager.get_interface_name(network, port)"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_e462dc3c","line":57,"updated":"2014-11-25 10:20:25.000000000","message":"(suggestion, no action req.)\ncould you name parameters we\u0027re using?, that helps if parameter ordering changes, and also for the ones not knowing \"DeviceManager\" object.","commit_id":"4eccba3ade7af102523faf0ef0cfb412e4352a42"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"d0709cde1d738355c5c1d2664ae189670f7384bf","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        self.ovs \u003d ovs_lib.BaseOVS(self.root_helper)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def _get_interface_name(self, network, port):"},{"line_number":57,"context_line":"        agent_manager \u003d dhcp.DeviceManager(cfg.CONF, cfg.CONF.root_helper,"},{"line_number":58,"context_line":"                                           mock.Mock())"},{"line_number":59,"context_line":"        return agent_manager.get_interface_name(network, port)"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_3384f95c","line":57,"in_reply_to":"5a890539_e462dc3c","updated":"2014-11-26 13:19:38.000000000","message":"ack thanks","commit_id":"4eccba3ade7af102523faf0ef0cfb412e4352a42"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"6e092dfe63aa0783befc68aeeec46c421631736b","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        return agent_manager.get_interface_name(network, port)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _create_network_dict(self, net_id, subnets\u003d[], ports\u003d[]):"},{"line_number":62,"context_line":"        net_dict \u003d dhcp.NetModel(True, {\"id\": net_id,"},{"line_number":63,"context_line":"                                    \"subnets\": subnets,"},{"line_number":64,"context_line":"                                    \"ports\": ports,"},{"line_number":65,"context_line":"                                    \"admin_state_up\": True,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_e44c9ca0","line":62,"updated":"2014-11-25 10:20:25.000000000","message":"could you name parameters too?.\n\nDon\u0027t know what\u0027s True from the name unless I go and look into NetModel :)\n\nIf you feel like, you could extend NetModel to accept kwargs after the bool:\n\nA\u0027la:\n\n  \u003e\u003e\u003e from neutron.agent.linux import dhcp\n  \u003e\u003e\u003e dhcp.DictModel(a\u003d1,b\u003d2,c\u003d3)\n  {\u0027a\u0027: 1, \u0027c\u0027: 3, \u0027b\u0027: 2}\n\nThis way we start to get rid of the \"passing dictionaries\" around, which is considered antisocial lately ;).","commit_id":"4eccba3ade7af102523faf0ef0cfb412e4352a42"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"d0709cde1d738355c5c1d2664ae189670f7384bf","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        return agent_manager.get_interface_name(network, port)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _create_network_dict(self, net_id, subnets\u003d[], ports\u003d[]):"},{"line_number":62,"context_line":"        net_dict \u003d dhcp.NetModel(True, {\"id\": net_id,"},{"line_number":63,"context_line":"                                    \"subnets\": subnets,"},{"line_number":64,"context_line":"                                    \"ports\": ports,"},{"line_number":65,"context_line":"                                    \"admin_state_up\": True,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_7324c15f","line":62,"in_reply_to":"5a890539_e44c9ca0","updated":"2014-11-26 13:19:38.000000000","message":"added named params. extending netmodel feels like it should be an additional patch","commit_id":"4eccba3ade7af102523faf0ef0cfb412e4352a42"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"6e092dfe63aa0783befc68aeeec46c421631736b","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def network_dict_for_dhcp(self, enable_dhcp\u003dTrue):"},{"line_number":97,"context_line":"        net_id \u003d uuidutils.generate_uuid()"},{"line_number":98,"context_line":"        sn_dict \u003d self._create_subnet_dict(net_id, enable_dhcp)"},{"line_number":99,"context_line":"        port_dict \u003d self._create_port_dict(net_id, sn_dict.id)"},{"line_number":100,"context_line":"        net_dict \u003d self._create_network_dict(net_id, [sn_dict], [port_dict])"},{"line_number":101,"context_line":"        return net_dict"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_2411445d","line":98,"updated":"2014-11-25 10:20:25.000000000","message":"(nit, no action required) subnet_dict? :-), just easier to read, even if we needed to break L100","commit_id":"4eccba3ade7af102523faf0ef0cfb412e4352a42"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"d0709cde1d738355c5c1d2664ae189670f7384bf","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def network_dict_for_dhcp(self, enable_dhcp\u003dTrue):"},{"line_number":97,"context_line":"        net_id \u003d uuidutils.generate_uuid()"},{"line_number":98,"context_line":"        sn_dict \u003d self._create_subnet_dict(net_id, enable_dhcp)"},{"line_number":99,"context_line":"        port_dict \u003d self._create_port_dict(net_id, sn_dict.id)"},{"line_number":100,"context_line":"        net_dict \u003d self._create_network_dict(net_id, [sn_dict], [port_dict])"},{"line_number":101,"context_line":"        return net_dict"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_f317d1eb","line":98,"in_reply_to":"5a890539_2411445d","updated":"2014-11-26 13:19:38.000000000","message":"Done","commit_id":"4eccba3ade7af102523faf0ef0cfb412e4352a42"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"beb3c4b6c62dbfecd1be2bb00e56fe3e7a3847b0","unresolved":false,"context_lines":[{"line_number":144,"context_line":""},{"line_number":145,"context_line":"class DHCPAgentTestCase(DHCPAgentTestFramework):"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def test_create_subnet_with_dhcp(self):"},{"line_number":148,"context_line":"        network \u003d self.network_dict_for_dhcp()"},{"line_number":149,"context_line":"        port \u003d network.ports[0]"},{"line_number":150,"context_line":"        iface_name \u003d self._get_interface_name(network, port)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_49eae974","line":147,"updated":"2014-11-25 08:33:17.000000000","message":"These 2 tests are very similar. How about creating a private function which does most of the checks and call it from both functions? Something like:\n\n def _test_dhcp_port(enable_dhcp\u003dTrue):\n     network \u003d self.network_dict_for_dhcp()\n     port \u003d network.ports[0]\n     iface_name \u003d self._get_interface_name(network, port)\n     self._configure_dhcp_for_network(network)\n     self.assertTrue(self.ovs.port_exists(iface_name))\n     self.assert_dhcp_namespace(network.namespace, enable_dhcp)\n     self.assert_dhcp_device(network.namespace, iface_name, enable_dhcp)\n     self.assert_ping_dhcp(network.namespace, enable_dhcp)\n\n def test_create_subnet_with_dhcp(self):\n     self._test_dhcp_port(enable_dhcp\u003dTrue)\n\n def test_create_subnet_without_dhcp(self):\n     self._test_dhcp_port(enable_dhcp\u003dFalse)","commit_id":"4eccba3ade7af102523faf0ef0cfb412e4352a42"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"d0709cde1d738355c5c1d2664ae189670f7384bf","unresolved":false,"context_lines":[{"line_number":144,"context_line":""},{"line_number":145,"context_line":"class DHCPAgentTestCase(DHCPAgentTestFramework):"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def test_create_subnet_with_dhcp(self):"},{"line_number":148,"context_line":"        network \u003d self.network_dict_for_dhcp()"},{"line_number":149,"context_line":"        port \u003d network.ports[0]"},{"line_number":150,"context_line":"        iface_name \u003d self._get_interface_name(network, port)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_b36e292d","line":147,"in_reply_to":"5a890539_49eae974","updated":"2014-11-26 13:19:38.000000000","message":"thanks... in the end I made the network the paramater to the test_port function - felt more useful as a utility method that way so other tests added here can use it (i.e. can specify the network you want to check, rather than it creates one every time).","commit_id":"4eccba3ade7af102523faf0ef0cfb412e4352a42"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"6e092dfe63aa0783befc68aeeec46c421631736b","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        self.assertTrue(self.ovs.port_exists(iface_name))"},{"line_number":153,"context_line":"        self.assert_dhcp_namespace(network.namespace)"},{"line_number":154,"context_line":"        self.assert_dhcp_device(network.namespace, iface_name)"},{"line_number":155,"context_line":"        self.assert_ping_dhcp(network.namespace)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def test_create_subnet_without_dhcp(self):"},{"line_number":158,"context_line":"        enable_dhcp \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_3e6cf007","line":155,"updated":"2014-11-25 10:20:25.000000000","message":"As an extra test, you could feed a mac/ip to the dhcp agent, and then connect another port to the bridge, in a namespace, to run dhcpclient, and check it got the right IP address.\n\nBut that could be food for a separate patch.\n\nGood work BTW :)","commit_id":"4eccba3ade7af102523faf0ef0cfb412e4352a42"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"d0709cde1d738355c5c1d2664ae189670f7384bf","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        self.assertTrue(self.ovs.port_exists(iface_name))"},{"line_number":153,"context_line":"        self.assert_dhcp_namespace(network.namespace)"},{"line_number":154,"context_line":"        self.assert_dhcp_device(network.namespace, iface_name)"},{"line_number":155,"context_line":"        self.assert_ping_dhcp(network.namespace)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def test_create_subnet_without_dhcp(self):"},{"line_number":158,"context_line":"        enable_dhcp \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_53650543","line":155,"in_reply_to":"5a890539_3e6cf007","updated":"2014-11-26 13:19:38.000000000","message":"thanks! that would be great... yes I was thinking about something like dhcping in the namespace possibly also but didn\u0027t get that far... yeah definitely for another patch\n\nthanks for review... to be honest I wasn\u0027t sure if i even interpreted \u0027functional test for dhcp agent\u0027 correctly... + it is a fine line between \u0027testing dnsmasq\u0027 and testing \u0027neutron-dhcp-agent\u0027","commit_id":"4eccba3ade7af102523faf0ef0cfb412e4352a42"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d3331b81f190b88aab32abfdd82b70f6dfa2ed21","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import mock"},{"line_number":17,"context_line":"from oslo.config import cfg"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_7c1b6e1c","line":15,"updated":"2014-11-28 16:47:05.000000000","message":"It seems there is no test really testing the dhcp (could be done using dhclient or dhcping (? never tested myself))","commit_id":"ee63c558c9c0846dd6a8a0c557285f6537168ff9"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"004474e1ab0ecfc06de553dc2793d84c8d7f4c03","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from neutron.tests.functional.agent.linux import pinger"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class DHCPAgentTestFramework(base.BaseOVSLinuxTestCase):"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    TEST_MAC_ADDRESS \u003d \u002724:77:03:7d:00:4c\u0027"},{"line_number":33,"context_line":"    TEST_IP_ADDRESS \u003d \u0027192.168.10.11\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_e148ce5e","line":30,"updated":"2014-11-26 17:10:04.000000000","message":"Since this is the base class for DHCP testing I think it shouldn\u0027t inherit from BaseOVSLinuxTestCase. DHCP can use also BridgeInterfaceDriver and at some point this should be tested too. How about you take away the ovs specific stuff from this class and create another one DHCPAgentOVSDriverTestFramework that inherits from DHCPAgentTestFramework? I am also OK if you don\u0027t want to create another class and you move the ovs specific part to DHCPAgentTestCase that should be renamed DHCPAgentOVSDriverTestCase.","commit_id":"ee63c558c9c0846dd6a8a0c557285f6537168ff9"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"b280b9240ca020d041105e0094fdcbb2023a617c","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from neutron.tests.functional.agent.linux import pinger"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class DHCPAgentTestFramework(base.BaseOVSLinuxTestCase):"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    TEST_MAC_ADDRESS \u003d \u002724:77:03:7d:00:4c\u0027"},{"line_number":33,"context_line":"    TEST_IP_ADDRESS \u003d \u0027192.168.10.11\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_87770708","line":30,"in_reply_to":"5a890539_e148ce5e","updated":"2014-11-27 10:12:52.000000000","message":"thanks Rossella indeed I agree with your thoughts here - it had occurred to me at some point when writing this stuff but got left out in the rush to get a v1 out. I think am going to go with the former (make a ovs specific subclass, since that is what is being exercised here) - will spend some time reworking it and see where it ends up","commit_id":"ee63c558c9c0846dd6a8a0c557285f6537168ff9"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"b280b9240ca020d041105e0094fdcbb2023a617c","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        sn_id \u003d uuidutils.generate_uuid()"},{"line_number":69,"context_line":"        sn_dict \u003d dhcp.DictModel({\"id\": sn_id,"},{"line_number":70,"context_line":"                            \"network_id\": net_id,"},{"line_number":71,"context_line":"                            \"ip_version\": 4,"},{"line_number":72,"context_line":"                            \"cidr\": \u0027192.168.10.0/24\u0027,"},{"line_number":73,"context_line":"                            \"gateway_ip\": \u0027192.168.10.1\u0027,"},{"line_number":74,"context_line":"                            \"enable_dhcp\": enable_dhcp,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_67721b13","line":71,"updated":"2014-11-27 10:12:52.000000000","message":"should be able to add v6 cases here easilly enough too...","commit_id":"ee63c558c9c0846dd6a8a0c557285f6537168ff9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"efd95cca784aca8ec0e2c58a31832388e3f3a782","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    def assert_ovs_port(self, iface_name, enable_dhcp\u003dTrue):"},{"line_number":119,"context_line":"        ovs \u003d ovs_lib.BaseOVS(self.root_helper)"},{"line_number":120,"context_line":"        if enable_dhcp:"},{"line_number":121,"context_line":"            self.assertTrue(ovs.port_exists(iface_name))"},{"line_number":122,"context_line":"        else:"},{"line_number":123,"context_line":"            self.assertFalse(ovs.port_exists(iface_name))"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_d097f938","line":121,"updated":"2014-11-27 22:47:35.000000000","message":"self.assertEqual(enable_dhcp, ...) seems clearer","commit_id":"ee63c558c9c0846dd6a8a0c557285f6537168ff9"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"e9da6f14bf8bbdfe5130ff155139b0331a2adea0","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    def assert_ovs_port(self, iface_name, enable_dhcp\u003dTrue):"},{"line_number":119,"context_line":"        ovs \u003d ovs_lib.BaseOVS(self.root_helper)"},{"line_number":120,"context_line":"        if enable_dhcp:"},{"line_number":121,"context_line":"            self.assertTrue(ovs.port_exists(iface_name))"},{"line_number":122,"context_line":"        else:"},{"line_number":123,"context_line":"            self.assertFalse(ovs.port_exists(iface_name))"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_1430889d","line":121,"in_reply_to":"5a890539_d097f938","updated":"2014-11-28 16:15:39.000000000","message":"like it! thanks","commit_id":"ee63c558c9c0846dd6a8a0c557285f6537168ff9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"efd95cca784aca8ec0e2c58a31832388e3f3a782","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    def assert_dhcp_namespace(self, namespace, enable_dhcp\u003dTrue):"},{"line_number":126,"context_line":"        ip \u003d ip_lib.IPWrapper(self.root_helper, namespace)"},{"line_number":127,"context_line":"        if enable_dhcp:"},{"line_number":128,"context_line":"            self.assertTrue(ip.netns.exists(namespace))"},{"line_number":129,"context_line":"        else:"},{"line_number":130,"context_line":"            self.assertFalse(ip.netns.exists(namespace))"},{"line_number":131,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_f0b315e7","line":128,"updated":"2014-11-27 22:47:35.000000000","message":"itto","commit_id":"ee63c558c9c0846dd6a8a0c557285f6537168ff9"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"e9da6f14bf8bbdfe5130ff155139b0331a2adea0","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    def assert_dhcp_namespace(self, namespace, enable_dhcp\u003dTrue):"},{"line_number":126,"context_line":"        ip \u003d ip_lib.IPWrapper(self.root_helper, namespace)"},{"line_number":127,"context_line":"        if enable_dhcp:"},{"line_number":128,"context_line":"            self.assertTrue(ip.netns.exists(namespace))"},{"line_number":129,"context_line":"        else:"},{"line_number":130,"context_line":"            self.assertFalse(ip.netns.exists(namespace))"},{"line_number":131,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_3425845c","line":128,"in_reply_to":"5a890539_f0b315e7","updated":"2014-11-28 16:15:39.000000000","message":"Done","commit_id":"ee63c558c9c0846dd6a8a0c557285f6537168ff9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b144524272f2aacfddf07825a9121de90b08e51e","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            self.assertFalse(ip_lib.ensure_device_is_ready(dhcp_iface_name,"},{"line_number":140,"context_line":"                                            self.root_helper, namespace))"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def assert_ping_dhcp(self, namespace, enable_dhcp\u003dTrue):"},{"line_number":143,"context_line":"        ip_ns \u003d ip_lib.IPWrapper(self.root_helper, namespace)"},{"line_number":144,"context_line":"        pingy \u003d pinger.Pinger(self)"},{"line_number":145,"context_line":"        if enable_dhcp:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_10f6e190","line":142,"updated":"2014-11-27 22:49:10.000000000","message":"iiuc, the method is checking that it\u0027s possible to ping from the dhcp namespace one of the dhcp namespace ip ... what is the usecase?","commit_id":"ee63c558c9c0846dd6a8a0c557285f6537168ff9"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"e9da6f14bf8bbdfe5130ff155139b0331a2adea0","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            self.assertFalse(ip_lib.ensure_device_is_ready(dhcp_iface_name,"},{"line_number":140,"context_line":"                                            self.root_helper, namespace))"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def assert_ping_dhcp(self, namespace, enable_dhcp\u003dTrue):"},{"line_number":143,"context_line":"        ip_ns \u003d ip_lib.IPWrapper(self.root_helper, namespace)"},{"line_number":144,"context_line":"        pingy \u003d pinger.Pinger(self)"},{"line_number":145,"context_line":"        if enable_dhcp:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_415c0bee","line":142,"in_reply_to":"5a890539_10f6e190","updated":"2014-11-28 16:15:39.000000000","message":"yeah ends up doing sthing like:\n\nsudo  -n, ip netns exec qdhcp-aab85fee-6035-46ba-9426-437e9c2cdf91 ping -c 1 -W 1  \u0027192.168.10.11\u0027 - will only happen if the port is created and dnsmasq bound to it","commit_id":"ee63c558c9c0846dd6a8a0c557285f6537168ff9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d3331b81f190b88aab32abfdd82b70f6dfa2ed21","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            self.assertFalse(ip_lib.ensure_device_is_ready(dhcp_iface_name,"},{"line_number":140,"context_line":"                                            self.root_helper, namespace))"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def assert_ping_dhcp(self, namespace, enable_dhcp\u003dTrue):"},{"line_number":143,"context_line":"        ip_ns \u003d ip_lib.IPWrapper(self.root_helper, namespace)"},{"line_number":144,"context_line":"        pingy \u003d pinger.Pinger(self)"},{"line_number":145,"context_line":"        if enable_dhcp:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_1c0eeae5","line":142,"in_reply_to":"5a890539_415c0bee","updated":"2014-11-28 16:47:05.000000000","message":"So i don\u0027t really understand the test, it seems the test is indirectly testing that the dhcp namespace is configured or not.","commit_id":"ee63c558c9c0846dd6a8a0c557285f6537168ff9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"efd95cca784aca8ec0e2c58a31832388e3f3a782","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        pingy \u003d pinger.Pinger(self)"},{"line_number":145,"context_line":"        if enable_dhcp:"},{"line_number":146,"context_line":"            pingy.assert_ping_from_ns(ip_ns, self.TEST_IP_ADDRESS)"},{"line_number":147,"context_line":"        else:"},{"line_number":148,"context_line":"            pingy.assert_no_ping_from_ns(ip_ns, self.TEST_IP_ADDRESS)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_b0e0adcd","line":147,"updated":"2014-11-27 22:47:35.000000000","message":"no sure to understand why we need to check something if not enable_dhcp","commit_id":"ee63c558c9c0846dd6a8a0c557285f6537168ff9"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"e9da6f14bf8bbdfe5130ff155139b0331a2adea0","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        pingy \u003d pinger.Pinger(self)"},{"line_number":145,"context_line":"        if enable_dhcp:"},{"line_number":146,"context_line":"            pingy.assert_ping_from_ns(ip_ns, self.TEST_IP_ADDRESS)"},{"line_number":147,"context_line":"        else:"},{"line_number":148,"context_line":"            pingy.assert_no_ping_from_ns(ip_ns, self.TEST_IP_ADDRESS)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_de80da4b","line":147,"in_reply_to":"5a890539_b0e0adcd","updated":"2014-11-28 16:15:39.000000000","message":"well you want to ensure that indeed when you don\u0027t enable_dhcp in a network there is nothing on TEST_IP_ADDRESS to ping","commit_id":"ee63c558c9c0846dd6a8a0c557285f6537168ff9"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c83f7cddf0076e159602b761c967e8be88c20cb1","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    def _configure(self):"},{"line_number":46,"context_line":"        dhcp_agent.register_options()"},{"line_number":47,"context_line":"        cfg.CONF.set_override(\u0027debug\u0027, False)"},{"line_number":48,"context_line":"        config.setup_logging()"},{"line_number":49,"context_line":"        cfg.CONF.set_override(\u0027root_helper\u0027, self.root_helper, group\u003d\u0027AGENT\u0027)"},{"line_number":50,"context_line":"        cfg.CONF.set_override(\u0027use_namespaces\u0027, True)"},{"line_number":51,"context_line":"        self.agent \u003d dhcp_agent.DhcpAgentWithStateReport(\u0027localhost\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_86aabed2","line":48,"updated":"2014-12-07 12:17:18.000000000","message":"This was starting to repeat too often for my taste... Please rebase on https://review.openstack.org/#/c/139858/.","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"30aa49078f2ac595aa86b78c6e7257a1ab547a5c","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    def _configure(self):"},{"line_number":46,"context_line":"        dhcp_agent.register_options()"},{"line_number":47,"context_line":"        cfg.CONF.set_override(\u0027debug\u0027, False)"},{"line_number":48,"context_line":"        config.setup_logging()"},{"line_number":49,"context_line":"        cfg.CONF.set_override(\u0027root_helper\u0027, self.root_helper, group\u003d\u0027AGENT\u0027)"},{"line_number":50,"context_line":"        cfg.CONF.set_override(\u0027use_namespaces\u0027, True)"},{"line_number":51,"context_line":"        self.agent \u003d dhcp_agent.DhcpAgentWithStateReport(\u0027localhost\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_6378f62b","line":48,"in_reply_to":"3a961159_86aabed2","updated":"2014-12-11 12:31:11.000000000","message":"Done (well i removed the line, your patch landed already)","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c83f7cddf0076e159602b761c967e8be88c20cb1","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        dhcp_agent.register_options()"},{"line_number":47,"context_line":"        cfg.CONF.set_override(\u0027debug\u0027, False)"},{"line_number":48,"context_line":"        config.setup_logging()"},{"line_number":49,"context_line":"        cfg.CONF.set_override(\u0027root_helper\u0027, self.root_helper, group\u003d\u0027AGENT\u0027)"},{"line_number":50,"context_line":"        cfg.CONF.set_override(\u0027use_namespaces\u0027, True)"},{"line_number":51,"context_line":"        self.agent \u003d dhcp_agent.DhcpAgentWithStateReport(\u0027localhost\u0027)"},{"line_number":52,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_061a4e6e","line":49,"updated":"2014-12-07 12:17:18.000000000","message":"True is the default here.","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"30aa49078f2ac595aa86b78c6e7257a1ab547a5c","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        dhcp_agent.register_options()"},{"line_number":47,"context_line":"        cfg.CONF.set_override(\u0027debug\u0027, False)"},{"line_number":48,"context_line":"        config.setup_logging()"},{"line_number":49,"context_line":"        cfg.CONF.set_override(\u0027root_helper\u0027, self.root_helper, group\u003d\u0027AGENT\u0027)"},{"line_number":50,"context_line":"        cfg.CONF.set_override(\u0027use_namespaces\u0027, True)"},{"line_number":51,"context_line":"        self.agent \u003d dhcp_agent.DhcpAgentWithStateReport(\u0027localhost\u0027)"},{"line_number":52,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_83aec283","line":49,"in_reply_to":"3a961159_061a4e6e","updated":"2014-12-11 12:31:11.000000000","message":"thx","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c83f7cddf0076e159602b761c967e8be88c20cb1","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        cfg.CONF.set_override(\u0027use_namespaces\u0027, True)"},{"line_number":51,"context_line":"        self.agent \u003d dhcp_agent.DhcpAgentWithStateReport(\u0027localhost\u0027)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _get_interface_name(self, network, port):"},{"line_number":54,"context_line":"        agent_manager \u003d dhcp.DeviceManager(conf\u003dcfg.CONF,"},{"line_number":55,"context_line":"            root_helper\u003dcfg.CONF.root_helper, plugin\u003dmock.Mock())"},{"line_number":56,"context_line":"        return agent_manager.get_interface_name(network, port)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_462b7682","line":53,"updated":"2014-12-07 12:17:18.000000000","message":"agent_manager is kind of a confusing variable name I think.","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"30aa49078f2ac595aa86b78c6e7257a1ab547a5c","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        cfg.CONF.set_override(\u0027use_namespaces\u0027, True)"},{"line_number":51,"context_line":"        self.agent \u003d dhcp_agent.DhcpAgentWithStateReport(\u0027localhost\u0027)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _get_interface_name(self, network, port):"},{"line_number":54,"context_line":"        agent_manager \u003d dhcp.DeviceManager(conf\u003dcfg.CONF,"},{"line_number":55,"context_line":"            root_helper\u003dcfg.CONF.root_helper, plugin\u003dmock.Mock())"},{"line_number":56,"context_line":"        return agent_manager.get_interface_name(network, port)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_43cbfa52","line":53,"in_reply_to":"3a961159_462b7682","updated":"2014-12-11 12:31:11.000000000","message":"Done","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c83f7cddf0076e159602b761c967e8be88c20cb1","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        return agent_manager.get_interface_name(network, port)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def _create_network_dict(self, net_id, subnets\u003d[], ports\u003d[]):"},{"line_number":59,"context_line":"        net_dict \u003d dhcp.NetModel(use_namespaces\u003dTrue, d\u003d{\"id\": net_id,"},{"line_number":60,"context_line":"                                    \"subnets\": subnets,"},{"line_number":61,"context_line":"                                    \"ports\": ports,"},{"line_number":62,"context_line":"                                    \"admin_state_up\": True,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_a6397ada","line":59,"updated":"2014-12-07 12:17:18.000000000","message":"The indentation looks kind of funky here... This is just a styling thing but I think it\u0027d more consistent with other Neutron code if you broke the newline after d\u003d{","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"30aa49078f2ac595aa86b78c6e7257a1ab547a5c","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        return agent_manager.get_interface_name(network, port)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def _create_network_dict(self, net_id, subnets\u003d[], ports\u003d[]):"},{"line_number":59,"context_line":"        net_dict \u003d dhcp.NetModel(use_namespaces\u003dTrue, d\u003d{\"id\": net_id,"},{"line_number":60,"context_line":"                                    \"subnets\": subnets,"},{"line_number":61,"context_line":"                                    \"ports\": ports,"},{"line_number":62,"context_line":"                                    \"admin_state_up\": True,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_03e9f2b7","line":59,"in_reply_to":"3a961159_a6397ada","updated":"2014-12-11 12:31:11.000000000","message":"Done","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c83f7cddf0076e159602b761c967e8be88c20cb1","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def _configure_dhcp_for_network(self, network, agent):"},{"line_number":114,"context_line":"        agent.configure_dhcp_for_network(network)"},{"line_number":115,"context_line":"        if network[\u0027subnets\u0027][0][\u0027enable_dhcp\u0027]:"},{"line_number":116,"context_line":"            self.addCleanup(self._cleanup_namespace, network.namespace)"},{"line_number":117,"context_line":"            self.addCleanup(self._cleanup_dhcp, network, agent)"},{"line_number":118,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_264d8a73","line":115,"updated":"2014-12-07 12:17:18.000000000","message":"Good stuff.","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"change_message_id":"ab516e430e2ea347ac0765c122e7d73c87b844a4","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def assert_dhcp_namespace(self, namespace, enable_dhcp\u003dTrue):"},{"line_number":120,"context_line":"        ip \u003d ip_lib.IPWrapper(self.root_helper, namespace)"},{"line_number":121,"context_line":"        self.assertEqual(ip.netns.exists(namespace), enable_dhcp)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def assert_dhcp_device(self, namespace, dhcp_iface_name, enable_dhcp\u003dTrue):"},{"line_number":124,"context_line":"        dev \u003d ip_lib.IPDevice(dhcp_iface_name, self.root_helper, namespace)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_3a7da6e7","line":121,"updated":"2014-12-05 02:08:49.000000000","message":"generally, assertEqual wants expected value first, which is enable_dhcp, right?","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"30aa49078f2ac595aa86b78c6e7257a1ab547a5c","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def assert_dhcp_namespace(self, namespace, enable_dhcp\u003dTrue):"},{"line_number":120,"context_line":"        ip \u003d ip_lib.IPWrapper(self.root_helper, namespace)"},{"line_number":121,"context_line":"        self.assertEqual(ip.netns.exists(namespace), enable_dhcp)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def assert_dhcp_device(self, namespace, dhcp_iface_name, enable_dhcp\u003dTrue):"},{"line_number":124,"context_line":"        dev \u003d ip_lib.IPDevice(dhcp_iface_name, self.root_helper, namespace)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_a3d73eec","line":121,"in_reply_to":"5a890539_3a7da6e7","updated":"2014-12-11 12:31:11.000000000","message":"Done","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c83f7cddf0076e159602b761c967e8be88c20cb1","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def assert_dhcp_device(self, namespace, dhcp_iface_name, enable_dhcp\u003dTrue):"},{"line_number":124,"context_line":"        dev \u003d ip_lib.IPDevice(dhcp_iface_name, self.root_helper, namespace)"},{"line_number":125,"context_line":"        if enable_dhcp:"},{"line_number":126,"context_line":"            self.assertEqual(self._MAC_ADDRESS, dev.link.address)"},{"line_number":127,"context_line":"            self.assertTrue(ip_lib.ensure_device_is_ready(dhcp_iface_name,"},{"line_number":128,"context_line":"                                            self.root_helper, namespace))"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_66579203","line":125,"updated":"2014-12-07 12:17:18.000000000","message":"Check out neutron/agent/linux/ip_lib.device_exists and device_exists_with_ip_mac.","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"30aa49078f2ac595aa86b78c6e7257a1ab547a5c","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def assert_dhcp_device(self, namespace, dhcp_iface_name, enable_dhcp\u003dTrue):"},{"line_number":124,"context_line":"        dev \u003d ip_lib.IPDevice(dhcp_iface_name, self.root_helper, namespace)"},{"line_number":125,"context_line":"        if enable_dhcp:"},{"line_number":126,"context_line":"            self.assertEqual(self._MAC_ADDRESS, dev.link.address)"},{"line_number":127,"context_line":"            self.assertTrue(ip_lib.ensure_device_is_ready(dhcp_iface_name,"},{"line_number":128,"context_line":"                                            self.root_helper, namespace))"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_03b81275","line":125,"in_reply_to":"3a961159_66579203","updated":"2014-12-11 12:31:11.000000000","message":"thx","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"6df03800f7560c3cec45abf46fef61da364da823","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        self._configure()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    # need to make sure ports \u0026 namespaces are gone, before super teardown"},{"line_number":46,"context_line":"    # kills the integration bridge, otherwise multiple kittens die"},{"line_number":47,"context_line":"    def tearDown(self):"},{"line_number":48,"context_line":"        for network in self.cleanup_networks:"},{"line_number":49,"context_line":"            self._cleanup_dhcp(network)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_56267a69","line":46,"updated":"2014-12-17 17:05:01.000000000","message":"I like kittens but can you add some more technical details?","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"6f72175a75be6b1f55ededdc39c6ffd63078ad29","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        self._configure()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    # need to make sure ports \u0026 namespaces are gone, before super teardown"},{"line_number":46,"context_line":"    # kills the integration bridge, otherwise multiple kittens die"},{"line_number":47,"context_line":"    def tearDown(self):"},{"line_number":48,"context_line":"        for network in self.cleanup_networks:"},{"line_number":49,"context_line":"            self._cleanup_dhcp(network)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_ac77f4d2","line":46,"in_reply_to":"3a961159_56267a69","updated":"2014-12-21 08:43:32.000000000","message":"I, like Rossella, like kittens (though significantly less than dogs - dogs are better), but I think the way you cleanup stuff here is a bit off the \u0027unittest\u0027 way.\n\nunittest provides an \u0027addCleanup\u0027 function which tells each test to run some function at tearDown (without specifying it explicitly in tearDown). So line 127 will be changed to \u0027self.addCleanup(self.cleanup_network, network)\u0027, and somewhere a function called \u0027cleanup_network\u0027 will be defined that will run _cleanup_dhcp and _cleanup_namespaces. So the logic will be:\n\n1. When creating a new network, schedule it for tearDown (self.cleanup_network, to be written) using addCleanup(),\n\n2. Once the test completes, the framework knows to look up all the stuff needs cleaning up and call them.\n\nHopefully this makes sense.","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"63a828242a84738bc9565e6658db4395ea2e8171","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        self._configure()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    # need to make sure ports \u0026 namespaces are gone, before super teardown"},{"line_number":46,"context_line":"    # kills the integration bridge, otherwise multiple kittens die"},{"line_number":47,"context_line":"    def tearDown(self):"},{"line_number":48,"context_line":"        for network in self.cleanup_networks:"},{"line_number":49,"context_line":"            self._cleanup_dhcp(network)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_c547671b","line":46,"in_reply_to":"3a961159_ac77f4d2","updated":"2014-12-24 15:32:32.000000000","message":"thanks Rossella and John.\n\nJohn I originally used addCleanup but this caused problems - see my comments about set 4 (on review front page) - tearDown is called first, before the addCleanup methods - the only way I could do this safely (no segfault always a bonus) was as above.","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"6f72175a75be6b1f55ededdc39c6ffd63078ad29","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            root_helper\u003dcfg.CONF.root_helper, plugin\u003dmock.Mock())"},{"line_number":68,"context_line":"        return device_manager.get_interface_name(network, port)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def _create_network_dict(self, net_id, subnets\u003d[], ports\u003d[]):"},{"line_number":71,"context_line":"        net_dict \u003d dhcp.NetModel(use_namespaces\u003dTrue, d\u003d{"},{"line_number":72,"context_line":"                                    \"id\": net_id,"},{"line_number":73,"context_line":"                                    \"subnets\": subnets,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_2c194488","line":70,"updated":"2014-12-21 08:43:32.000000000","message":"Please refrain from using mutable objects are positional arguments. The reason is that if the default object (a list, in this case) is used and modified, then the default object is also changed. In other words, if I append (somewhere in this code) an object to \u0027subjects\u0027, then the default object used as default will also contain this new object.\n\nInstead, use \u0027None\u0027 and explicitly change it to an empty list inside the function.","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"63a828242a84738bc9565e6658db4395ea2e8171","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            root_helper\u003dcfg.CONF.root_helper, plugin\u003dmock.Mock())"},{"line_number":68,"context_line":"        return device_manager.get_interface_name(network, port)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def _create_network_dict(self, net_id, subnets\u003d[], ports\u003d[]):"},{"line_number":71,"context_line":"        net_dict \u003d dhcp.NetModel(use_namespaces\u003dTrue, d\u003d{"},{"line_number":72,"context_line":"                                    \"id\": net_id,"},{"line_number":73,"context_line":"                                    \"subnets\": subnets,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_d491db52","line":70,"in_reply_to":"3a961159_2c194488","updated":"2014-12-24 15:32:32.000000000","message":"Done and thank you very much for explaining so well","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"6f72175a75be6b1f55ededdc39c6ffd63078ad29","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def _create_network_dict(self, net_id, subnets\u003d[], ports\u003d[]):"},{"line_number":71,"context_line":"        net_dict \u003d dhcp.NetModel(use_namespaces\u003dTrue, d\u003d{"},{"line_number":72,"context_line":"                                    \"id\": net_id,"},{"line_number":73,"context_line":"                                    \"subnets\": subnets,"},{"line_number":74,"context_line":"                                    \"ports\": ports,"},{"line_number":75,"context_line":"                                    \"admin_state_up\": True,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_cc5b6052","line":72,"updated":"2014-12-21 08:43:32.000000000","message":"Please follow http://docs.openstack.org/developer/hacking/#dictionaries-lists - the definitions of all the keys in the next 3 functions should be the same, where the preference (I believe) is 8 whitespaces of indentation past the line before it.","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"63a828242a84738bc9565e6658db4395ea2e8171","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def _create_network_dict(self, net_id, subnets\u003d[], ports\u003d[]):"},{"line_number":71,"context_line":"        net_dict \u003d dhcp.NetModel(use_namespaces\u003dTrue, d\u003d{"},{"line_number":72,"context_line":"                                    \"id\": net_id,"},{"line_number":73,"context_line":"                                    \"subnets\": subnets,"},{"line_number":74,"context_line":"                                    \"ports\": ports,"},{"line_number":75,"context_line":"                                    \"admin_state_up\": True,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_1451a32f","line":72,"in_reply_to":"3a961159_cc5b6052","updated":"2014-12-24 15:32:32.000000000","message":"Done","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"6f72175a75be6b1f55ededdc39c6ffd63078ad29","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        return net_dict"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _create_subnet_dict(self, net_id, enable_dhcp\u003dTrue, ip_v\u003d4):"},{"line_number":80,"context_line":"        sn_id \u003d uuidutils.generate_uuid()"},{"line_number":81,"context_line":"        sn_dict \u003d dhcp.DictModel({\"id\": sn_id,"},{"line_number":82,"context_line":"                            \"network_id\": net_id,"},{"line_number":83,"context_line":"                            \"ip_version\": ip_v,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_0c52c834","line":80,"updated":"2014-12-21 08:43:32.000000000","message":"nit: sn_id can be removed and the returned value from generate_id can be used directly in the dict.","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"63a828242a84738bc9565e6658db4395ea2e8171","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        return net_dict"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _create_subnet_dict(self, net_id, enable_dhcp\u003dTrue, ip_v\u003d4):"},{"line_number":80,"context_line":"        sn_id \u003d uuidutils.generate_uuid()"},{"line_number":81,"context_line":"        sn_dict \u003d dhcp.DictModel({\"id\": sn_id,"},{"line_number":82,"context_line":"                            \"network_id\": net_id,"},{"line_number":83,"context_line":"                            \"ip_version\": ip_v,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_b4260fcc","line":80,"in_reply_to":"3a961159_0c52c834","updated":"2014-12-24 15:32:32.000000000","message":"Done","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"6f72175a75be6b1f55ededdc39c6ffd63078ad29","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _create_subnet_dict(self, net_id, enable_dhcp\u003dTrue, ip_v\u003d4):"},{"line_number":80,"context_line":"        sn_id \u003d uuidutils.generate_uuid()"},{"line_number":81,"context_line":"        sn_dict \u003d dhcp.DictModel({\"id\": sn_id,"},{"line_number":82,"context_line":"                            \"network_id\": net_id,"},{"line_number":83,"context_line":"                            \"ip_version\": ip_v,"},{"line_number":84,"context_line":"                            \"cidr\": self._IP_ADDRS[ip_v][\u0027cidr\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_2c4b0488","line":81,"updated":"2014-12-21 08:43:32.000000000","message":"I believe conventions dictate the \u0027id\u0027 above should be in a separate line, or that the indentation of all the keys match. Not sure, but I believe the way it is now isn\u0027t right. Same for L96.","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"63a828242a84738bc9565e6658db4395ea2e8171","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _create_subnet_dict(self, net_id, enable_dhcp\u003dTrue, ip_v\u003d4):"},{"line_number":80,"context_line":"        sn_id \u003d uuidutils.generate_uuid()"},{"line_number":81,"context_line":"        sn_dict \u003d dhcp.DictModel({\"id\": sn_id,"},{"line_number":82,"context_line":"                            \"network_id\": net_id,"},{"line_number":83,"context_line":"                            \"ip_version\": ip_v,"},{"line_number":84,"context_line":"                            \"cidr\": self._IP_ADDRS[ip_v][\u0027cidr\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_f42c17ae","line":81,"in_reply_to":"3a961159_2c4b0488","updated":"2014-12-24 15:32:32.000000000","message":"Done","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"6f72175a75be6b1f55ededdc39c6ffd63078ad29","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            sn_dict[\u0027ipv6_address_mode\u0027] \u003d constants.DHCPV6_STATEFUL"},{"line_number":91,"context_line":"        return sn_dict"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _create_port_dict(self, net_id, sn_id, ip_v\u003d4):"},{"line_number":94,"context_line":"        port_id \u003d uuidutils.generate_uuid()"},{"line_number":95,"context_line":"        device_id \u003d commonutils.get_dhcp_agent_device_id(net_id, cfg.CONF.host)"},{"line_number":96,"context_line":"        port_dict \u003d dhcp.DictModel({\"id\": port_id,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_cc7440d1","line":93,"updated":"2014-12-21 08:43:32.000000000","message":"I\u0027m not a fan of shortened variable names (like \u0027net_id\u0027 and \u0027sn_id\u0027, which I believe correspond to subnet_id?) - can we extend these to be their fuller counterparts?\n\nThis will make lines longer, but we can compensate using new lines.","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"63a828242a84738bc9565e6658db4395ea2e8171","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            sn_dict[\u0027ipv6_address_mode\u0027] \u003d constants.DHCPV6_STATEFUL"},{"line_number":91,"context_line":"        return sn_dict"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _create_port_dict(self, net_id, sn_id, ip_v\u003d4):"},{"line_number":94,"context_line":"        port_id \u003d uuidutils.generate_uuid()"},{"line_number":95,"context_line":"        device_id \u003d commonutils.get_dhcp_agent_device_id(net_id, cfg.CONF.host)"},{"line_number":96,"context_line":"        port_dict \u003d dhcp.DictModel({\"id\": port_id,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_07b25748","line":93,"in_reply_to":"3a961159_cc7440d1","updated":"2014-12-24 15:32:32.000000000","message":"Done","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"6f72175a75be6b1f55ededdc39c6ffd63078ad29","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        return sn_dict"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _create_port_dict(self, net_id, sn_id, ip_v\u003d4):"},{"line_number":94,"context_line":"        port_id \u003d uuidutils.generate_uuid()"},{"line_number":95,"context_line":"        device_id \u003d commonutils.get_dhcp_agent_device_id(net_id, cfg.CONF.host)"},{"line_number":96,"context_line":"        port_dict \u003d dhcp.DictModel({\"id\": port_id,"},{"line_number":97,"context_line":"                            \"name\": \"foo\","}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_2c322410","line":94,"updated":"2014-12-21 08:43:32.000000000","message":"Same re: remove port_id and assign the value straight to L96.","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"63a828242a84738bc9565e6658db4395ea2e8171","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        return sn_dict"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _create_port_dict(self, net_id, sn_id, ip_v\u003d4):"},{"line_number":94,"context_line":"        port_id \u003d uuidutils.generate_uuid()"},{"line_number":95,"context_line":"        device_id \u003d commonutils.get_dhcp_agent_device_id(net_id, cfg.CONF.host)"},{"line_number":96,"context_line":"        port_dict \u003d dhcp.DictModel({\"id\": port_id,"},{"line_number":97,"context_line":"                            \"name\": \"foo\","}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_2784b35c","line":94,"in_reply_to":"3a961159_2c322410","updated":"2014-12-24 15:32:32.000000000","message":"Done","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"6f72175a75be6b1f55ededdc39c6ffd63078ad29","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                            \"device_id\": device_id,"},{"line_number":102,"context_line":"                            \"device_owner\": \"foo\","},{"line_number":103,"context_line":"                            \"fixed_ips\": [{\"subnet_id\": sn_id,"},{"line_number":104,"context_line":"                                            \"ip_address\":"},{"line_number":105,"context_line":"                                           self._IP_ADDRS[ip_v][\u0027addr\u0027]}]})"},{"line_number":106,"context_line":"        return port_dict"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_ec7d7cb3","line":104,"updated":"2014-12-21 08:43:32.000000000","message":"nit: there seems to be an extra space before the ip_address key above.","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"63a828242a84738bc9565e6658db4395ea2e8171","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                            \"device_id\": device_id,"},{"line_number":102,"context_line":"                            \"device_owner\": \"foo\","},{"line_number":103,"context_line":"                            \"fixed_ips\": [{\"subnet_id\": sn_id,"},{"line_number":104,"context_line":"                                            \"ip_address\":"},{"line_number":105,"context_line":"                                           self._IP_ADDRS[ip_v][\u0027addr\u0027]}]})"},{"line_number":106,"context_line":"        return port_dict"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_c7920f9e","line":104,"in_reply_to":"3a961159_ec7d7cb3","updated":"2014-12-24 15:32:32.000000000","message":"not sure if this is a gerrit formatting thing or if i already fixed it here - but in local copy looks ok - let\u0027s see on v.next","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"6245f63c670ccab1c796bd5d3fe48618e190bfdc","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        expected_alloc \u003d {}"},{"line_number":148,"context_line":"        for port in network.ports:"},{"line_number":149,"context_line":"            ip \u003d port.fixed_ips[0].ip_address"},{"line_number":150,"context_line":"            expected_alloc[port.mac_address] \u003d port.fixed_ips[0].ip_address"},{"line_number":151,"context_line":"        if expected_alloc:"},{"line_number":152,"context_line":"            host_allocs \u003d {}"},{"line_number":153,"context_line":"            host_file \u003d open(dhcp_driver.get_conf_file_name(\u0027host\u0027))"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_c8e9d01b","line":150,"updated":"2014-12-18 10:41:39.000000000","message":"nit duplicate here ^^^","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"63a828242a84738bc9565e6658db4395ea2e8171","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        expected_alloc \u003d {}"},{"line_number":148,"context_line":"        for port in network.ports:"},{"line_number":149,"context_line":"            ip \u003d port.fixed_ips[0].ip_address"},{"line_number":150,"context_line":"            expected_alloc[port.mac_address] \u003d port.fixed_ips[0].ip_address"},{"line_number":151,"context_line":"        if expected_alloc:"},{"line_number":152,"context_line":"            host_allocs \u003d {}"},{"line_number":153,"context_line":"            host_file \u003d open(dhcp_driver.get_conf_file_name(\u0027host\u0027))"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_47ee1f23","line":150,"in_reply_to":"3a961159_c8e9d01b","updated":"2014-12-24 15:32:32.000000000","message":"Done","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"6f72175a75be6b1f55ededdc39c6ffd63078ad29","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        for port in network.ports:"},{"line_number":149,"context_line":"            ip \u003d port.fixed_ips[0].ip_address"},{"line_number":150,"context_line":"            expected_alloc[port.mac_address] \u003d port.fixed_ips[0].ip_address"},{"line_number":151,"context_line":"        if expected_alloc:"},{"line_number":152,"context_line":"            host_allocs \u003d {}"},{"line_number":153,"context_line":"            host_file \u003d open(dhcp_driver.get_conf_file_name(\u0027host\u0027))"},{"line_number":154,"context_line":"            host_lines \u003d host_file.readlines()"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_ec2bbc92","line":151,"updated":"2014-12-21 08:43:32.000000000","message":"I think that the logic relating to reading and parsing the host file should have its own function.","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"63a828242a84738bc9565e6658db4395ea2e8171","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        for port in network.ports:"},{"line_number":149,"context_line":"            ip \u003d port.fixed_ips[0].ip_address"},{"line_number":150,"context_line":"            expected_alloc[port.mac_address] \u003d port.fixed_ips[0].ip_address"},{"line_number":151,"context_line":"        if expected_alloc:"},{"line_number":152,"context_line":"            host_allocs \u003d {}"},{"line_number":153,"context_line":"            host_file \u003d open(dhcp_driver.get_conf_file_name(\u0027host\u0027))"},{"line_number":154,"context_line":"            host_lines \u003d host_file.readlines()"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_279753ed","line":151,"in_reply_to":"3a961159_ec2bbc92","updated":"2014-12-24 15:32:32.000000000","message":"Done","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"6f72175a75be6b1f55ededdc39c6ffd63078ad29","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            host_file \u003d open(dhcp_driver.get_conf_file_name(\u0027host\u0027))"},{"line_number":154,"context_line":"            host_lines \u003d host_file.readlines()"},{"line_number":155,"context_line":"            for line in host_lines:"},{"line_number":156,"context_line":"                tokens \u003d line.split(\u0027,\u0027)"},{"line_number":157,"context_line":"                if network.subnets[0].ip_version \u003d\u003d 6:"},{"line_number":158,"context_line":"                    ip \u003d tokens[2].rstrip().replace(\u0027[\u0027, \u0027\u0027)"},{"line_number":159,"context_line":"                    host_allocs[tokens[0]] \u003d ip.replace(\u0027]\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_6c38acee","line":156,"updated":"2014-12-21 08:43:32.000000000","message":"How about this?\n\n ip \u003d tokens[2].rstrip()\n if network.subnets[0].ip_version \u003d\u003d 6:\n     ip \u003d ip.replace(\u0027[\u0027, \u0027\u0027).replace(\u0027]\u0027, \u0027\u0027)\n host_allocs[tokens[0]] \u003d ip","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"63a828242a84738bc9565e6658db4395ea2e8171","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            host_file \u003d open(dhcp_driver.get_conf_file_name(\u0027host\u0027))"},{"line_number":154,"context_line":"            host_lines \u003d host_file.readlines()"},{"line_number":155,"context_line":"            for line in host_lines:"},{"line_number":156,"context_line":"                tokens \u003d line.split(\u0027,\u0027)"},{"line_number":157,"context_line":"                if network.subnets[0].ip_version \u003d\u003d 6:"},{"line_number":158,"context_line":"                    ip \u003d tokens[2].rstrip().replace(\u0027[\u0027, \u0027\u0027)"},{"line_number":159,"context_line":"                    host_allocs[tokens[0]] \u003d ip.replace(\u0027]\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_6756bbcf","line":156,"in_reply_to":"3a961159_6c38acee","updated":"2014-12-24 15:32:32.000000000","message":"like it thanks","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"6f72175a75be6b1f55ededdc39c6ffd63078ad29","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            self.assert_allocations(network)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def test_create_subnet_with_dhcp(self):"},{"line_number":179,"context_line":"        for _ip_v in [4, 6]:"},{"line_number":180,"context_line":"            network \u003d self.network_dict_for_dhcp(enable_dhcp\u003dTrue, ip_v\u003d_ip_v)"},{"line_number":181,"context_line":"            self._assert_dhcp_resources(network)"},{"line_number":182,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_0c29e89a","line":179,"updated":"2014-12-21 08:43:32.000000000","message":"How about renaming \u0027_ip_v\u0027 to \u0027version\u0027?","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"63a828242a84738bc9565e6658db4395ea2e8171","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            self.assert_allocations(network)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def test_create_subnet_with_dhcp(self):"},{"line_number":179,"context_line":"        for _ip_v in [4, 6]:"},{"line_number":180,"context_line":"            network \u003d self.network_dict_for_dhcp(enable_dhcp\u003dTrue, ip_v\u003d_ip_v)"},{"line_number":181,"context_line":"            self._assert_dhcp_resources(network)"},{"line_number":182,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_25bcabdb","line":179,"in_reply_to":"3a961159_0c29e89a","updated":"2014-12-24 15:32:32.000000000","message":"like it thx","commit_id":"88c5fd86b39ddf8fcd8a5741c177abaaec7617fe"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"7b59f7ba7061eeb9edf79e91284c708a8908a41d","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        host_file \u003d open(dhcp_driver.get_conf_file_name(\u0027host\u0027))"},{"line_number":103,"context_line":"        host_lines \u003d host_file.readlines()"},{"line_number":104,"context_line":"        for line in host_lines:"},{"line_number":105,"context_line":"            tokens \u003d line.split(\u0027,\u0027)"},{"line_number":106,"context_line":"            ip \u003d tokens[2].rstrip()"},{"line_number":107,"context_line":"            if network.subnets[0].ip_version \u003d\u003d 6:"},{"line_number":108,"context_line":"                ip \u003d ip.replace(\u0027[\u0027, \u0027\u0027).replace(\u0027]\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_dbbbbf0d","line":105,"updated":"2014-12-25 07:46:30.000000000","message":"Looking at this again, I think that the format of the file is known, so we know exactly how any \",\" there are in the file. In this case, this might be better:\n\n x, y, ip \u003d line.split(\u0027,\u0027)\n ip \u003d ip.rstrip()\n ...\n\nNot sure though, but might worth looking in to.","commit_id":"796b3e60ed057f6f213ef6104a11ee8347ab4681"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"5847fd4c7bfcd397d57cf659c5a3baeb3f92feb5","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        host_file \u003d open(dhcp_driver.get_conf_file_name(\u0027host\u0027))"},{"line_number":103,"context_line":"        host_lines \u003d host_file.readlines()"},{"line_number":104,"context_line":"        for line in host_lines:"},{"line_number":105,"context_line":"            tokens \u003d line.split(\u0027,\u0027)"},{"line_number":106,"context_line":"            ip \u003d tokens[2].rstrip()"},{"line_number":107,"context_line":"            if network.subnets[0].ip_version \u003d\u003d 6:"},{"line_number":108,"context_line":"                ip \u003d ip.replace(\u0027[\u0027, \u0027\u0027).replace(\u0027]\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_7a5d4215","line":105,"in_reply_to":"3a961159_0646ce4f","updated":"2014-12-29 13:15:59.000000000","message":"Thanks John and Hirofumi - have used John\u0027s suggestion and added a with open to ensure a safer close of the file","commit_id":"796b3e60ed057f6f213ef6104a11ee8347ab4681"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"06253972058b26da9b5886f4ef11f309cdb17dfc","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        host_file \u003d open(dhcp_driver.get_conf_file_name(\u0027host\u0027))"},{"line_number":103,"context_line":"        host_lines \u003d host_file.readlines()"},{"line_number":104,"context_line":"        for line in host_lines:"},{"line_number":105,"context_line":"            tokens \u003d line.split(\u0027,\u0027)"},{"line_number":106,"context_line":"            ip \u003d tokens[2].rstrip()"},{"line_number":107,"context_line":"            if network.subnets[0].ip_version \u003d\u003d 6:"},{"line_number":108,"context_line":"                ip \u003d ip.replace(\u0027[\u0027, \u0027\u0027).replace(\u0027]\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_0646ce4f","line":105,"in_reply_to":"3a961159_dbbbbf0d","updated":"2014-12-25 08:57:05.000000000","message":"I agree John. What tokens[0], tokens[2] points is difficult to understand.","commit_id":"796b3e60ed057f6f213ef6104a11ee8347ab4681"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"ece9641c8a5c3b149eaee20316cb7359299c1b6a","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        host_allocations \u003d {}"},{"line_number":102,"context_line":"        with open(dhcp_driver.get_conf_file_name(\u0027host\u0027)) as host_file:"},{"line_number":103,"context_line":"            for line in host_file.readlines():"},{"line_number":104,"context_line":"                _mac, _hostname, _ip \u003d line.split(\u0027,\u0027)"},{"line_number":105,"context_line":"                _ip \u003d _ip.rstrip()"},{"line_number":106,"context_line":"                if network.subnets[0].ip_version \u003d\u003d 6:"},{"line_number":107,"context_line":"                    _ip \u003d _ip.replace(\u0027[\u0027, \u0027\u0027).replace(\u0027]\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_5cb4f7d0","line":104,"updated":"2014-12-30 07:05:18.000000000","message":"nit: no need to add a \u0027_\u0027 prefix before these variables. Specifically \u0027ip\u0027 and \u0027mac\u0027 are used afterwards so you probably don\u0027t want to add \u0027_\u0027 before them. Maybe this will look and will convey the intention better:\n\n mac, _, ip \u003d line.split(\u0027,\u0027)\n # ...","commit_id":"2cdfdf136588df9ce14161aa3c07a3a542c2248d"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"daa3a5932f9a710c1297d383e50c4e0d307ad774","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        host_allocations \u003d {}"},{"line_number":102,"context_line":"        with open(dhcp_driver.get_conf_file_name(\u0027host\u0027)) as host_file:"},{"line_number":103,"context_line":"            for line in host_file.readlines():"},{"line_number":104,"context_line":"                _mac, _hostname, _ip \u003d line.split(\u0027,\u0027)"},{"line_number":105,"context_line":"                _ip \u003d _ip.rstrip()"},{"line_number":106,"context_line":"                if network.subnets[0].ip_version \u003d\u003d 6:"},{"line_number":107,"context_line":"                    _ip \u003d _ip.replace(\u0027[\u0027, \u0027\u0027).replace(\u0027]\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_64d2f25c","line":104,"in_reply_to":"3a961159_5cb4f7d0","updated":"2014-12-30 14:55:51.000000000","message":"Done","commit_id":"2cdfdf136588df9ce14161aa3c07a3a542c2248d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"6f5659160a23651e32b3fab48ed879c03a56351b","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        if network[\u0027subnets\u0027][0][\u0027enable_dhcp\u0027]:"},{"line_number":82,"context_line":"            self.cleanup_networks.append(network)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def assert_dhcp_namespace(self, namespace, enable_dhcp\u003dTrue):"},{"line_number":85,"context_line":"        ip \u003d ip_lib.IPWrapper(self.root_helper, namespace)"},{"line_number":86,"context_line":"        self.assertEqual(enable_dhcp, ip.netns.exists(namespace))"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_f38222a4","line":84,"updated":"2014-12-30 19:49:20.000000000","message":"no need to set a default value for enable_dhcp, it\u0027s never used","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5a59e1ae1c15ce727f0404f2f7d03b68dc728519","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        if network[\u0027subnets\u0027][0][\u0027enable_dhcp\u0027]:"},{"line_number":82,"context_line":"            self.cleanup_networks.append(network)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def assert_dhcp_namespace(self, namespace, enable_dhcp\u003dTrue):"},{"line_number":85,"context_line":"        ip \u003d ip_lib.IPWrapper(self.root_helper, namespace)"},{"line_number":86,"context_line":"        self.assertEqual(enable_dhcp, ip.netns.exists(namespace))"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_d18ee931","line":84,"in_reply_to":"3a961159_5c085b28","updated":"2015-01-02 11:56:08.000000000","message":"I agree Cedric here.\nI would let the enable_dhcp argument go away now for simplicity. It looks equally meaningful (even more) to me to just do self.assertTrue(ip.netns.exists(namespace))","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"31e198b35b158a8a4d5c1348feef4c18d3961edc","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        if network[\u0027subnets\u0027][0][\u0027enable_dhcp\u0027]:"},{"line_number":82,"context_line":"            self.cleanup_networks.append(network)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def assert_dhcp_namespace(self, namespace, enable_dhcp\u003dTrue):"},{"line_number":85,"context_line":"        ip \u003d ip_lib.IPWrapper(self.root_helper, namespace)"},{"line_number":86,"context_line":"        self.assertEqual(enable_dhcp, ip.netns.exists(namespace))"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_f4b57a7e","line":84,"in_reply_to":"3a961159_d18ee931","updated":"2015-01-05 13:09:26.000000000","message":"OK, removed the default for enable_dhcp. Miguel - actually it depends on whether enable_dhcp is True or not (i.e. would need an if.. else and have a corresponding self.assertFalse)","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"11dfa06b0cda9ab4f3250337c89af82559cd85a8","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        if network[\u0027subnets\u0027][0][\u0027enable_dhcp\u0027]:"},{"line_number":82,"context_line":"            self.cleanup_networks.append(network)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def assert_dhcp_namespace(self, namespace, enable_dhcp\u003dTrue):"},{"line_number":85,"context_line":"        ip \u003d ip_lib.IPWrapper(self.root_helper, namespace)"},{"line_number":86,"context_line":"        self.assertEqual(enable_dhcp, ip.netns.exists(namespace))"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_5c085b28","line":84,"in_reply_to":"3a961159_f38222a4","updated":"2014-12-31 14:01:17.000000000","message":"if you mean there are no invocations of \u0027assert_dhcp_namespace\u0027 where the enable_dhcp parameter is omitted, indeed this is the case (wasn\u0027t so initially but added explicit values for clarity). I can remove them but imo this removes from the clarity here, given the assertEqual that follows (in all cases you point out below). If you feel really strongly about that then I can remove them.","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"6f5659160a23651e32b3fab48ed879c03a56351b","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        ip \u003d ip_lib.IPWrapper(self.root_helper, namespace)"},{"line_number":86,"context_line":"        self.assertEqual(enable_dhcp, ip.netns.exists(namespace))"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def assert_dhcp_device(self, namespace, dhcp_iface_name, enable_dhcp\u003dTrue):"},{"line_number":89,"context_line":"        dev \u003d ip_lib.IPDevice(dhcp_iface_name, self.root_helper, namespace)"},{"line_number":90,"context_line":"        self.assertEqual(enable_dhcp, ip_lib.device_exists(dhcp_iface_name,"},{"line_number":91,"context_line":"                                                self.root_helper, namespace))"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_13924ef6","line":88,"updated":"2014-12-30 19:49:20.000000000","message":"itto","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"11dfa06b0cda9ab4f3250337c89af82559cd85a8","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        ip \u003d ip_lib.IPWrapper(self.root_helper, namespace)"},{"line_number":86,"context_line":"        self.assertEqual(enable_dhcp, ip.netns.exists(namespace))"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def assert_dhcp_device(self, namespace, dhcp_iface_name, enable_dhcp\u003dTrue):"},{"line_number":89,"context_line":"        dev \u003d ip_lib.IPDevice(dhcp_iface_name, self.root_helper, namespace)"},{"line_number":90,"context_line":"        self.assertEqual(enable_dhcp, ip_lib.device_exists(dhcp_iface_name,"},{"line_number":91,"context_line":"                                                self.root_helper, namespace))"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_7c0b5724","line":88,"in_reply_to":"3a961159_13924ef6","updated":"2014-12-31 14:01:17.000000000","message":"see above","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5a59e1ae1c15ce727f0404f2f7d03b68dc728519","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        ip \u003d ip_lib.IPWrapper(self.root_helper, namespace)"},{"line_number":86,"context_line":"        self.assertEqual(enable_dhcp, ip.netns.exists(namespace))"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def assert_dhcp_device(self, namespace, dhcp_iface_name, enable_dhcp\u003dTrue):"},{"line_number":89,"context_line":"        dev \u003d ip_lib.IPDevice(dhcp_iface_name, self.root_helper, namespace)"},{"line_number":90,"context_line":"        self.assertEqual(enable_dhcp, ip_lib.device_exists(dhcp_iface_name,"},{"line_number":91,"context_line":"                                                self.root_helper, namespace))"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_f19da567","line":88,"in_reply_to":"3a961159_7c0b5724","updated":"2015-01-02 11:56:08.000000000","message":"same here.","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"31e198b35b158a8a4d5c1348feef4c18d3961edc","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        ip \u003d ip_lib.IPWrapper(self.root_helper, namespace)"},{"line_number":86,"context_line":"        self.assertEqual(enable_dhcp, ip.netns.exists(namespace))"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def assert_dhcp_device(self, namespace, dhcp_iface_name, enable_dhcp\u003dTrue):"},{"line_number":89,"context_line":"        dev \u003d ip_lib.IPDevice(dhcp_iface_name, self.root_helper, namespace)"},{"line_number":90,"context_line":"        self.assertEqual(enable_dhcp, ip_lib.device_exists(dhcp_iface_name,"},{"line_number":91,"context_line":"                                                self.root_helper, namespace))"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_54aace1a","line":88,"in_reply_to":"3a961159_f19da567","updated":"2015-01-05 13:09:26.000000000","message":"Done","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"6f5659160a23651e32b3fab48ed879c03a56351b","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        if enable_dhcp:"},{"line_number":93,"context_line":"            self.assertEqual(self.test_utils._MAC_ADDRESS, dev.link.address)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def assert_ovs_port(self, iface_name, enable_dhcp\u003dTrue):"},{"line_number":96,"context_line":"        self.assertEqual(enable_dhcp, self.ovs.port_exists(iface_name))"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def _get_host_allocations(self, network):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_338d8ad4","line":95,"updated":"2014-12-30 19:49:20.000000000","message":"ditto","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"11dfa06b0cda9ab4f3250337c89af82559cd85a8","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        if enable_dhcp:"},{"line_number":93,"context_line":"            self.assertEqual(self.test_utils._MAC_ADDRESS, dev.link.address)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def assert_ovs_port(self, iface_name, enable_dhcp\u003dTrue):"},{"line_number":96,"context_line":"        self.assertEqual(enable_dhcp, self.ovs.port_exists(iface_name))"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def _get_host_allocations(self, network):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_9c11e355","line":95,"in_reply_to":"3a961159_338d8ad4","updated":"2014-12-31 14:01:17.000000000","message":"see above","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"31e198b35b158a8a4d5c1348feef4c18d3961edc","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        if enable_dhcp:"},{"line_number":93,"context_line":"            self.assertEqual(self.test_utils._MAC_ADDRESS, dev.link.address)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def assert_ovs_port(self, iface_name, enable_dhcp\u003dTrue):"},{"line_number":96,"context_line":"        self.assertEqual(enable_dhcp, self.ovs.port_exists(iface_name))"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def _get_host_allocations(self, network):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_74a98a23","line":95,"in_reply_to":"3a961159_518af91a","updated":"2015-01-05 13:09:26.000000000","message":"Done","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5a59e1ae1c15ce727f0404f2f7d03b68dc728519","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        if enable_dhcp:"},{"line_number":93,"context_line":"            self.assertEqual(self.test_utils._MAC_ADDRESS, dev.link.address)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def assert_ovs_port(self, iface_name, enable_dhcp\u003dTrue):"},{"line_number":96,"context_line":"        self.assertEqual(enable_dhcp, self.ovs.port_exists(iface_name))"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def _get_host_allocations(self, network):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_518af91a","line":95,"in_reply_to":"3a961159_9c11e355","updated":"2015-01-02 11:56:08.000000000","message":":)","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"6f5659160a23651e32b3fab48ed879c03a56351b","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                host_allocations[mac] \u003d ip"},{"line_number":109,"context_line":"        return host_allocations"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def assert_allocations(self, network):"},{"line_number":112,"context_line":"        expected_allocations \u003d {}"},{"line_number":113,"context_line":"        for port in network.ports:"},{"line_number":114,"context_line":"            ip \u003d port.fixed_ips[0].ip_address"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_5349368d","line":111,"updated":"2014-12-30 19:49:20.000000000","message":"Do we need a functional test to check such assertion?","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"11dfa06b0cda9ab4f3250337c89af82559cd85a8","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                host_allocations[mac] \u003d ip"},{"line_number":109,"context_line":"        return host_allocations"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def assert_allocations(self, network):"},{"line_number":112,"context_line":"        expected_allocations \u003d {}"},{"line_number":113,"context_line":"        for port in network.ports:"},{"line_number":114,"context_line":"            ip \u003d port.fixed_ips[0].ip_address"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_dc1b6b71","line":111,"in_reply_to":"3a961159_5349368d","updated":"2014-12-31 14:01:17.000000000","message":"sorry but I am not quite following here. Is there something wrong with the way the test is written? Do you object to reading the host file, or the way I check that dnsmasq has made appropriate allocations for given mac addresses?","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5a59e1ae1c15ce727f0404f2f7d03b68dc728519","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                host_allocations[mac] \u003d ip"},{"line_number":109,"context_line":"        return host_allocations"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def assert_allocations(self, network):"},{"line_number":112,"context_line":"        expected_allocations \u003d {}"},{"line_number":113,"context_line":"        for port in network.ports:"},{"line_number":114,"context_line":"            ip \u003d port.fixed_ips[0].ip_address"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_f1abe572","line":111,"in_reply_to":"3a961159_bce05ff9","updated":"2015-01-02 11:56:08.000000000","message":"And we are using specific dnsmasq driver knowledge from which we may want to isolate if we ever have another dhcp driver (openflow based, for example).\n\nI would consider this functional only if your _get_host_allocations went over the available MACs low level requesting DHCP on the network.","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"fe1aa1ee6448d333e562f5ababf47e0981348de9","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                host_allocations[mac] \u003d ip"},{"line_number":109,"context_line":"        return host_allocations"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def assert_allocations(self, network):"},{"line_number":112,"context_line":"        expected_allocations \u003d {}"},{"line_number":113,"context_line":"        for port in network.ports:"},{"line_number":114,"context_line":"            ip \u003d port.fixed_ips[0].ip_address"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_bce05ff9","line":111,"in_reply_to":"3a961159_dc1b6b71","updated":"2014-12-31 14:33:06.000000000","message":"it seems assert_allocations could be done in a unit test without a real environment (perhaps already done in neutron.tests.unit.test_dhcp* or neutron.tests.unit.linux.*). \n\nimo, it\u0027s confusing to perform such tests in functional tests part as it\u0027s not a really functional test (integration with dnsmasq is not tested).\n\nmoreover unit testing are normally \"cheaper\" to code and maintain than functional ones","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"67090f477c05fe8967d2a4ba572ca8953e0ac20f","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"class DHCPAgentOVSTestCase(DHCPAgentOVSTestFramework):"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def _assert_dhcp_resources(self, network):"},{"line_number":124,"context_line":"        enable_dhcp \u003d network[\u0027subnets\u0027][0][\u0027enable_dhcp\u0027]"},{"line_number":125,"context_line":"        port \u003d network.ports[0]"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_eac1394f","line":122,"updated":"2014-12-31 18:12:49.000000000","message":"self._configure_dhcp_for_network(network) should be moved to be outside of this function. I would expect intuitively for the test_create_subnet_with_dhcp test to create the network dict, configure it, then assert stuff.","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"31e198b35b158a8a4d5c1348feef4c18d3961edc","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"class DHCPAgentOVSTestCase(DHCPAgentOVSTestFramework):"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def _assert_dhcp_resources(self, network):"},{"line_number":124,"context_line":"        enable_dhcp \u003d network[\u0027subnets\u0027][0][\u0027enable_dhcp\u0027]"},{"line_number":125,"context_line":"        port \u003d network.ports[0]"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_ef0e87e4","line":122,"in_reply_to":"3a961159_eac1394f","updated":"2015-01-05 13:09:26.000000000","message":"Done","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"6f5659160a23651e32b3fab48ed879c03a56351b","unresolved":false,"context_lines":[{"line_number":121,"context_line":"class DHCPAgentOVSTestCase(DHCPAgentOVSTestFramework):"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def _assert_dhcp_resources(self, network):"},{"line_number":124,"context_line":"        enable_dhcp \u003d network[\u0027subnets\u0027][0][\u0027enable_dhcp\u0027]"},{"line_number":125,"context_line":"        port \u003d network.ports[0]"},{"line_number":126,"context_line":"        iface_name \u003d self.test_utils.get_interface_name(network, port)"},{"line_number":127,"context_line":"        self._configure_dhcp_for_network(network)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_939e3e06","line":124,"updated":"2014-12-30 19:49:20.000000000","message":"enable_dhcp should be provided as an argument not deduced from the \"observed\" network.","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"31e198b35b158a8a4d5c1348feef4c18d3961edc","unresolved":false,"context_lines":[{"line_number":121,"context_line":"class DHCPAgentOVSTestCase(DHCPAgentOVSTestFramework):"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def _assert_dhcp_resources(self, network):"},{"line_number":124,"context_line":"        enable_dhcp \u003d network[\u0027subnets\u0027][0][\u0027enable_dhcp\u0027]"},{"line_number":125,"context_line":"        port \u003d network.ports[0]"},{"line_number":126,"context_line":"        iface_name \u003d self.test_utils.get_interface_name(network, port)"},{"line_number":127,"context_line":"        self._configure_dhcp_for_network(network)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_0f12f308","line":124,"in_reply_to":"3a961159_2aa341b2","updated":"2015-01-05 13:09:26.000000000","message":"Done","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"11dfa06b0cda9ab4f3250337c89af82559cd85a8","unresolved":false,"context_lines":[{"line_number":121,"context_line":"class DHCPAgentOVSTestCase(DHCPAgentOVSTestFramework):"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def _assert_dhcp_resources(self, network):"},{"line_number":124,"context_line":"        enable_dhcp \u003d network[\u0027subnets\u0027][0][\u0027enable_dhcp\u0027]"},{"line_number":125,"context_line":"        port \u003d network.ports[0]"},{"line_number":126,"context_line":"        iface_name \u003d self.test_utils.get_interface_name(network, port)"},{"line_number":127,"context_line":"        self._configure_dhcp_for_network(network)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_f9511931","line":124,"in_reply_to":"3a961159_939e3e06","updated":"2014-12-31 14:01:17.000000000","message":"why do you think it is better that way? imo it is better to deduce the state from the network for which we are indeed making all the following checks.","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"67090f477c05fe8967d2a4ba572ca8953e0ac20f","unresolved":false,"context_lines":[{"line_number":121,"context_line":"class DHCPAgentOVSTestCase(DHCPAgentOVSTestFramework):"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def _assert_dhcp_resources(self, network):"},{"line_number":124,"context_line":"        enable_dhcp \u003d network[\u0027subnets\u0027][0][\u0027enable_dhcp\u0027]"},{"line_number":125,"context_line":"        port \u003d network.ports[0]"},{"line_number":126,"context_line":"        iface_name \u003d self.test_utils.get_interface_name(network, port)"},{"line_number":127,"context_line":"        self._configure_dhcp_for_network(network)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_2aa341b2","line":124,"in_reply_to":"3a961159_9ccc838c","updated":"2014-12-31 18:12:49.000000000","message":"I agree with Cedric, enable_dhcp should be an explicit argument.","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"fe1aa1ee6448d333e562f5ababf47e0981348de9","unresolved":false,"context_lines":[{"line_number":121,"context_line":"class DHCPAgentOVSTestCase(DHCPAgentOVSTestFramework):"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def _assert_dhcp_resources(self, network):"},{"line_number":124,"context_line":"        enable_dhcp \u003d network[\u0027subnets\u0027][0][\u0027enable_dhcp\u0027]"},{"line_number":125,"context_line":"        port \u003d network.ports[0]"},{"line_number":126,"context_line":"        iface_name \u003d self.test_utils.get_interface_name(network, port)"},{"line_number":127,"context_line":"        self._configure_dhcp_for_network(network)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_9ccc838c","line":124,"in_reply_to":"3a961159_f9511931","updated":"2014-12-31 14:33:06.000000000","message":"L136 and L142 define enable_dhcp value, L124 deduces it from network but nothing ensures (except tested implementation) enable_dhcp value in L124 corresponds to the value defined in L136/142","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"6f5659160a23651e32b3fab48ed879c03a56351b","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        self._configure_dhcp_for_network(network)"},{"line_number":128,"context_line":"        self.assert_ovs_port(iface_name, enable_dhcp)"},{"line_number":129,"context_line":"        self.assert_dhcp_namespace(network.namespace, enable_dhcp)"},{"line_number":130,"context_line":"        self.assert_dhcp_device(network.namespace, iface_name, enable_dhcp)"},{"line_number":131,"context_line":"        if enable_dhcp:"},{"line_number":132,"context_line":"            self.assert_allocations(network)"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_33a4aa4a","line":130,"updated":"2014-12-30 19:49:20.000000000","message":"It seems dnsmasq startup is not tested?","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"11dfa06b0cda9ab4f3250337c89af82559cd85a8","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        self._configure_dhcp_for_network(network)"},{"line_number":128,"context_line":"        self.assert_ovs_port(iface_name, enable_dhcp)"},{"line_number":129,"context_line":"        self.assert_dhcp_namespace(network.namespace, enable_dhcp)"},{"line_number":130,"context_line":"        self.assert_dhcp_device(network.namespace, iface_name, enable_dhcp)"},{"line_number":131,"context_line":"        if enable_dhcp:"},{"line_number":132,"context_line":"            self.assert_allocations(network)"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_391ac17c","line":130,"in_reply_to":"3a961159_33a4aa4a","updated":"2014-12-31 14:01:17.000000000","message":"not sure what you mean here?  The dnsmasq process is indeed spawned after _configure_dhcp_for_network (depending on whether the network subnet has dhcp enabled or not). Or do you mean I should add something like \u0027ps ax | grep dnsmasq\u0027 to make sure it was spawned correctly (though this latter part is implicitly tested by asserting the allocations, when we read the host file).","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"fe1aa1ee6448d333e562f5ababf47e0981348de9","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        self._configure_dhcp_for_network(network)"},{"line_number":128,"context_line":"        self.assert_ovs_port(iface_name, enable_dhcp)"},{"line_number":129,"context_line":"        self.assert_dhcp_namespace(network.namespace, enable_dhcp)"},{"line_number":130,"context_line":"        self.assert_dhcp_device(network.namespace, iface_name, enable_dhcp)"},{"line_number":131,"context_line":"        if enable_dhcp:"},{"line_number":132,"context_line":"            self.assert_allocations(network)"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_3ca38fb2","line":130,"in_reply_to":"3a961159_391ac17c","updated":"2014-12-31 14:33:06.000000000","message":"\"though this latter part is implicitly tested by asserting the allocations, when we read the host file\"\n\niiuc, nothing ensures dnsmasq is started if assert_allocation succeed, it only ensures host_opts file is populated.","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5a59e1ae1c15ce727f0404f2f7d03b68dc728519","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        self._configure_dhcp_for_network(network)"},{"line_number":128,"context_line":"        self.assert_ovs_port(iface_name, enable_dhcp)"},{"line_number":129,"context_line":"        self.assert_dhcp_namespace(network.namespace, enable_dhcp)"},{"line_number":130,"context_line":"        self.assert_dhcp_device(network.namespace, iface_name, enable_dhcp)"},{"line_number":131,"context_line":"        if enable_dhcp:"},{"line_number":132,"context_line":"            self.assert_allocations(network)"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_71aff57d","line":130,"in_reply_to":"3a961159_3ca38fb2","updated":"2015-01-02 11:56:08.000000000","message":"hint: I would look on the external process .active or driver .active which will go over /proc/\u003cPID\u003e/cmdline and make sure it\u0027s your dnsmasq on the give network UUID.","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"67090f477c05fe8967d2a4ba572ca8953e0ac20f","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            network \u003d self.network_dict_for_dhcp(enable_dhcp\u003dFalse,"},{"line_number":143,"context_line":"                ip_v\u003dversion)"},{"line_number":144,"context_line":"            self._assert_dhcp_resources(network)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def test_new_address_allocation(self):"},{"line_number":147,"context_line":"        network \u003d self.network_dict_for_dhcp()"},{"line_number":148,"context_line":"        self._configure_dhcp_for_network(network)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_ca9d5d68","line":145,"updated":"2014-12-31 18:12:49.000000000","message":"I would add a test that sends a DHCP request with a certain MAC address and waits until it gets the expected IP address. You could use something similar to what Cedric did with the FakeVM patch, but I don\u0027t think you should depend on it.","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5a59e1ae1c15ce727f0404f2f7d03b68dc728519","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            network \u003d self.network_dict_for_dhcp(enable_dhcp\u003dFalse,"},{"line_number":143,"context_line":"                ip_v\u003dversion)"},{"line_number":144,"context_line":"            self._assert_dhcp_resources(network)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def test_new_address_allocation(self):"},{"line_number":147,"context_line":"        network \u003d self.network_dict_for_dhcp()"},{"line_number":148,"context_line":"        self._configure_dhcp_for_network(network)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_d1c34937","line":145,"in_reply_to":"3a961159_ca9d5d68","updated":"2015-01-02 11:56:08.000000000","message":"I agree (See my comments on L111)","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 Red Hat, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_54c44491","line":1,"updated":"2015-01-15 23:14:45.000000000","message":"(nit) \n\nq: how do you know your change has been in review too long?  \n\na: when you have to update the copyright year of your patch additions.","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"f3a3350f27794fa740e5da4ee2af9ebbece90547","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 Red Hat, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_dd95b7e4","line":1,"in_reply_to":"3a961159_54c44491","updated":"2015-01-15 23:28:42.000000000","message":"lol","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 Red Hat, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_b8e9791c","line":1,"in_reply_to":"3a961159_dd95b7e4","updated":"2015-01-21 17:43:17.000000000","message":"Done","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import fixtures"},{"line_number":17,"context_line":"import netaddr"},{"line_number":18,"context_line":"import os"},{"line_number":19,"context_line":"from oslo.config import cfg"},{"line_number":20,"context_line":"import stat"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_b459e82a","line":18,"updated":"2015-01-15 23:14:45.000000000","message":"(nit) this is a stdlib import","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import fixtures"},{"line_number":17,"context_line":"import netaddr"},{"line_number":18,"context_line":"import os"},{"line_number":19,"context_line":"from oslo.config import cfg"},{"line_number":20,"context_line":"import stat"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_581df50e","line":18,"in_reply_to":"3a961159_b459e82a","updated":"2015-01-21 17:43:17.000000000","message":"Done","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import netaddr"},{"line_number":18,"context_line":"import os"},{"line_number":19,"context_line":"from oslo.config import cfg"},{"line_number":20,"context_line":"import stat"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from neutron.agent.common import config"},{"line_number":23,"context_line":"from neutron.agent import dhcp_agent"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_d49bd4c6","line":20,"updated":"2015-01-15 23:14:45.000000000","message":"(nit) this is a stdlib import","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import netaddr"},{"line_number":18,"context_line":"import os"},{"line_number":19,"context_line":"from oslo.config import cfg"},{"line_number":20,"context_line":"import stat"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from neutron.agent.common import config"},{"line_number":23,"context_line":"from neutron.agent import dhcp_agent"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_781ab118","line":20,"in_reply_to":"3a961159_d49bd4c6","updated":"2015-01-21 17:43:17.000000000","message":"Done","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class DHCPAgentOVSTestFramework(base.BaseOVSLinuxTestCase):"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    _TEST_MAC \u003d \"24:77:03:7d:00:4d\""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def setUp(self):"},{"line_number":36,"context_line":"        super(DHCPAgentOVSTestFramework, self).setUp()"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_1ddadf4a","line":33,"updated":"2015-01-15 23:14:45.000000000","message":"Consider dynamically deriving non-conflicting mac addresses rather than hard-coding them (here and in testutils) - see\nAssaf\u0027s example as to how: https://review.openstack.org/#/c/142843/6/neutron/tests/unit/test_l3_agent.py","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class DHCPAgentOVSTestFramework(base.BaseOVSLinuxTestCase):"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    _TEST_MAC \u003d \"24:77:03:7d:00:4d\""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def setUp(self):"},{"line_number":36,"context_line":"        super(DHCPAgentOVSTestFramework, self).setUp()"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_43b0aa8b","line":33,"in_reply_to":"3a961159_1ddadf4a","updated":"2015-01-21 17:43:17.000000000","message":"Done","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        self.cleanup_networks \u003d []"},{"line_number":38,"context_line":"        self._configure()"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    # need to make sure ports \u0026 namespaces are gone, before super teardown"},{"line_number":41,"context_line":"    # kills the integration bridge. Any addCleanup methods are invoked"},{"line_number":42,"context_line":"    # _after_ tearDown so if we use those we get a segfault."},{"line_number":43,"context_line":"    def tearDown(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_3441780a","line":40,"updated":"2015-01-15 23:14:45.000000000","message":"Please avoid putting comments outside of methods - a docstring or method-internal comment is preferable.","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        self.cleanup_networks \u003d []"},{"line_number":38,"context_line":"        self._configure()"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    # need to make sure ports \u0026 namespaces are gone, before super teardown"},{"line_number":41,"context_line":"    # kills the integration bridge. Any addCleanup methods are invoked"},{"line_number":42,"context_line":"    # _after_ tearDown so if we use those we get a segfault."},{"line_number":43,"context_line":"    def tearDown(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_a3a78e4e","line":40,"in_reply_to":"3a961159_3441780a","updated":"2015-01-21 17:43:17.000000000","message":"Done (nuked it)","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    # need to make sure ports \u0026 namespaces are gone, before super teardown"},{"line_number":41,"context_line":"    # kills the integration bridge. Any addCleanup methods are invoked"},{"line_number":42,"context_line":"    # _after_ tearDown so if we use those we get a segfault."},{"line_number":43,"context_line":"    def tearDown(self):"},{"line_number":44,"context_line":"        for network in self.cleanup_networks:"},{"line_number":45,"context_line":"            self._cleanup_dhcp(network)"},{"line_number":46,"context_line":"            self._cleanup_namespace(network.namespace)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_14963c3e","line":43,"updated":"2015-01-15 23:14:45.000000000","message":"tearDown should be avoided in favor of adding cleanup functions via addCleanup, e.g.\n\nnetwork \u003d ...\nself.addCleanup(self._cleanup_network, network)\n\nUsing addCleanup right after resources are created ensures that they are cleaned up in reverse order and avoiding having to manually assure the same result as is being done here.","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"f97bab343fcca8835cb1076996d3d6c84b4073a4","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    # need to make sure ports \u0026 namespaces are gone, before super teardown"},{"line_number":41,"context_line":"    # kills the integration bridge. Any addCleanup methods are invoked"},{"line_number":42,"context_line":"    # _after_ tearDown so if we use those we get a segfault."},{"line_number":43,"context_line":"    def tearDown(self):"},{"line_number":44,"context_line":"        for network in self.cleanup_networks:"},{"line_number":45,"context_line":"            self._cleanup_dhcp(network)"},{"line_number":46,"context_line":"            self._cleanup_namespace(network.namespace)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_dae3ebd5","line":43,"in_reply_to":"3a961159_14963c3e","updated":"2015-01-16 12:02:13.000000000","message":"trouble is that all addCleanup functions are invoked after teardown [1]... using cleanup methods gave me a segfault every time this code ran... the teardown yanks the br_int  - have more traces if interested - this has been much discussed in this review - see my comments re v 4 for example\n\n[1] https://docs.python.org/dev/library/unittest.html#unittest.TestCase.addCleanup","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    # need to make sure ports \u0026 namespaces are gone, before super teardown"},{"line_number":41,"context_line":"    # kills the integration bridge. Any addCleanup methods are invoked"},{"line_number":42,"context_line":"    # _after_ tearDown so if we use those we get a segfault."},{"line_number":43,"context_line":"    def tearDown(self):"},{"line_number":44,"context_line":"        for network in self.cleanup_networks:"},{"line_number":45,"context_line":"            self._cleanup_dhcp(network)"},{"line_number":46,"context_line":"            self._cleanup_namespace(network.namespace)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_63acc6ee","line":43,"in_reply_to":"3a961159_3b2b0796","updated":"2015-01-21 17:43:17.000000000","message":"OK have removed for this revision - i\u0027d be very happy not to have to override teardown hopefully it is indeed a local issue","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"6c9dfc70c65d4f29a9fc98e7cd003c59ccb41812","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    # need to make sure ports \u0026 namespaces are gone, before super teardown"},{"line_number":41,"context_line":"    # kills the integration bridge. Any addCleanup methods are invoked"},{"line_number":42,"context_line":"    # _after_ tearDown so if we use those we get a segfault."},{"line_number":43,"context_line":"    def tearDown(self):"},{"line_number":44,"context_line":"        for network in self.cleanup_networks:"},{"line_number":45,"context_line":"            self._cleanup_dhcp(network)"},{"line_number":46,"context_line":"            self._cleanup_namespace(network.namespace)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_3b2b0796","line":43,"in_reply_to":"3a961159_dae3ebd5","updated":"2015-01-16 18:37:57.000000000","message":"Given that tearDown has no explicit part in removing the bridge - addCleanup is responsible [1] - I can\u0027t see why the ordering of tearDown and addCleanup matters.  I can only assume that there is some host-specific issue that you are seeing and I would prefer that you get to the bottom of that than merge this workaround.\n\nI\u0027ve modified this patchset to use addCleanup [2] and I don\u0027t see any segfaults.  The effective ordering of resource cleanup is identical to what is proposed here.\n\n1: https://github.com/openstack/neutron/blob/master/neutron/tests/functional/agent/linux/base.py#L118\n\n2: http://paste.openstack.org/show/158294/","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            self._cleanup_namespace(network.namespace)"},{"line_number":47,"context_line":"        super(DHCPAgentOVSTestFramework, self).tearDown()"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    #TODO(marios): remove me once permissions issue is"},{"line_number":50,"context_line":"    #resolved. Temp fix taken from #/c/136840/"},{"line_number":51,"context_line":"    def _fix_config_dir_permissions(self):"},{"line_number":52,"context_line":"        # TempDir create folders with u+rwx rights"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_14e47cde","line":49,"updated":"2015-01-15 23:14:45.000000000","message":"Again, comment outside the method.  But as per Cedric\u0027s comment on the commit msg, I don\u0027t think this requirement is temporary.","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            self._cleanup_namespace(network.namespace)"},{"line_number":47,"context_line":"        super(DHCPAgentOVSTestFramework, self).tearDown()"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    #TODO(marios): remove me once permissions issue is"},{"line_number":50,"context_line":"    #resolved. Temp fix taken from #/c/136840/"},{"line_number":51,"context_line":"    def _fix_config_dir_permissions(self):"},{"line_number":52,"context_line":"        # TempDir create folders with u+rwx rights"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_e3c196e5","line":49,"in_reply_to":"3a961159_14e47cde","updated":"2015-01-21 17:43:17.000000000","message":"Done","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    def _configure(self):"},{"line_number":64,"context_line":"        config.setup_logging()"},{"line_number":65,"context_line":"        dhcp_agent.register_options()"},{"line_number":66,"context_line":"        cfg.CONF.set_override(\u0027debug\u0027, False)"},{"line_number":67,"context_line":"        cfg.CONF.set_override(\"dhcp_delete_namespaces\", True)"},{"line_number":68,"context_line":"        #TODO(marios):remove me once permissions issue is resolved"},{"line_number":69,"context_line":"        self.agent_config_dir \u003d self.useFixture(fixtures.TempDir()).path"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_34b098db","line":66,"updated":"2015-01-15 23:14:45.000000000","message":"Isn\u0027t this false by default?","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    def _configure(self):"},{"line_number":64,"context_line":"        config.setup_logging()"},{"line_number":65,"context_line":"        dhcp_agent.register_options()"},{"line_number":66,"context_line":"        cfg.CONF.set_override(\u0027debug\u0027, False)"},{"line_number":67,"context_line":"        cfg.CONF.set_override(\"dhcp_delete_namespaces\", True)"},{"line_number":68,"context_line":"        #TODO(marios):remove me once permissions issue is resolved"},{"line_number":69,"context_line":"        self.agent_config_dir \u003d self.useFixture(fixtures.TempDir()).path"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_839372f9","line":66,"in_reply_to":"3a961159_34b098db","updated":"2015-01-21 17:43:17.000000000","message":"Done","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    def network_dict_for_dhcp(self, enable_dhcp\u003dTrue, ip_v\u003d4):"},{"line_number":80,"context_line":"        net_id \u003d uuidutils.generate_uuid()"},{"line_number":81,"context_line":"        subnet_dict \u003d self.test_utils.create_subnet_dict(net_id,"},{"line_number":82,"context_line":"                                                    enable_dhcp, ip_v)"},{"line_number":83,"context_line":"        port_dict \u003d self.test_utils.create_port_dict(net_id,"},{"line_number":84,"context_line":"                                                    subnet_dict.id, ip_v)"},{"line_number":85,"context_line":"        port_dict.device_id \u003d commonutils.get_dhcp_agent_device_id(net_id,"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_173e3e8b","line":82,"updated":"2015-01-15 23:14:45.000000000","message":"PEP8 - If parameters appear on the first line after an opening parenthesis, align subsequent lines to the opening parenthesis\n\nsee: https://www.python.org/dev/peps/pep-0008/#indentation\n\n/me wishes for a python version of gofmt to save ourselves the hassle of manual style enforcement","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        subnet_dict \u003d self.test_utils.create_subnet_dict(net_id,"},{"line_number":82,"context_line":"                                                    enable_dhcp, ip_v)"},{"line_number":83,"context_line":"        port_dict \u003d self.test_utils.create_port_dict(net_id,"},{"line_number":84,"context_line":"                                                    subnet_dict.id, ip_v)"},{"line_number":85,"context_line":"        port_dict.device_id \u003d commonutils.get_dhcp_agent_device_id(net_id,"},{"line_number":86,"context_line":"                                                                cfg.CONF.host)"},{"line_number":87,"context_line":"        net_dict \u003d self.test_utils.create_network_dict(net_id,"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_574b662a","line":84,"updated":"2015-01-15 23:14:45.000000000","message":"PEP8 ditto","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        subnet_dict \u003d self.test_utils.create_subnet_dict(net_id,"},{"line_number":82,"context_line":"                                                    enable_dhcp, ip_v)"},{"line_number":83,"context_line":"        port_dict \u003d self.test_utils.create_port_dict(net_id,"},{"line_number":84,"context_line":"                                                    subnet_dict.id, ip_v)"},{"line_number":85,"context_line":"        port_dict.device_id \u003d commonutils.get_dhcp_agent_device_id(net_id,"},{"line_number":86,"context_line":"                                                                cfg.CONF.host)"},{"line_number":87,"context_line":"        net_dict \u003d self.test_utils.create_network_dict(net_id,"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_8376123d","line":84,"in_reply_to":"3a961159_574b662a","updated":"2015-01-21 17:43:17.000000000","message":"Done","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        port_dict.device_id \u003d commonutils.get_dhcp_agent_device_id(net_id,"},{"line_number":86,"context_line":"                                                                cfg.CONF.host)"},{"line_number":87,"context_line":"        net_dict \u003d self.test_utils.create_network_dict(net_id,"},{"line_number":88,"context_line":"                                                    [subnet_dict], [port_dict])"},{"line_number":89,"context_line":"        return net_dict"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def _cleanup_namespace(self, namespace):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_7746a222","line":88,"updated":"2015-01-15 23:14:45.000000000","message":"PEP8 ditto","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        port_dict.device_id \u003d commonutils.get_dhcp_agent_device_id(net_id,"},{"line_number":86,"context_line":"                                                                cfg.CONF.host)"},{"line_number":87,"context_line":"        net_dict \u003d self.test_utils.create_network_dict(net_id,"},{"line_number":88,"context_line":"                                                    [subnet_dict], [port_dict])"},{"line_number":89,"context_line":"        return net_dict"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def _cleanup_namespace(self, namespace):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_437c2a21","line":88,"in_reply_to":"3a961159_7746a222","updated":"2015-01-21 17:43:17.000000000","message":"Done","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"31bafea0a783fe246515f1cd95bcade50f9b7d00","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                                                    [subnet_dict], [port_dict])"},{"line_number":89,"context_line":"        return net_dict"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def _cleanup_namespace(self, namespace):"},{"line_number":92,"context_line":"        ip \u003d ip_lib.IPWrapper(self.root_helper, namespace)"},{"line_number":93,"context_line":"        if ip.netns.exists(namespace):"},{"line_number":94,"context_line":"            ip.netns.delete(namespace)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_7a7209e4","line":91,"updated":"2015-01-15 22:58:08.000000000","message":"it could/shoud be in helpers/base module","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        self.agent.call_driver(\u0027disable\u0027, network)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _configure_dhcp_for_network(self, network):"},{"line_number":100,"context_line":"        #make sure permissions on the config dir are ok:"},{"line_number":101,"context_line":"        self._fix_config_dir_permissions()"},{"line_number":102,"context_line":"        self.agent.configure_dhcp_for_network(network)"},{"line_number":103,"context_line":"        if network[\u0027subnets\u0027][0][\u0027enable_dhcp\u0027]:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_77cce261","line":100,"updated":"2015-01-15 23:14:45.000000000","message":"Is there a reason not to do this in _configure() and avoid cluttering this method?","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    def assert_dhcp_device(self, namespace, dhcp_iface_name, enable_dhcp):"},{"line_number":111,"context_line":"        dev \u003d ip_lib.IPDevice(dhcp_iface_name, self.root_helper, namespace)"},{"line_number":112,"context_line":"        self.assertEqual(enable_dhcp, ip_lib.device_exists(dhcp_iface_name,"},{"line_number":113,"context_line":"                                                self.root_helper, namespace))"},{"line_number":114,"context_line":"        if enable_dhcp:"},{"line_number":115,"context_line":"            self.assertEqual(self.test_utils._MAC_ADDRESS, dev.link.address)"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_b7e9eaac","line":113,"updated":"2015-01-15 23:14:45.000000000","message":"PEP8 ditto","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    def assert_dhcp_device(self, namespace, dhcp_iface_name, enable_dhcp):"},{"line_number":111,"context_line":"        dev \u003d ip_lib.IPDevice(dhcp_iface_name, self.root_helper, namespace)"},{"line_number":112,"context_line":"        self.assertEqual(enable_dhcp, ip_lib.device_exists(dhcp_iface_name,"},{"line_number":113,"context_line":"                                                self.root_helper, namespace))"},{"line_number":114,"context_line":"        if enable_dhcp:"},{"line_number":115,"context_line":"            self.assertEqual(self.test_utils._MAC_ADDRESS, dev.link.address)"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_63920659","line":113,"in_reply_to":"3a961159_b7e9eaac","updated":"2015-01-21 17:43:17.000000000","message":"Done","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        if enable_dhcp:"},{"line_number":115,"context_line":"            self.assertEqual(self.test_utils._MAC_ADDRESS, dev.link.address)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def assert_ovs_port(self, iface_name, enable_dhcp):"},{"line_number":118,"context_line":"        self.assertEqual(enable_dhcp, self.ovs.port_exists(iface_name))"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def _get_host_allocations(self, network):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_37b6da89","line":117,"updated":"2015-01-15 23:14:45.000000000","message":"I\u0027m not sure I see the value in this function since it\u0027s only called in one place.  Consider inlining.","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        if enable_dhcp:"},{"line_number":115,"context_line":"            self.assertEqual(self.test_utils._MAC_ADDRESS, dev.link.address)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def assert_ovs_port(self, iface_name, enable_dhcp):"},{"line_number":118,"context_line":"        self.assertEqual(enable_dhcp, self.ovs.port_exists(iface_name))"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def _get_host_allocations(self, network):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_43950a3f","line":117,"in_reply_to":"3a961159_37b6da89","updated":"2015-01-21 17:43:17.000000000","message":"Done","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def _get_host_allocations(self, network):"},{"line_number":121,"context_line":"        dhcp_driver \u003d self.agent.dhcp_driver_cls(cfg.CONF, network,"},{"line_number":122,"context_line":"            self.root_helper)"},{"line_number":123,"context_line":"        host_allocations \u003d {}"},{"line_number":124,"context_line":"        with open(dhcp_driver.get_conf_file_name(\u0027host\u0027)) as host_file:"},{"line_number":125,"context_line":"            for line in host_file.readlines():"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_57b0c68a","line":122,"updated":"2015-01-15 23:14:45.000000000","message":"PEP8 ditto","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def _get_host_allocations(self, network):"},{"line_number":121,"context_line":"        dhcp_driver \u003d self.agent.dhcp_driver_cls(cfg.CONF, network,"},{"line_number":122,"context_line":"            self.root_helper)"},{"line_number":123,"context_line":"        host_allocations \u003d {}"},{"line_number":124,"context_line":"        with open(dhcp_driver.get_conf_file_name(\u0027host\u0027)) as host_file:"},{"line_number":125,"context_line":"            for line in host_file.readlines():"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_43e7ca12","line":122,"in_reply_to":"3a961159_57b0c68a","updated":"2015-01-21 17:43:17.000000000","message":"Done","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"class DHCPAgentOVSTestCase(DHCPAgentOVSTestFramework):"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    def _assert_dhcp_resources(self, network, enable_dhcp):"},{"line_number":146,"context_line":"        port \u003d network.ports[0]"},{"line_number":147,"context_line":"        iface_name \u003d self.test_utils.get_interface_name(network, port)"},{"line_number":148,"context_line":"        #self._configure_dhcp_for_network(network)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_3dab1b89","line":145,"updated":"2015-01-15 23:14:45.000000000","message":"If the point of having a \u0027framework\u0027 separate from the test case is to isolate tests from supporting infrastructure, why is this method included here instead of the parent?","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":145,"context_line":"    def _assert_dhcp_resources(self, network, enable_dhcp):"},{"line_number":146,"context_line":"        port \u003d network.ports[0]"},{"line_number":147,"context_line":"        iface_name \u003d self.test_utils.get_interface_name(network, port)"},{"line_number":148,"context_line":"        #self._configure_dhcp_for_network(network)"},{"line_number":149,"context_line":"        self.assert_ovs_port(iface_name, enable_dhcp)"},{"line_number":150,"context_line":"        self.assert_dhcp_namespace(network.namespace, enable_dhcp)"},{"line_number":151,"context_line":"        self.assert_dhcp_device(network.namespace, iface_name, enable_dhcp)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_da269db9","line":148,"updated":"2015-01-15 23:14:45.000000000","message":"Remove?","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":145,"context_line":"    def _assert_dhcp_resources(self, network, enable_dhcp):"},{"line_number":146,"context_line":"        port \u003d network.ports[0]"},{"line_number":147,"context_line":"        iface_name \u003d self.test_utils.get_interface_name(network, port)"},{"line_number":148,"context_line":"        #self._configure_dhcp_for_network(network)"},{"line_number":149,"context_line":"        self.assert_ovs_port(iface_name, enable_dhcp)"},{"line_number":150,"context_line":"        self.assert_dhcp_namespace(network.namespace, enable_dhcp)"},{"line_number":151,"context_line":"        self.assert_dhcp_device(network.namespace, iface_name, enable_dhcp)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_c32c9a4d","line":148,"in_reply_to":"3a961159_da269db9","updated":"2015-01-21 17:43:17.000000000","message":"Done","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":168,"context_line":"    def test_new_address_allocation(self):"},{"line_number":169,"context_line":"        network \u003d self.network_dict_for_dhcp()"},{"line_number":170,"context_line":"        self._configure_dhcp_for_network(network)"},{"line_number":171,"context_line":"        #assert allocations before adding new address"},{"line_number":172,"context_line":"        self.assert_allocations(network)"},{"line_number":173,"context_line":"        ip_addr \u003d netaddr.IPNetwork(network.subnets[0].cidr)[1]"},{"line_number":174,"context_line":"        new_port \u003d self.test_utils.create_port_dict(network.id,"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_3a57a102","line":171,"updated":"2015-01-15 23:14:45.000000000","message":"Please avoid adding comments that can be easily inferred from the code.","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":168,"context_line":"    def test_new_address_allocation(self):"},{"line_number":169,"context_line":"        network \u003d self.network_dict_for_dhcp()"},{"line_number":170,"context_line":"        self._configure_dhcp_for_network(network)"},{"line_number":171,"context_line":"        #assert allocations before adding new address"},{"line_number":172,"context_line":"        self.assert_allocations(network)"},{"line_number":173,"context_line":"        ip_addr \u003d netaddr.IPNetwork(network.subnets[0].cidr)[1]"},{"line_number":174,"context_line":"        new_port \u003d self.test_utils.create_port_dict(network.id,"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_831a9215","line":171,"in_reply_to":"3a961159_3a57a102","updated":"2015-01-21 17:43:17.000000000","message":"Done","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        self.assert_allocations(network)"},{"line_number":173,"context_line":"        ip_addr \u003d netaddr.IPNetwork(network.subnets[0].cidr)[1]"},{"line_number":174,"context_line":"        new_port \u003d self.test_utils.create_port_dict(network.id,"},{"line_number":175,"context_line":"                network.subnets[0].id, _MAC\u003dself._TEST_MAC, _IP\u003dstr(ip_addr))"},{"line_number":176,"context_line":"        network.ports.append(new_port)"},{"line_number":177,"context_line":"        dhcp_driver \u003d self.agent.dhcp_driver_cls(cfg.CONF, network,"},{"line_number":178,"context_line":"                                                self.root_helper)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_5a41cd37","line":175,"updated":"2015-01-15 23:14:45.000000000","message":"PEP8 ditto","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        self.assert_allocations(network)"},{"line_number":173,"context_line":"        ip_addr \u003d netaddr.IPNetwork(network.subnets[0].cidr)[1]"},{"line_number":174,"context_line":"        new_port \u003d self.test_utils.create_port_dict(network.id,"},{"line_number":175,"context_line":"                network.subnets[0].id, _MAC\u003dself._TEST_MAC, _IP\u003dstr(ip_addr))"},{"line_number":176,"context_line":"        network.ports.append(new_port)"},{"line_number":177,"context_line":"        dhcp_driver \u003d self.agent.dhcp_driver_cls(cfg.CONF, network,"},{"line_number":178,"context_line":"                                                self.root_helper)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_c3d3ba36","line":175,"in_reply_to":"3a961159_5a41cd37","updated":"2015-01-21 17:43:17.000000000","message":"Done","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                network.subnets[0].id, _MAC\u003dself._TEST_MAC, _IP\u003dstr(ip_addr))"},{"line_number":176,"context_line":"        network.ports.append(new_port)"},{"line_number":177,"context_line":"        dhcp_driver \u003d self.agent.dhcp_driver_cls(cfg.CONF, network,"},{"line_number":178,"context_line":"                                                self.root_helper)"},{"line_number":179,"context_line":"        dhcp_driver.reload_allocations()"},{"line_number":180,"context_line":"        self.assert_allocations(network)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_9a47b54b","line":178,"updated":"2015-01-15 23:14:45.000000000","message":"PEP8 ditto","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                network.subnets[0].id, _MAC\u003dself._TEST_MAC, _IP\u003dstr(ip_addr))"},{"line_number":176,"context_line":"        network.ports.append(new_port)"},{"line_number":177,"context_line":"        dhcp_driver \u003d self.agent.dhcp_driver_cls(cfg.CONF, network,"},{"line_number":178,"context_line":"                                                self.root_helper)"},{"line_number":179,"context_line":"        dhcp_driver.reload_allocations()"},{"line_number":180,"context_line":"        self.assert_allocations(network)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_03dea23f","line":178,"in_reply_to":"3a961159_9a47b54b","updated":"2015-01-21 17:43:17.000000000","message":"Done","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c5d55c369ab47ec681d78881ee75757e05e2be9a","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import fixtures"},{"line_number":17,"context_line":"import netaddr"},{"line_number":18,"context_line":"import os"},{"line_number":19,"context_line":"import stat"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from oslo.config import cfg"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_c2ee4b22","line":19,"updated":"2015-01-21 23:57:49.000000000","message":"As per my comment on the previous patchset, these are both stdlib imports.","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"cf8fd29f12262620c324ef7e08c77a731fd16f88","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import fixtures"},{"line_number":17,"context_line":"import netaddr"},{"line_number":18,"context_line":"import os"},{"line_number":19,"context_line":"import stat"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from oslo.config import cfg"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_225fc542","line":19,"in_reply_to":"1a930d6b_c2ee4b22","updated":"2015-01-26 17:50:48.000000000","message":"sorry :/","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c5d55c369ab47ec681d78881ee75757e05e2be9a","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def setUp(self):"},{"line_number":39,"context_line":"        super(DHCPAgentOVSTestFramework, self).setUp()"},{"line_number":40,"context_line":"        self.cleanup_networks \u003d []"},{"line_number":41,"context_line":"        self._configure()"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _fix_config_dir_permissions(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_e2e7c7e2","line":40,"updated":"2015-01-21 23:57:49.000000000","message":"This can be removed.","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"cf8fd29f12262620c324ef7e08c77a731fd16f88","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def setUp(self):"},{"line_number":39,"context_line":"        super(DHCPAgentOVSTestFramework, self).setUp()"},{"line_number":40,"context_line":"        self.cleanup_networks \u003d []"},{"line_number":41,"context_line":"        self._configure()"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _fix_config_dir_permissions(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_a232d50d","line":40,"in_reply_to":"1a930d6b_e2e7c7e2","updated":"2015-01-26 17:50:48.000000000","message":"Done","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c5d55c369ab47ec681d78881ee75757e05e2be9a","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                os.chmod(current_dir, new_perms)"},{"line_number":50,"context_line":"            current_dir \u003d os.path.dirname(current_dir)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _configure(self):"},{"line_number":53,"context_line":"        config.setup_logging()"},{"line_number":54,"context_line":"        dhcp_agent.register_options()"},{"line_number":55,"context_line":"        cfg.CONF.set_override(\"dhcp_delete_namespaces\", True)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_417df86d","line":52,"updated":"2015-01-21 23:57:49.000000000","message":"Consider disabling status reporting by setting cfg.CONF.AGENT.report_interval \u003d 0 unless you\u0027re planning on validating the agent state reporting mechanism in this change.","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"cf8fd29f12262620c324ef7e08c77a731fd16f88","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                os.chmod(current_dir, new_perms)"},{"line_number":50,"context_line":"            current_dir \u003d os.path.dirname(current_dir)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _configure(self):"},{"line_number":53,"context_line":"        config.setup_logging()"},{"line_number":54,"context_line":"        dhcp_agent.register_options()"},{"line_number":55,"context_line":"        cfg.CONF.set_override(\"dhcp_delete_namespaces\", True)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_6230ed01","line":52,"in_reply_to":"1a930d6b_417df86d","updated":"2015-01-26 17:50:48.000000000","message":"Done","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c5d55c369ab47ec681d78881ee75757e05e2be9a","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        self.test_utils \u003d testutils.FunctionalTestUtils()"},{"line_number":66,"context_line":"        self.ovs_driver \u003d interface.OVSInterfaceDriver(cfg.CONF)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def network_dict_for_dhcp(self, enable_dhcp\u003dTrue, ip_v\u003d4):"},{"line_number":69,"context_line":"        net_id \u003d uuidutils.generate_uuid()"},{"line_number":70,"context_line":"        subnet_dict \u003d self.test_utils.create_subnet_dict(net_id,"},{"line_number":71,"context_line":"                                                         enable_dhcp, ip_v)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_e1e4243d","line":68,"updated":"2015-01-21 23:57:49.000000000","message":"Is there a rhyme or reason as to why some method names are prefixed with \u0027_\u0027 and some are not?","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"cf8fd29f12262620c324ef7e08c77a731fd16f88","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        self.test_utils \u003d testutils.FunctionalTestUtils()"},{"line_number":66,"context_line":"        self.ovs_driver \u003d interface.OVSInterfaceDriver(cfg.CONF)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def network_dict_for_dhcp(self, enable_dhcp\u003dTrue, ip_v\u003d4):"},{"line_number":69,"context_line":"        net_id \u003d uuidutils.generate_uuid()"},{"line_number":70,"context_line":"        subnet_dict \u003d self.test_utils.create_subnet_dict(net_id,"},{"line_number":71,"context_line":"                                                         enable_dhcp, ip_v)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_d8deee3e","line":68,"in_reply_to":"1a930d6b_e1e4243d","updated":"2015-01-26 17:50:48.000000000","message":"the idea was methods called from outside this class don\u0027t get _ but I think I missed a few - will try and make this more consistent. thanks","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c5d55c369ab47ec681d78881ee75757e05e2be9a","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                                                       [port_dict])"},{"line_number":78,"context_line":"        return net_dict"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _cleanup_network(self, network, enable_dhcp):"},{"line_number":81,"context_line":"        if enable_dhcp:"},{"line_number":82,"context_line":"            self.agent.call_driver(\u0027disable\u0027, network)"},{"line_number":83,"context_line":"        for port in network.ports:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_22262f17","line":80,"updated":"2015-01-21 23:57:49.000000000","message":"(No action requried) enable_dhcp -\u003e dhcp_enabled","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"cf8fd29f12262620c324ef7e08c77a731fd16f88","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                                                       [port_dict])"},{"line_number":78,"context_line":"        return net_dict"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _cleanup_network(self, network, enable_dhcp):"},{"line_number":81,"context_line":"        if enable_dhcp:"},{"line_number":82,"context_line":"            self.agent.call_driver(\u0027disable\u0027, network)"},{"line_number":83,"context_line":"        for port in network.ports:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_91ea810d","line":80,"in_reply_to":"1a930d6b_22262f17","updated":"2015-01-26 17:50:48.000000000","message":"Done","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c5d55c369ab47ec681d78881ee75757e05e2be9a","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    def _cleanup_network(self, network, enable_dhcp):"},{"line_number":81,"context_line":"        if enable_dhcp:"},{"line_number":82,"context_line":"            self.agent.call_driver(\u0027disable\u0027, network)"},{"line_number":83,"context_line":"        for port in network.ports:"},{"line_number":84,"context_line":"            vif_name \u003d self.test_utils.get_interface_name(network.id, port),"},{"line_number":85,"context_line":"            self.ovs_driver.unplug(device_name\u003dvif_name,"},{"line_number":86,"context_line":"                                   bridge\u003dcfg.CONF[\u0027ovs_integration_bridge\u0027],"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_624917d0","line":83,"updated":"2015-01-21 23:57:49.000000000","message":"Why is it necessary to manually remove ports if the bridge will be automatically removed in a subsequently-called cleanup function?  I\u0027m not sure the ovs_use_veth path is worth supporting, it was a stopgap to support broken namespace support in RHEL6 that should not longer be necessary.","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"cf8fd29f12262620c324ef7e08c77a731fd16f88","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    def _cleanup_network(self, network, enable_dhcp):"},{"line_number":81,"context_line":"        if enable_dhcp:"},{"line_number":82,"context_line":"            self.agent.call_driver(\u0027disable\u0027, network)"},{"line_number":83,"context_line":"        for port in network.ports:"},{"line_number":84,"context_line":"            vif_name \u003d self.test_utils.get_interface_name(network.id, port),"},{"line_number":85,"context_line":"            self.ovs_driver.unplug(device_name\u003dvif_name,"},{"line_number":86,"context_line":"                                   bridge\u003dcfg.CONF[\u0027ovs_integration_bridge\u0027],"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_9861c63b","line":83,"in_reply_to":"1a930d6b_624917d0","updated":"2015-01-26 17:50:48.000000000","message":"yeah you\u0027re right this is a remnant from when I was manually clearing up (and included as some attempt to prevent the segfault I was seeing)","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c5d55c369ab47ec681d78881ee75757e05e2be9a","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _configure_dhcp_for_network(self, network):"},{"line_number":94,"context_line":"        self.agent.configure_dhcp_for_network(network)"},{"line_number":95,"context_line":"        if network[\u0027subnets\u0027][0][\u0027enable_dhcp\u0027]:"},{"line_number":96,"context_line":"            self.cleanup_networks.append(network)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def assert_dhcp_namespace(self, namespace, enable_dhcp):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_dd09ca2d","line":95,"updated":"2015-01-21 23:57:49.000000000","message":"Most calls to this function seem to to be calling addCleanup right afterwards.  I\u0027d suggest either adding the addCleanup call here or removing this line and the one that follows.  If you do remove these lines, consider inlining the call on line 94.","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"cf8fd29f12262620c324ef7e08c77a731fd16f88","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _configure_dhcp_for_network(self, network):"},{"line_number":94,"context_line":"        self.agent.configure_dhcp_for_network(network)"},{"line_number":95,"context_line":"        if network[\u0027subnets\u0027][0][\u0027enable_dhcp\u0027]:"},{"line_number":96,"context_line":"            self.cleanup_networks.append(network)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def assert_dhcp_namespace(self, namespace, enable_dhcp):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_d1b5e9ee","line":95,"in_reply_to":"1a930d6b_dd09ca2d","updated":"2015-01-26 17:50:48.000000000","message":"thanks... yeah I nuked these lines (remnants from manual cleanup). I added the addCleanup to the network creation method actually I think it makes sense there.","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c5d55c369ab47ec681d78881ee75757e05e2be9a","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    def assert_dhcp_device(self, namespace, dhcp_iface_name, enable_dhcp):"},{"line_number":103,"context_line":"        dev \u003d ip_lib.IPDevice(dhcp_iface_name, self.root_helper, namespace)"},{"line_number":104,"context_line":"        self.assertEqual(enable_dhcp, ip_lib.device_exists(dhcp_iface_name,"},{"line_number":105,"context_line":"                                                self.root_helper, namespace))"},{"line_number":106,"context_line":"        if enable_dhcp:"},{"line_number":107,"context_line":"            self.assertEqual(self.test_utils._MAC_ADDRESS, dev.link.address)"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_1d3a72cd","line":105,"updated":"2015-01-21 23:57:49.000000000","message":"As per my comment on the previous patchset, pep8 indent.","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"cf8fd29f12262620c324ef7e08c77a731fd16f88","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    def assert_dhcp_device(self, namespace, dhcp_iface_name, enable_dhcp):"},{"line_number":103,"context_line":"        dev \u003d ip_lib.IPDevice(dhcp_iface_name, self.root_helper, namespace)"},{"line_number":104,"context_line":"        self.assertEqual(enable_dhcp, ip_lib.device_exists(dhcp_iface_name,"},{"line_number":105,"context_line":"                                                self.root_helper, namespace))"},{"line_number":106,"context_line":"        if enable_dhcp:"},{"line_number":107,"context_line":"            self.assertEqual(self.test_utils._MAC_ADDRESS, dev.link.address)"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_1196914c","line":105,"in_reply_to":"1a930d6b_1d3a72cd","updated":"2015-01-26 17:50:48.000000000","message":"Done","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c5d55c369ab47ec681d78881ee75757e05e2be9a","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        if enable_dhcp:"},{"line_number":107,"context_line":"            self.assertEqual(self.test_utils._MAC_ADDRESS, dev.link.address)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def _plug_port_for_dhcp_request(self, network, port):"},{"line_number":110,"context_line":"        namespace \u003d network.namespace"},{"line_number":111,"context_line":"        vif_name \u003d self.test_utils.get_interface_name(network.id, port)"},{"line_number":112,"context_line":"        self.ovs_driver.plug(network.id, port.id, vif_name, port.mac_address,"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_81ce0082","line":109,"updated":"2015-01-21 23:57:49.000000000","message":"Consider adding a cleanup function that targets the added port and call addCleanup in this method to avoid having to do anything manual action to ensure cleanup (line 203).","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"cf8fd29f12262620c324ef7e08c77a731fd16f88","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        if enable_dhcp:"},{"line_number":107,"context_line":"            self.assertEqual(self.test_utils._MAC_ADDRESS, dev.link.address)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def _plug_port_for_dhcp_request(self, network, port):"},{"line_number":110,"context_line":"        namespace \u003d network.namespace"},{"line_number":111,"context_line":"        vif_name \u003d self.test_utils.get_interface_name(network.id, port)"},{"line_number":112,"context_line":"        self.ovs_driver.plug(network.id, port.id, vif_name, port.mac_address,"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_40e56e36","line":109,"in_reply_to":"1a930d6b_81ce0082","updated":"2015-01-26 17:50:48.000000000","message":"Done","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c5d55c369ab47ec681d78881ee75757e05e2be9a","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        self.ovs_driver.plug(network.id, port.id, vif_name, port.mac_address,"},{"line_number":113,"context_line":"            cfg.CONF[\u0027ovs_integration_bridge\u0027], namespace\u003dnamespace)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def assert_good_allocation_for_port(self, network, good_port):"},{"line_number":116,"context_line":"        good_vif_name \u003d self.test_utils.get_interface_name(network.id,"},{"line_number":117,"context_line":"            good_port)"},{"line_number":118,"context_line":"        ip \u003d ip_lib.IPWrapper(self.root_helper, network.namespace)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_2132aca7","line":115,"updated":"2015-01-21 23:57:49.000000000","message":"Consider extracting the common elements of this method and the one that follows into a shared helper method.  The only difference would appear to be whether the netns command is expected to succeed or fail.","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"cf8fd29f12262620c324ef7e08c77a731fd16f88","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        self.ovs_driver.plug(network.id, port.id, vif_name, port.mac_address,"},{"line_number":113,"context_line":"            cfg.CONF[\u0027ovs_integration_bridge\u0027], namespace\u003dnamespace)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def assert_good_allocation_for_port(self, network, good_port):"},{"line_number":116,"context_line":"        good_vif_name \u003d self.test_utils.get_interface_name(network.id,"},{"line_number":117,"context_line":"            good_port)"},{"line_number":118,"context_line":"        ip \u003d ip_lib.IPWrapper(self.root_helper, network.namespace)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_40f00e91","line":115,"in_reply_to":"1a930d6b_2132aca7","updated":"2015-01-26 17:50:48.000000000","message":"Done","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c5d55c369ab47ec681d78881ee75757e05e2be9a","unresolved":false,"context_lines":[{"line_number":117,"context_line":"            good_port)"},{"line_number":118,"context_line":"        ip \u003d ip_lib.IPWrapper(self.root_helper, network.namespace)"},{"line_number":119,"context_line":"        good_req \u003d ip.netns.execute("},{"line_number":120,"context_line":"            [\u0027dhclient\u0027, \u0027-1\u0027, \u0027-timeout\u0027, \u00273\u0027, \u0027%s\u0027 % (good_vif_name)])"},{"line_number":121,"context_line":"        self.assertEqual(good_req, \u0027\u0027)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def assert_bad_allocation_for_port(self, network, bad_port):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_bd3cfe94","line":120,"updated":"2015-01-21 23:57:49.000000000","message":"You\u0027ll need to add an entry in the functional test filter [1] to allow invoking dhclient in a namespace - that\u0027s the cause of the current functional test failure.\n\nIt may also be necessary to ensure the package that provides dhclient is installed by devstack by adding an entry (suffixed with \u0027 # testonly\u0027) to each of files/{debs,rpms,rpms-suse}/neutron in the devstack repo.\n\n1: https://github.com/openstack/neutron/blob/master/neutron/tests/contrib/filters.template","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"cf8fd29f12262620c324ef7e08c77a731fd16f88","unresolved":false,"context_lines":[{"line_number":117,"context_line":"            good_port)"},{"line_number":118,"context_line":"        ip \u003d ip_lib.IPWrapper(self.root_helper, network.namespace)"},{"line_number":119,"context_line":"        good_req \u003d ip.netns.execute("},{"line_number":120,"context_line":"            [\u0027dhclient\u0027, \u0027-1\u0027, \u0027-timeout\u0027, \u00273\u0027, \u0027%s\u0027 % (good_vif_name)])"},{"line_number":121,"context_line":"        self.assertEqual(good_req, \u0027\u0027)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def assert_bad_allocation_for_port(self, network, bad_port):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_807bd6f3","line":120,"in_reply_to":"1a930d6b_bd3cfe94","updated":"2015-01-26 17:50:48.000000000","message":"Done","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c5d55c369ab47ec681d78881ee75757e05e2be9a","unresolved":false,"context_lines":[{"line_number":123,"context_line":"    def assert_bad_allocation_for_port(self, network, bad_port):"},{"line_number":124,"context_line":"        ip \u003d ip_lib.IPWrapper(self.root_helper, network.namespace)"},{"line_number":125,"context_line":"        bad_vif \u003d self.test_utils.get_interface_name(network.id, bad_port)"},{"line_number":126,"context_line":"        self.assertRaises("},{"line_number":127,"context_line":"            RuntimeError, ip.netns.execute,"},{"line_number":128,"context_line":"            [\u0027dhclient\u0027, \u0027-1\u0027, \u0027-timeout\u0027, \u00273\u0027, \u0027%s\u0027 % (bad_vif)])"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_1df992c8","line":126,"updated":"2015-01-21 23:57:49.000000000","message":"Prefer testtools.ExpectedException:\n\nwith testtools.ExpectedException(RuntimeError):\n  ip.netns.execute(...)","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"cf8fd29f12262620c324ef7e08c77a731fd16f88","unresolved":false,"context_lines":[{"line_number":123,"context_line":"    def assert_bad_allocation_for_port(self, network, bad_port):"},{"line_number":124,"context_line":"        ip \u003d ip_lib.IPWrapper(self.root_helper, network.namespace)"},{"line_number":125,"context_line":"        bad_vif \u003d self.test_utils.get_interface_name(network.id, bad_port)"},{"line_number":126,"context_line":"        self.assertRaises("},{"line_number":127,"context_line":"            RuntimeError, ip.netns.execute,"},{"line_number":128,"context_line":"            [\u0027dhclient\u0027, \u0027-1\u0027, \u0027-timeout\u0027, \u00273\u0027, \u0027%s\u0027 % (bad_vif)])"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_40564e2b","line":126,"in_reply_to":"1a930d6b_1df992c8","updated":"2015-01-26 17:50:48.000000000","message":"Done","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c5d55c369ab47ec681d78881ee75757e05e2be9a","unresolved":false,"context_lines":[{"line_number":169,"context_line":"            self.addCleanup(self._cleanup_network, network, enable_dhcp)"},{"line_number":170,"context_line":"            self._assert_dhcp_resources(network, enable_dhcp)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def test_create_subnet_without_dhcp(self):"},{"line_number":173,"context_line":"        enable_dhcp \u003d False"},{"line_number":174,"context_line":"        for version in [4, 6]:"},{"line_number":175,"context_line":"            network \u003d self.network_dict_for_dhcp(enable_dhcp, ip_v\u003dversion)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_c16c889f","line":172,"updated":"2015-01-21 23:57:49.000000000","message":"Why does this method exist?  It doesn\u0027t appear to validate anything that couldn\u0027t be better checked in a unit test, and functional testing should only be resorted to when unit testing is not sufficient.","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"cf8fd29f12262620c324ef7e08c77a731fd16f88","unresolved":false,"context_lines":[{"line_number":169,"context_line":"            self.addCleanup(self._cleanup_network, network, enable_dhcp)"},{"line_number":170,"context_line":"            self._assert_dhcp_resources(network, enable_dhcp)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def test_create_subnet_without_dhcp(self):"},{"line_number":173,"context_line":"        enable_dhcp \u003d False"},{"line_number":174,"context_line":"        for version in [4, 6]:"},{"line_number":175,"context_line":"            network \u003d self.network_dict_for_dhcp(enable_dhcp, ip_v\u003dversion)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_eb5abb28","line":172,"in_reply_to":"1a930d6b_c16c889f","updated":"2015-01-26 17:50:48.000000000","message":"well it asserts that if you choose not to enable dhcp on a given net/subnet then the dhcp port and namespace aren\u0027t  created. If you really think it needs to go then I will nuke it on next rev.","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c5d55c369ab47ec681d78881ee75757e05e2be9a","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            self.addCleanup(self._cleanup_network, network, enable_dhcp)"},{"line_number":177,"context_line":"            self._assert_dhcp_resources(network, enable_dhcp)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def test_good_address_allocation(self):"},{"line_number":180,"context_line":"        network \u003d self.network_dict_for_dhcp()"},{"line_number":181,"context_line":"        self._configure_dhcp_for_network(network)"},{"line_number":182,"context_line":"        self.addCleanup(self._cleanup_network, network, enable_dhcp\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_81952042","line":179,"updated":"2015-01-21 23:57:49.000000000","message":"This method and the one that follows are nearly identical - consider factoring out the common elements into a helper method.","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"cf8fd29f12262620c324ef7e08c77a731fd16f88","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            self.addCleanup(self._cleanup_network, network, enable_dhcp)"},{"line_number":177,"context_line":"            self._assert_dhcp_resources(network, enable_dhcp)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def test_good_address_allocation(self):"},{"line_number":180,"context_line":"        network \u003d self.network_dict_for_dhcp()"},{"line_number":181,"context_line":"        self._configure_dhcp_for_network(network)"},{"line_number":182,"context_line":"        self.addCleanup(self._cleanup_network, network, enable_dhcp\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_eb5d5b7a","line":179,"in_reply_to":"1a930d6b_81952042","updated":"2015-01-26 17:50:48.000000000","message":"Done","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c5d55c369ab47ec681d78881ee75757e05e2be9a","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            mac\u003dstr(self._TEST_MAC), ip\u003dstr(ip_addr))"},{"line_number":188,"context_line":"        network.ports.append(good_port)"},{"line_number":189,"context_line":"        dhcp_driver \u003d self.agent.dhcp_driver_cls(cfg.CONF, network,"},{"line_number":190,"context_line":"                                                self.root_helper)"},{"line_number":191,"context_line":"        dhcp_driver.reload_allocations()"},{"line_number":192,"context_line":"        self._plug_port_for_dhcp_request(network, good_port)"},{"line_number":193,"context_line":"        self.assert_good_allocation_for_port(network, good_port)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_42e41b0d","line":190,"updated":"2015-01-21 23:57:49.000000000","message":"As per my comment on the previous patchset, pep8 indent","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"cf8fd29f12262620c324ef7e08c77a731fd16f88","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            mac\u003dstr(self._TEST_MAC), ip\u003dstr(ip_addr))"},{"line_number":188,"context_line":"        network.ports.append(good_port)"},{"line_number":189,"context_line":"        dhcp_driver \u003d self.agent.dhcp_driver_cls(cfg.CONF, network,"},{"line_number":190,"context_line":"                                                self.root_helper)"},{"line_number":191,"context_line":"        dhcp_driver.reload_allocations()"},{"line_number":192,"context_line":"        self._plug_port_for_dhcp_request(network, good_port)"},{"line_number":193,"context_line":"        self.assert_good_allocation_for_port(network, good_port)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_2b53e36b","line":190,"in_reply_to":"1a930d6b_42e41b0d","updated":"2015-01-26 17:50:48.000000000","message":"Done","commit_id":"0f060021ceef7845a7d600f2c71ce76ef08384c9"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f01c7c9e870466a665f81adf8119fd19224efccc","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from neutron.agent import dhcp_agent"},{"line_number":26,"context_line":"from neutron.agent.linux import interface"},{"line_number":27,"context_line":"from neutron.agent.linux import ip_lib"},{"line_number":28,"context_line":"from neutron.common import utils as commonutils"},{"line_number":29,"context_line":"from neutron.openstack.common import uuidutils"},{"line_number":30,"context_line":"from neutron.tests.functional.agent.linux import base"},{"line_number":31,"context_line":"from neutron.tests.functional.common import utils as testutils"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_c2707442","line":28,"updated":"2015-01-27 00:17:26.000000000","message":"(No action required) -\u003e common_utils ?\n\nIt seems strange that we follow pep8 standards for variable names and module names but buck them for aliases.","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"8c74b4c3b5df429e2847f3c288cf7fea1fbca8d0","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from neutron.agent import dhcp_agent"},{"line_number":26,"context_line":"from neutron.agent.linux import interface"},{"line_number":27,"context_line":"from neutron.agent.linux import ip_lib"},{"line_number":28,"context_line":"from neutron.common import utils as commonutils"},{"line_number":29,"context_line":"from neutron.openstack.common import uuidutils"},{"line_number":30,"context_line":"from neutron.tests.functional.agent.linux import base"},{"line_number":31,"context_line":"from neutron.tests.functional.common import utils as testutils"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa81d914_dddf990b","line":28,"in_reply_to":"1a930d6b_c2707442","updated":"2015-02-02 18:28:30.000000000","message":"Done","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f01c7c9e870466a665f81adf8119fd19224efccc","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    def _fix_config_dir_permissions(self):"},{"line_number":44,"context_line":"        current_dir \u003d self.agent_config_dir"},{"line_number":45,"context_line":"        while current_dir !\u003d \u0027/\u0027:"},{"line_number":46,"context_line":"            perms \u003d stat.S_IMODE(os.stat(current_dir).st_mode)"},{"line_number":47,"context_line":"            new_perms \u003d perms | stat.S_IROTH | stat.S_IXOTH"},{"line_number":48,"context_line":"            if new_perms !\u003d perms:"},{"line_number":49,"context_line":"                os.chmod(current_dir, new_perms)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_62d18022","line":46,"updated":"2015-01-27 00:17:26.000000000","message":"Is there a reason to use stat vs octal permissions?  I think the stat constants are a lot less clear than their octal equivalents, and I don\u0027t think I\u0027m the only one.","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"8c74b4c3b5df429e2847f3c288cf7fea1fbca8d0","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    def _fix_config_dir_permissions(self):"},{"line_number":44,"context_line":"        current_dir \u003d self.agent_config_dir"},{"line_number":45,"context_line":"        while current_dir !\u003d \u0027/\u0027:"},{"line_number":46,"context_line":"            perms \u003d stat.S_IMODE(os.stat(current_dir).st_mode)"},{"line_number":47,"context_line":"            new_perms \u003d perms | stat.S_IROTH | stat.S_IXOTH"},{"line_number":48,"context_line":"            if new_perms !\u003d perms:"},{"line_number":49,"context_line":"                os.chmod(current_dir, new_perms)"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_c112abb3","line":46,"in_reply_to":"1a930d6b_62d18022","updated":"2015-02-02 18:28:30.000000000","message":"Done","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f01c7c9e870466a665f81adf8119fd19224efccc","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        br_int \u003d self.create_ovs_bridge()"},{"line_number":64,"context_line":"        cfg.CONF.set_override(\u0027ovs_integration_bridge\u0027, br_int.br_name)"},{"line_number":65,"context_line":"        self.agent \u003d dhcp_agent.DhcpAgentWithStateReport(\u0027localhost\u0027)"},{"line_number":66,"context_line":"        self.test_utils \u003d testutils.FunctionalTestUtils()"},{"line_number":67,"context_line":"        self.ovs_driver \u003d interface.OVSInterfaceDriver(cfg.CONF)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def network_dict_for_dhcp(self, dhcp_enabled\u003dTrue, ip_v\u003d4):"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_8293cc59","line":66,"updated":"2015-01-27 00:17:26.000000000","message":"Given that there is no state in this class, I\u0027m not sure why an instance variable is suggested.  A bunch of helper methods or a class with class or static methods is suggested.","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"8c74b4c3b5df429e2847f3c288cf7fea1fbca8d0","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        br_int \u003d self.create_ovs_bridge()"},{"line_number":64,"context_line":"        cfg.CONF.set_override(\u0027ovs_integration_bridge\u0027, br_int.br_name)"},{"line_number":65,"context_line":"        self.agent \u003d dhcp_agent.DhcpAgentWithStateReport(\u0027localhost\u0027)"},{"line_number":66,"context_line":"        self.test_utils \u003d testutils.FunctionalTestUtils()"},{"line_number":67,"context_line":"        self.ovs_driver \u003d interface.OVSInterfaceDriver(cfg.CONF)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def network_dict_for_dhcp(self, dhcp_enabled\u003dTrue, ip_v\u003d4):"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_baa95de1","line":66,"in_reply_to":"1a930d6b_8293cc59","updated":"2015-02-02 18:28:30.000000000","message":"Done","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f01c7c9e870466a665f81adf8119fd19224efccc","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        self.test_utils \u003d testutils.FunctionalTestUtils()"},{"line_number":67,"context_line":"        self.ovs_driver \u003d interface.OVSInterfaceDriver(cfg.CONF)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def network_dict_for_dhcp(self, dhcp_enabled\u003dTrue, ip_v\u003d4):"},{"line_number":70,"context_line":"        net_id \u003d uuidutils.generate_uuid()"},{"line_number":71,"context_line":"        subnet_dict \u003d self.test_utils.create_subnet_dict(net_id,"},{"line_number":72,"context_line":"                                                         dhcp_enabled, ip_v)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_22821800","line":69,"updated":"2015-01-27 00:17:26.000000000","message":"ip_v -\u003e ip_version ?\n\nPlease try to keep names consistent rather than using arbitrary short-forms.","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"8c74b4c3b5df429e2847f3c288cf7fea1fbca8d0","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        self.test_utils \u003d testutils.FunctionalTestUtils()"},{"line_number":67,"context_line":"        self.ovs_driver \u003d interface.OVSInterfaceDriver(cfg.CONF)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def network_dict_for_dhcp(self, dhcp_enabled\u003dTrue, ip_v\u003d4):"},{"line_number":70,"context_line":"        net_id \u003d uuidutils.generate_uuid()"},{"line_number":71,"context_line":"        subnet_dict \u003d self.test_utils.create_subnet_dict(net_id,"},{"line_number":72,"context_line":"                                                         dhcp_enabled, ip_v)"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_111ed463","line":69,"in_reply_to":"1a930d6b_22821800","updated":"2015-02-02 18:28:30.000000000","message":"Done","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f01c7c9e870466a665f81adf8119fd19224efccc","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            ip.netns.delete(network.namespace)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def _configure_dhcp_for_network(self, network):"},{"line_number":96,"context_line":"        self.agent.configure_dhcp_for_network(network)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def assert_dhcp_namespace(self, namespace, dhcp_enabled):"},{"line_number":99,"context_line":"        ip \u003d ip_lib.IPWrapper(self.root_helper, namespace)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_27b06adc","line":96,"updated":"2015-01-27 00:17:26.000000000","message":"Consider inlining.","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"8c74b4c3b5df429e2847f3c288cf7fea1fbca8d0","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            ip.netns.delete(network.namespace)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def _configure_dhcp_for_network(self, network):"},{"line_number":96,"context_line":"        self.agent.configure_dhcp_for_network(network)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def assert_dhcp_namespace(self, namespace, dhcp_enabled):"},{"line_number":99,"context_line":"        ip \u003d ip_lib.IPWrapper(self.root_helper, namespace)"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_d168bcbc","line":96,"in_reply_to":"1a930d6b_27b06adc","updated":"2015-02-02 18:28:30.000000000","message":"Done","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f01c7c9e870466a665f81adf8119fd19224efccc","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    def assert_dhcp_device(self, namespace, dhcp_iface_name, dhcp_enabled):"},{"line_number":103,"context_line":"        dev \u003d ip_lib.IPDevice(dhcp_iface_name, self.root_helper, namespace)"},{"line_number":104,"context_line":"        self.assertEqual(dhcp_enabled, ip_lib.device_exists("},{"line_number":105,"context_line":"                         dhcp_iface_name, self.root_helper, namespace))"},{"line_number":106,"context_line":"        if dhcp_enabled:"},{"line_number":107,"context_line":"            self.assertEqual(self.test_utils._MAC_ADDRESS, dev.link.address)"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_270cea93","line":105,"updated":"2015-01-27 00:17:26.000000000","message":"aligning to the previous open parenthesis is confusing my poor eyes.  Please indent only 4 spaces past the start of the previous line if no parameters are included on the line the open parenthesis, e.g.\n\nself.asserEqual(...(\n    dhcp_iface_name, ...)","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"8c74b4c3b5df429e2847f3c288cf7fea1fbca8d0","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    def assert_dhcp_device(self, namespace, dhcp_iface_name, dhcp_enabled):"},{"line_number":103,"context_line":"        dev \u003d ip_lib.IPDevice(dhcp_iface_name, self.root_helper, namespace)"},{"line_number":104,"context_line":"        self.assertEqual(dhcp_enabled, ip_lib.device_exists("},{"line_number":105,"context_line":"                         dhcp_iface_name, self.root_helper, namespace))"},{"line_number":106,"context_line":"        if dhcp_enabled:"},{"line_number":107,"context_line":"            self.assertEqual(self.test_utils._MAC_ADDRESS, dev.link.address)"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_51384ca0","line":105,"in_reply_to":"1a930d6b_270cea93","updated":"2015-02-02 18:28:30.000000000","message":"Done (i hope?)","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f01c7c9e870466a665f81adf8119fd19224efccc","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    def assert_good_allocation_for_port(self, network, port):"},{"line_number":122,"context_line":"        vif_name, ip_wrapper \u003d self._get_allocation_params(network, port)"},{"line_number":123,"context_line":"        req \u003d ip_wrapper.netns.execute("},{"line_number":124,"context_line":"            [\u0027dhclient\u0027, \u0027-1\u0027, \u0027-timeout\u0027, \u00273\u0027, \u0027%s\u0027 % (vif_name)])"},{"line_number":125,"context_line":"        self.assertEqual(req, \u0027\u0027)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def assert_bad_allocation_for_port(self, network, port):"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_8752fe64","line":124,"updated":"2015-01-27 00:17:26.000000000","message":"(No action required) this command invocation and the one on line 130 are shared - consider extracting for reuse.","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"8c74b4c3b5df429e2847f3c288cf7fea1fbca8d0","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    def assert_good_allocation_for_port(self, network, port):"},{"line_number":122,"context_line":"        vif_name, ip_wrapper \u003d self._get_allocation_params(network, port)"},{"line_number":123,"context_line":"        req \u003d ip_wrapper.netns.execute("},{"line_number":124,"context_line":"            [\u0027dhclient\u0027, \u0027-1\u0027, \u0027-timeout\u0027, \u00273\u0027, \u0027%s\u0027 % (vif_name)])"},{"line_number":125,"context_line":"        self.assertEqual(req, \u0027\u0027)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def assert_bad_allocation_for_port(self, network, port):"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_71d71024","line":124,"in_reply_to":"1a930d6b_8752fe64","updated":"2015-02-02 18:28:30.000000000","message":"Done","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f01c7c9e870466a665f81adf8119fd19224efccc","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"class DHCPAgentOVSTestCase(DHCPAgentOVSTestFramework):"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def _assert_dhcp_resources(self, network, dhcp_enabled):"},{"line_number":159,"context_line":"        port \u003d network.ports[0]"},{"line_number":160,"context_line":"        iface_name \u003d self.test_utils.get_interface_name(network, port)"},{"line_number":161,"context_line":"        self.assertEqual(dhcp_enabled, self.ovs.port_exists(iface_name))"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_c24314ad","line":158,"updated":"2015-01-27 00:17:26.000000000","message":"Why is this method here instead of in the framework class?\n\nAlso, please use the convention of prefixing test cases with \u0027Test\u0027.   Any class that begins with Test is generally not safe to subclass because it would result in the execution of duplicate tests.","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"8c74b4c3b5df429e2847f3c288cf7fea1fbca8d0","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"class DHCPAgentOVSTestCase(DHCPAgentOVSTestFramework):"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def _assert_dhcp_resources(self, network, dhcp_enabled):"},{"line_number":159,"context_line":"        port \u003d network.ports[0]"},{"line_number":160,"context_line":"        iface_name \u003d self.test_utils.get_interface_name(network, port)"},{"line_number":161,"context_line":"        self.assertEqual(dhcp_enabled, self.ovs.port_exists(iface_name))"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_51904c43","line":158,"in_reply_to":"1a930d6b_c24314ad","updated":"2015-02-02 18:28:30.000000000","message":"Done","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f01c7c9e870466a665f81adf8119fd19224efccc","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            self._configure_dhcp_for_network(network)"},{"line_number":172,"context_line":"            self._assert_dhcp_resources(network, dhcp_enabled)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def test_create_subnet_without_dhcp(self):"},{"line_number":175,"context_line":"        dhcp_enabled \u003d False"},{"line_number":176,"context_line":"        for version in [4, 6]:"},{"line_number":177,"context_line":"            network \u003d self.network_dict_for_dhcp(dhcp_enabled, ip_v\u003dversion)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_e7bf425f","line":174,"updated":"2015-01-27 00:17:26.000000000","message":"I really don\u0027t think that a functional test environment should be required to verify the absence of interaction with the underlying system, but I\u0027ll hold my nose for now.","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"37080d303d5003373879e93b67a97ef2747953f8","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            net_id, cfg.CONF.host)"},{"line_number":92,"context_line":"        net_dict \u003d self.test_utils.create_network_dict("},{"line_number":93,"context_line":"            net_id, [subnet_dict], [port_dict])"},{"line_number":94,"context_line":"        self.addCleanup(self._cleanup_network, net_dict, dhcp_enabled)"},{"line_number":95,"context_line":"        return net_dict"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _cleanup_port(self, network, port):"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba3cc151_9a302fa0","line":94,"updated":"2015-07-01 06:10:51.000000000","message":"it\u0027s surprising that dict-generating function registering this cleanup.\ni guess it rather belongs to _get_network_port_for_allocation_test.","commit_id":"059b0a1fc82aab284cf118b30ba1459e2b70b683"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"99e768c59381a546baf7299658272cd404d68e11","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            net_id, cfg.CONF.host)"},{"line_number":92,"context_line":"        net_dict \u003d self.test_utils.create_network_dict("},{"line_number":93,"context_line":"            net_id, [subnet_dict], [port_dict])"},{"line_number":94,"context_line":"        self.addCleanup(self._cleanup_network, net_dict, dhcp_enabled)"},{"line_number":95,"context_line":"        return net_dict"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _cleanup_port(self, network, port):"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba3cc151_28c74197","line":94,"in_reply_to":"ba3cc151_9a302fa0","updated":"2015-07-01 16:31:14.000000000","message":"Thanks for your review. Yeah, You are right, it\u0027s wrong place for adding cleanup. I will make another patch set and fix it.","commit_id":"059b0a1fc82aab284cf118b30ba1459e2b70b683"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"37080d303d5003373879e93b67a97ef2747953f8","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    def _cleanup_port(self, network, port):"},{"line_number":98,"context_line":"        vif_name \u003d self.test_utils.get_interface_name(network.id, port)"},{"line_number":99,"context_line":"        self.ovs_driver.unplug("},{"line_number":100,"context_line":"            device_name\u003dvif_name, bridge\u003dcfg.CONF[\u0027ovs_integration_bridge\u0027],"},{"line_number":101,"context_line":"            namespace\u003dnetwork.namespace, prefix\u003dNone)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _cleanup_network(self, network, dhcp_enabled):"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba3cc151_8f96b3ee","line":100,"range":{"start_line":100,"start_character":41,"end_line":100,"end_character":75},"updated":"2015-07-01 06:10:51.000000000","message":"cfg.CONF.ovs_integration_bridge","commit_id":"059b0a1fc82aab284cf118b30ba1459e2b70b683"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"99e768c59381a546baf7299658272cd404d68e11","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    def _cleanup_port(self, network, port):"},{"line_number":98,"context_line":"        vif_name \u003d self.test_utils.get_interface_name(network.id, port)"},{"line_number":99,"context_line":"        self.ovs_driver.unplug("},{"line_number":100,"context_line":"            device_name\u003dvif_name, bridge\u003dcfg.CONF[\u0027ovs_integration_bridge\u0027],"},{"line_number":101,"context_line":"            namespace\u003dnetwork.namespace, prefix\u003dNone)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _cleanup_network(self, network, dhcp_enabled):"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba3cc151_ebd63af0","line":100,"in_reply_to":"ba3cc151_8f96b3ee","updated":"2015-07-01 16:31:14.000000000","message":"Done","commit_id":"059b0a1fc82aab284cf118b30ba1459e2b70b683"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"37080d303d5003373879e93b67a97ef2747953f8","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        self.assert_dhcp_device(network.namespace, iface_name, dhcp_enabled)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def assert_dhcp_namespace(self, namespace, dhcp_enabled):"},{"line_number":124,"context_line":"        ip \u003d ip_lib.IPWrapper(namespace)"},{"line_number":125,"context_line":"        self.assertEqual(dhcp_enabled, ip.netns.exists(namespace))"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def assert_dhcp_device(self, namespace, dhcp_iface_name, dhcp_enabled):"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba3cc151_ef7dffb1","line":124,"updated":"2015-07-01 06:10:51.000000000","message":"i don\u0027t think you need to specify namespace if it\u0027s used only for namespace operations like ip.netns.exists.","commit_id":"059b0a1fc82aab284cf118b30ba1459e2b70b683"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"99e768c59381a546baf7299658272cd404d68e11","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        self.assert_dhcp_device(network.namespace, iface_name, dhcp_enabled)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def assert_dhcp_namespace(self, namespace, dhcp_enabled):"},{"line_number":124,"context_line":"        ip \u003d ip_lib.IPWrapper(namespace)"},{"line_number":125,"context_line":"        self.assertEqual(dhcp_enabled, ip.netns.exists(namespace))"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def assert_dhcp_device(self, namespace, dhcp_iface_name, dhcp_enabled):"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba3cc151_2b02e23d","line":124,"in_reply_to":"ba3cc151_ef7dffb1","updated":"2015-07-01 16:31:14.000000000","message":"Done","commit_id":"059b0a1fc82aab284cf118b30ba1459e2b70b683"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"37080d303d5003373879e93b67a97ef2747953f8","unresolved":false,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        return vif_name, dhclient_cmd, dhclient_pid_file"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def _list_is_empty(self, list):"},{"line_number":158,"context_line":"        if list:"},{"line_number":159,"context_line":"            return False"},{"line_number":160,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba3cc151_5a0dc735","line":157,"updated":"2015-07-01 06:10:51.000000000","message":"this method seems super redundant.\n\"not\" or \"\u003d\u003d []\" should be enough.","commit_id":"059b0a1fc82aab284cf118b30ba1459e2b70b683"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"99e768c59381a546baf7299658272cd404d68e11","unresolved":false,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        return vif_name, dhclient_cmd, dhclient_pid_file"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def _list_is_empty(self, list):"},{"line_number":158,"context_line":"        if list:"},{"line_number":159,"context_line":"            return False"},{"line_number":160,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba3cc151_e1c3b955","line":157,"in_reply_to":"ba3cc151_5a0dc735","updated":"2015-07-01 16:31:14.000000000","message":"Done :)","commit_id":"059b0a1fc82aab284cf118b30ba1459e2b70b683"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"37080d303d5003373879e93b67a97ef2747953f8","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        self.assert_good_allocation_for_port(network, port)"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    def test_bad_address_allocation(self):"},{"line_number":234,"context_line":"        self._TEST_MAC.value +\u003d 1"},{"line_number":235,"context_line":"        network, port \u003d self._get_network_port_for_allocation_test()"},{"line_number":236,"context_line":"        self._plug_port_for_dhcp_request(network, port)"},{"line_number":237,"context_line":"        self.assert_bad_allocation_for_port(network, port)"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba3cc151_0f0e233b","line":234,"updated":"2015-07-01 06:10:51.000000000","message":"can you explain what this \"+\u003d 1\" is for?","commit_id":"059b0a1fc82aab284cf118b30ba1459e2b70b683"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"99e768c59381a546baf7299658272cd404d68e11","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        self.assert_good_allocation_for_port(network, port)"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    def test_bad_address_allocation(self):"},{"line_number":234,"context_line":"        self._TEST_MAC.value +\u003d 1"},{"line_number":235,"context_line":"        network, port \u003d self._get_network_port_for_allocation_test()"},{"line_number":236,"context_line":"        self._plug_port_for_dhcp_request(network, port)"},{"line_number":237,"context_line":"        self.assert_bad_allocation_for_port(network, port)"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba3cc151_88a20d4a","line":234,"in_reply_to":"ba3cc151_0f0e233b","updated":"2015-07-01 16:31:14.000000000","message":"This is interesting moment. After your comment I understood, that something wrong here. I will make the correct bad address allocation test in the another patch-set. Again, thanks for your comments. They are very useful.","commit_id":"059b0a1fc82aab284cf118b30ba1459e2b70b683"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"d639cd84857da9e5d5bd52103d6cc62c27532d15","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        self.mock_plugin_api.release_dhcp_port.return_value \u003d None"},{"line_number":109,"context_line":"        if dhcp_enabled:"},{"line_number":110,"context_line":"            self.agent.call_driver(\u0027disable\u0027, network)"},{"line_number":111,"context_line":"        ip \u003d ip_lib.IPWrapper(network.namespace)"},{"line_number":112,"context_line":"        if ip.netns.exists(network.namespace):"},{"line_number":113,"context_line":"            ip.netns.delete(network.namespace)"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"ba3cc151_d1764e05","line":111,"range":{"start_line":111,"start_character":30,"end_line":111,"end_character":47},"updated":"2015-07-02 13:48:14.000000000","message":"IPWrapper()  without namespace should be enough here.","commit_id":"1076b9e813190036114919a4ce50e890977e51a8"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"139693a9d7995cb055ce620a3fc2b4a3064fed17","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        self.mock_plugin_api.release_dhcp_port.return_value \u003d None"},{"line_number":109,"context_line":"        if dhcp_enabled:"},{"line_number":110,"context_line":"            self.agent.call_driver(\u0027disable\u0027, network)"},{"line_number":111,"context_line":"        ip \u003d ip_lib.IPWrapper(network.namespace)"},{"line_number":112,"context_line":"        if ip.netns.exists(network.namespace):"},{"line_number":113,"context_line":"            ip.netns.delete(network.namespace)"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"ba3cc151_25173149","line":111,"in_reply_to":"ba3cc151_d1764e05","updated":"2015-07-02 15:17:53.000000000","message":"Done","commit_id":"1076b9e813190036114919a4ce50e890977e51a8"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"d639cd84857da9e5d5bd52103d6cc62c27532d15","unresolved":false,"context_lines":[{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        ip_device \u003d ip_lib.IPDevice(vif_name, network.namespace)"},{"line_number":180,"context_line":"        ip_list \u003d ip_device.addr.list(ip_version\u003d4)"},{"line_number":181,"context_line":"        self.assertTrue(ip_list \u003d\u003d [])"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _run_and_kill_dhclient(self, cmd, dhclient_pid_file):"},{"line_number":184,"context_line":"        dhclient_proc, cmd \u003d utils.create_process(cmd\u003dcmd, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":31,"id":"ba3cc151_11cef662","line":181,"updated":"2015-07-02 13:48:14.000000000","message":"assertEqual([], ip_list) is preferable.","commit_id":"1076b9e813190036114919a4ce50e890977e51a8"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"139693a9d7995cb055ce620a3fc2b4a3064fed17","unresolved":false,"context_lines":[{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        ip_device \u003d ip_lib.IPDevice(vif_name, network.namespace)"},{"line_number":180,"context_line":"        ip_list \u003d ip_device.addr.list(ip_version\u003d4)"},{"line_number":181,"context_line":"        self.assertTrue(ip_list \u003d\u003d [])"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _run_and_kill_dhclient(self, cmd, dhclient_pid_file):"},{"line_number":184,"context_line":"        dhclient_proc, cmd \u003d utils.create_process(cmd\u003dcmd, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":31,"id":"ba3cc151_e51ce96b","line":181,"in_reply_to":"ba3cc151_11cef662","updated":"2015-07-02 15:17:53.000000000","message":"Done","commit_id":"1076b9e813190036114919a4ce50e890977e51a8"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d3a5b396855f4df404bc007e80785cc88d129cfd","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import fixtures"},{"line_number":18,"context_line":"import mock"},{"line_number":19,"context_line":"import netaddr"},{"line_number":20,"context_line":"import os"},{"line_number":21,"context_line":"from oslo_config import cfg"},{"line_number":22,"context_line":"from oslo_utils import uuidutils"},{"line_number":23,"context_line":"import tempfile"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a41bdd9_f64934b8","line":20,"updated":"2015-07-14 20:56:29.000000000","message":"wrong import groups: os, tempfile are standard modules","commit_id":"d50396dc1462d5f2549484c4941f834226f4e869"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"6af114edac53d914b8eb25af5d32fb0831521158","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import fixtures"},{"line_number":18,"context_line":"import mock"},{"line_number":19,"context_line":"import netaddr"},{"line_number":20,"context_line":"import os"},{"line_number":21,"context_line":"from oslo_config import cfg"},{"line_number":22,"context_line":"from oslo_utils import uuidutils"},{"line_number":23,"context_line":"import tempfile"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a41bdd9_c971d277","line":20,"in_reply_to":"9a41bdd9_f64934b8","updated":"2015-07-15 11:43:06.000000000","message":"Cedric, ok, will be fixed in next patch-set. Thanks for review.","commit_id":"d50396dc1462d5f2549484c4941f834226f4e869"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"6af114edac53d914b8eb25af5d32fb0831521158","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        vif_name \u003d self.test_utils.get_interface_name(network.id, port)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        # AppArmor does not allow to use another location for the pid-file"},{"line_number":152,"context_line":"        dhclient_pid_file \u003d tempfile.mktemp(\u0027.pid\u0027, \u0027dhclient-\u0027, \u0027/var/run\u0027)"},{"line_number":153,"context_line":"        self.addCleanup(self._cleanup_pid_file, dhclient_pid_file)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        # dhclient writes pid only when running as a daemon (-nw) in some cases"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a41bdd9_e6e5e5a3","line":152,"updated":"2015-07-15 11:43:06.000000000","message":"I found another way to kill dhclient without create .pid-file in /var/run (and other stuff) and I will implement this in next patch set.","commit_id":"d50396dc1462d5f2549484c4941f834226f4e869"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d3a5b396855f4df404bc007e80785cc88d129cfd","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        self.assertEqual([], ip_list)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _run_and_kill_dhclient(self, cmd, dhclient_pid_file):"},{"line_number":184,"context_line":"        dhclient_proc, cmd \u003d utils.create_process(cmd\u003dcmd, run_as_root\u003dTrue)"},{"line_number":185,"context_line":"        eventlet.sleep(5)"},{"line_number":186,"context_line":"        dhclient_pid \u003d None"},{"line_number":187,"context_line":"        if os.path.isfile(dhclient_pid_file):"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a41bdd9_566b40f1","line":184,"updated":"2015-07-14 20:56:29.000000000","message":"You cannot use RootHelperProcess?","commit_id":"d50396dc1462d5f2549484c4941f834226f4e869"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"6af114edac53d914b8eb25af5d32fb0831521158","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        self.assertEqual([], ip_list)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _run_and_kill_dhclient(self, cmd, dhclient_pid_file):"},{"line_number":184,"context_line":"        dhclient_proc, cmd \u003d utils.create_process(cmd\u003dcmd, run_as_root\u003dTrue)"},{"line_number":185,"context_line":"        eventlet.sleep(5)"},{"line_number":186,"context_line":"        dhclient_pid \u003d None"},{"line_number":187,"context_line":"        if os.path.isfile(dhclient_pid_file):"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a41bdd9_ec0f0937","line":184,"in_reply_to":"9a41bdd9_566b40f1","updated":"2015-07-15 11:43:06.000000000","message":"Cedric, nope. There is some problem with using RootHelperProcess for run dhclient. It falls with \"process hasn\u0027t been spawned in 20 seconds\" error, but really process is spawned and method _wait_for_child_process (in net_helpers) just can\u0027t finds child process for some reason.","commit_id":"d50396dc1462d5f2549484c4941f834226f4e869"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"b0d1f885e4edb5c5b6856f68c478cc1f7f6612ec","unresolved":false,"context_lines":[{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _run_and_kill_dhclient(self, cmd, dhclient_pid_file):"},{"line_number":184,"context_line":"        dhclient_proc, cmd \u003d utils.create_process(cmd\u003dcmd, run_as_root\u003dTrue)"},{"line_number":185,"context_line":"        eventlet.sleep(5)"},{"line_number":186,"context_line":"        dhclient_pid \u003d None"},{"line_number":187,"context_line":"        if os.path.isfile(dhclient_pid_file):"},{"line_number":188,"context_line":"            with open(dhclient_pid_file, \u0027r\u0027) as f:"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a41bdd9_0daf1982","line":185,"updated":"2015-07-14 03:20:30.000000000","message":"this sleep seems racing.","commit_id":"d50396dc1462d5f2549484c4941f834226f4e869"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"1b3f5f352976e4fc973c590d64c460a9981250cd","unresolved":false,"context_lines":[{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _run_and_kill_dhclient(self, cmd, dhclient_pid_file):"},{"line_number":184,"context_line":"        dhclient_proc, cmd \u003d utils.create_process(cmd\u003dcmd, run_as_root\u003dTrue)"},{"line_number":185,"context_line":"        eventlet.sleep(5)"},{"line_number":186,"context_line":"        dhclient_pid \u003d None"},{"line_number":187,"context_line":"        if os.path.isfile(dhclient_pid_file):"},{"line_number":188,"context_line":"            with open(dhclient_pid_file, \u0027r\u0027) as f:"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a41bdd9_2e7af277","line":185,"in_reply_to":"9a41bdd9_0daf1982","updated":"2015-07-14 16:32:43.000000000","message":"I don\u0027t exactly understand what do you mean. Can you explain, please? Method is just runs dhclient and kills it after 5 seconds (if it\u0027s still running).","commit_id":"d50396dc1462d5f2549484c4941f834226f4e869"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d3a5b396855f4df404bc007e80785cc88d129cfd","unresolved":false,"context_lines":[{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _run_and_kill_dhclient(self, cmd, dhclient_pid_file):"},{"line_number":184,"context_line":"        dhclient_proc, cmd \u003d utils.create_process(cmd\u003dcmd, run_as_root\u003dTrue)"},{"line_number":185,"context_line":"        eventlet.sleep(5)"},{"line_number":186,"context_line":"        dhclient_pid \u003d None"},{"line_number":187,"context_line":"        if os.path.isfile(dhclient_pid_file):"},{"line_number":188,"context_line":"            with open(dhclient_pid_file, \u0027r\u0027) as f:"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a41bdd9_b6c3acec","line":185,"in_reply_to":"9a41bdd9_2e7af277","updated":"2015-07-14 20:56:29.000000000","message":"Yamamoto concern is what ensures we get the ip in 5 seconds? You should explain where \"5\" comes from","commit_id":"d50396dc1462d5f2549484c4941f834226f4e869"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"6af114edac53d914b8eb25af5d32fb0831521158","unresolved":false,"context_lines":[{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _run_and_kill_dhclient(self, cmd, dhclient_pid_file):"},{"line_number":184,"context_line":"        dhclient_proc, cmd \u003d utils.create_process(cmd\u003dcmd, run_as_root\u003dTrue)"},{"line_number":185,"context_line":"        eventlet.sleep(5)"},{"line_number":186,"context_line":"        dhclient_pid \u003d None"},{"line_number":187,"context_line":"        if os.path.isfile(dhclient_pid_file):"},{"line_number":188,"context_line":"            with open(dhclient_pid_file, \u0027r\u0027) as f:"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a41bdd9_b215d840","line":185,"in_reply_to":"9a41bdd9_4acdd464","updated":"2015-07-15 11:43:06.000000000","message":"Assaf, use wait_until_true is very good idea, thanks! I will implement this in next patch-set.","commit_id":"d50396dc1462d5f2549484c4941f834226f4e869"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"6af114edac53d914b8eb25af5d32fb0831521158","unresolved":false,"context_lines":[{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _run_and_kill_dhclient(self, cmd, dhclient_pid_file):"},{"line_number":184,"context_line":"        dhclient_proc, cmd \u003d utils.create_process(cmd\u003dcmd, run_as_root\u003dTrue)"},{"line_number":185,"context_line":"        eventlet.sleep(5)"},{"line_number":186,"context_line":"        dhclient_pid \u003d None"},{"line_number":187,"context_line":"        if os.path.isfile(dhclient_pid_file):"},{"line_number":188,"context_line":"            with open(dhclient_pid_file, \u0027r\u0027) as f:"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a41bdd9_6918c61e","line":185,"in_reply_to":"9a41bdd9_b6c3acec","updated":"2015-07-15 11:43:06.000000000","message":"Cedric, no particular reason. 5 seconds is just enough for dhclient to configure address on any system.","commit_id":"d50396dc1462d5f2549484c4941f834226f4e869"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"4ef379c3480d187311dd26d7f92016452c6e985a","unresolved":false,"context_lines":[{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _run_and_kill_dhclient(self, cmd, dhclient_pid_file):"},{"line_number":184,"context_line":"        dhclient_proc, cmd \u003d utils.create_process(cmd\u003dcmd, run_as_root\u003dTrue)"},{"line_number":185,"context_line":"        eventlet.sleep(5)"},{"line_number":186,"context_line":"        dhclient_pid \u003d None"},{"line_number":187,"context_line":"        if os.path.isfile(dhclient_pid_file):"},{"line_number":188,"context_line":"            with open(dhclient_pid_file, \u0027r\u0027) as f:"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a41bdd9_4acdd464","line":185,"in_reply_to":"9a41bdd9_b6c3acec","updated":"2015-07-14 21:16:53.000000000","message":"Why not just add a wait_until_true that waits until it sees the expected address on the interface, and then kill dhclient? If the wait_until_true fails then you have a definite test failure.","commit_id":"d50396dc1462d5f2549484c4941f834226f4e869"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"7877c3a22eb46dfcf1bfe2b264b2b495386aaa8b","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        vif_name, dhclient_cmd \u003d self._get_allocation_params(network, port)"},{"line_number":165,"context_line":"        self._run_dhclient(dhclient_cmd, network)"},{"line_number":166,"context_line":"        # we need wait some time (10 seconds is enough) and check"},{"line_number":167,"context_line":"        # that dhclient not configured ip-adress for interface"},{"line_number":168,"context_line":"        eventlet.sleep(10)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        ip_list \u003d self._ip_list_for_vif(vif_name, network.namespace)"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a50d1a3_f6b0b98d","line":167,"range":{"start_line":167,"start_character":42,"end_line":167,"end_character":48},"updated":"2015-07-21 06:53:26.000000000","message":"typo: address","commit_id":"f20ee5b025697facb505f7fccb555e106bb26e40"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"64aad8e794e4b6dd1b549c33dd1abc01c070f934","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        vif_name, dhclient_cmd \u003d self._get_allocation_params(network, port)"},{"line_number":165,"context_line":"        self._run_dhclient(dhclient_cmd, network)"},{"line_number":166,"context_line":"        # we need wait some time (10 seconds is enough) and check"},{"line_number":167,"context_line":"        # that dhclient not configured ip-adress for interface"},{"line_number":168,"context_line":"        eventlet.sleep(10)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        ip_list \u003d self._ip_list_for_vif(vif_name, network.namespace)"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a50d1a3_a0440074","line":167,"in_reply_to":"3a50d1a3_f6b0b98d","updated":"2015-07-21 09:28:42.000000000","message":"Done","commit_id":"f20ee5b025697facb505f7fccb555e106bb26e40"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"a49fec3d4a87cd62a55dd917162f3b72c71d0b99","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        for version in [4, 6]:"},{"line_number":197,"context_line":"            network \u003d self.network_dict_for_dhcp("},{"line_number":198,"context_line":"                dhcp_enabled, ip_version\u003dversion)"},{"line_number":199,"context_line":"            self.assert_dhcp_resources(network, dhcp_enabled)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def _get_network_port_for_allocation_test(self):"},{"line_number":202,"context_line":"        network \u003d self.network_dict_for_dhcp()"}],"source_content_type":"text/x-python","patch_set":34,"id":"3a50d1a3_2f15f83e","line":199,"updated":"2015-07-28 10:17:29.000000000","message":"we should call self.configure_dhcp_for_networ() before this, right? Otherwise it\u0027s obvios no resources will be created","commit_id":"7b3350ef4360d071f7e931458919e7be35fdf5ff"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"4a6e81ebf84d2f4b8c5729ab76a51e125733af08","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        for version in [4, 6]:"},{"line_number":197,"context_line":"            network \u003d self.network_dict_for_dhcp("},{"line_number":198,"context_line":"                dhcp_enabled, ip_version\u003dversion)"},{"line_number":199,"context_line":"            self.assert_dhcp_resources(network, dhcp_enabled)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def _get_network_port_for_allocation_test(self):"},{"line_number":202,"context_line":"        network \u003d self.network_dict_for_dhcp()"}],"source_content_type":"text/x-python","patch_set":34,"id":"3a50d1a3_025480fb","line":199,"in_reply_to":"3a50d1a3_2f15f83e","updated":"2015-07-28 15:40:53.000000000","message":"Oleg, it\u0027s seems like really need to call self.configure_dhcp_for_network(), but actually it\u0027s not necessary. self.configure_dhcp_for_network() just calls configure_dhcp_for_network() method of dhcp-agent, and in configure_dhcp_for_network() for networks (subnets) which enable_dhcp is False are nothing will be executed.","commit_id":"7b3350ef4360d071f7e931458919e7be35fdf5ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"88c10952ff942cb43ca8cfc01de2da7b738d5b55","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"class DHCPAgentOVSTestFramework(base.BaseOVSLinuxTestCase):"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    _TEST_MAC \u003d netaddr.EUI(\"24:77:03:7d:00:3a\")"},{"line_number":41,"context_line":"    _TEST_MAC.dialect \u003d netaddr.mac_unix"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a4dcd0f_cb6486ba","line":40,"updated":"2015-08-12 01:05:58.000000000","message":"Is there a reason to have both _TEST_MAC and FunctionalDhcpTestUtils._MAC_ADDRESS?","commit_id":"12a639295223d218a02149892feb6072b50635a8"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"1c831a4df3cb788298659a35672fe98fe91fc073","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"class DHCPAgentOVSTestFramework(base.BaseOVSLinuxTestCase):"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    _TEST_MAC \u003d netaddr.EUI(\"24:77:03:7d:00:3a\")"},{"line_number":41,"context_line":"    _TEST_MAC.dialect \u003d netaddr.mac_unix"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a4dcd0f_9bff7e65","line":40,"in_reply_to":"1a4dcd0f_6fd51ee3","updated":"2015-08-12 19:05:12.000000000","message":"And big thanks for review, Assaf :)","commit_id":"12a639295223d218a02149892feb6072b50635a8"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"ae317d60fe5ec274ac5207ed137ba006d2bb40eb","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"class DHCPAgentOVSTestFramework(base.BaseOVSLinuxTestCase):"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    _TEST_MAC \u003d netaddr.EUI(\"24:77:03:7d:00:3a\")"},{"line_number":41,"context_line":"    _TEST_MAC.dialect \u003d netaddr.mac_unix"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a4dcd0f_6fd51ee3","line":40,"in_reply_to":"1a4dcd0f_cb6486ba","updated":"2015-08-12 16:11:07.000000000","message":"_MAC_ADDRESS from FunctionalDhcpTestUtils used as \"default\" mac_address for port in method create_port_dict if parameter mac_address not specified. In the next patch-set I moved code from FunctionalDhcpTestUtils to this class and clarified names of these constants.","commit_id":"12a639295223d218a02149892feb6072b50635a8"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"88c10952ff942cb43ca8cfc01de2da7b738d5b55","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def _configure(self):"},{"line_number":48,"context_line":"        config.setup_logging()"},{"line_number":49,"context_line":"        self.register_options()"},{"line_number":50,"context_line":"        cfg.CONF.set_override(\"dhcp_delete_namespaces\", True)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        # NOTE(cbrandily): TempDir fixture creates a folder with 0o700"},{"line_number":53,"context_line":"        # permissions but agent dir must be readable by dnsmasq user (nobody)"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a4dcd0f_f0efefae","line":50,"updated":"2015-08-12 01:05:58.000000000","message":"This is the default now, no need to set it to True.","commit_id":"12a639295223d218a02149892feb6072b50635a8"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"ae317d60fe5ec274ac5207ed137ba006d2bb40eb","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def _configure(self):"},{"line_number":48,"context_line":"        config.setup_logging()"},{"line_number":49,"context_line":"        self.register_options()"},{"line_number":50,"context_line":"        cfg.CONF.set_override(\"dhcp_delete_namespaces\", True)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        # NOTE(cbrandily): TempDir fixture creates a folder with 0o700"},{"line_number":53,"context_line":"        # permissions but agent dir must be readable by dnsmasq user (nobody)"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a4dcd0f_20388d9f","line":50,"in_reply_to":"1a4dcd0f_f0efefae","updated":"2015-08-12 16:11:07.000000000","message":"Done","commit_id":"12a639295223d218a02149892feb6072b50635a8"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"88c10952ff942cb43ca8cfc01de2da7b738d5b55","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        self.test_utils \u003d functional_dhcp_test_utils.FunctionalDhcpTestUtils"},{"line_number":72,"context_line":"        self.ovs_driver \u003d interface.OVSInterfaceDriver(cfg.CONF)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def register_options(self):"},{"line_number":75,"context_line":"        config.register_interface_driver_opts_helper(cfg.CONF)"},{"line_number":76,"context_line":"        config.register_use_namespaces_opts_helper(cfg.CONF)"},{"line_number":77,"context_line":"        config.register_agent_state_opts_helper(cfg.CONF)"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a4dcd0f_6b3e928c","line":74,"updated":"2015-08-12 01:05:58.000000000","message":"Please delete this method and instead use neutron/agent/dhcp_agent.register_options.","commit_id":"12a639295223d218a02149892feb6072b50635a8"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"ae317d60fe5ec274ac5207ed137ba006d2bb40eb","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        self.test_utils \u003d functional_dhcp_test_utils.FunctionalDhcpTestUtils"},{"line_number":72,"context_line":"        self.ovs_driver \u003d interface.OVSInterfaceDriver(cfg.CONF)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def register_options(self):"},{"line_number":75,"context_line":"        config.register_interface_driver_opts_helper(cfg.CONF)"},{"line_number":76,"context_line":"        config.register_use_namespaces_opts_helper(cfg.CONF)"},{"line_number":77,"context_line":"        config.register_agent_state_opts_helper(cfg.CONF)"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a4dcd0f_a04c9d42","line":74,"in_reply_to":"1a4dcd0f_6b3e928c","updated":"2015-08-12 16:11:07.000000000","message":"I used manual register options because when use dhcp_agent.register_options these test failed [1]. And it something connected with another functional test, that already register metadata_proxy_socket opt. In my opinion, the reason in test_keepalived_state_change test [2]. I will going to research this more.\n\n[1] http://paste.openstack.org/show/CMhezSaDTSDL8KWxI4Hq/ \n\n[2] https://github.com/openstack/neutron/blob/master/neutron/tests/functional/agent/l3/test_keepalived_state_change.py#L29","commit_id":"12a639295223d218a02149892feb6072b50635a8"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"88c10952ff942cb43ca8cfc01de2da7b738d5b55","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        self.agent.configure_dhcp_for_network(network)"},{"line_number":97,"context_line":"        self.addCleanup(self._cleanup_network, network, dhcp_enabled)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _cleanup_port(self, network, port):"},{"line_number":100,"context_line":"        vif_name \u003d self.test_utils.get_interface_name(network.id, port)"},{"line_number":101,"context_line":"        self.ovs_driver.unplug("},{"line_number":102,"context_line":"            device_name\u003dvif_name, bridge\u003dcfg.CONF.ovs_integration_bridge,"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a4dcd0f_0b44aeb4","line":99,"updated":"2015-08-12 01:05:58.000000000","message":"I think you can safely delete this method. When you delete the integration bridge any ports on it will also be cleaned up:\n\nhttp://paste.openstack.org/show/412636/","commit_id":"12a639295223d218a02149892feb6072b50635a8"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"ae317d60fe5ec274ac5207ed137ba006d2bb40eb","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        self.agent.configure_dhcp_for_network(network)"},{"line_number":97,"context_line":"        self.addCleanup(self._cleanup_network, network, dhcp_enabled)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _cleanup_port(self, network, port):"},{"line_number":100,"context_line":"        vif_name \u003d self.test_utils.get_interface_name(network.id, port)"},{"line_number":101,"context_line":"        self.ovs_driver.unplug("},{"line_number":102,"context_line":"            device_name\u003dvif_name, bridge\u003dcfg.CONF.ovs_integration_bridge,"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a4dcd0f_5e5256df","line":99,"in_reply_to":"1a4dcd0f_0b44aeb4","updated":"2015-08-12 16:11:07.000000000","message":"You are right, thanks. I deleted this method in next patch-set.","commit_id":"12a639295223d218a02149892feb6072b50635a8"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"88c10952ff942cb43ca8cfc01de2da7b738d5b55","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        self.mock_plugin_api.release_dhcp_port.return_value \u003d None"},{"line_number":107,"context_line":"        if dhcp_enabled:"},{"line_number":108,"context_line":"            self.agent.call_driver(\u0027disable\u0027, network)"},{"line_number":109,"context_line":"        ip \u003d ip_lib.IPWrapper()"},{"line_number":110,"context_line":"        if ip.netns.exists(network.namespace):"},{"line_number":111,"context_line":"            ip.netns.delete(network.namespace)"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"1a4dcd0f_4b015637","line":109,"updated":"2015-08-12 01:05:58.000000000","message":"Are these 3 lines necessary? The DHCP agent should clean up its namespace properly. If it isn\u0027t, do we want to hide that bug?","commit_id":"12a639295223d218a02149892feb6072b50635a8"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"ae317d60fe5ec274ac5207ed137ba006d2bb40eb","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        self.mock_plugin_api.release_dhcp_port.return_value \u003d None"},{"line_number":107,"context_line":"        if dhcp_enabled:"},{"line_number":108,"context_line":"            self.agent.call_driver(\u0027disable\u0027, network)"},{"line_number":109,"context_line":"        ip \u003d ip_lib.IPWrapper()"},{"line_number":110,"context_line":"        if ip.netns.exists(network.namespace):"},{"line_number":111,"context_line":"            ip.netns.delete(network.namespace)"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"1a4dcd0f_bead9aea","line":109,"in_reply_to":"1a4dcd0f_4b015637","updated":"2015-08-12 16:11:07.000000000","message":"I checked it and yes, DHCP agent cleans own namespace properly. No any bugs :) removed these 3 lines.","commit_id":"12a639295223d218a02149892feb6072b50635a8"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"88c10952ff942cb43ca8cfc01de2da7b738d5b55","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                             namespace\u003dnamespace)"},{"line_number":139,"context_line":"        self.addCleanup(self._cleanup_port, network, port)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def _get_allocation_params(self, network, port):"},{"line_number":142,"context_line":"        vif_name \u003d self.test_utils.get_interface_name(network.id, port)"},{"line_number":143,"context_line":"        dhclient_cmd \u003d [\u0027dhclient\u0027, \u0027-d\u0027, \u0027-1\u0027, \u0027%s\u0027 % (vif_name)]"},{"line_number":144,"context_line":"        return vif_name, dhclient_cmd"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a4dcd0f_2b7e4a19","line":141,"updated":"2015-08-12 01:05:58.000000000","message":"I think it makes a lot more sense to get rid of this method, then make _run_dhclient accept the interface_name and construct the dhclient_cmd in _run_dhclient.","commit_id":"12a639295223d218a02149892feb6072b50635a8"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"ae317d60fe5ec274ac5207ed137ba006d2bb40eb","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                             namespace\u003dnamespace)"},{"line_number":139,"context_line":"        self.addCleanup(self._cleanup_port, network, port)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def _get_allocation_params(self, network, port):"},{"line_number":142,"context_line":"        vif_name \u003d self.test_utils.get_interface_name(network.id, port)"},{"line_number":143,"context_line":"        dhclient_cmd \u003d [\u0027dhclient\u0027, \u0027-d\u0027, \u0027-1\u0027, \u0027%s\u0027 % (vif_name)]"},{"line_number":144,"context_line":"        return vif_name, dhclient_cmd"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a4dcd0f_601775ee","line":141,"in_reply_to":"1a4dcd0f_2b7e4a19","updated":"2015-08-12 16:11:07.000000000","message":"Good idea, thanks. Done","commit_id":"12a639295223d218a02149892feb6072b50635a8"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"88c10952ff942cb43ca8cfc01de2da7b738d5b55","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _ip_list_for_vif(self, vif_name, namespace):"},{"line_number":147,"context_line":"        ip_device \u003d ip_lib.IPDevice(vif_name, namespace)"},{"line_number":148,"context_line":"        ip_list \u003d ip_device.addr.list(ip_version\u003d4)"},{"line_number":149,"context_line":"        return ip_list"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def assert_good_allocation_for_port(self, network, port):"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a4dcd0f_0bbfceaa","line":148,"updated":"2015-08-12 01:05:58.000000000","message":"I think you can remove the \u0027ip_list\u0027 var.","commit_id":"12a639295223d218a02149892feb6072b50635a8"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"ae317d60fe5ec274ac5207ed137ba006d2bb40eb","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _ip_list_for_vif(self, vif_name, namespace):"},{"line_number":147,"context_line":"        ip_device \u003d ip_lib.IPDevice(vif_name, namespace)"},{"line_number":148,"context_line":"        ip_list \u003d ip_device.addr.list(ip_version\u003d4)"},{"line_number":149,"context_line":"        return ip_list"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def assert_good_allocation_for_port(self, network, port):"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a4dcd0f_40d91956","line":148,"in_reply_to":"1a4dcd0f_0bbfceaa","updated":"2015-08-12 16:11:07.000000000","message":"Done","commit_id":"12a639295223d218a02149892feb6072b50635a8"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"88c10952ff942cb43ca8cfc01de2da7b738d5b55","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        for version in [4, 6]:"},{"line_number":197,"context_line":"            network \u003d self.network_dict_for_dhcp("},{"line_number":198,"context_line":"                dhcp_enabled, ip_version\u003dversion)"},{"line_number":199,"context_line":"            self.assert_dhcp_resources(network, dhcp_enabled)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def _get_network_port_for_allocation_test(self):"},{"line_number":202,"context_line":"        network \u003d self.network_dict_for_dhcp()"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a4dcd0f_0bfeeead","line":199,"updated":"2015-08-12 01:05:58.000000000","message":"You\u0027re missing a call to configure_dhcp_for_network :)","commit_id":"12a639295223d218a02149892feb6072b50635a8"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"ae317d60fe5ec274ac5207ed137ba006d2bb40eb","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        for version in [4, 6]:"},{"line_number":197,"context_line":"            network \u003d self.network_dict_for_dhcp("},{"line_number":198,"context_line":"                dhcp_enabled, ip_version\u003dversion)"},{"line_number":199,"context_line":"            self.assert_dhcp_resources(network, dhcp_enabled)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def _get_network_port_for_allocation_test(self):"},{"line_number":202,"context_line":"        network \u003d self.network_dict_for_dhcp()"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a4dcd0f_997d581e","line":199,"in_reply_to":"1a4dcd0f_0bfeeead","updated":"2015-08-12 16:11:07.000000000","message":"This is interesting moment. Actually, it asserts that if dhcp not enabled on a given net/subnet then the dhcp port and namespace aren\u0027t created. And some patch-sets ago, Maru said: \"I really don\u0027t think that a functional test environment should be required to verify the absence of interaction with underlying system, but I\u0027ll hold my nose for now.\" and I don\u0027t know what better — leave this test-case or remove it. What do you think?","commit_id":"12a639295223d218a02149892feb6072b50635a8"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"88c10952ff942cb43ca8cfc01de2da7b738d5b55","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                dhcp_enabled, ip_version\u003dversion)"},{"line_number":199,"context_line":"            self.assert_dhcp_resources(network, dhcp_enabled)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def _get_network_port_for_allocation_test(self):"},{"line_number":202,"context_line":"        network \u003d self.network_dict_for_dhcp()"},{"line_number":203,"context_line":"        self.configure_dhcp_for_network(network\u003dnetwork)"},{"line_number":204,"context_line":"        ip_addr \u003d netaddr.IPNetwork(network.subnets[0].cidr)[1]"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a4dcd0f_2b22ca52","line":201,"updated":"2015-08-12 01:05:58.000000000","message":"This should be moved to the framework class?","commit_id":"12a639295223d218a02149892feb6072b50635a8"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"ae317d60fe5ec274ac5207ed137ba006d2bb40eb","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                dhcp_enabled, ip_version\u003dversion)"},{"line_number":199,"context_line":"            self.assert_dhcp_resources(network, dhcp_enabled)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def _get_network_port_for_allocation_test(self):"},{"line_number":202,"context_line":"        network \u003d self.network_dict_for_dhcp()"},{"line_number":203,"context_line":"        self.configure_dhcp_for_network(network\u003dnetwork)"},{"line_number":204,"context_line":"        ip_addr \u003d netaddr.IPNetwork(network.subnets[0].cidr)[1]"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a4dcd0f_c3f773d1","line":201,"in_reply_to":"1a4dcd0f_2b22ca52","updated":"2015-08-12 16:11:07.000000000","message":"Yep, this can be done without any issues","commit_id":"12a639295223d218a02149892feb6072b50635a8"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ac6bf9b819c3caac5db3116f492899896d3ecef3","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"class DHCPAgentOVSTestFramework(base.BaseOVSLinuxTestCase):"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    _DHCP_PORT_MAC_ADRESS \u003d netaddr.EUI(\"24:77:03:7d:00:4c\")"},{"line_number":42,"context_line":"    _DHCP_PORT_MAC_ADRESS.dialect \u003d netaddr.mac_unix"},{"line_number":43,"context_line":"    _TENANT_PORT_MAC_ADRESS \u003d netaddr.EUI(\"24:77:03:7d:00:3a\")"},{"line_number":44,"context_line":"    _TENANT_PORT_MAC_ADRESS.dialect \u003d netaddr.mac_unix"}],"source_content_type":"text/x-python","patch_set":37,"id":"fa1b9901_9ac18283","line":41,"updated":"2015-08-17 14:18:56.000000000","message":"+1 great change with the variable names.","commit_id":"5caf4d4b5fbece05f05cfa76c03851dac717cc99"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"1cf36f0e3676be1870429a976f552885ac2b301d","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        self.assertEqual([], ip_list)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def _run_dhclient(self, vif_name, network):"},{"line_number":217,"context_line":"        dhclient_cmd \u003d [\u0027dhclient\u0027, \u0027-d\u0027, \u0027-1\u0027, \u0027%s\u0027 % (vif_name)]"},{"line_number":218,"context_line":"        proc \u003d net_helpers.RootHelperProcess("},{"line_number":219,"context_line":"            cmd\u003ddhclient_cmd, namespace\u003dnetwork.namespace)"},{"line_number":220,"context_line":"        self.addCleanup(self._cleanup_dhclient, proc)"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a4dcd0f_027650d8","line":217,"updated":"2015-08-14 08:01:34.000000000","message":"In my experience this will overwrite system /etc/resolv.conf with whatever we provided via DHCP.\n\nCan you check it locally?\n\n\nSee [1], probably the most suitable is option 3, grabbing the system resolv.conf DNSs first.\n\n[1] http://www.cyberciti.biz/faq/dhclient-etcresolvconf-hooks/","commit_id":"5caf4d4b5fbece05f05cfa76c03851dac717cc99"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"d623051eb962db0366b65007e6ab79f558c3ef1e","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        self.assertEqual([], ip_list)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def _run_dhclient(self, vif_name, network):"},{"line_number":217,"context_line":"        dhclient_cmd \u003d [\u0027dhclient\u0027, \u0027-d\u0027, \u0027-1\u0027, \u0027%s\u0027 % (vif_name)]"},{"line_number":218,"context_line":"        proc \u003d net_helpers.RootHelperProcess("},{"line_number":219,"context_line":"            cmd\u003ddhclient_cmd, namespace\u003dnetwork.namespace)"},{"line_number":220,"context_line":"        self.addCleanup(self._cleanup_dhclient, proc)"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a4dcd0f_053e5a29","line":217,"in_reply_to":"1a4dcd0f_027650d8","updated":"2015-08-14 08:37:16.000000000","message":"I checked it locally and this is really happening, after running dhclient system /etc/resolv.conf are overrated. Miguel, thanks for review and suggestion how to resolve it. I will fix it in next patchset.","commit_id":"5caf4d4b5fbece05f05cfa76c03851dac717cc99"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"add1d636badb66880488d4fe9e80d09a9af6bf07","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        self.assertEqual([], ip_list)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def _run_dhclient(self, vif_name, network):"},{"line_number":217,"context_line":"        dhclient_cmd \u003d [\u0027dhclient\u0027, \u0027-d\u0027, \u0027-1\u0027, \u0027%s\u0027 % (vif_name)]"},{"line_number":218,"context_line":"        proc \u003d net_helpers.RootHelperProcess("},{"line_number":219,"context_line":"            cmd\u003ddhclient_cmd, namespace\u003dnetwork.namespace)"},{"line_number":220,"context_line":"        self.addCleanup(self._cleanup_dhclient, proc)"}],"source_content_type":"text/x-python","patch_set":37,"id":"fa1b9901_a62fd63d","line":217,"in_reply_to":"1a4dcd0f_027650d8","updated":"2015-08-20 16:47:05.000000000","message":"Miguel, I found a proper way how to solve this problem. dhclient is run in a namespace and if the resolv.conf exists in /etc/netns/*dhcp-agent namespace name*/ folder, then all commands are running in this namespace will be used (if necessary) the file from namespace, instead of system file /etc/resolv.conf. As a result, in this case all we do, we do in the \"sandbox\" and don\u0027t change any system files, such as /etc/dhcp/dhclient.conf and etc.","commit_id":"5caf4d4b5fbece05f05cfa76c03851dac717cc99"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"692df15b7177b3c1a7d3229b96d72acccbdf6124","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        network.ports.append(port)"},{"line_number":248,"context_line":"        process_monitor \u003d external_process.ProcessMonitor("},{"line_number":249,"context_line":"            config\u003dcfg.CONF, resource_type\u003d\u0027dhcp\u0027)"},{"line_number":250,"context_line":"        dhcp_driver \u003d self.agent.dhcp_driver_cls("},{"line_number":251,"context_line":"            cfg.CONF, network, process_monitor)"},{"line_number":252,"context_line":"        dhcp_driver.reload_allocations()"},{"line_number":253,"context_line":"        self._plug_port_for_dhcp_request(network, port)"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a4dcd0f_e567aeb5","line":250,"updated":"2015-08-14 08:12:13.000000000","message":"In this test we\u0027re effectively testing the dhcp driver, more than the agent itself.\n\nDo we have some way of passing down the network to the agent instead of jumping over it and going straight to the driver so we also make sure the logic in the agent is working?.","commit_id":"5caf4d4b5fbece05f05cfa76c03851dac717cc99"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"d623051eb962db0366b65007e6ab79f558c3ef1e","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        network.ports.append(port)"},{"line_number":248,"context_line":"        process_monitor \u003d external_process.ProcessMonitor("},{"line_number":249,"context_line":"            config\u003dcfg.CONF, resource_type\u003d\u0027dhcp\u0027)"},{"line_number":250,"context_line":"        dhcp_driver \u003d self.agent.dhcp_driver_cls("},{"line_number":251,"context_line":"            cfg.CONF, network, process_monitor)"},{"line_number":252,"context_line":"        dhcp_driver.reload_allocations()"},{"line_number":253,"context_line":"        self._plug_port_for_dhcp_request(network, port)"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a4dcd0f_28e32b07","line":250,"in_reply_to":"1a4dcd0f_e567aeb5","updated":"2015-08-14 08:37:16.000000000","message":"Interesting point, I will going to research this more.","commit_id":"5caf4d4b5fbece05f05cfa76c03851dac717cc99"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"692df15b7177b3c1a7d3229b96d72acccbdf6124","unresolved":false,"context_lines":[{"line_number":260,"context_line":"            config\u003dcfg.CONF, resource_type\u003d\u0027dhcp\u0027)"},{"line_number":261,"context_line":"        dhcp_driver \u003d self.agent.dhcp_driver_cls("},{"line_number":262,"context_line":"            cfg.CONF, network, process_monitor)"},{"line_number":263,"context_line":"        dhcp_driver.reload_allocations()"},{"line_number":264,"context_line":"        bad_mac_adress \u003d netaddr.EUI(self._TENANT_PORT_MAC_ADRESS.value + 1)"},{"line_number":265,"context_line":"        bad_mac_adress.dialect \u003d netaddr.mac_unix"},{"line_number":266,"context_line":"        port.mac_address \u003d str(bad_mac_adress)"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a4dcd0f_25e35607","line":263,"updated":"2015-08-14 08:12:13.000000000","message":"Ditto. Also I see a lot of replication with the previous test.","commit_id":"5caf4d4b5fbece05f05cfa76c03851dac717cc99"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"193bae1aba1965acbc229fc1e1aef3f79cfff343","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        self.assertEqual([], ip_list)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def _run_dhclient(self, vif_name, network):"},{"line_number":217,"context_line":"        # at the first, create resolv.conf in dhcp-agent namespace"},{"line_number":218,"context_line":"        # otherwise, dhclient will override system /etc/resolv.conf"},{"line_number":219,"context_line":"        cmd \u003d [\u0027mkdir\u0027, \u0027-p\u0027, \u0027/etc/netns/%s\u0027 % network.namespace]"},{"line_number":220,"context_line":"        utils.execute(cmd\u003dcmd, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":41,"id":"da20952f_a2efb6e7","line":217,"updated":"2015-09-06 20:35:41.000000000","message":"i am wondering if we should not run dhclient in a specific namespace","commit_id":"799b76e36066ccd36f1902117c7d1585e8cbb460"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"3b0b8217f8e73a1e8d90a933d27a40546f0d181c","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        self.assertEqual([], ip_list)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def _run_dhclient(self, vif_name, network):"},{"line_number":217,"context_line":"        # at the first, create resolv.conf in dhcp-agent namespace"},{"line_number":218,"context_line":"        # otherwise, dhclient will override system /etc/resolv.conf"},{"line_number":219,"context_line":"        cmd \u003d [\u0027mkdir\u0027, \u0027-p\u0027, \u0027/etc/netns/%s\u0027 % network.namespace]"},{"line_number":220,"context_line":"        utils.execute(cmd\u003dcmd, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":41,"id":"da20952f_c78bc6c1","line":217,"in_reply_to":"da20952f_1294a788","updated":"2015-09-07 13:25:29.000000000","message":"a-ha, got it. will try to do it","commit_id":"799b76e36066ccd36f1902117c7d1585e8cbb460"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"85c6d6442826d233277bac17805dfab7fbece941","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        self.assertEqual([], ip_list)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def _run_dhclient(self, vif_name, network):"},{"line_number":217,"context_line":"        # at the first, create resolv.conf in dhcp-agent namespace"},{"line_number":218,"context_line":"        # otherwise, dhclient will override system /etc/resolv.conf"},{"line_number":219,"context_line":"        cmd \u003d [\u0027mkdir\u0027, \u0027-p\u0027, \u0027/etc/netns/%s\u0027 % network.namespace]"},{"line_number":220,"context_line":"        utils.execute(cmd\u003dcmd, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":41,"id":"da20952f_1294a788","line":217,"in_reply_to":"da20952f_62067e87","updated":"2015-09-07 09:26:28.000000000","message":"the idea was to have 2 namespaces: one for dhcp-agent, one simulating a VM (FakeMachine?) interconnected using the OVS integration bridge","commit_id":"799b76e36066ccd36f1902117c7d1585e8cbb460"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"00b537725afa0245e8b17441557dc2415fb34da3","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        self.assertEqual([], ip_list)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def _run_dhclient(self, vif_name, network):"},{"line_number":217,"context_line":"        # at the first, create resolv.conf in dhcp-agent namespace"},{"line_number":218,"context_line":"        # otherwise, dhclient will override system /etc/resolv.conf"},{"line_number":219,"context_line":"        cmd \u003d [\u0027mkdir\u0027, \u0027-p\u0027, \u0027/etc/netns/%s\u0027 % network.namespace]"},{"line_number":220,"context_line":"        utils.execute(cmd\u003dcmd, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":41,"id":"da20952f_62067e87","line":217,"in_reply_to":"da20952f_a2efb6e7","updated":"2015-09-07 08:12:13.000000000","message":"Cedric, actually, we should. The tap-interface appears in dhcp-agent\u0027s namespace (when we \"emulate\" the vm connection in _plug_port_for_dhcp_request method) and not available in global namespace","commit_id":"799b76e36066ccd36f1902117c7d1585e8cbb460"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"193bae1aba1965acbc229fc1e1aef3f79cfff343","unresolved":false,"context_lines":[{"line_number":216,"context_line":"    def _run_dhclient(self, vif_name, network):"},{"line_number":217,"context_line":"        # at the first, create resolv.conf in dhcp-agent namespace"},{"line_number":218,"context_line":"        # otherwise, dhclient will override system /etc/resolv.conf"},{"line_number":219,"context_line":"        cmd \u003d [\u0027mkdir\u0027, \u0027-p\u0027, \u0027/etc/netns/%s\u0027 % network.namespace]"},{"line_number":220,"context_line":"        utils.execute(cmd\u003dcmd, run_as_root\u003dTrue)"},{"line_number":221,"context_line":"        cmd \u003d [\u0027touch\u0027, \u0027/etc/netns/%s/resolv.conf\u0027 % network.namespace]"},{"line_number":222,"context_line":"        utils.execute(cmd\u003dcmd, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":41,"id":"da20952f_220de6e7","line":219,"updated":"2015-09-06 20:35:41.000000000","message":"/etc/netns/\u003cnamespace\u003e is not deleted if L222 or L224 fails + i would prefer we define a FixedDirFixture fixture to handle directory create/delete.","commit_id":"799b76e36066ccd36f1902117c7d1585e8cbb460"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"00b537725afa0245e8b17441557dc2415fb34da3","unresolved":false,"context_lines":[{"line_number":216,"context_line":"    def _run_dhclient(self, vif_name, network):"},{"line_number":217,"context_line":"        # at the first, create resolv.conf in dhcp-agent namespace"},{"line_number":218,"context_line":"        # otherwise, dhclient will override system /etc/resolv.conf"},{"line_number":219,"context_line":"        cmd \u003d [\u0027mkdir\u0027, \u0027-p\u0027, \u0027/etc/netns/%s\u0027 % network.namespace]"},{"line_number":220,"context_line":"        utils.execute(cmd\u003dcmd, run_as_root\u003dTrue)"},{"line_number":221,"context_line":"        cmd \u003d [\u0027touch\u0027, \u0027/etc/netns/%s/resolv.conf\u0027 % network.namespace]"},{"line_number":222,"context_line":"        utils.execute(cmd\u003dcmd, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":41,"id":"da20952f_82095297","line":219,"in_reply_to":"da20952f_220de6e7","updated":"2015-09-07 08:12:13.000000000","message":"I think, that using FixedDirFixture is good idea, I will do it. Thanks!","commit_id":"799b76e36066ccd36f1902117c7d1585e8cbb460"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"78752b6b2db824edd1beaad370f34fcbe93e8a77","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        utils.wait_until_true(predicate, 10)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        ip_list \u003d self._ip_list_for_vif(vif_name, network.namespace)"},{"line_number":205,"context_line":"        ip_addr \u003d ip_list[0].get(\u0027cidr\u0027)[:-3]"},{"line_number":206,"context_line":"        self.assertEqual(port.fixed_ips[0].ip_address, ip_addr)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def assert_bad_allocation_for_port(self, network, port):"}],"source_content_type":"text/x-python","patch_set":44,"id":"da20952f_b7797a95","line":205,"updated":"2015-09-11 08:12:53.000000000","message":"does -3 here means to strip /24 ?\n\nhow about str(netaddr.IPNetwork(cidr).ip) ?","commit_id":"29a7779c9db25513e378e7483e1f9990a3fd2c86"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"ee358cc381c4636fc2abae71df8da7556cf55eae","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        utils.wait_until_true(predicate, 10)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        ip_list \u003d self._ip_list_for_vif(vif_name, network.namespace)"},{"line_number":205,"context_line":"        ip_addr \u003d ip_list[0].get(\u0027cidr\u0027)[:-3]"},{"line_number":206,"context_line":"        self.assertEqual(port.fixed_ips[0].ip_address, ip_addr)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def assert_bad_allocation_for_port(self, network, port):"}],"source_content_type":"text/x-python","patch_set":44,"id":"da20952f_17d2a600","line":205,"in_reply_to":"da20952f_b7797a95","updated":"2015-09-11 08:27:54.000000000","message":"Yeah, that\u0027s right. Will fix it, thanks.","commit_id":"29a7779c9db25513e378e7483e1f9990a3fd2c86"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"5bd70a0c712e99d8d76e789e833fddcdb0eae683","unresolved":false,"context_lines":[{"line_number":37,"context_line":"from neutron.tests.functional.agent.linux import helpers"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"class DHCPAgentOVSTestFramework(base.BaseOVSLinuxTestCase):"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    _DHCP_PORT_MAC_ADDRESS \u003d netaddr.EUI(\"24:77:03:7d:00:4c\")"},{"line_number":43,"context_line":"    _DHCP_PORT_MAC_ADDRESS.dialect \u003d netaddr.mac_unix"}],"source_content_type":"text/x-python","patch_set":49,"id":"7a2fa921_19975d49","line":40,"updated":"2015-10-07 17:19:20.000000000","message":"There\u0027s no reason to inherit from BaseOVSLinuxTestCase, that means the tests will run twice, once with each ovs_lib implementation. We went through this before with the L3 agent and it was decided to run against only one interface (The default one). We have tests that test ovs_lib explicitly, as well as tests that test the L3 agent\u0027s and DHCP agent\u0027s interaction with ovs_lib (plug_port).\n\nYou can inherit from the functional base class found in neutron.tests.functional.base instead.","commit_id":"85fab12e68e92547dc8d35959ef99fa2b21fecfc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"910b86b907ef82bdf14fb4245e0aaf6fade25dbc","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def setUp(self):"},{"line_number":56,"context_line":"        super(DHCPAgentOVSTestFramework, self).setUp()"},{"line_number":57,"context_line":"        self._configure()"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _configure(self):"},{"line_number":60,"context_line":"        config.setup_logging()"}],"source_content_type":"text/x-python","patch_set":51,"id":"7a2fa921_30b8ca74","line":57,"updated":"2015-10-09 13:27:12.000000000","message":"nit: Not sure why _configure() body is a separate method and not part of setUp()","commit_id":"0d32b7c874139a13b6434c94b7d9300bcd08ff57"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"f8d78896f5c489d4b387cd94ed819bb9652893c7","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def setUp(self):"},{"line_number":56,"context_line":"        super(DHCPAgentOVSTestFramework, self).setUp()"},{"line_number":57,"context_line":"        self._configure()"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _configure(self):"},{"line_number":60,"context_line":"        config.setup_logging()"}],"source_content_type":"text/x-python","patch_set":51,"id":"7a2fa921_87e1269d","line":57,"in_reply_to":"7a2fa921_30b8ca74","updated":"2015-10-12 13:38:52.000000000","message":"Ihar, it was separated since first patch-set. I think we can move _configure() body in setUp() method. I will do it.","commit_id":"0d32b7c874139a13b6434c94b7d9300bcd08ff57"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"dc4b9ea83aadac912eb5cd78c4e4e576f10656f7","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def setUp(self):"},{"line_number":56,"context_line":"        super(DHCPAgentOVSTestFramework, self).setUp()"},{"line_number":57,"context_line":"        self._configure()"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _configure(self):"},{"line_number":60,"context_line":"        config.setup_logging()"}],"source_content_type":"text/x-python","patch_set":51,"id":"5a2ca52d_6f313aa2","line":57,"in_reply_to":"7a2fa921_87e1269d","updated":"2015-10-13 16:55:57.000000000","message":"Done","commit_id":"0d32b7c874139a13b6434c94b7d9300bcd08ff57"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"910b86b907ef82bdf14fb4245e0aaf6fade25dbc","unresolved":false,"context_lines":[{"line_number":220,"context_line":"    def _run_dhclient(self, vif_name, network):"},{"line_number":221,"context_line":"        # at the first, create resolv.conf in dhcp-agent namespace"},{"line_number":222,"context_line":"        # otherwise, dhclient will override system /etc/resolv.conf"},{"line_number":223,"context_line":"        etc_dir \u003d \u0027/etc/netns/%s\u0027 % network.namespace"},{"line_number":224,"context_line":"        self.useFixture(helpers.TempDirFixture(etc_dir))"},{"line_number":225,"context_line":"        cmd \u003d [\u0027touch\u0027, os.path.join(etc_dir, \u0027resolv.conf\u0027)]"},{"line_number":226,"context_line":"        utils.execute(cmd, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":51,"id":"7a2fa921_eb7583ca","line":223,"updated":"2015-10-09 13:27:12.000000000","message":"I think it\u0027s worth a TODO and an explanation why we touch system level /etc/ config directory, and why we think it\u0027s ok for now.","commit_id":"0d32b7c874139a13b6434c94b7d9300bcd08ff57"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"dc4b9ea83aadac912eb5cd78c4e4e576f10656f7","unresolved":false,"context_lines":[{"line_number":220,"context_line":"    def _run_dhclient(self, vif_name, network):"},{"line_number":221,"context_line":"        # at the first, create resolv.conf in dhcp-agent namespace"},{"line_number":222,"context_line":"        # otherwise, dhclient will override system /etc/resolv.conf"},{"line_number":223,"context_line":"        etc_dir \u003d \u0027/etc/netns/%s\u0027 % network.namespace"},{"line_number":224,"context_line":"        self.useFixture(helpers.TempDirFixture(etc_dir))"},{"line_number":225,"context_line":"        cmd \u003d [\u0027touch\u0027, os.path.join(etc_dir, \u0027resolv.conf\u0027)]"},{"line_number":226,"context_line":"        utils.execute(cmd, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":51,"id":"5a2ca52d_ef1d4a10","line":223,"in_reply_to":"7a2fa921_53bd1001","updated":"2015-10-13 16:55:57.000000000","message":"Done","commit_id":"0d32b7c874139a13b6434c94b7d9300bcd08ff57"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"f8d78896f5c489d4b387cd94ed819bb9652893c7","unresolved":false,"context_lines":[{"line_number":220,"context_line":"    def _run_dhclient(self, vif_name, network):"},{"line_number":221,"context_line":"        # at the first, create resolv.conf in dhcp-agent namespace"},{"line_number":222,"context_line":"        # otherwise, dhclient will override system /etc/resolv.conf"},{"line_number":223,"context_line":"        etc_dir \u003d \u0027/etc/netns/%s\u0027 % network.namespace"},{"line_number":224,"context_line":"        self.useFixture(helpers.TempDirFixture(etc_dir))"},{"line_number":225,"context_line":"        cmd \u003d [\u0027touch\u0027, os.path.join(etc_dir, \u0027resolv.conf\u0027)]"},{"line_number":226,"context_line":"        utils.execute(cmd, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":51,"id":"7a2fa921_53bd1001","line":223,"in_reply_to":"7a2fa921_eb7583ca","updated":"2015-10-12 13:38:52.000000000","message":"Ihar, I will rewrite it in next PS.","commit_id":"0d32b7c874139a13b6434c94b7d9300bcd08ff57"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"910b86b907ef82bdf14fb4245e0aaf6fade25dbc","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        self.useFixture(helpers.TempDirFixture(etc_dir))"},{"line_number":225,"context_line":"        cmd \u003d [\u0027touch\u0027, os.path.join(etc_dir, \u0027resolv.conf\u0027)]"},{"line_number":226,"context_line":"        utils.execute(cmd, run_as_root\u003dTrue)"},{"line_number":227,"context_line":"        dhclient_cmd \u003d [\u0027dhclient\u0027, \u0027--no-pid\u0027, \u0027-d\u0027, \u0027-1\u0027, \u0027%s\u0027 % (vif_name)]"},{"line_number":228,"context_line":"        proc \u003d net_helpers.RootHelperProcess("},{"line_number":229,"context_line":"            cmd\u003ddhclient_cmd, namespace\u003dnetwork.namespace)"},{"line_number":230,"context_line":"        self.addCleanup(proc.wait)"}],"source_content_type":"text/x-python","patch_set":51,"id":"7a2fa921_8b6baf84","line":227,"updated":"2015-10-09 13:27:12.000000000","message":"Shouldn\u0027t we install dhclient as part of functional environment preparation then?\n\nAnother question: --no-pid argument was added in isc dhcp package since 4.2.0. Debian 6.0 still contains 4.1.1. Are we ok with it? Are we sure 4.2.0+ has reasonable adoption around platforms we target?\n\nAlso nitty nit: why do we need to %s for a single string?","commit_id":"0d32b7c874139a13b6434c94b7d9300bcd08ff57"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"f8d78896f5c489d4b387cd94ed819bb9652893c7","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        self.useFixture(helpers.TempDirFixture(etc_dir))"},{"line_number":225,"context_line":"        cmd \u003d [\u0027touch\u0027, os.path.join(etc_dir, \u0027resolv.conf\u0027)]"},{"line_number":226,"context_line":"        utils.execute(cmd, run_as_root\u003dTrue)"},{"line_number":227,"context_line":"        dhclient_cmd \u003d [\u0027dhclient\u0027, \u0027--no-pid\u0027, \u0027-d\u0027, \u0027-1\u0027, \u0027%s\u0027 % (vif_name)]"},{"line_number":228,"context_line":"        proc \u003d net_helpers.RootHelperProcess("},{"line_number":229,"context_line":"            cmd\u003ddhclient_cmd, namespace\u003dnetwork.namespace)"},{"line_number":230,"context_line":"        self.addCleanup(proc.wait)"}],"source_content_type":"text/x-python","patch_set":51,"id":"7a2fa921_f3f69cf8","line":227,"in_reply_to":"7a2fa921_8b6baf84","updated":"2015-10-12 13:38:52.000000000","message":"I can add dhclient to requirements for functional environment if it needed. But how can I do it? Can you show me some examples?\n\nWhy we should support Debian 6.0 with old version of dhclient? Anyway, tests succeeded in our gates and I think that\u0027s enough.\n\n%s will be fixed in new PS.","commit_id":"0d32b7c874139a13b6434c94b7d9300bcd08ff57"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f34d96317d41efcb706cf2d6e4e57c8e0cb09952","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        self.useFixture(helpers.TempDirFixture(etc_dir))"},{"line_number":225,"context_line":"        cmd \u003d [\u0027touch\u0027, os.path.join(etc_dir, \u0027resolv.conf\u0027)]"},{"line_number":226,"context_line":"        utils.execute(cmd, run_as_root\u003dTrue)"},{"line_number":227,"context_line":"        dhclient_cmd \u003d [\u0027dhclient\u0027, \u0027--no-pid\u0027, \u0027-d\u0027, \u0027-1\u0027, \u0027%s\u0027 % (vif_name)]"},{"line_number":228,"context_line":"        proc \u003d net_helpers.RootHelperProcess("},{"line_number":229,"context_line":"            cmd\u003ddhclient_cmd, namespace\u003dnetwork.namespace)"},{"line_number":230,"context_line":"        self.addCleanup(proc.wait)"}],"source_content_type":"text/x-python","patch_set":51,"id":"7a2fa921_cb0ba42a","line":227,"in_reply_to":"7a2fa921_f3f69cf8","updated":"2015-10-12 14:39:31.000000000","message":"I believe https://github.com/openstack/neutron/blob/master/tools/configure_for_func_testing.sh#L83 should be updated.","commit_id":"0d32b7c874139a13b6434c94b7d9300bcd08ff57"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"910b86b907ef82bdf14fb4245e0aaf6fade25dbc","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        for version in [4, 6]:"},{"line_number":248,"context_line":"            network \u003d self.network_dict_for_dhcp("},{"line_number":249,"context_line":"                dhcp_enabled, ip_version\u003dversion)"},{"line_number":250,"context_line":"            self.assert_dhcp_resources(network, dhcp_enabled)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def test_good_address_allocation(self):"},{"line_number":253,"context_line":"        network, port \u003d self._get_network_port_for_allocation_test()"}],"source_content_type":"text/x-python","patch_set":51,"id":"7a2fa921_ebc26384","line":250,"updated":"2015-10-09 13:27:12.000000000","message":"I don\u0027t follow this test. It merely generates a dict and then validates that there are no dhcp resources on the system. But you never trigger dhcp configuration that could in theory create those resources. So the test won\u0027t ever fail.","commit_id":"0d32b7c874139a13b6434c94b7d9300bcd08ff57"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"dc4b9ea83aadac912eb5cd78c4e4e576f10656f7","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        for version in [4, 6]:"},{"line_number":248,"context_line":"            network \u003d self.network_dict_for_dhcp("},{"line_number":249,"context_line":"                dhcp_enabled, ip_version\u003dversion)"},{"line_number":250,"context_line":"            self.assert_dhcp_resources(network, dhcp_enabled)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def test_good_address_allocation(self):"},{"line_number":253,"context_line":"        network, port \u003d self._get_network_port_for_allocation_test()"}],"source_content_type":"text/x-python","patch_set":51,"id":"5a2ca52d_8f1a9616","line":250,"in_reply_to":"7a2fa921_13c6b816","updated":"2015-10-13 16:55:57.000000000","message":"Done","commit_id":"0d32b7c874139a13b6434c94b7d9300bcd08ff57"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"f8d78896f5c489d4b387cd94ed819bb9652893c7","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        for version in [4, 6]:"},{"line_number":248,"context_line":"            network \u003d self.network_dict_for_dhcp("},{"line_number":249,"context_line":"                dhcp_enabled, ip_version\u003dversion)"},{"line_number":250,"context_line":"            self.assert_dhcp_resources(network, dhcp_enabled)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def test_good_address_allocation(self):"},{"line_number":253,"context_line":"        network, port \u003d self._get_network_port_for_allocation_test()"}],"source_content_type":"text/x-python","patch_set":51,"id":"7a2fa921_13c6b816","line":250,"in_reply_to":"7a2fa921_ebc26384","updated":"2015-10-12 13:38:52.000000000","message":"This test is very questionable and there was a lot of questions about it. I will remove it in next PS.","commit_id":"0d32b7c874139a13b6434c94b7d9300bcd08ff57"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"01ae334953e489a2d8e4c5ac24d71b07f5bd96a4","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        ip_list \u003d self._ip_list_for_vif(vif_name, network.namespace)"},{"line_number":203,"context_line":"        cidr \u003d ip_list[0].get(\u0027cidr\u0027)"},{"line_number":204,"context_line":"        ip_addr \u003d str(netaddr.IPNetwork(cidr).ip)"},{"line_number":205,"context_line":"        self.assertEqual(port.fixed_ips[0].ip_address, ip_addr)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    def assert_bad_allocation_for_port(self, network, port):"},{"line_number":208,"context_line":"        vif_name \u003d self.get_interface_name(network.id, port)"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a2ca52d_690908dd","line":205,"updated":"2015-10-14 15:06:47.000000000","message":"how about checking the contents of resolv.conf as well?","commit_id":"df67e942572738857e6f88ab38a08d73a2678887"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"7c8b786aeab3c0ed35a1367b5deaa0bc3fa7f3e7","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        ip_list \u003d self._ip_list_for_vif(vif_name, network.namespace)"},{"line_number":203,"context_line":"        cidr \u003d ip_list[0].get(\u0027cidr\u0027)"},{"line_number":204,"context_line":"        ip_addr \u003d str(netaddr.IPNetwork(cidr).ip)"},{"line_number":205,"context_line":"        self.assertEqual(port.fixed_ips[0].ip_address, ip_addr)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    def assert_bad_allocation_for_port(self, network, port):"},{"line_number":208,"context_line":"        vif_name \u003d self.get_interface_name(network.id, port)"}],"source_content_type":"text/x-python","patch_set":54,"id":"3a29b11f_1b4a8a26","line":205,"in_reply_to":"5a2ca52d_10641ee2","updated":"2015-10-22 15:15:21.000000000","message":"I think, that checking the contents of resolv.conf (and dhclient.leases) is not necessary. It has to do with inner work of dhclient and dnsmasq and we don\u0027t need to check this out in these functional tests.","commit_id":"df67e942572738857e6f88ab38a08d73a2678887"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"3b27a217bfa16d497985dda908a558b39c720371","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        ip_list \u003d self._ip_list_for_vif(vif_name, network.namespace)"},{"line_number":203,"context_line":"        cidr \u003d ip_list[0].get(\u0027cidr\u0027)"},{"line_number":204,"context_line":"        ip_addr \u003d str(netaddr.IPNetwork(cidr).ip)"},{"line_number":205,"context_line":"        self.assertEqual(port.fixed_ips[0].ip_address, ip_addr)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    def assert_bad_allocation_for_port(self, network, port):"},{"line_number":208,"context_line":"        vif_name \u003d self.get_interface_name(network.id, port)"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a2ca52d_10641ee2","line":205,"in_reply_to":"5a2ca52d_690908dd","updated":"2015-10-15 06:15:20.000000000","message":"Interesting point. Not sure, that resolv.conf will be useful for us, I will check it. May be is better to check dhclient.leases file.","commit_id":"df67e942572738857e6f88ab38a08d73a2678887"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"01ae334953e489a2d8e4c5ac24d71b07f5bd96a4","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        # system /etc/resolv.conf"},{"line_number":222,"context_line":"        # By default, folder for dhcp-agent\u0027s namespace doesn\u0027t exist"},{"line_number":223,"context_line":"        # that\u0027s why we use AdminTempDirFixture for create directory"},{"line_number":224,"context_line":"        # with admin permissions in /etc/netns/ and touch resolv.conf in it."},{"line_number":225,"context_line":"        etc_dir \u003d \u0027/etc/netns/%s\u0027 % network.namespace"},{"line_number":226,"context_line":"        self.useFixture(helpers.AdminTempDirFixture(etc_dir))"},{"line_number":227,"context_line":"        cmd \u003d [\u0027touch\u0027, os.path.join(etc_dir, \u0027resolv.conf\u0027)]"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a2ca52d_26ec9f8e","line":224,"updated":"2015-10-14 15:06:47.000000000","message":"is dhclient aware of /etc/netns convention?","commit_id":"df67e942572738857e6f88ab38a08d73a2678887"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"3b27a217bfa16d497985dda908a558b39c720371","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        # system /etc/resolv.conf"},{"line_number":222,"context_line":"        # By default, folder for dhcp-agent\u0027s namespace doesn\u0027t exist"},{"line_number":223,"context_line":"        # that\u0027s why we use AdminTempDirFixture for create directory"},{"line_number":224,"context_line":"        # with admin permissions in /etc/netns/ and touch resolv.conf in it."},{"line_number":225,"context_line":"        etc_dir \u003d \u0027/etc/netns/%s\u0027 % network.namespace"},{"line_number":226,"context_line":"        self.useFixture(helpers.AdminTempDirFixture(etc_dir))"},{"line_number":227,"context_line":"        cmd \u003d [\u0027touch\u0027, os.path.join(etc_dir, \u0027resolv.conf\u0027)]"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a2ca52d_f50f2b2c","line":224,"in_reply_to":"5a2ca52d_26ec9f8e","updated":"2015-10-15 06:15:20.000000000","message":"No, it\u0027s provides netns. From ip-netns man:\n\n    For example, if you want a different\n    version of /etc/resolv.conf for a network namespace used to isolate\n    your vpn you would name it /etc/netns/myvpn/resolv.conf","commit_id":"df67e942572738857e6f88ab38a08d73a2678887"}],"neutron/tests/functional/agent/test_dhcp_agent_ovs.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c83f7cddf0076e159602b761c967e8be88c20cb1","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from neutron.tests.functional.agent.linux import base"},{"line_number":21,"context_line":"from neutron.tests.functional.agent import test_dhcp_agent"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class DHCPAgentOVSTestFramework(test_dhcp_agent.DHCPAgentTestFramework,"},{"line_number":25,"context_line":"                                base.BaseOVSLinuxTestCase):"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_3b1da374","line":23,"updated":"2014-12-07 12:17:18.000000000","message":"I think that having these two classes in a separate file does more harm than good.","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"30aa49078f2ac595aa86b78c6e7257a1ab547a5c","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from neutron.tests.functional.agent.linux import base"},{"line_number":21,"context_line":"from neutron.tests.functional.agent import test_dhcp_agent"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class DHCPAgentOVSTestFramework(test_dhcp_agent.DHCPAgentTestFramework,"},{"line_number":25,"context_line":"                                base.BaseOVSLinuxTestCase):"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_23498e8b","line":23,"in_reply_to":"3a961159_3b1da374","updated":"2014-12-11 12:31:11.000000000","message":"I\u0027ve actually just decided to baptize this as ovs-specific and put into a single file for now, see what you think","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c83f7cddf0076e159602b761c967e8be88c20cb1","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        dhcp_agent.register_options()"},{"line_number":35,"context_line":"        cfg.CONF.set_override("},{"line_number":36,"context_line":"            \u0027interface_driver\u0027,"},{"line_number":37,"context_line":"            \u0027neutron.agent.linux.interface.OVSInterfaceDriver\u0027)"},{"line_number":38,"context_line":"        cfg.CONF.set_override(\u0027ovs_use_veth\u0027, False)"},{"line_number":39,"context_line":"        br_int \u003d self.create_ovs_bridge()"},{"line_number":40,"context_line":"        cfg.CONF.set_override(\u0027ovs_integration_bridge\u0027, br_int.br_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_e61c626d","line":37,"updated":"2014-12-07 12:17:18.000000000","message":"False is the default.","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"30aa49078f2ac595aa86b78c6e7257a1ab547a5c","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        dhcp_agent.register_options()"},{"line_number":35,"context_line":"        cfg.CONF.set_override("},{"line_number":36,"context_line":"            \u0027interface_driver\u0027,"},{"line_number":37,"context_line":"            \u0027neutron.agent.linux.interface.OVSInterfaceDriver\u0027)"},{"line_number":38,"context_line":"        cfg.CONF.set_override(\u0027ovs_use_veth\u0027, False)"},{"line_number":39,"context_line":"        br_int \u003d self.create_ovs_bridge()"},{"line_number":40,"context_line":"        cfg.CONF.set_override(\u0027ovs_integration_bridge\u0027, br_int.br_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_43269acf","line":37,"in_reply_to":"3a961159_e61c626d","updated":"2014-12-11 12:31:11.000000000","message":"Done","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c83f7cddf0076e159602b761c967e8be88c20cb1","unresolved":false,"context_lines":[{"line_number":37,"context_line":"            \u0027neutron.agent.linux.interface.OVSInterfaceDriver\u0027)"},{"line_number":38,"context_line":"        cfg.CONF.set_override(\u0027ovs_use_veth\u0027, False)"},{"line_number":39,"context_line":"        br_int \u003d self.create_ovs_bridge()"},{"line_number":40,"context_line":"        cfg.CONF.set_override(\u0027ovs_integration_bridge\u0027, br_int.br_name)"},{"line_number":41,"context_line":"        self.agent \u003d dhcp_agent.DhcpAgentWithStateReport(\u0027localhost\u0027)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def assert_ovs_port(self, iface_name, enable_dhcp\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_26266abb","line":40,"updated":"2014-12-07 12:17:18.000000000","message":"Note that you initialize self.agent in the base class as well.","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"30aa49078f2ac595aa86b78c6e7257a1ab547a5c","unresolved":false,"context_lines":[{"line_number":37,"context_line":"            \u0027neutron.agent.linux.interface.OVSInterfaceDriver\u0027)"},{"line_number":38,"context_line":"        cfg.CONF.set_override(\u0027ovs_use_veth\u0027, False)"},{"line_number":39,"context_line":"        br_int \u003d self.create_ovs_bridge()"},{"line_number":40,"context_line":"        cfg.CONF.set_override(\u0027ovs_integration_bridge\u0027, br_int.br_name)"},{"line_number":41,"context_line":"        self.agent \u003d dhcp_agent.DhcpAgentWithStateReport(\u0027localhost\u0027)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def assert_ovs_port(self, iface_name, enable_dhcp\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_0314924c","line":40,"in_reply_to":"3a961159_26266abb","updated":"2014-12-11 12:31:11.000000000","message":"yeah thanks","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c83f7cddf0076e159602b761c967e8be88c20cb1","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        cfg.CONF.set_override(\u0027ovs_integration_bridge\u0027, br_int.br_name)"},{"line_number":41,"context_line":"        self.agent \u003d dhcp_agent.DhcpAgentWithStateReport(\u0027localhost\u0027)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def assert_ovs_port(self, iface_name, enable_dhcp\u003dTrue):"},{"line_number":44,"context_line":"        ovs \u003d ovs_lib.BaseOVS(self.root_helper)"},{"line_number":45,"context_line":"        self.assertEqual(ovs.port_exists(iface_name), enable_dhcp)"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_860e3e33","line":43,"updated":"2014-12-07 12:17:18.000000000","message":"You can use self.ovs instead.","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"change_message_id":"ab516e430e2ea347ac0765c122e7d73c87b844a4","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def assert_ovs_port(self, iface_name, enable_dhcp\u003dTrue):"},{"line_number":44,"context_line":"        ovs \u003d ovs_lib.BaseOVS(self.root_helper)"},{"line_number":45,"context_line":"        self.assertEqual(ovs.port_exists(iface_name), enable_dhcp)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class DHCPAgentOVSTestCase(DHCPAgentOVSTestFramework):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_7a83aeca","line":45,"updated":"2014-12-05 02:08:49.000000000","message":"Same comment here about expected value first","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"30aa49078f2ac595aa86b78c6e7257a1ab547a5c","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def assert_ovs_port(self, iface_name, enable_dhcp\u003dTrue):"},{"line_number":44,"context_line":"        ovs \u003d ovs_lib.BaseOVS(self.root_helper)"},{"line_number":45,"context_line":"        self.assertEqual(ovs.port_exists(iface_name), enable_dhcp)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class DHCPAgentOVSTestCase(DHCPAgentOVSTestFramework):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_ce03910b","line":45,"in_reply_to":"5a890539_7a83aeca","updated":"2014-12-11 12:31:11.000000000","message":"Done","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c83f7cddf0076e159602b761c967e8be88c20cb1","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class DHCPAgentOVSTestCase(DHCPAgentOVSTestFramework):"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def _assert_dhcp_port(self, network):"},{"line_number":51,"context_line":"        enable_dhcp \u003d network[\u0027subnets\u0027][0][\u0027enable_dhcp\u0027]"},{"line_number":52,"context_line":"        port \u003d network.ports[0]"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_fb023b0a","line":49,"updated":"2014-12-07 12:17:18.000000000","message":"_assert_dhcp_port is pretty misleading... It also checks the namespace existence for example. Maybe _assert_dhcp_resources?","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"30aa49078f2ac595aa86b78c6e7257a1ab547a5c","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class DHCPAgentOVSTestCase(DHCPAgentOVSTestFramework):"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def _assert_dhcp_port(self, network):"},{"line_number":51,"context_line":"        enable_dhcp \u003d network[\u0027subnets\u0027][0][\u0027enable_dhcp\u0027]"},{"line_number":52,"context_line":"        port \u003d network.ports[0]"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_6e1e1d65","line":49,"in_reply_to":"3a961159_fb023b0a","updated":"2014-12-11 12:31:11.000000000","message":"Done","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c83f7cddf0076e159602b761c967e8be88c20cb1","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        self.assert_ovs_port(iface_name, enable_dhcp)"},{"line_number":56,"context_line":"        self.assert_dhcp_namespace(network.namespace, enable_dhcp)"},{"line_number":57,"context_line":"        self.assert_dhcp_device(network.namespace, iface_name, enable_dhcp)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def test_create_subnet_with_dhcp(self):"},{"line_number":60,"context_line":"        for _ip_v in [4, 6]:"},{"line_number":61,"context_line":"            network \u003d self.network_dict_for_dhcp(enable_dhcp\u003dTrue, ip_v\u003d_ip_v)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_bb08b32e","line":58,"updated":"2014-12-07 12:17:18.000000000","message":"I think you can create an internal _test_create_subnet_with_dhcp_flag method then have these two methods call it. Since they\u0027re already so short I don\u0027t know if this approach is necessarily better.","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c83f7cddf0076e159602b761c967e8be88c20cb1","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def test_create_subnet_without_dhcp(self):"},{"line_number":65,"context_line":"        enable_dhcp \u003d False"},{"line_number":66,"context_line":"        for _ip_v in [4, 6]:"},{"line_number":67,"context_line":"            network \u003d self.network_dict_for_dhcp(enable_dhcp, _ip_v)"},{"line_number":68,"context_line":"            self._assert_dhcp_port(network)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_7b172b52","line":66,"updated":"2014-12-07 12:17:18.000000000","message":"Nit of the year: You can just call enable_dhcp\u003dFalse here and not use the enable_dhcp variable defined on line 65.","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"7094d6195624003a8ed0627197240c050f9a75e4","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def test_create_subnet_without_dhcp(self):"},{"line_number":65,"context_line":"        enable_dhcp \u003d False"},{"line_number":66,"context_line":"        for _ip_v in [4, 6]:"},{"line_number":67,"context_line":"            network \u003d self.network_dict_for_dhcp(enable_dhcp, _ip_v)"},{"line_number":68,"context_line":"            self._assert_dhcp_port(network)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_bd73124c","line":66,"in_reply_to":"3a961159_7b172b52","updated":"2014-12-09 08:49:29.000000000","message":"lol @ nit of the year. yeah man makes sense will do","commit_id":"36383bfdcd21d444369249cfe7b880a0b3106c53"}],"neutron/tests/functional/common/functional_dhcp_test_utils.py":[{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"b08552410b8c91b83d44ee7cd32b463318c9d386","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"import mock"},{"line_number":16,"context_line":"from oslo_config import cfg"},{"line_number":17,"context_line":"from oslo_utils import uuidutils"}],"source_content_type":"text/x-python","patch_set":34,"id":"3a50d1a3_613802ef","line":14,"updated":"2015-07-28 05:29:43.000000000","message":"nit: please add a new line here if there is another spin","commit_id":"7b3350ef4360d071f7e931458919e7be35fdf5ff"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"a60c55b0a85c0c861429f4eb07711b755d0ba216","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"import mock"},{"line_number":16,"context_line":"from oslo_config import cfg"},{"line_number":17,"context_line":"from oslo_utils import uuidutils"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a4dcd0f_4fefbdb0","line":14,"in_reply_to":"3a50d1a3_613802ef","updated":"2015-08-03 14:57:19.000000000","message":"Thanks for review! Done.","commit_id":"7b3350ef4360d071f7e931458919e7be35fdf5ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"88c10952ff942cb43ca8cfc01de2da7b738d5b55","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from neutron.common import constants"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class FunctionalDhcpTestUtils(object):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    _MAC_ADDRESS \u003d \u002724:77:03:7d:00:4c\u0027"},{"line_number":27,"context_line":"    _IP_ADDRS \u003d {"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a4dcd0f_d0bc33bd","line":24,"updated":"2015-08-12 01:05:58.000000000","message":"I don\u0027t know if this was recently discussed (You\u0027ll have to excuse me I\u0027m not going through 35 patchsets) but why not move these methods to the other file under DHCPAgentOVSTestFramework?","commit_id":"12a639295223d218a02149892feb6072b50635a8"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"ae317d60fe5ec274ac5207ed137ba006d2bb40eb","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from neutron.common import constants"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class FunctionalDhcpTestUtils(object):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    _MAC_ADDRESS \u003d \u002724:77:03:7d:00:4c\u0027"},{"line_number":27,"context_line":"    _IP_ADDRS \u003d {"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a4dcd0f_cf0b12d4","line":24,"in_reply_to":"1a4dcd0f_d0bc33bd","updated":"2015-08-12 16:11:07.000000000","message":"It was not discussed and I think that\u0027s a good idea.","commit_id":"12a639295223d218a02149892feb6072b50635a8"}],"neutron/tests/functional/common/utils.py":[{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"7b59f7ba7061eeb9edf79e91284c708a8908a41d","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    _MAC_ADDRESS \u003d \u002724:77:03:7d:00:4c\u0027"},{"line_number":47,"context_line":"    _IP_ADDRS \u003d {4: {\u0027addr\u0027: \u0027192.168.10.11\u0027,"},{"line_number":48,"context_line":"                   \u0027cidr\u0027: \u0027192.168.10.0/24\u0027,"},{"line_number":49,"context_line":"                   \u0027gateway\u0027: \u0027192.168.10.1\u0027},"},{"line_number":50,"context_line":"                 6: {\u0027addr\u0027: \u00270:0:0:0:0:ffff:c0a8:a0b\u0027,"},{"line_number":51,"context_line":"                     \u0027cidr\u0027: \u00270:0:0:0:0:ffff:c0a8:a00/120\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_bbd7d34e","line":48,"updated":"2014-12-25 07:46:30.000000000","message":"spaces here.","commit_id":"796b3e60ed057f6f213ef6104a11ee8347ab4681"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"5847fd4c7bfcd397d57cf659c5a3baeb3f92feb5","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    _MAC_ADDRESS \u003d \u002724:77:03:7d:00:4c\u0027"},{"line_number":47,"context_line":"    _IP_ADDRS \u003d {4: {\u0027addr\u0027: \u0027192.168.10.11\u0027,"},{"line_number":48,"context_line":"                   \u0027cidr\u0027: \u0027192.168.10.0/24\u0027,"},{"line_number":49,"context_line":"                   \u0027gateway\u0027: \u0027192.168.10.1\u0027},"},{"line_number":50,"context_line":"                 6: {\u0027addr\u0027: \u00270:0:0:0:0:ffff:c0a8:a0b\u0027,"},{"line_number":51,"context_line":"                     \u0027cidr\u0027: \u00270:0:0:0:0:ffff:c0a8:a00/120\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_5a8ec67a","line":48,"in_reply_to":"3a961159_bbd7d34e","updated":"2014-12-29 13:15:59.000000000","message":"thanks! will eventually get the hang of the expected indentation here. indeed it does look much better when done \u0027properly\u0027","commit_id":"796b3e60ed057f6f213ef6104a11ee8347ab4681"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"67090f477c05fe8967d2a4ba572ca8953e0ac20f","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from neutron.common import constants"},{"line_number":26,"context_line":"from neutron.openstack.common import uuidutils"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"def _server_process(addr, port_number):"},{"line_number":30,"context_line":"    Handler \u003d SimpleHTTPServer.SimpleHTTPRequestHandler"},{"line_number":31,"context_line":"    httpd \u003d SocketServer.TCPServer((addr, port_number), Handler)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_eaea19d7","line":28,"updated":"2014-12-31 18:12:49.000000000","message":"I think these two functions are unused?","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"c553d79ab3f28a6cfd0f2adf6c25accf63a97a8d","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from neutron.common import constants"},{"line_number":26,"context_line":"from neutron.openstack.common import uuidutils"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"def _server_process(addr, port_number):"},{"line_number":30,"context_line":"    Handler \u003d SimpleHTTPServer.SimpleHTTPRequestHandler"},{"line_number":31,"context_line":"    httpd \u003d SocketServer.TCPServer((addr, port_number), Handler)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_09b3d3e9","line":28,"in_reply_to":"3a961159_eaea19d7","updated":"2015-01-05 11:54:56.000000000","message":"sorry for the confusion - this file is also used by the l2-ovs agent tests in review @ [1] - since dependency didn\u0027t make sense imo for dhcp vs ovs-agent tests I decided to carry it in both and then rebase for whichever one doesn\u0027t land first \n\n[1] https://review.openstack.org/#/c/140042/","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"67090f477c05fe8967d2a4ba572ca8953e0ac20f","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    #give it a chance luv"},{"line_number":41,"context_line":"    time.sleep(1)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"class FunctionalTestUtils(object):"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    _MAC_ADDRESS \u003d \u002724:77:03:7d:00:4c\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_4adc0d47","line":43,"updated":"2014-12-31 18:12:49.000000000","message":"I don\u0027t see the point in holding an instance of this class in the DHCP test case. This class should not have instances, it has no state. I\u0027d make all of the functions class methods, or just get rid of the class and move all of the functions to the module level.","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5a59e1ae1c15ce727f0404f2f7d03b68dc728519","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    #give it a chance luv"},{"line_number":41,"context_line":"    time.sleep(1)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"class FunctionalTestUtils(object):"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    _MAC_ADDRESS \u003d \u002724:77:03:7d:00:4c\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_51df590c","line":43,"in_reply_to":"3a961159_4adc0d47","updated":"2015-01-02 11:56:08.000000000","message":"+1 for module level, simplicity first.","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"c553d79ab3f28a6cfd0f2adf6c25accf63a97a8d","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    #give it a chance luv"},{"line_number":41,"context_line":"    time.sleep(1)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"class FunctionalTestUtils(object):"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    _MAC_ADDRESS \u003d \u002724:77:03:7d:00:4c\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_29d08ff6","line":43,"in_reply_to":"3a961159_51df590c","updated":"2015-01-05 11:54:56.000000000","message":"OK will do that for the next revision","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"67090f477c05fe8967d2a4ba572ca8953e0ac20f","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            \u0027addr\u0027: \u00270:0:0:0:0:ffff:c0a8:a0b\u0027,"},{"line_number":54,"context_line":"            \u0027cidr\u0027: \u00270:0:0:0:0:ffff:c0a8:a00/120\u0027,"},{"line_number":55,"context_line":"            \u0027gateway\u0027: \u00270:0:0:0:0:ffff:c0a8:a01\u0027}, }"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def make_single_request(self, addr, port\u003d9999):"},{"line_number":58,"context_line":"        conn \u003d httplib.HTTPConnection(addr, port)"},{"line_number":59,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_2abc21db","line":56,"updated":"2014-12-31 18:12:49.000000000","message":"Unused?","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"c553d79ab3f28a6cfd0f2adf6c25accf63a97a8d","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            \u0027addr\u0027: \u00270:0:0:0:0:ffff:c0a8:a0b\u0027,"},{"line_number":54,"context_line":"            \u0027cidr\u0027: \u00270:0:0:0:0:ffff:c0a8:a00/120\u0027,"},{"line_number":55,"context_line":"            \u0027gateway\u0027: \u00270:0:0:0:0:ffff:c0a8:a01\u0027}, }"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def make_single_request(self, addr, port\u003d9999):"},{"line_number":58,"context_line":"        conn \u003d httplib.HTTPConnection(addr, port)"},{"line_number":59,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_69c37738","line":56,"in_reply_to":"3a961159_2abc21db","updated":"2015-01-05 11:54:56.000000000","message":"see comment at #28 above - this is used by the l2-ovs tests","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"67090f477c05fe8967d2a4ba572ca8953e0ac20f","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        except Exception:"},{"line_number":62,"context_line":"            return False"},{"line_number":63,"context_line":"        return True"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def get_interface_name(self, network, port):"},{"line_number":66,"context_line":"        device_manager \u003d dhcp.DeviceManager(conf\u003dcfg.CONF,"},{"line_number":67,"context_line":"                        root_helper\u003dcfg.CONF.root_helper, plugin\u003dmock.Mock())"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_4ab32d0a","line":64,"updated":"2014-12-31 18:12:49.000000000","message":"You can consider just moving these 4 functions to test_dhcp_agent.DHCPAgentOVSTestFramework","commit_id":"77733891c591eb18b05385f9950f3081ab88a6a3"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 Red Hat, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_bd870b5a","line":1,"updated":"2015-01-15 23:14:45.000000000","message":"YAGNI - Consider inlining the methods of this module into the new test module.  Most of the methods here are very much specific to the testing being added - dhcp.[classname] is a clue - and if future changes need to reuse them, they can refactor the methods into a more convenient location at that time.  The danger of a catch-all \u0027utils\u0027 module is that it become a dumping ground that nobody understand well and and in general is less discoverable than a more focused module.","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 Red Hat, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_3e201149","line":1,"in_reply_to":"3a961159_bd870b5a","updated":"2015-01-21 17:43:17.000000000","message":"this code is also used in the ovs-agent functional tests in review @ https://review.openstack.org/#/c/140042/5\n\ndependency didn\u0027t make sense for these two cases so just going to rebase whichever doesn\u0027t land first","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from neutron.openstack.common import uuidutils"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"def _server_process(addr, port_number):"},{"line_number":30,"context_line":"    Handler \u003d SimpleHTTPServer.SimpleHTTPRequestHandler"},{"line_number":31,"context_line":"    httpd \u003d SocketServer.TCPServer((addr, port_number), Handler)"},{"line_number":32,"context_line":"    #process a single request and die"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_7ad8497f","line":29,"updated":"2015-01-15 23:14:45.000000000","message":"This method and others in this module do not appear to be used - please remove.","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from neutron.openstack.common import uuidutils"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"def _server_process(addr, port_number):"},{"line_number":30,"context_line":"    Handler \u003d SimpleHTTPServer.SimpleHTTPRequestHandler"},{"line_number":31,"context_line":"    httpd \u003d SocketServer.TCPServer((addr, port_number), Handler)"},{"line_number":32,"context_line":"    #process a single request and die"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_7e1a9918","line":29,"in_reply_to":"3a961159_7ad8497f","updated":"2015-01-21 17:43:17.000000000","message":"same see above (used elsewhere)","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"31bafea0a783fe246515f1cd95bcade50f9b7d00","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"def _server_process(addr, port_number):"},{"line_number":30,"context_line":"    Handler \u003d SimpleHTTPServer.SimpleHTTPRequestHandler"},{"line_number":31,"context_line":"    httpd \u003d SocketServer.TCPServer((addr, port_number), Handler)"},{"line_number":32,"context_line":"    #process a single request and die"},{"line_number":33,"context_line":"    httpd.handle_request()"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_fa3439fc","line":30,"updated":"2015-01-15 22:58:08.000000000","message":"Handler doesn\u0027t respect python naming conventions and could be inlined","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"def _server_process(addr, port_number):"},{"line_number":30,"context_line":"    Handler \u003d SimpleHTTPServer.SimpleHTTPRequestHandler"},{"line_number":31,"context_line":"    httpd \u003d SocketServer.TCPServer((addr, port_number), Handler)"},{"line_number":32,"context_line":"    #process a single request and die"},{"line_number":33,"context_line":"    httpd.handle_request()"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_9eee65eb","line":30,"in_reply_to":"3a961159_fa3439fc","updated":"2015-01-21 17:43:17.000000000","message":"Done","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    httpd.handle_request()"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def serve_single_request(addr, port_number):"},{"line_number":37,"context_line":"    p \u003d multiprocessing.Process(target\u003d_server_process, args\u003d(addr,"},{"line_number":38,"context_line":"                                port_number))"},{"line_number":39,"context_line":"    p.start()"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_bab5511a","line":36,"updated":"2015-01-15 23:14:45.000000000","message":"unused","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    httpd.handle_request()"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def serve_single_request(addr, port_number):"},{"line_number":37,"context_line":"    p \u003d multiprocessing.Process(target\u003d_server_process, args\u003d(addr,"},{"line_number":38,"context_line":"                                port_number))"},{"line_number":39,"context_line":"    p.start()"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_beba41df","line":36,"in_reply_to":"3a961159_bab5511a","updated":"2015-01-21 17:43:17.000000000","message":"same","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"38b1df2078f3f4c96d334a2769772e8360228d9c","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            \u0027cidr\u0027: \u00270:0:0:0:0:ffff:c0a8:a00/120\u0027,"},{"line_number":55,"context_line":"            \u0027gateway\u0027: \u00270:0:0:0:0:ffff:c0a8:a01\u0027}, }"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def make_single_request(self, addr, port\u003d9999):"},{"line_number":58,"context_line":"        conn \u003d httplib.HTTPConnection(addr, port)"},{"line_number":59,"context_line":"        try:"},{"line_number":60,"context_line":"            conn.request(\"GET\", \"/\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_3aca41a0","line":57,"updated":"2015-01-15 23:14:45.000000000","message":"unused","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"31bafea0a783fe246515f1cd95bcade50f9b7d00","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            \"tenant_id\": uuidutils.generate_uuid(), })"},{"line_number":79,"context_line":"        return net_dict"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def create_subnet_dict(self, net_id, enable_dhcp\u003dTrue, ip_v\u003d4):"},{"line_number":82,"context_line":"        sn_dict \u003d dhcp.DictModel({"},{"line_number":83,"context_line":"            \"id\": uuidutils.generate_uuid(),"},{"line_number":84,"context_line":"            \"network_id\": net_id,"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_dd2697b9","line":81,"updated":"2015-01-15 22:58:08.000000000","message":"ip_v \u003d\u003d\u003e ip_version, otherwise it\u0027s difficult to understand its meaning without looking deeper.","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"31bafea0a783fe246515f1cd95bcade50f9b7d00","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        return sn_dict"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def create_port_dict(self, network_id, subnet_id, ip_v\u003d4,"},{"line_number":96,"context_line":"                        _MAC\u003dNone, _IP\u003dNone):"},{"line_number":97,"context_line":"        _MAC \u003d self._MAC_ADDRESS if not _MAC else _MAC"},{"line_number":98,"context_line":"        _IP \u003d self._IP_ADDRS[ip_v][\u0027addr\u0027] if not _IP else _IP"},{"line_number":99,"context_line":"        port_dict \u003d dhcp.DictModel({"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_7a07691d","line":96,"updated":"2015-01-15 22:58:08.000000000","message":"python naming conventions \u003d\u003d\u003e mac, ip instead of _MAC,_IP","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ca00659638d0caa390494a295b7a4a4a69931e3c","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        return sn_dict"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def create_port_dict(self, network_id, subnet_id, ip_v\u003d4,"},{"line_number":96,"context_line":"                        _MAC\u003dNone, _IP\u003dNone):"},{"line_number":97,"context_line":"        _MAC \u003d self._MAC_ADDRESS if not _MAC else _MAC"},{"line_number":98,"context_line":"        _IP \u003d self._IP_ADDRS[ip_v][\u0027addr\u0027] if not _IP else _IP"},{"line_number":99,"context_line":"        port_dict \u003d dhcp.DictModel({"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_1e3b553b","line":96,"in_reply_to":"3a961159_7a07691d","updated":"2015-01-21 17:43:17.000000000","message":"Done","commit_id":"33b79d525377841a2a80c2d6ba191ec0bf2ce650"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f01c7c9e870466a665f81adf8119fd19224efccc","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 Red Hat, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_a7053a15","line":1,"updated":"2015-01-27 00:17:26.000000000","message":"2015","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"8c74b4c3b5df429e2847f3c288cf7fea1fbca8d0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 Red Hat, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_9a21f9a1","line":1,"in_reply_to":"1a930d6b_a7053a15","updated":"2015-02-02 18:28:30.000000000","message":"Done","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f01c7c9e870466a665f81adf8119fd19224efccc","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from neutron.openstack.common import uuidutils"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class FunctionalTestUtils(object):"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    _MAC_ADDRESS \u003d \u002724:77:03:7d:00:4c\u0027"},{"line_number":26,"context_line":"    _IP_ADDRS \u003d {"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_62234056","line":23,"updated":"2015-01-27 00:17:26.000000000","message":"This class name is too generic.  So is the module name, for that matter.  Please rename to make your intent clear.","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"8c74b4c3b5df429e2847f3c288cf7fea1fbca8d0","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from neutron.openstack.common import uuidutils"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class FunctionalTestUtils(object):"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    _MAC_ADDRESS \u003d \u002724:77:03:7d:00:4c\u0027"},{"line_number":26,"context_line":"    _IP_ADDRS \u003d {"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_773b809c","line":23,"in_reply_to":"1a930d6b_62234056","updated":"2015-02-02 18:28:30.000000000","message":"Done","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f01c7c9e870466a665f81adf8119fd19224efccc","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def get_interface_name(self, network, port):"},{"line_number":37,"context_line":"        device_manager \u003d dhcp.DeviceManager(conf\u003dcfg.CONF,"},{"line_number":38,"context_line":"                        root_helper\u003dcfg.CONF.root_helper, plugin\u003dmock.Mock())"},{"line_number":39,"context_line":"        return device_manager.get_interface_name(network, port)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def create_network_dict(self, net_id, subnets\u003dNone, ports\u003dNone):"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_e202d008","line":38,"updated":"2015-01-27 00:17:26.000000000","message":"PEP8 indent","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"8c74b4c3b5df429e2847f3c288cf7fea1fbca8d0","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def get_interface_name(self, network, port):"},{"line_number":37,"context_line":"        device_manager \u003d dhcp.DeviceManager(conf\u003dcfg.CONF,"},{"line_number":38,"context_line":"                        root_helper\u003dcfg.CONF.root_helper, plugin\u003dmock.Mock())"},{"line_number":39,"context_line":"        return device_manager.get_interface_name(network, port)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def create_network_dict(self, net_id, subnets\u003dNone, ports\u003dNone):"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_7762a0ae","line":38,"in_reply_to":"1a930d6b_e202d008","updated":"2015-02-02 18:28:30.000000000","message":"Done","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f01c7c9e870466a665f81adf8119fd19224efccc","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        return sn_dict"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def create_port_dict(self, network_id, subnet_id, ip_v\u003d4,"},{"line_number":67,"context_line":"                         mac\u003dNone, ip\u003dNone):"},{"line_number":68,"context_line":"        mac \u003d self._MAC_ADDRESS if not mac else mac"},{"line_number":69,"context_line":"        ip \u003d self._IP_ADDRS[ip_v][\u0027addr\u0027] if not ip else ip"},{"line_number":70,"context_line":"        port_dict \u003d dhcp.DictModel({"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a930d6b_823f4cb3","line":67,"updated":"2015-01-27 00:17:26.000000000","message":"ip -\u003e ip_address\n\nditto","commit_id":"a1ebbec55f4be4d50cdd3fb94576d61fb4b1e8d8"}],"tools/configure_for_func_testing.sh":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"6ee25dd647264cf6317ca4653ae3f226cea1c236","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    echo_summary \"Installing base dependencies\""},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    INSTALL_TESTONLY_PACKAGES\u003dTrue"},{"line_number":87,"context_line":"    PACKAGES\u003d$(get_packages general neutron,q-agt,q-l3,dhclient)"},{"line_number":88,"context_line":"    # Do not install \u0027python-\u0027 prefixed packages other than"},{"line_number":89,"context_line":"    # python-dev*.  Neutron\u0027s functional testing relies on deployment"},{"line_number":90,"context_line":"    # to a tox env so there is no point in installing python"}],"source_content_type":"text/x-sh","patch_set":52,"id":"5a2ca52d_afc19230","line":87,"updated":"2015-10-13 16:56:48.000000000","message":"I don\u0027t believe it will work since get_packages expects service names, not package names: https://github.com/openstack-dev/devstack/blob/master/functions-common#L1066","commit_id":"4ed4daf46e72c22bc1c239bfb2672c011d65eb58"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"75a9bf4199d6cc9f1f0f43d9b7f9f0cec1007cb2","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    echo_summary \"Installing base dependencies\""},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    INSTALL_TESTONLY_PACKAGES\u003dTrue"},{"line_number":87,"context_line":"    PACKAGES\u003d$(get_packages general neutron,q-agt,q-l3,dhclient)"},{"line_number":88,"context_line":"    # Do not install \u0027python-\u0027 prefixed packages other than"},{"line_number":89,"context_line":"    # python-dev*.  Neutron\u0027s functional testing relies on deployment"},{"line_number":90,"context_line":"    # to a tox env so there is no point in installing python"}],"source_content_type":"text/x-sh","patch_set":52,"id":"5a2ca52d_0f58c6f9","line":87,"range":{"start_line":87,"start_character":55,"end_line":87,"end_character":63},"updated":"2015-10-13 16:55:23.000000000","message":"Not sure about this one. Now I tried to check how it works.","commit_id":"4ed4daf46e72c22bc1c239bfb2672c011d65eb58"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"ca24cf3e99043e8df7aaa7e7a3493a733f30f37a","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    echo_summary \"Installing base dependencies\""},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    INSTALL_TESTONLY_PACKAGES\u003dTrue"},{"line_number":87,"context_line":"    PACKAGES\u003d$(get_packages general neutron,q-agt,q-l3,dhclient)"},{"line_number":88,"context_line":"    # Do not install \u0027python-\u0027 prefixed packages other than"},{"line_number":89,"context_line":"    # python-dev*.  Neutron\u0027s functional testing relies on deployment"},{"line_number":90,"context_line":"    # to a tox env so there is no point in installing python"}],"source_content_type":"text/x-sh","patch_set":52,"id":"5a2ca52d_42d0d553","line":87,"in_reply_to":"5a2ca52d_afc19230","updated":"2015-10-13 17:12:14.000000000","message":"Ihar, oh… okay, usefull link, thanks.","commit_id":"4ed4daf46e72c22bc1c239bfb2672c011d65eb58"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"bc3e9bc62481fe4842277eb62eb552c385df7c58","unresolved":false,"context_lines":[{"line_number":211,"context_line":"    _install_databases"},{"line_number":212,"context_line":"    _install_rootwrap_sudoers"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    install_package dhclient"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    # Installing python-openvswitch from packages is a stop-gap while"},{"line_number":217,"context_line":"    # python-openvswitch remains unavailable from pypi.  This also"}],"source_content_type":"text/x-sh","patch_set":53,"id":"5a2ca52d_dcb6053d","line":214,"range":{"start_line":214,"start_character":4,"end_line":214,"end_character":19},"updated":"2015-10-13 19:47:36.000000000","message":"Nice try but not quite right.","commit_id":"c9745df5c36b0cb259fcd800c483486c37756f30"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"7924e35a4a999c27dacf82da69fd75b9bce69e49","unresolved":false,"context_lines":[{"line_number":211,"context_line":"    _install_databases"},{"line_number":212,"context_line":"    _install_rootwrap_sudoers"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    install_package dhclient"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    # Installing python-openvswitch from packages is a stop-gap while"},{"line_number":217,"context_line":"    # python-openvswitch remains unavailable from pypi.  This also"}],"source_content_type":"text/x-sh","patch_set":53,"id":"5a2ca52d_dceeef21","line":214,"range":{"start_line":214,"start_character":4,"end_line":214,"end_character":19},"in_reply_to":"5a2ca52d_dcb6053d","updated":"2015-10-14 09:05:30.000000000","message":"It works on Fedora, but not works on Ubuntu. On Ubuntu the package name must be \"isc-dhcp-client\". I will fix it in next PS.","commit_id":"c9745df5c36b0cb259fcd800c483486c37756f30"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"b045a64eebb3c0c88768288358e6c80bbfcd98b3","unresolved":false,"context_lines":[{"line_number":218,"context_line":"    else"},{"line_number":219,"context_line":"        exit_distro_not_supported \"installing dhclient package\""},{"line_number":220,"context_line":"    fi"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    # Installing python-openvswitch from packages is a stop-gap while"},{"line_number":223,"context_line":"    # python-openvswitch remains unavailable from pypi.  This also"},{"line_number":224,"context_line":"    # requires that sitepackages\u003dTrue be set in tox.ini to allow the"}],"source_content_type":"text/x-sh","patch_set":55,"id":"3a29b11f_3a1cf9c0","line":221,"updated":"2015-10-23 14:22:38.000000000","message":"Should this support RHEL?","commit_id":"31bdb9bffd9d9d979f53f954d165526438cf0c57"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f16c1dbb3492f78fcb170f97a6428ef3c3434209","unresolved":false,"context_lines":[{"line_number":218,"context_line":"    else"},{"line_number":219,"context_line":"        exit_distro_not_supported \"installing dhclient package\""},{"line_number":220,"context_line":"    fi"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    # Installing python-openvswitch from packages is a stop-gap while"},{"line_number":223,"context_line":"    # python-openvswitch remains unavailable from pypi.  This also"},{"line_number":224,"context_line":"    # requires that sitepackages\u003dTrue be set in tox.ini to allow the"}],"source_content_type":"text/x-sh","patch_set":55,"id":"1a26ad4f_d7a8a58f","line":221,"in_reply_to":"1a26ad4f_6d7719d5","updated":"2015-11-02 12:03:20.000000000","message":"Anyway, it\u0027s not strictly a requirement since the script is used in gate only where we don\u0027t use RHEL.","commit_id":"31bdb9bffd9d9d979f53f954d165526438cf0c57"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"5529c3ad0117df4b595229556171a4fa27917042","unresolved":false,"context_lines":[{"line_number":218,"context_line":"    else"},{"line_number":219,"context_line":"        exit_distro_not_supported \"installing dhclient package\""},{"line_number":220,"context_line":"    fi"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    # Installing python-openvswitch from packages is a stop-gap while"},{"line_number":223,"context_line":"    # python-openvswitch remains unavailable from pypi.  This also"},{"line_number":224,"context_line":"    # requires that sitepackages\u003dTrue be set in tox.ini to allow the"}],"source_content_type":"text/x-sh","patch_set":55,"id":"1a26ad4f_37d479ea","line":221,"in_reply_to":"1a26ad4f_6d7719d5","updated":"2015-11-02 12:06:01.000000000","message":"Thanks for feedback.","commit_id":"31bdb9bffd9d9d979f53f954d165526438cf0c57"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"5529c3ad0117df4b595229556171a4fa27917042","unresolved":false,"context_lines":[{"line_number":218,"context_line":"    else"},{"line_number":219,"context_line":"        exit_distro_not_supported \"installing dhclient package\""},{"line_number":220,"context_line":"    fi"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    # Installing python-openvswitch from packages is a stop-gap while"},{"line_number":223,"context_line":"    # python-openvswitch remains unavailable from pypi.  This also"},{"line_number":224,"context_line":"    # requires that sitepackages\u003dTrue be set in tox.ini to allow the"}],"source_content_type":"text/x-sh","patch_set":55,"id":"1a26ad4f_f7d92123","line":221,"in_reply_to":"1a26ad4f_d7a8a58f","updated":"2015-11-02 12:06:01.000000000","message":"Thanks for feedback.","commit_id":"31bdb9bffd9d9d979f53f954d165526438cf0c57"},{"author":{"_account_id":14615,"name":"Sergey Belous","email":"belous.py@gmail.com","username":"sbelous"},"change_message_id":"bda2cb04f91741bb74f2498472f2c9789cf08b68","unresolved":false,"context_lines":[{"line_number":218,"context_line":"    else"},{"line_number":219,"context_line":"        exit_distro_not_supported \"installing dhclient package\""},{"line_number":220,"context_line":"    fi"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    # Installing python-openvswitch from packages is a stop-gap while"},{"line_number":223,"context_line":"    # python-openvswitch remains unavailable from pypi.  This also"},{"line_number":224,"context_line":"    # requires that sitepackages\u003dTrue be set in tox.ini to allow the"}],"source_content_type":"text/x-sh","patch_set":55,"id":"1a26ad4f_6d7719d5","line":221,"in_reply_to":"3a29b11f_3a1cf9c0","updated":"2015-10-27 11:03:55.000000000","message":"Martin, functions \"is_fedora\" and \"install_packages\" defined in functions-common script in devstack\u0027s folder.\nFrom functions-common:\n\n    # Determine if current distribution is a Fedora-based distribution\n    # (Fedora, RHEL, CentOS, etc).\n    # is_fedora\n\nThat means, yes, it supports RHEL and CentOS.","commit_id":"31bdb9bffd9d9d979f53f954d165526438cf0c57"}]}
