)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"c42bec702542503c358b8b24271a16e9f5c6c718","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Previouly when starting the dhcp agent the sync_state() process would"},{"line_number":10,"context_line":"be extrememly expense as it would query quantum server for each network."},{"line_number":11,"context_line":"In order to improve performance a get_all_network_info() was added"},{"line_number":12,"context_line":"so this information could be retrived in one query rather than a query"},{"line_number":13,"context_line":"for each active network."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The second part of this patch optimizes the logic to avoid calling"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAOn%2F%2FYHY%3D","line":12,"updated":"2013-05-13 05:58:39.000000000","message":"typo: retrieved","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Previouly when starting the dhcp agent the sync_state() process would"},{"line_number":10,"context_line":"be extrememly expense as it would query quantum server for each network."},{"line_number":11,"context_line":"In order to improve performance a get_all_network_info() was added"},{"line_number":12,"context_line":"so this information could be retrived in one query rather than a query"},{"line_number":13,"context_line":"for each active network."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The second part of this patch optimizes the logic to avoid calling"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAOn%2F%2FYCE%3D","line":12,"in_reply_to":"AAAAOn%2F%2FYHY%3D","updated":"2013-05-13 06:46:54.000000000","message":"Done","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7ecb4456f6438a0538d526d08ce069755f1d33a2","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Improve DHCP agent performance."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Previouly when starting the dhcp agent the sync_state() process would"},{"line_number":10,"context_line":"be extrememly expense as it would query quantum server for each network."},{"line_number":11,"context_line":"In order to improve performance a get_all_network_info() was added"},{"line_number":12,"context_line":"so this information could be retrieved in one query rather than a query"},{"line_number":13,"context_line":"for each active network."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAPH%2F%2F94w%3D","line":10,"updated":"2013-05-17 16:21:13.000000000","message":"would be -\u003e was (?) \n\nexpense -\u003e expensive","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f82f3d88a2ca3cbe74a6c308d6cd252a9be519e3","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Improve DHCP agent performance."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Previouly when starting the dhcp agent the sync_state() process would"},{"line_number":10,"context_line":"be extrememly expense as it would query quantum server for each network."},{"line_number":11,"context_line":"In order to improve performance a get_all_network_info() was added"},{"line_number":12,"context_line":"so this information could be retrieved in one query rather than a query"},{"line_number":13,"context_line":"for each active network."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAPH%2F%2F5eA%3D","line":10,"in_reply_to":"AAAAPH%2F%2F94w%3D","updated":"2013-05-28 20:15:55.000000000","message":"Done","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7ecb4456f6438a0538d526d08ce069755f1d33a2","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Previouly when starting the dhcp agent the sync_state() process would"},{"line_number":10,"context_line":"be extrememly expense as it would query quantum server for each network."},{"line_number":11,"context_line":"In order to improve performance a get_all_network_info() was added"},{"line_number":12,"context_line":"so this information could be retrieved in one query rather than a query"},{"line_number":13,"context_line":"for each active network."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAPH%2F%2F94s%3D","line":11,"updated":"2013-05-17 16:21:13.000000000","message":"\u0027a\u0027 -\u003e a method","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f82f3d88a2ca3cbe74a6c308d6cd252a9be519e3","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Previouly when starting the dhcp agent the sync_state() process would"},{"line_number":10,"context_line":"be extrememly expense as it would query quantum server for each network."},{"line_number":11,"context_line":"In order to improve performance a get_all_network_info() was added"},{"line_number":12,"context_line":"so this information could be retrieved in one query rather than a query"},{"line_number":13,"context_line":"for each active network."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAPH%2F%2F5d8%3D","line":11,"in_reply_to":"AAAAPH%2F%2F94s%3D","updated":"2013-05-28 20:15:55.000000000","message":"should I figured having () on get_all_network_info implied it was a method :P","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7ecb4456f6438a0538d526d08ce069755f1d33a2","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Previouly when starting the dhcp agent the sync_state() process would"},{"line_number":10,"context_line":"be extrememly expense as it would query quantum server for each network."},{"line_number":11,"context_line":"In order to improve performance a get_all_network_info() was added"},{"line_number":12,"context_line":"so this information could be retrieved in one query rather than a query"},{"line_number":13,"context_line":"for each active network."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The second part of this patch optimizes the logic to avoid calling"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAPH%2F%2F94k%3D","line":12,"updated":"2013-05-17 16:21:13.000000000","message":"rather than a -\u003e rather than doing a","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f82f3d88a2ca3cbe74a6c308d6cd252a9be519e3","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Previouly when starting the dhcp agent the sync_state() process would"},{"line_number":10,"context_line":"be extrememly expense as it would query quantum server for each network."},{"line_number":11,"context_line":"In order to improve performance a get_all_network_info() was added"},{"line_number":12,"context_line":"so this information could be retrieved in one query rather than a query"},{"line_number":13,"context_line":"for each active network."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The second part of this patch optimizes the logic to avoid calling"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAPH%2F%2F5dk%3D","line":12,"in_reply_to":"AAAAPH%2F%2F94k%3D","updated":"2013-05-28 20:15:55.000000000","message":"Done","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7ecb4456f6438a0538d526d08ce069755f1d33a2","unresolved":false,"context_lines":[{"line_number":13,"context_line":"for each active network."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The second part of this patch optimizes the logic to avoid calling"},{"line_number":16,"context_line":"get_dhcp_port(). Perviously, this method was called once for each network"},{"line_number":17,"context_line":"which makes a call to get_subnets() and get_ports() unnecessarily as"},{"line_number":18,"context_line":"the dhcp agent can determine itself if it needs to update a port or create a"},{"line_number":19,"context_line":"port for dhcp."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAPH%2F%2F94M%3D","line":16,"updated":"2013-05-17 16:21:13.000000000","message":"perviously -\u003e previously","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f82f3d88a2ca3cbe74a6c308d6cd252a9be519e3","unresolved":false,"context_lines":[{"line_number":13,"context_line":"for each active network."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The second part of this patch optimizes the logic to avoid calling"},{"line_number":16,"context_line":"get_dhcp_port(). Perviously, this method was called once for each network"},{"line_number":17,"context_line":"which makes a call to get_subnets() and get_ports() unnecessarily as"},{"line_number":18,"context_line":"the dhcp agent can determine itself if it needs to update a port or create a"},{"line_number":19,"context_line":"port for dhcp."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAPH%2F%2F5d4%3D","line":16,"in_reply_to":"AAAAPH%2F%2F94M%3D","updated":"2013-05-28 20:15:55.000000000","message":"Done","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7ecb4456f6438a0538d526d08ce069755f1d33a2","unresolved":false,"context_lines":[{"line_number":18,"context_line":"the dhcp agent can determine itself if it needs to update a port or create a"},{"line_number":19,"context_line":"port for dhcp."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"This patch also threads the inital sync process."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"There was also a trivial change to the nvp_plugin where filters is assumed to"},{"line_number":24,"context_line":"be a dict()."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAPH%2F%2F93w%3D","line":21,"updated":"2013-05-17 16:21:13.000000000","message":"\"Thread\" as a verb is probably not semantically cortect here? Usually one threads a screw, not a sync process :)","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f82f3d88a2ca3cbe74a6c308d6cd252a9be519e3","unresolved":false,"context_lines":[{"line_number":18,"context_line":"the dhcp agent can determine itself if it needs to update a port or create a"},{"line_number":19,"context_line":"port for dhcp."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"This patch also threads the inital sync process."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"There was also a trivial change to the nvp_plugin where filters is assumed to"},{"line_number":24,"context_line":"be a dict()."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAPH%2F%2F5dw%3D","line":21,"in_reply_to":"AAAAPH%2F%2F93w%3D","updated":"2013-05-28 20:15:55.000000000","message":"i think it\u0027s okay. You knew what I mean\u0027t right :) ?","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7ecb4456f6438a0538d526d08ce069755f1d33a2","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"This patch also threads the inital sync process."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"There was also a trivial change to the nvp_plugin where filters is assumed to"},{"line_number":24,"context_line":"be a dict()."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"implements blueprint improve-dhcp-agent-performance"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAPH%2F%2F93k%3D","line":23,"updated":"2013-05-17 16:21:13.000000000","message":"filters is -\u003e filter are","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f82f3d88a2ca3cbe74a6c308d6cd252a9be519e3","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"This patch also threads the inital sync process."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"There was also a trivial change to the nvp_plugin where filters is assumed to"},{"line_number":24,"context_line":"be a dict()."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"implements blueprint improve-dhcp-agent-performance"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAPH%2F%2F5ds%3D","line":23,"in_reply_to":"AAAAPH%2F%2F93k%3D","updated":"2013-05-28 20:15:55.000000000","message":"Done","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7ecb4456f6438a0538d526d08ce069755f1d33a2","unresolved":false,"context_lines":[{"line_number":21,"context_line":"This patch also threads the inital sync process."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"There was also a trivial change to the nvp_plugin where filters is assumed to"},{"line_number":24,"context_line":"be a dict()."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"implements blueprint improve-dhcp-agent-performance"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAPH%2F%2F93g%3D","line":24,"updated":"2013-05-17 16:21:13.000000000","message":"does dict need parenthesis","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f82f3d88a2ca3cbe74a6c308d6cd252a9be519e3","unresolved":false,"context_lines":[{"line_number":21,"context_line":"This patch also threads the inital sync process."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"There was also a trivial change to the nvp_plugin where filters is assumed to"},{"line_number":24,"context_line":"be a dict()."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"implements blueprint improve-dhcp-agent-performance"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAPH%2F%2F5do%3D","line":24,"in_reply_to":"AAAAPH%2F%2F93g%3D","updated":"2013-05-28 20:15:55.000000000","message":"Done","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"266c052baa5a3b3515340c6817013d1b7db4db51","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Improve DHCP agent performance."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Previouly when starting the dhcp agent the sync_state() process would"},{"line_number":10,"context_line":"be extrememly expensive as it would query quantum server for each network."},{"line_number":11,"context_line":"In order to improve performance a get_all_network_info() was added"},{"line_number":12,"context_line":"so this information could be retrieved in one query rather than doing a"},{"line_number":13,"context_line":"query for each active network."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"AAAAPX%2F%2F6SQ%3D","line":10,"updated":"2013-06-06 07:50:04.000000000","message":"extrememly \u003d\u003e extremely","commit_id":"808a29ef8d3ddc8ceb009525d7b5e0f072d9fc39"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":7,"context_line":"Improve DHCP agent performance."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Previouly when starting the dhcp agent the sync_state() process would"},{"line_number":10,"context_line":"be extrememly expensive as it would query quantum server for each network."},{"line_number":11,"context_line":"In order to improve performance a get_all_network_info() was added"},{"line_number":12,"context_line":"so this information could be retrieved in one query rather than doing a"},{"line_number":13,"context_line":"query for each active network."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"AAAAPX%2F%2F42E%3D","line":10,"in_reply_to":"AAAAPX%2F%2F6SQ%3D","updated":"2013-06-06 18:56:03.000000000","message":"Done","commit_id":"808a29ef8d3ddc8ceb009525d7b5e0f072d9fc39"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Improve DHCP agent performance."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Previouly when starting the dhcp agent the sync_state() process would"},{"line_number":10,"context_line":"be extremely expensive as it would query quantum server for each network."},{"line_number":11,"context_line":"In order to improve performance a get_all_network_info() was added"},{"line_number":12,"context_line":"so this information could be retrieved in one query rather than doing a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"AAAAPX%2F%2F3rQ%3D","line":9,"updated":"2013-06-07 01:40:32.000000000","message":"Previously","commit_id":"2279c4a907fec50fa31c11ba3e4afcca0f307763"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Improve DHCP agent performance."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Previouly when starting the dhcp agent the sync_state() process would"},{"line_number":10,"context_line":"be extremely expensive as it would query quantum server for each network."},{"line_number":11,"context_line":"In order to improve performance a get_all_network_info() was added"},{"line_number":12,"context_line":"so this information could be retrieved in one query rather than doing a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"AAAAPX%2F%2F3mg%3D","line":9,"in_reply_to":"AAAAPX%2F%2F3rQ%3D","updated":"2013-06-07 02:38:42.000000000","message":"Done","commit_id":"2279c4a907fec50fa31c11ba3e4afcca0f307763"}],"etc/dhcp_agent.ini":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7ecb4456f6438a0538d526d08ce069755f1d33a2","unresolved":false,"context_lines":[{"line_number":41,"context_line":"# This option requires enable_isolated_metadata \u003d True"},{"line_number":42,"context_line":"# enable_metadata_network \u003d False"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"# Number of threads to use during sync process"},{"line_number":45,"context_line":"# num_sync_threads \u003d 4"}],"source_content_type":"text/x-properties","patch_set":6,"id":"AAAAPH%2F%2F9xs%3D","line":44,"updated":"2013-05-17 16:21:13.000000000","message":"Is it worth warning that it should not exceed the number of connections in the pool on the server?","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f82f3d88a2ca3cbe74a6c308d6cd252a9be519e3","unresolved":false,"context_lines":[{"line_number":41,"context_line":"# This option requires enable_isolated_metadata \u003d True"},{"line_number":42,"context_line":"# enable_metadata_network \u003d False"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"# Number of threads to use during sync process"},{"line_number":45,"context_line":"# num_sync_threads \u003d 4"}],"source_content_type":"text/x-properties","patch_set":6,"id":"AAAAPH%2F%2F5dg%3D","line":44,"in_reply_to":"AAAAPH%2F%2F9xs%3D","updated":"2013-05-28 20:15:55.000000000","message":"Sure.","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"}],"neutron/agent/dhcp_agent.py":[{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":369,"context_line":"        self.context \u003d context"},{"line_number":370,"context_line":"        self.host \u003d cfg.CONF.host"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"    def get_active_networks(self):"},{"line_number":373,"context_line":"        \"\"\"Make a remote process call to retrieve the active networks.\"\"\""},{"line_number":374,"context_line":"        return self.call(self.context,"},{"line_number":375,"context_line":"                         self.make_msg(\u0027get_active_networks\u0027, host\u003dself.host),"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAP3%2F%2F7Sc%3D","line":372,"updated":"2013-07-09 03:19:20.000000000","message":"Is this method used?","commit_id":"5e52f49cd736335765be579d63464fa1d013889c"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":369,"context_line":"        self.context \u003d context"},{"line_number":370,"context_line":"        self.host \u003d cfg.CONF.host"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"    def get_active_networks(self):"},{"line_number":373,"context_line":"        \"\"\"Make a remote process call to retrieve the active networks.\"\"\""},{"line_number":374,"context_line":"        return self.call(self.context,"},{"line_number":375,"context_line":"                         self.make_msg(\u0027get_active_networks\u0027, host\u003dself.host),"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAP3%2F%2F7NY%3D","line":372,"in_reply_to":"AAAAP3%2F%2F7Sc%3D","updated":"2013-07-09 04:06:49.000000000","message":"Done","commit_id":"5e52f49cd736335765be579d63464fa1d013889c"}],"neutron/db/dhcp_rpc_base.py":[{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":45,"context_line":"            nets \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":46,"context_line":"        return [net[\u0027id\u0027] for net in nets]"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def get_active_networks_info(self, context, **kwargs):"},{"line_number":49,"context_line":"        \"\"\"Returns all the networks/subnets/ports in system.\"\"\""},{"line_number":50,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":51,"context_line":"        LOG.debug(_(\u0027get_active_networks from %s\u0027), host)"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAP3%2F%2F7SU%3D","line":48,"updated":"2013-07-09 03:19:20.000000000","message":"why not use the get_active_networks to implement your logic in get_active_networks_info directly?","commit_id":"5e52f49cd736335765be579d63464fa1d013889c"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":45,"context_line":"            nets \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":46,"context_line":"        return [net[\u0027id\u0027] for net in nets]"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def get_active_networks_info(self, context, **kwargs):"},{"line_number":49,"context_line":"        \"\"\"Returns all the networks/subnets/ports in system.\"\"\""},{"line_number":50,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":51,"context_line":"        LOG.debug(_(\u0027get_active_networks from %s\u0027), host)"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAP3%2F%2F7NU%3D","line":48,"in_reply_to":"AAAAP3%2F%2F7SU%3D","updated":"2013-07-09 04:06:49.000000000","message":"no reason. I think it\u0027s better to break up the logic into different methods for this rather than pass in a variable which changes what this method returns.","commit_id":"5e52f49cd736335765be579d63464fa1d013889c"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":48,"context_line":"    def get_active_networks_info(self, context, **kwargs):"},{"line_number":49,"context_line":"        \"\"\"Returns all the networks/subnets/ports in system.\"\"\""},{"line_number":50,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":51,"context_line":"        LOG.debug(_(\u0027get_active_networks from %s\u0027), host)"},{"line_number":52,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":53,"context_line":"        if utils.is_extension_supported("},{"line_number":54,"context_line":"            plugin, constants.AGENT_SCHEDULER_EXT_ALIAS):"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAP3%2F%2F7NQ%3D","line":51,"updated":"2013-07-09 04:06:49.000000000","message":"whoops need to add _info.","commit_id":"5e52f49cd736335765be579d63464fa1d013889c"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":45,"context_line":"            nets \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":46,"context_line":"        return [net[\u0027id\u0027] for net in nets]"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def get_active_networks_info(self, context, **kwargs):"},{"line_number":49,"context_line":"        \"\"\"Returns all the networks/subnets/ports in system.\"\"\""},{"line_number":50,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":51,"context_line":"        LOG.debug(_(\u0027get_active_networks_info from %s\u0027), host)"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAP3%2F%2F7Lc%3D","line":48,"updated":"2013-07-09 04:31:16.000000000","message":"advice to add additional logic into get_active_networks","commit_id":"c02ad138dda05bca203e6fa1d121a4fccc08a28c"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":45,"context_line":"            nets \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":46,"context_line":"        return [net[\u0027id\u0027] for net in nets]"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def get_active_networks_info(self, context, **kwargs):"},{"line_number":49,"context_line":"        \"\"\"Returns all the networks/subnets/ports in system.\"\"\""},{"line_number":50,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":51,"context_line":"        LOG.debug(_(\u0027get_active_networks_info from %s\u0027), host)"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAP3%2F%2F7Is%3D","line":48,"in_reply_to":"AAAAP3%2F%2F7Lc%3D","updated":"2013-07-09 04:56:27.000000000","message":"I\u0027m not sure i follow? Your saying to combine get_active_networks into get_active_networks?","commit_id":"c02ad138dda05bca203e6fa1d121a4fccc08a28c"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":45,"context_line":"            nets \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":46,"context_line":"        return [net[\u0027id\u0027] for net in nets]"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def get_active_networks_info(self, context, **kwargs):"},{"line_number":49,"context_line":"        \"\"\"Returns all the networks/subnets/ports in system.\"\"\""},{"line_number":50,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":51,"context_line":"        LOG.debug(_(\u0027get_active_networks_info from %s\u0027), host)"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAP3%2F%2F6tQ%3D","line":48,"updated":"2013-07-09 08:24:10.000000000","message":"I mean we don\u0027t need to add another get_active_networks_info to replace the current get_active_networks(). we just need to add additional codes into get_active_networks().","commit_id":"18bfc58632000a80797f299a5f3d35e1afd69a8d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":45,"context_line":"            nets \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":46,"context_line":"        return [net[\u0027id\u0027] for net in nets]"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def get_active_networks_info(self, context, **kwargs):"},{"line_number":49,"context_line":"        \"\"\"Returns all the networks/subnets/ports in system.\"\"\""},{"line_number":50,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":51,"context_line":"        LOG.debug(_(\u0027get_active_networks_info from %s\u0027), host)"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAP3%2F%2F5bE%3D","line":48,"in_reply_to":"AAAAP3%2F%2F6tQ%3D","updated":"2013-07-09 15:54:46.000000000","message":"1) This changes the api though and existing agents deployed using get_active_networks() expect this to turn a list of id\u0027s but now returns a list of dicts.\n\n2) the only way to do that would be to pass in an additional variable that controls what get_active_networks() returns. Varying what the return structure looks like based on the input is not ideal.","commit_id":"18bfc58632000a80797f299a5f3d35e1afd69a8d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":96,"context_line":"        network state."},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        \"\"\""},{"line_number":99,"context_line":"        # NOTE(arosen): This method is no longer used by the DHCP agent but is"},{"line_number":100,"context_line":"        # left so that quantum-dhcp-agents will still continue to work if"},{"line_number":101,"context_line":"        # quantum-server is upgraded and not the agent."},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAP3%2F%2F5a0%3D","line":99,"updated":"2013-07-09 15:54:46.000000000","message":"I\u0027ll move this comment up to get_active_networks() as well.","commit_id":"18bfc58632000a80797f299a5f3d35e1afd69a8d"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":49,"context_line":"            nets \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":50,"context_line":"        return [net[\u0027id\u0027] for net in nets]"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def get_active_networks_info(self, context, **kwargs):"},{"line_number":53,"context_line":"        \"\"\"Returns all the networks/subnets/ports in system.\"\"\""},{"line_number":54,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":55,"context_line":"        LOG.debug(_(\u0027get_active_networks_info from %s\u0027), host)"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAAP3%2F%2F3nQ%3D","line":52,"updated":"2013-07-10 03:05:10.000000000","message":"I think we can create a common function which contains line 38-49, and make both get_active_networks() and get_active_networks_info() to use it.","commit_id":"9c1716a25cd12ea81951ca7774fc42532475cc6e"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":49,"context_line":"            nets \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":50,"context_line":"        return [net[\u0027id\u0027] for net in nets]"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def get_active_networks_info(self, context, **kwargs):"},{"line_number":53,"context_line":"        \"\"\"Returns all the networks/subnets/ports in system.\"\"\""},{"line_number":54,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":55,"context_line":"        LOG.debug(_(\u0027get_active_networks_info from %s\u0027), host)"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAAP3%2F%2F3i0%3D","line":52,"in_reply_to":"AAAAP3%2F%2F3nQ%3D","updated":"2013-07-10 03:48:51.000000000","message":"i see, will do.","commit_id":"9c1716a25cd12ea81951ca7774fc42532475cc6e"}],"quantum/agent/dhcp_agent.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"unresolved":false,"context_lines":[{"line_number":69,"context_line":"                    help\u003d_(\"Allows for serving metadata requests from a \""},{"line_number":70,"context_line":"                           \"dedicate network. Requires \""},{"line_number":71,"context_line":"                           \"enable isolated_metadata \u003d True \")),"},{"line_number":72,"context_line":"        cfg.IntOpt(\u0027num_sync_threads\u0027, default\u003dmultiprocessing.cpu_count()*2,"},{"line_number":73,"context_line":"                   help\u003d\u0027Number of thread to use to parallelize and spawn\u0027"},{"line_number":74,"context_line":"                        \u0027dnsmasq processes during initial sync.\u0027)"},{"line_number":75,"context_line":"    ]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FX74%3D","line":72,"updated":"2013-05-13 09:39:41.000000000","message":"missing whitespaces around *?","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                    help\u003d_(\"Allows for serving metadata requests from a \""},{"line_number":70,"context_line":"                           \"dedicate network. Requires \""},{"line_number":71,"context_line":"                           \"enable isolated_metadata \u003d True \")),"},{"line_number":72,"context_line":"        cfg.IntOpt(\u0027num_sync_threads\u0027, default\u003dmultiprocessing.cpu_count()*2,"},{"line_number":73,"context_line":"                   help\u003d\u0027Number of thread to use to parallelize and spawn\u0027"},{"line_number":74,"context_line":"                        \u0027dnsmasq processes during initial sync.\u0027)"},{"line_number":75,"context_line":"    ]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FXBA%3D","line":72,"in_reply_to":"AAAAOn%2F%2FX74%3D","updated":"2013-05-13 17:28:40.000000000","message":"Done","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"c42bec702542503c358b8b24271a16e9f5c6c718","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                           \"dedicate network. Requires \""},{"line_number":71,"context_line":"                           \"enable isolated_metadata \u003d True \")),"},{"line_number":72,"context_line":"        cfg.IntOpt(\u0027num_sync_threads\u0027, default\u003dmultiprocessing.cpu_count()*2,"},{"line_number":73,"context_line":"                   help\u003d\u0027Number of thread to use to parallelize and spawn\u0027"},{"line_number":74,"context_line":"                        \u0027dnsmasq processes during initial sync.\u0027)"},{"line_number":75,"context_line":"    ]"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FYHQ%3D","line":73,"updated":"2013-05-13 05:58:39.000000000","message":"typo: threads","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                           \"dedicate network. Requires \""},{"line_number":71,"context_line":"                           \"enable isolated_metadata \u003d True \")),"},{"line_number":72,"context_line":"        cfg.IntOpt(\u0027num_sync_threads\u0027, default\u003dmultiprocessing.cpu_count()*2,"},{"line_number":73,"context_line":"                   help\u003d\u0027Number of thread to use to parallelize and spawn\u0027"},{"line_number":74,"context_line":"                        \u0027dnsmasq processes during initial sync.\u0027)"},{"line_number":75,"context_line":"    ]"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FYCY%3D","line":73,"in_reply_to":"AAAAOn%2F%2FYHQ%3D","updated":"2013-05-13 06:46:54.000000000","message":"Done","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"unresolved":false,"context_lines":[{"line_number":178,"context_line":"        networks \u003d self.plugin_rpc.get_all_network_info()"},{"line_number":179,"context_line":"        pool \u003d utils.ThreadPool(cfg.CONF.num_sync_threads)"},{"line_number":180,"context_line":"        for network in networks:"},{"line_number":181,"context_line":"            self.configure_dhcp_for_network(network)"},{"line_number":182,"context_line":"            pool.add_task(self.configure_dhcp_for_network, network)"},{"line_number":183,"context_line":"        pool.wait_completion()"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FX6k%3D","line":181,"updated":"2013-05-13 09:39:41.000000000","message":"This seems to do completely the same what the next line is supposed to do in parallel. Am I missing something?","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        networks \u003d self.plugin_rpc.get_all_network_info()"},{"line_number":179,"context_line":"        pool \u003d utils.ThreadPool(cfg.CONF.num_sync_threads)"},{"line_number":180,"context_line":"        for network in networks:"},{"line_number":181,"context_line":"            self.configure_dhcp_for_network(network)"},{"line_number":182,"context_line":"            pool.add_task(self.configure_dhcp_for_network, network)"},{"line_number":183,"context_line":"        pool.wait_completion()"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FXA0%3D","line":181,"in_reply_to":"AAAAOn%2F%2FX6k%3D","updated":"2013-05-13 17:28:40.000000000","message":"right. this was a wip. removed.","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"unresolved":false,"context_lines":[{"line_number":192,"context_line":"            return"},{"line_number":193,"context_line":"        self.configure_dhcp_for_network(network)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def configure_dhcp_for_network(self, network):"},{"line_number":196,"context_line":"        if not network.admin_state_up:"},{"line_number":197,"context_line":"            return"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FX7Q%3D","line":195,"updated":"2013-05-13 09:39:41.000000000","message":"Quantum seems to use eventlet only to monkey patch socket module (quantum/wsgi.py:eventlet.patcher.monkey_patch(all\u003dFalse, socket\u003dTrue)), so threading.Thread instances will be run as preemptive OS threads and we should carefully put locks in this method anywhere we need.\n\nShouldn\u0027t the modification of self.cache dict be protected with a lock?\n    line 205: self.cache.put(network)","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":192,"context_line":"            return"},{"line_number":193,"context_line":"        self.configure_dhcp_for_network(network)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def configure_dhcp_for_network(self, network):"},{"line_number":196,"context_line":"        if not network.admin_state_up:"},{"line_number":197,"context_line":"            return"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FW%2F4%3D","line":195,"in_reply_to":"AAAAOn%2F%2FX7Q%3D","updated":"2013-05-13 17:28:40.000000000","message":"Will look into this. I believe this could happen via: _periodic_resync_helper() which runs in a eventlet though I think we had  this issue before.","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"c42bec702542503c358b8b24271a16e9f5c6c718","unresolved":false,"context_lines":[{"line_number":382,"context_line":"                             self.make_msg(\u0027get_all_network_info\u0027,"},{"line_number":383,"context_line":"                                           host\u003dself.host),"},{"line_number":384,"context_line":"                             topic\u003dself.topic)"},{"line_number":385,"context_line":"        for network in networks:"},{"line_number":386,"context_line":"            dict_model_list.append(DictModel(network))"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        return dict_model_list"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FYHI%3D","line":385,"updated":"2013-05-13 05:58:39.000000000","message":"Just wondering, wouldn\u0027t it be better to write:\n\nreturn [DictModel(n) for n in networks] and get rid of dict_model_list","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":382,"context_line":"                             self.make_msg(\u0027get_all_network_info\u0027,"},{"line_number":383,"context_line":"                                           host\u003dself.host),"},{"line_number":384,"context_line":"                             topic\u003dself.topic)"},{"line_number":385,"context_line":"        for network in networks:"},{"line_number":386,"context_line":"            dict_model_list.append(DictModel(network))"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        return dict_model_list"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FYCU%3D","line":385,"in_reply_to":"AAAAOn%2F%2FYHI%3D","updated":"2013-05-13 06:46:54.000000000","message":"Done","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"c42bec702542503c358b8b24271a16e9f5c6c718","unresolved":false,"context_lines":[{"line_number":565,"context_line":"        host_uuid \u003d uuid.uuid5(uuid.NAMESPACE_DNS, socket.gethostname())"},{"line_number":566,"context_line":"        return \u0027dhcp%s-%s\u0027 % (host_uuid, network.id)"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"    def create_dhcp_port(self, network):"},{"line_number":569,"context_line":"        device_id \u003d self.get_device_id(network)"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"        subnets \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FYEs%3D","line":568,"updated":"2013-05-13 05:58:39.000000000","message":"method signature seems to be duplicating \ndef create_dhcp_port(self, port):","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"unresolved":false,"context_lines":[{"line_number":565,"context_line":"        host_uuid \u003d uuid.uuid5(uuid.NAMESPACE_DNS, socket.gethostname())"},{"line_number":566,"context_line":"        return \u0027dhcp%s-%s\u0027 % (host_uuid, network.id)"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"    def create_dhcp_port(self, network):"},{"line_number":569,"context_line":"        device_id \u003d self.get_device_id(network)"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"        subnets \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FX50%3D","line":568,"in_reply_to":"AAAAOn%2F%2FYEs%3D","updated":"2013-05-13 08:42:56.000000000","message":"sorry, missed that it is another class","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"c42bec702542503c358b8b24271a16e9f5c6c718","unresolved":false,"context_lines":[{"line_number":587,"context_line":"                                   if s.enable_dhcp]"},{"line_number":588,"context_line":"        retval \u003d None"},{"line_number":589,"context_line":"        for port in network.ports:"},{"line_number":590,"context_line":"            port_device_id \u003d getattr(port, \u0027device_id\u0027, None)"},{"line_number":591,"context_line":"            if port_device_id and port_device_id \u003d\u003d device_id:"},{"line_number":592,"context_line":"                port_fixed_ips \u003d []"},{"line_number":593,"context_line":"                for fixed_ip in port.fixed_ips:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FYHA%3D","line":590,"updated":"2013-05-13 05:58:39.000000000","message":"port.get(\u0027device_id\u0027) ?","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":587,"context_line":"                                   if s.enable_dhcp]"},{"line_number":588,"context_line":"        retval \u003d None"},{"line_number":589,"context_line":"        for port in network.ports:"},{"line_number":590,"context_line":"            port_device_id \u003d getattr(port, \u0027device_id\u0027, None)"},{"line_number":591,"context_line":"            if port_device_id and port_device_id \u003d\u003d device_id:"},{"line_number":592,"context_line":"                port_fixed_ips \u003d []"},{"line_number":593,"context_line":"                for fixed_ip in port.fixed_ips:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FYCQ%3D","line":590,"in_reply_to":"AAAAOn%2F%2FYHA%3D","updated":"2013-05-13 06:46:54.000000000","message":"nope, port isn\u0027t a dict it\u0027s a DictModel.","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"c42bec702542503c358b8b24271a16e9f5c6c718","unresolved":false,"context_lines":[{"line_number":598,"context_line":""},{"line_number":599,"context_line":"                # If there are dhcp_enabled_subnet_ids here that means that"},{"line_number":600,"context_line":"                # we need to add those to the port and call update."},{"line_number":601,"context_line":"                if len(dhcp_enabled_subnet_ids):"},{"line_number":602,"context_line":"                    port_fixed_ips.extend("},{"line_number":603,"context_line":"                        [dict(subnet_id\u003ds) for s in dhcp_enabled_subnet_ids])"},{"line_number":604,"context_line":"                    retval \u003d self.plugin.update_dhcp_port("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FYGc%3D","line":601,"updated":"2013-05-13 05:58:39.000000000","message":"if dhcp_enabled_subnet_ids","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":598,"context_line":""},{"line_number":599,"context_line":"                # If there are dhcp_enabled_subnet_ids here that means that"},{"line_number":600,"context_line":"                # we need to add those to the port and call update."},{"line_number":601,"context_line":"                if len(dhcp_enabled_subnet_ids):"},{"line_number":602,"context_line":"                    port_fixed_ips.extend("},{"line_number":603,"context_line":"                        [dict(subnet_id\u003ds) for s in dhcp_enabled_subnet_ids])"},{"line_number":604,"context_line":"                    retval \u003d self.plugin.update_dhcp_port("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FYCM%3D","line":601,"in_reply_to":"AAAAOn%2F%2FYGc%3D","updated":"2013-05-13 06:46:54.000000000","message":"Done","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"c42bec702542503c358b8b24271a16e9f5c6c718","unresolved":false,"context_lines":[{"line_number":623,"context_line":"                fixed_ips\u003d[dict(subnet_id\u003ds) for s in dhcp_enabled_subnet_ids])"},{"line_number":624,"context_line":"            retval \u003d self.plugin.create_dhcp_port({\u0027port\u0027: port_dict})"},{"line_number":625,"context_line":""},{"line_number":626,"context_line":"        # Convert subnet_id to subnet dict"},{"line_number":627,"context_line":"        fixed_ips \u003d [dict(subnet_id\u003dfixed_ip.subnet_id,"},{"line_number":628,"context_line":"                          ip_address\u003dfixed_ip.ip_address,"},{"line_number":629,"context_line":"                          subnet\u003dsubnets[fixed_ip.subnet_id])"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FYGM%3D","line":626,"updated":"2013-05-13 05:58:39.000000000","message":"the comment seems to be misleading","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"c42bec702542503c358b8b24271a16e9f5c6c718","unresolved":false,"context_lines":[{"line_number":631,"context_line":""},{"line_number":632,"context_line":"        ips \u003d [DictModel(item) if isinstance(item, dict) else item"},{"line_number":633,"context_line":"               for item in fixed_ips]"},{"line_number":634,"context_line":"        setattr(retval, \u0027fixed_ips\u0027, ips)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"        return retval"},{"line_number":637,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FYGI%3D","line":634,"updated":"2013-05-13 05:58:39.000000000","message":"retval[\u0027fixed_ips\u0027] \u003d ips ?","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":631,"context_line":""},{"line_number":632,"context_line":"        ips \u003d [DictModel(item) if isinstance(item, dict) else item"},{"line_number":633,"context_line":"               for item in fixed_ips]"},{"line_number":634,"context_line":"        setattr(retval, \u0027fixed_ips\u0027, ips)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"        return retval"},{"line_number":637,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FYCI%3D","line":634,"in_reply_to":"AAAAOn%2F%2FYGI%3D","updated":"2013-05-13 06:46:54.000000000","message":"ditto.","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":66,"context_line":"                    help\u003d_(\"Allows for serving metadata requests from a \""},{"line_number":67,"context_line":"                           \"dedicate network. Requires \""},{"line_number":68,"context_line":"                           \"enable isolated_metadata \u003d True \")),"},{"line_number":69,"context_line":"        cfg.IntOpt(\u0027num_sync_threads\u0027, default\u003d4,"},{"line_number":70,"context_line":"                   help\u003d_(\u0027Number of threads to use during sync process.\u0027)),"},{"line_number":71,"context_line":"    ]"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FU2k%3D","line":69,"updated":"2013-05-14 17:54:25.000000000","message":"wouldn\u0027t this need to be documented in the ini file?","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                    help\u003d_(\"Allows for serving metadata requests from a \""},{"line_number":67,"context_line":"                           \"dedicate network. Requires \""},{"line_number":68,"context_line":"                           \"enable isolated_metadata \u003d True \")),"},{"line_number":69,"context_line":"        cfg.IntOpt(\u0027num_sync_threads\u0027, default\u003d4,"},{"line_number":70,"context_line":"                   help\u003d_(\u0027Number of threads to use during sync process.\u0027)),"},{"line_number":71,"context_line":"    ]"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUoU%3D","line":69,"in_reply_to":"AAAAOn%2F%2FU2k%3D","updated":"2013-05-14 18:44:00.000000000","message":"Done","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        try:"},{"line_number":153,"context_line":"            active_networks \u003d set(self.plugin_rpc.get_active_networks())"},{"line_number":154,"context_line":"            for deleted_id in known_networks - active_networks:"},{"line_number":155,"context_line":"                self.disable_dhcp_helper(deleted_id)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"            self.bulk_enable_dhcp_helper()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FU4o%3D","line":154,"updated":"2013-05-14 17:54:25.000000000","message":"do you plan to improve how we deal with deleted networks in a later patch? Or is it not worth the effort?","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        try:"},{"line_number":153,"context_line":"            active_networks \u003d set(self.plugin_rpc.get_active_networks())"},{"line_number":154,"context_line":"            for deleted_id in known_networks - active_networks:"},{"line_number":155,"context_line":"                self.disable_dhcp_helper(deleted_id)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"            self.bulk_enable_dhcp_helper()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUn4%3D","line":154,"in_reply_to":"AAAAOn%2F%2FU4o%3D","updated":"2013-05-14 18:44:00.000000000","message":"disable_dhcp_helper() does not need to talk to quantum and is only done locally  so it\u0027s already pretty fast. We could thread this as well but currently this isn\u0027t a bottleneck.","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":185,"context_line":"            self.needs_resync \u003d True"},{"line_number":186,"context_line":"            LOG.exception(_(\u0027Network %s RPC info call failed.\u0027), network_id)"},{"line_number":187,"context_line":"            return"},{"line_number":188,"context_line":"        self.configure_dhcp_for_network(network)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    def configure_dhcp_for_network(self, network):"},{"line_number":191,"context_line":"        if not network.admin_state_up:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FU4M%3D","line":188,"updated":"2013-05-14 17:54:25.000000000","message":"wouldn\u0027t be better to move this into the try-except? or did you explicitly don\u0027t want to catch exceptions?","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            self.needs_resync \u003d True"},{"line_number":186,"context_line":"            LOG.exception(_(\u0027Network %s RPC info call failed.\u0027), network_id)"},{"line_number":187,"context_line":"            return"},{"line_number":188,"context_line":"        self.configure_dhcp_for_network(network)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    def configure_dhcp_for_network(self, network):"},{"line_number":191,"context_line":"        if not network.admin_state_up:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUnc%3D","line":188,"in_reply_to":"AAAAOn%2F%2FU4M%3D","updated":"2013-05-14 18:44:00.000000000","message":"The try/except above is for RPC exceptions which configure_dhcp_for_network() doesnt\u0027 raise.","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":185,"context_line":"            self.needs_resync \u003d True"},{"line_number":186,"context_line":"            LOG.exception(_(\u0027Network %s RPC info call failed.\u0027), network_id)"},{"line_number":187,"context_line":"            return"},{"line_number":188,"context_line":"        self.configure_dhcp_for_network(network)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    def configure_dhcp_for_network(self, network):"},{"line_number":191,"context_line":"        if not network.admin_state_up:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUgM%3D","line":188,"in_reply_to":"AAAAOn%2F%2FUhw%3D","updated":"2013-05-14 19:36:22.000000000","message":"Understood.","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            self.needs_resync \u003d True"},{"line_number":186,"context_line":"            LOG.exception(_(\u0027Network %s RPC info call failed.\u0027), network_id)"},{"line_number":187,"context_line":"            return"},{"line_number":188,"context_line":"        self.configure_dhcp_for_network(network)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    def configure_dhcp_for_network(self, network):"},{"line_number":191,"context_line":"        if not network.admin_state_up:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUhw%3D","line":188,"in_reply_to":"AAAAOn%2F%2FUks%3D","updated":"2013-05-14 19:10:11.000000000","message":"Which is part of the reason why I didn\u0027t move this line in the try block :) . Exception should be changed to RemoteError imo but this is out of scope for my patch imo.\n\nAlso, this code previously wasn\u0027t in the try/except block either. I just added a method configure_dhcp_for_network() as this code is needed in the bulk function i added.","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":185,"context_line":"            self.needs_resync \u003d True"},{"line_number":186,"context_line":"            LOG.exception(_(\u0027Network %s RPC info call failed.\u0027), network_id)"},{"line_number":187,"context_line":"            return"},{"line_number":188,"context_line":"        self.configure_dhcp_for_network(network)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    def configure_dhcp_for_network(self, network):"},{"line_number":191,"context_line":"        if not network.admin_state_up:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUks%3D","line":188,"in_reply_to":"AAAAOn%2F%2FUnc%3D","updated":"2013-05-14 18:54:11.000000000","message":"but you\u0027re catching Exception!","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":547,"context_line":"        host_uuid \u003d uuid.uuid5(uuid.NAMESPACE_DNS, socket.gethostname())"},{"line_number":548,"context_line":"        return \u0027dhcp%s-%s\u0027 % (host_uuid, network.id)"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    def create_dhcp_port(self, network):"},{"line_number":551,"context_line":"        device_id \u003d self.get_device_id(network)"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"        subnets \u003d {}"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FU3w%3D","line":550,"updated":"2013-05-14 17:54:25.000000000","message":"small nit: docstring?","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":547,"context_line":"        host_uuid \u003d uuid.uuid5(uuid.NAMESPACE_DNS, socket.gethostname())"},{"line_number":548,"context_line":"        return \u0027dhcp%s-%s\u0027 % (host_uuid, network.id)"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    def create_dhcp_port(self, network):"},{"line_number":551,"context_line":"        device_id \u003d self.get_device_id(network)"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"        subnets \u003d {}"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUnY%3D","line":550,"in_reply_to":"AAAAOn%2F%2FU3w%3D","updated":"2013-05-14 18:44:00.000000000","message":"Done","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":565,"context_line":"                network_id\u003dsubnet.network_id,"},{"line_number":566,"context_line":"                tenant_id\u003dsubnet.tenant_id)"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        dhcp_enabled_subnet_ids \u003d [s.id for s in network.subnets"},{"line_number":569,"context_line":"                                   if s.enable_dhcp]"},{"line_number":570,"context_line":"        retval \u003d None"},{"line_number":571,"context_line":"        for port in network.ports:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUwc%3D","line":568,"updated":"2013-05-14 17:54:25.000000000","message":"You are scanning network.subnets in the previous for: it might as well better to compile dhcp_enabled_subnet_ids there, and save the list comprehension.","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":565,"context_line":"                network_id\u003dsubnet.network_id,"},{"line_number":566,"context_line":"                tenant_id\u003dsubnet.tenant_id)"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        dhcp_enabled_subnet_ids \u003d [s.id for s in network.subnets"},{"line_number":569,"context_line":"                                   if s.enable_dhcp]"},{"line_number":570,"context_line":"        retval \u003d None"},{"line_number":571,"context_line":"        for port in network.ports:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUnQ%3D","line":568,"in_reply_to":"AAAAOn%2F%2FUwc%3D","updated":"2013-05-14 18:44:00.000000000","message":"sure, thanks.","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":576,"context_line":"                    port_fixed_ips.append({\u0027subnet_id\u0027: fixed_ip.subnet_id,"},{"line_number":577,"context_line":"                                           \u0027ip_address\u0027: fixed_ip.ip_address})"},{"line_number":578,"context_line":"                    if fixed_ip.subnet_id in dhcp_enabled_subnet_ids:"},{"line_number":579,"context_line":"                        dhcp_enabled_subnet_ids.remove(fixed_ip.subnet_id)"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"                # If there are dhcp_enabled_subnet_ids here that means that"},{"line_number":582,"context_line":"                # we need to add those to the port and call update."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUvc%3D","line":579,"updated":"2013-05-14 17:54:25.000000000","message":"I found this whole block a bit convoluted, especially the fact that we first build dhcp_enabled_subnet_ids and then remove elements from it. I wonder if there is any further room for improvement. Just a suggestion.","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":576,"context_line":"                    port_fixed_ips.append({\u0027subnet_id\u0027: fixed_ip.subnet_id,"},{"line_number":577,"context_line":"                                           \u0027ip_address\u0027: fixed_ip.ip_address})"},{"line_number":578,"context_line":"                    if fixed_ip.subnet_id in dhcp_enabled_subnet_ids:"},{"line_number":579,"context_line":"                        dhcp_enabled_subnet_ids.remove(fixed_ip.subnet_id)"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"                # If there are dhcp_enabled_subnet_ids here that means that"},{"line_number":582,"context_line":"                # we need to add those to the port and call update."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUko%3D","line":579,"in_reply_to":"AAAAOn%2F%2FUm4%3D","updated":"2013-05-14 18:54:11.000000000","message":"um...ok.","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":576,"context_line":"                    port_fixed_ips.append({\u0027subnet_id\u0027: fixed_ip.subnet_id,"},{"line_number":577,"context_line":"                                           \u0027ip_address\u0027: fixed_ip.ip_address})"},{"line_number":578,"context_line":"                    if fixed_ip.subnet_id in dhcp_enabled_subnet_ids:"},{"line_number":579,"context_line":"                        dhcp_enabled_subnet_ids.remove(fixed_ip.subnet_id)"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"                # If there are dhcp_enabled_subnet_ids here that means that"},{"line_number":582,"context_line":"                # we need to add those to the port and call update."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUm4%3D","line":579,"in_reply_to":"AAAAOn%2F%2FUvc%3D","updated":"2013-05-14 18:44:00.000000000","message":"We only remove the ones that are already associated with the port. We need to figure out if there are any dhcp_enabled subnets that are not associated with the port.  Line 583 is where the ones that are left are added to the port and then update_port is called.","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":593,"context_line":"        # DHCP port has not yet been created."},{"line_number":594,"context_line":"        if retval is None:"},{"line_number":595,"context_line":"            LOG.debug(_(\u0027DHCP port %(device_id)s on network %(network_id)s\u0027"},{"line_number":596,"context_line":"                        \u0027does not yet exist.\u0027), {\u0027device_id\u0027: device_id,"},{"line_number":597,"context_line":"                                                 \u0027network_id\u0027: network.id})"},{"line_number":598,"context_line":"            port_dict \u003d dict("},{"line_number":599,"context_line":"                name\u003d\u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUvQ%3D","line":596,"updated":"2013-05-14 17:54:25.000000000","message":"% instead of , maybe?","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":593,"context_line":"        # DHCP port has not yet been created."},{"line_number":594,"context_line":"        if retval is None:"},{"line_number":595,"context_line":"            LOG.debug(_(\u0027DHCP port %(device_id)s on network %(network_id)s\u0027"},{"line_number":596,"context_line":"                        \u0027does not yet exist.\u0027), {\u0027device_id\u0027: device_id,"},{"line_number":597,"context_line":"                                                 \u0027network_id\u0027: network.id})"},{"line_number":598,"context_line":"            port_dict \u003d dict("},{"line_number":599,"context_line":"                name\u003d\u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUkc%3D","line":596,"in_reply_to":"AAAAOn%2F%2FUms%3D","updated":"2013-05-14 18:54:11.000000000","message":"cool, thanks for clearing that up.","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":593,"context_line":"        # DHCP port has not yet been created."},{"line_number":594,"context_line":"        if retval is None:"},{"line_number":595,"context_line":"            LOG.debug(_(\u0027DHCP port %(device_id)s on network %(network_id)s\u0027"},{"line_number":596,"context_line":"                        \u0027does not yet exist.\u0027), {\u0027device_id\u0027: device_id,"},{"line_number":597,"context_line":"                                                 \u0027network_id\u0027: network.id})"},{"line_number":598,"context_line":"            port_dict \u003d dict("},{"line_number":599,"context_line":"                name\u003d\u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUms%3D","line":596,"in_reply_to":"AAAAOn%2F%2FUvQ%3D","updated":"2013-05-14 18:44:00.000000000","message":"The convention quantum uses (don\u0027t ask me why) is that single params are % multiple ones use , .","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":602,"context_line":"                network_id\u003dnetwork.id,"},{"line_number":603,"context_line":"                tenant_id\u003dnetwork.tenant_id,"},{"line_number":604,"context_line":"                device_owner\u003d\u0027network:dhcp\u0027,"},{"line_number":605,"context_line":"                fixed_ips\u003d[dict(subnet_id\u003ds) for s in dhcp_enabled_subnet_ids])"},{"line_number":606,"context_line":"            retval \u003d self.plugin.create_dhcp_port({\u0027port\u0027: port_dict})"},{"line_number":607,"context_line":""},{"line_number":608,"context_line":"        # Convert subnet_id to subnet dict"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUvM%3D","line":605,"updated":"2013-05-14 17:54:25.000000000","message":"you built this on line 585, worth saving it?","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":602,"context_line":"                network_id\u003dnetwork.id,"},{"line_number":603,"context_line":"                tenant_id\u003dnetwork.tenant_id,"},{"line_number":604,"context_line":"                device_owner\u003d\u0027network:dhcp\u0027,"},{"line_number":605,"context_line":"                fixed_ips\u003d[dict(subnet_id\u003ds) for s in dhcp_enabled_subnet_ids])"},{"line_number":606,"context_line":"            retval \u003d self.plugin.create_dhcp_port({\u0027port\u0027: port_dict})"},{"line_number":607,"context_line":""},{"line_number":608,"context_line":"        # Convert subnet_id to subnet dict"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUkI%3D","line":605,"in_reply_to":"AAAAOn%2F%2FUmg%3D","updated":"2013-05-14 18:54:11.000000000","message":"oops, yeah.","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":602,"context_line":"                network_id\u003dnetwork.id,"},{"line_number":603,"context_line":"                tenant_id\u003dnetwork.tenant_id,"},{"line_number":604,"context_line":"                device_owner\u003d\u0027network:dhcp\u0027,"},{"line_number":605,"context_line":"                fixed_ips\u003d[dict(subnet_id\u003ds) for s in dhcp_enabled_subnet_ids])"},{"line_number":606,"context_line":"            retval \u003d self.plugin.create_dhcp_port({\u0027port\u0027: port_dict})"},{"line_number":607,"context_line":""},{"line_number":608,"context_line":"        # Convert subnet_id to subnet dict"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUmg%3D","line":605,"in_reply_to":"AAAAOn%2F%2FUvM%3D","updated":"2013-05-14 18:44:00.000000000","message":"If we get to this line we did not enter line 585.","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"unresolved":false,"context_lines":[{"line_number":613,"context_line":""},{"line_number":614,"context_line":"        ips \u003d [DictModel(item) if isinstance(item, dict) else item"},{"line_number":615,"context_line":"               for item in fixed_ips]"},{"line_number":616,"context_line":"        setattr(retval, \u0027fixed_ips\u0027, ips)"},{"line_number":617,"context_line":""},{"line_number":618,"context_line":"        return retval"},{"line_number":619,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FVuc%3D","line":616,"updated":"2013-05-14 07:46:32.000000000","message":"nit: is using of setattr() necessary? I think, retval.fixed_ips \u003d ips will do as well. Surely, they do completely the same thing here, but attribute assigning is (IMHO) clearer.","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":613,"context_line":""},{"line_number":614,"context_line":"        ips \u003d [DictModel(item) if isinstance(item, dict) else item"},{"line_number":615,"context_line":"               for item in fixed_ips]"},{"line_number":616,"context_line":"        setattr(retval, \u0027fixed_ips\u0027, ips)"},{"line_number":617,"context_line":""},{"line_number":618,"context_line":"        return retval"},{"line_number":619,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUmY%3D","line":616,"in_reply_to":"AAAAOn%2F%2FVuc%3D","updated":"2013-05-14 18:44:00.000000000","message":"sure.","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                    help\u003d_(\"Support Metadata requests on isolated networks.\")),"},{"line_number":65,"context_line":"        cfg.BoolOpt(\u0027enable_metadata_network\u0027, default\u003dFalse,"},{"line_number":66,"context_line":"                    help\u003d_(\"Allows for serving metadata requests from a \""},{"line_number":67,"context_line":"                           \"dedicate network. Requires \""},{"line_number":68,"context_line":"                           \"enable isolated_metadata \u003d True \")),"},{"line_number":69,"context_line":"        cfg.IntOpt(\u0027num_sync_threads\u0027, default\u003d4,"},{"line_number":70,"context_line":"                   help\u003d_(\u0027Number of threads to use during sync process.\u0027)),"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FT%2Bg%3D","line":67,"updated":"2013-05-15 00:08:53.000000000","message":"whoops some how i changed this docstring... will amend  tomorrow in another patch giving time for other reviewers first.","commit_id":"3e7d46b13d34356b600ffdd558187b343491cf24"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7ecb4456f6438a0538d526d08ce069755f1d33a2","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def bulk_enable_dhcp_helper(self):"},{"line_number":175,"context_line":"        networks \u003d self.plugin_rpc.get_all_network_info()"},{"line_number":176,"context_line":"        pool \u003d eventlet.GreenPool(cfg.CONF.num_sync_threads)"},{"line_number":177,"context_line":"        for network in networks:"},{"line_number":178,"context_line":"            pool.spawn_n(self.configure_dhcp_for_network, network)"},{"line_number":179,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2F958%3D","line":176,"updated":"2013-05-17 16:21:13.000000000","message":"Have you considered openstack.common.thread_group.ThreadGroup?\n\nConceptually you do the same here, but you are losing the advantages of using the openstack shared libraries.","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f82f3d88a2ca3cbe74a6c308d6cd252a9be519e3","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def bulk_enable_dhcp_helper(self):"},{"line_number":175,"context_line":"        networks \u003d self.plugin_rpc.get_all_network_info()"},{"line_number":176,"context_line":"        pool \u003d eventlet.GreenPool(cfg.CONF.num_sync_threads)"},{"line_number":177,"context_line":"        for network in networks:"},{"line_number":178,"context_line":"            pool.spawn_n(self.configure_dhcp_for_network, network)"},{"line_number":179,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2F5dY%3D","line":176,"in_reply_to":"AAAAPH%2F%2F958%3D","updated":"2013-05-28 20:15:55.000000000","message":"I\u0027ll check it out.","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7ecb4456f6438a0538d526d08ce069755f1d33a2","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    def bulk_enable_dhcp_helper(self):"},{"line_number":175,"context_line":"        networks \u003d self.plugin_rpc.get_all_network_info()"},{"line_number":176,"context_line":"        pool \u003d eventlet.GreenPool(cfg.CONF.num_sync_threads)"},{"line_number":177,"context_line":"        for network in networks:"},{"line_number":178,"context_line":"            pool.spawn_n(self.configure_dhcp_for_network, network)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    def enable_dhcp_helper(self, network_id):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2F95Y%3D","line":177,"updated":"2013-05-17 16:21:13.000000000","message":"The following will avoid spawning threads that immediately exit (will save the process some time)\n\nfor network in networks if network.admin_state_up","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f82f3d88a2ca3cbe74a6c308d6cd252a9be519e3","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    def bulk_enable_dhcp_helper(self):"},{"line_number":175,"context_line":"        networks \u003d self.plugin_rpc.get_all_network_info()"},{"line_number":176,"context_line":"        pool \u003d eventlet.GreenPool(cfg.CONF.num_sync_threads)"},{"line_number":177,"context_line":"        for network in networks:"},{"line_number":178,"context_line":"            pool.spawn_n(self.configure_dhcp_for_network, network)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    def enable_dhcp_helper(self, network_id):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2F5c8%3D","line":177,"in_reply_to":"AAAAPH%2F%2F95Y%3D","updated":"2013-05-28 20:15:55.000000000","message":"Since this doesn\u0027t actually spawn a real thread as is done within a greenthread i don\u0027t think it makes much difference.  I\u0027ll add that check if you want but it\u0027s already done in configure_dhcp_for_network()","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7ecb4456f6438a0538d526d08ce069755f1d33a2","unresolved":false,"context_lines":[{"line_number":547,"context_line":"        host_uuid \u003d uuid.uuid5(uuid.NAMESPACE_DNS, socket.gethostname())"},{"line_number":548,"context_line":"        return \u0027dhcp%s-%s\u0027 % (host_uuid, network.id)"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    def create_dhcp_port(self, network):"},{"line_number":551,"context_line":"        \"\"\"Create/update DHCP port for the host if needed and return port.\"\"\""},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"        device_id \u003d self.get_device_id(network)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2F928%3D","line":550,"updated":"2013-05-17 16:21:13.000000000","message":"would it be possible to not have two methods with the same name and quite different semantics?\n\nThis could be called setup_dhcp_port","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f82f3d88a2ca3cbe74a6c308d6cd252a9be519e3","unresolved":false,"context_lines":[{"line_number":547,"context_line":"        host_uuid \u003d uuid.uuid5(uuid.NAMESPACE_DNS, socket.gethostname())"},{"line_number":548,"context_line":"        return \u0027dhcp%s-%s\u0027 % (host_uuid, network.id)"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    def create_dhcp_port(self, network):"},{"line_number":551,"context_line":"        \"\"\"Create/update DHCP port for the host if needed and return port.\"\"\""},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"        device_id \u003d self.get_device_id(network)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2F5c0%3D","line":550,"in_reply_to":"AAAAPH%2F%2F928%3D","updated":"2013-05-28 20:15:55.000000000","message":"I agree that\u0027s a much better name. thanks.","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7ecb4456f6438a0538d526d08ce069755f1d33a2","unresolved":false,"context_lines":[{"line_number":555,"context_line":"        dhcp_enabled_subnet_ids \u003d []"},{"line_number":556,"context_line":"        for subnet in network.subnets:"},{"line_number":557,"context_line":"            if subnet.enable_dhcp:"},{"line_number":558,"context_line":"                dhcp_enabled_subnet_ids.append(subnet.id)"},{"line_number":559,"context_line":"            subnets[subnet.id] \u003d dict("},{"line_number":560,"context_line":"                allocation_pools\u003dsubnet.allocation_pools,"},{"line_number":561,"context_line":"                cidr\u003dsubnet.cidr,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2F91w%3D","line":558,"updated":"2013-05-17 16:21:13.000000000","message":"perhaps it should be possible to use list comprehension:\n\ndhcp_enabled_subnet_ids \u003d subnet.id for subnet in network.subnets if subnet.enable_dhcp","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f82f3d88a2ca3cbe74a6c308d6cd252a9be519e3","unresolved":false,"context_lines":[{"line_number":555,"context_line":"        dhcp_enabled_subnet_ids \u003d []"},{"line_number":556,"context_line":"        for subnet in network.subnets:"},{"line_number":557,"context_line":"            if subnet.enable_dhcp:"},{"line_number":558,"context_line":"                dhcp_enabled_subnet_ids.append(subnet.id)"},{"line_number":559,"context_line":"            subnets[subnet.id] \u003d dict("},{"line_number":560,"context_line":"                allocation_pools\u003dsubnet.allocation_pools,"},{"line_number":561,"context_line":"                cidr\u003dsubnet.cidr,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2F5Eo%3D","line":558,"in_reply_to":"AAAAPH%2F%2F91w%3D","updated":"2013-05-28 20:15:55.000000000","message":"I did previously but changed it to a for so that I cloud include the building of the subnet_id -\u003e subnet map.","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7ecb4456f6438a0538d526d08ce069755f1d33a2","unresolved":false,"context_lines":[{"line_number":567,"context_line":"                ip_version\u003dsubnet.ip_version,"},{"line_number":568,"context_line":"                name\u003dsubnet.name,"},{"line_number":569,"context_line":"                network_id\u003dsubnet.network_id,"},{"line_number":570,"context_line":"                tenant_id\u003dsubnet.tenant_id)"},{"line_number":571,"context_line":""},{"line_number":572,"context_line":"        retval \u003d None"},{"line_number":573,"context_line":"        for port in network.ports:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2F92E%3D","line":570,"updated":"2013-05-17 16:21:13.000000000","message":"I guess you could not do:\n\nsubnets[subnet.id] \u003d subnet\n\nBut the reason is not clear to me.","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f82f3d88a2ca3cbe74a6c308d6cd252a9be519e3","unresolved":false,"context_lines":[{"line_number":567,"context_line":"                ip_version\u003dsubnet.ip_version,"},{"line_number":568,"context_line":"                name\u003dsubnet.name,"},{"line_number":569,"context_line":"                network_id\u003dsubnet.network_id,"},{"line_number":570,"context_line":"                tenant_id\u003dsubnet.tenant_id)"},{"line_number":571,"context_line":""},{"line_number":572,"context_line":"        retval \u003d None"},{"line_number":573,"context_line":"        for port in network.ports:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2FoyI%3D","line":570,"in_reply_to":"AAAAPH%2F%2F92E%3D","updated":"2013-05-28 20:15:55.000000000","message":"This allows use to recreate fixed_ips as a DictModel on 613. We need to change how the data is stored there and group it all in fixed_ips.","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7ecb4456f6438a0538d526d08ce069755f1d33a2","unresolved":false,"context_lines":[{"line_number":571,"context_line":""},{"line_number":572,"context_line":"        retval \u003d None"},{"line_number":573,"context_line":"        for port in network.ports:"},{"line_number":574,"context_line":"            port_device_id \u003d getattr(port, \u0027device_id\u0027, None)"},{"line_number":575,"context_line":"            if port_device_id and port_device_id \u003d\u003d device_id:"},{"line_number":576,"context_line":"                port_fixed_ips \u003d []"},{"line_number":577,"context_line":"                for fixed_ip in port.fixed_ips:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2F90c%3D","line":574,"updated":"2013-05-17 16:21:13.000000000","message":"it seems you\u0027re looking for dhcp ports.\nCan\u0027t you just lookup the device owner?","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f82f3d88a2ca3cbe74a6c308d6cd252a9be519e3","unresolved":false,"context_lines":[{"line_number":571,"context_line":""},{"line_number":572,"context_line":"        retval \u003d None"},{"line_number":573,"context_line":"        for port in network.ports:"},{"line_number":574,"context_line":"            port_device_id \u003d getattr(port, \u0027device_id\u0027, None)"},{"line_number":575,"context_line":"            if port_device_id and port_device_id \u003d\u003d device_id:"},{"line_number":576,"context_line":"                port_fixed_ips \u003d []"},{"line_number":577,"context_line":"                for fixed_ip in port.fixed_ips:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2F4%2F0%3D","line":574,"in_reply_to":"AAAAPH%2F%2F90c%3D","updated":"2013-05-28 20:15:55.000000000","message":"nope because the code is written to allow multiple dhcp agents to run on the same subnet. I need to find the device_id that matches to the dnsmasq process running on this node:\n\n\n    def get_device_id(self, network):\n        \"\"\"Return a unique DHCP device ID for this host on the network.\"\"\"\n        # There could be more than one dhcp server per network, so create\n        # a device id that combines host and network ids\n\n        host_uuid \u003d uuid.uuid5(uuid.NAMESPACE_DNS, socket.gethostname())\n        return \u0027dhcp%s-%s\u0027 % (host_uuid, network.id)","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7ecb4456f6438a0538d526d08ce069755f1d33a2","unresolved":false,"context_lines":[{"line_number":572,"context_line":"        retval \u003d None"},{"line_number":573,"context_line":"        for port in network.ports:"},{"line_number":574,"context_line":"            port_device_id \u003d getattr(port, \u0027device_id\u0027, None)"},{"line_number":575,"context_line":"            if port_device_id and port_device_id \u003d\u003d device_id:"},{"line_number":576,"context_line":"                port_fixed_ips \u003d []"},{"line_number":577,"context_line":"                for fixed_ip in port.fixed_ips:"},{"line_number":578,"context_line":"                    port_fixed_ips.append({\u0027subnet_id\u0027: fixed_ip.subnet_id,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2F91A%3D","line":575,"updated":"2013-05-17 16:21:13.000000000","message":"Can device_id be none? If not, the first part of this check can be removed probably","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f82f3d88a2ca3cbe74a6c308d6cd252a9be519e3","unresolved":false,"context_lines":[{"line_number":572,"context_line":"        retval \u003d None"},{"line_number":573,"context_line":"        for port in network.ports:"},{"line_number":574,"context_line":"            port_device_id \u003d getattr(port, \u0027device_id\u0027, None)"},{"line_number":575,"context_line":"            if port_device_id and port_device_id \u003d\u003d device_id:"},{"line_number":576,"context_line":"                port_fixed_ips \u003d []"},{"line_number":577,"context_line":"                for fixed_ip in port.fixed_ips:"},{"line_number":578,"context_line":"                    port_fixed_ips.append({\u0027subnet_id\u0027: fixed_ip.subnet_id,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2F4%2Fk%3D","line":575,"in_reply_to":"AAAAPH%2F%2F91A%3D","updated":"2013-05-28 20:15:55.000000000","message":"it can.","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7ecb4456f6438a0538d526d08ce069755f1d33a2","unresolved":false,"context_lines":[{"line_number":590,"context_line":"                else:"},{"line_number":591,"context_line":"                    retval \u003d port"},{"line_number":592,"context_line":"                # break since we found port that matches device_id"},{"line_number":593,"context_line":"                break"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"        # DHCP port has not yet been created."},{"line_number":596,"context_line":"        if retval is None:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2F90E%3D","line":593,"updated":"2013-05-17 16:21:13.000000000","message":"perhaps even return?","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f82f3d88a2ca3cbe74a6c308d6cd252a9be519e3","unresolved":false,"context_lines":[{"line_number":590,"context_line":"                else:"},{"line_number":591,"context_line":"                    retval \u003d port"},{"line_number":592,"context_line":"                # break since we found port that matches device_id"},{"line_number":593,"context_line":"                break"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"        # DHCP port has not yet been created."},{"line_number":596,"context_line":"        if retval is None:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2Foys%3D","line":593,"in_reply_to":"AAAAPH%2F%2F90E%3D","updated":"2013-05-28 20:15:55.000000000","message":"We still need to update the port though.  This only breaks us out of the loop that searches to see if there is already a dhcp port created that matches the device_id of this agent.","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"unresolved":false,"context_lines":[{"line_number":568,"context_line":"                ip_version\u003dsubnet.ip_version,"},{"line_number":569,"context_line":"                name\u003dsubnet.name,"},{"line_number":570,"context_line":"                network_id\u003dsubnet.network_id,"},{"line_number":571,"context_line":"                tenant_id\u003dsubnet.tenant_id)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"        retval \u003d None"},{"line_number":574,"context_line":"        for port in network.ports:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPH%2F%2FlKw%3D","line":571,"updated":"2013-05-30 01:45:15.000000000","message":"Why are you adding information of dhcp disabled subnet?","commit_id":"ad3fc33c3291390277b52f4c20805e33d9349022"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f82f3d88a2ca3cbe74a6c308d6cd252a9be519e3","unresolved":false,"context_lines":[{"line_number":568,"context_line":"                ip_version\u003dsubnet.ip_version,"},{"line_number":569,"context_line":"                name\u003dsubnet.name,"},{"line_number":570,"context_line":"                network_id\u003dsubnet.network_id,"},{"line_number":571,"context_line":"                tenant_id\u003dsubnet.tenant_id)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"        retval \u003d None"},{"line_number":574,"context_line":"        for port in network.ports:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPH%2F%2FlFE%3D","line":571,"in_reply_to":"AAAAPH%2F%2FlKw%3D","updated":"2013-05-30 02:59:08.000000000","message":"The previous code did but you are right I suppose we don\u0027t need that.","commit_id":"ad3fc33c3291390277b52f4c20805e33d9349022"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"unresolved":false,"context_lines":[{"line_number":570,"context_line":"                network_id\u003dsubnet.network_id,"},{"line_number":571,"context_line":"                tenant_id\u003dsubnet.tenant_id)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"        retval \u003d None"},{"line_number":574,"context_line":"        for port in network.ports:"},{"line_number":575,"context_line":"            port_device_id \u003d getattr(port, \u0027device_id\u0027, None)"},{"line_number":576,"context_line":"            if port_device_id and port_device_id \u003d\u003d device_id:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPH%2F%2FlK0%3D","line":573,"updated":"2013-05-30 01:45:15.000000000","message":"nit: I prefer more meaningful name of variable for reability\nHow about created_dhcp_port ?","commit_id":"ad3fc33c3291390277b52f4c20805e33d9349022"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f82f3d88a2ca3cbe74a6c308d6cd252a9be519e3","unresolved":false,"context_lines":[{"line_number":570,"context_line":"                network_id\u003dsubnet.network_id,"},{"line_number":571,"context_line":"                tenant_id\u003dsubnet.tenant_id)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"        retval \u003d None"},{"line_number":574,"context_line":"        for port in network.ports:"},{"line_number":575,"context_line":"            port_device_id \u003d getattr(port, \u0027device_id\u0027, None)"},{"line_number":576,"context_line":"            if port_device_id and port_device_id \u003d\u003d device_id:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPH%2F%2FlFM%3D","line":573,"in_reply_to":"AAAAPH%2F%2FlK0%3D","updated":"2013-05-30 02:59:08.000000000","message":"Done","commit_id":"ad3fc33c3291390277b52f4c20805e33d9349022"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"unresolved":false,"context_lines":[{"line_number":573,"context_line":"        retval \u003d None"},{"line_number":574,"context_line":"        for port in network.ports:"},{"line_number":575,"context_line":"            port_device_id \u003d getattr(port, \u0027device_id\u0027, None)"},{"line_number":576,"context_line":"            if port_device_id and port_device_id \u003d\u003d device_id:"},{"line_number":577,"context_line":"                port_fixed_ips \u003d []"},{"line_number":578,"context_line":"                for fixed_ip in port.fixed_ips:"},{"line_number":579,"context_line":"                    port_fixed_ips.append({\u0027subnet_id\u0027: fixed_ip.subnet_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPH%2F%2FlKk%3D","line":576,"updated":"2013-05-30 01:45:15.000000000","message":"only port_device_id \u003d\u003d device_id: is OK, because device_id will not be None","commit_id":"ad3fc33c3291390277b52f4c20805e33d9349022"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f82f3d88a2ca3cbe74a6c308d6cd252a9be519e3","unresolved":false,"context_lines":[{"line_number":573,"context_line":"        retval \u003d None"},{"line_number":574,"context_line":"        for port in network.ports:"},{"line_number":575,"context_line":"            port_device_id \u003d getattr(port, \u0027device_id\u0027, None)"},{"line_number":576,"context_line":"            if port_device_id and port_device_id \u003d\u003d device_id:"},{"line_number":577,"context_line":"                port_fixed_ips \u003d []"},{"line_number":578,"context_line":"                for fixed_ip in port.fixed_ips:"},{"line_number":579,"context_line":"                    port_fixed_ips.append({\u0027subnet_id\u0027: fixed_ip.subnet_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPH%2F%2FlFQ%3D","line":576,"in_reply_to":"AAAAPH%2F%2FlKk%3D","updated":"2013-05-30 02:59:08.000000000","message":"Done","commit_id":"ad3fc33c3291390277b52f4c20805e33d9349022"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":155,"context_line":"            for deleted_id in known_networks - active_networks:"},{"line_number":156,"context_line":"                self.disable_dhcp_helper(deleted_id)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"            self.bulk_enable_dhcp_helper()"},{"line_number":159,"context_line":"        except Exception:"},{"line_number":160,"context_line":"            self.needs_resync \u003d True"},{"line_number":161,"context_line":"            LOG.exception(_(\u0027Unable to sync network state.\u0027))"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2FkVo%3D","line":158,"updated":"2013-05-30 11:55:31.000000000","message":"before this patch, we will filter the networks in quantum by active_networks according to the scheduler. now the bulk_enable_dhcp_helper will get the all networks regardless the shedulering","commit_id":"8950d7b861b8bcad8ecbcd67796a55964c3a58c5"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":155,"context_line":"            for deleted_id in known_networks - active_networks:"},{"line_number":156,"context_line":"                self.disable_dhcp_helper(deleted_id)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"            self.bulk_enable_dhcp_helper()"},{"line_number":159,"context_line":"        except Exception:"},{"line_number":160,"context_line":"            self.needs_resync \u003d True"},{"line_number":161,"context_line":"            LOG.exception(_(\u0027Unable to sync network state.\u0027))"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2FjOU%3D","line":158,"in_reply_to":"AAAAPH%2F%2FkVo%3D","updated":"2013-05-30 18:42:55.000000000","message":"good point. I\u0027ll fix this.","commit_id":"8950d7b861b8bcad8ecbcd67796a55964c3a58c5"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":356,"context_line":"        1.0 - Initial version."},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    \"\"\""},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    BASE_RPC_API_VERSION \u003d \u00271.0\u0027"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    def __init__(self, topic, context):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2FkYU%3D","line":359,"updated":"2013-05-30 11:55:31.000000000","message":"don\u0027t we need bump the version number?","commit_id":"8950d7b861b8bcad8ecbcd67796a55964c3a58c5"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":356,"context_line":"        1.0 - Initial version."},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    \"\"\""},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    BASE_RPC_API_VERSION \u003d \u00271.0\u0027"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    def __init__(self, topic, context):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2FjOQ%3D","line":359,"in_reply_to":"AAAAPH%2F%2FkYU%3D","updated":"2013-05-30 18:42:55.000000000","message":"sure I can bump it","commit_id":"8950d7b861b8bcad8ecbcd67796a55964c3a58c5"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":548,"context_line":"        host_uuid \u003d uuid.uuid5(uuid.NAMESPACE_DNS, socket.gethostname())"},{"line_number":549,"context_line":"        return \u0027dhcp%s-%s\u0027 % (host_uuid, network.id)"},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"    def setup_dhcp_port(self, network):"},{"line_number":552,"context_line":"        \"\"\"Create/update DHCP port for the host if needed and return port.\"\"\""},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"        device_id \u003d self.get_device_id(network)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2Fidg%3D","line":551,"updated":"2013-05-30 23:21:55.000000000","message":"we can also call previous get_dhcp_port in this function if we need to update or create and dhcp port. I think we should not change the interface between agent and quantum server as possible as we can.","commit_id":"8950d7b861b8bcad8ecbcd67796a55964c3a58c5"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":548,"context_line":"        host_uuid \u003d uuid.uuid5(uuid.NAMESPACE_DNS, socket.gethostname())"},{"line_number":549,"context_line":"        return \u0027dhcp%s-%s\u0027 % (host_uuid, network.id)"},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"    def setup_dhcp_port(self, network):"},{"line_number":552,"context_line":"        \"\"\"Create/update DHCP port for the host if needed and return port.\"\"\""},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"        device_id \u003d self.get_device_id(network)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2FicA%3D","line":551,"in_reply_to":"AAAAPH%2F%2Fidg%3D","updated":"2013-05-30 23:29:42.000000000","message":"Yes we could have but then in dhcp_rpc_base.py we would still need to do (get_subnets()/get_ports()) in the get_dhcp_port method  unless we passed in this data. This change now allows the dhcp-agent to handle all the update logic externally as now there is an update_port()/create_port() method. This is more efficient this way.","commit_id":"8950d7b861b8bcad8ecbcd67796a55964c3a58c5"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":568,"context_line":"                    ip_version\u003dsubnet.ip_version,"},{"line_number":569,"context_line":"                    name\u003dsubnet.name,"},{"line_number":570,"context_line":"                    network_id\u003dsubnet.network_id,"},{"line_number":571,"context_line":"                    tenant_id\u003dsubnet.tenant_id)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"        dhcp_port \u003d None"},{"line_number":574,"context_line":"        for port in network.ports:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2Fic4%3D","line":571,"updated":"2013-05-30 23:21:55.000000000","message":"nit: It is not friendly to expansion of the subnet, for example the extension attr.","commit_id":"8950d7b861b8bcad8ecbcd67796a55964c3a58c5"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"unresolved":false,"context_lines":[{"line_number":568,"context_line":"                    ip_version\u003dsubnet.ip_version,"},{"line_number":569,"context_line":"                    name\u003dsubnet.name,"},{"line_number":570,"context_line":"                    network_id\u003dsubnet.network_id,"},{"line_number":571,"context_line":"                    tenant_id\u003dsubnet.tenant_id)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"        dhcp_port \u003d None"},{"line_number":574,"context_line":"        for port in network.ports:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2FgRk%3D","line":571,"in_reply_to":"AAAAPH%2F%2Fic4%3D","updated":"2013-05-31 17:57:50.000000000","message":"+1. \nMay be we can add\n\n    def __delitem__(self, key):\n        self.__delattr__(key)\n    def __getitem__(self, key):\n        self.__getattribute__(key)\n    def __setitem__(self, key, value):\n        self.__setattr__(key, value)\n\nto DictModel","commit_id":"8950d7b861b8bcad8ecbcd67796a55964c3a58c5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"266c052baa5a3b3515340c6817013d1b7db4db51","unresolved":false,"context_lines":[{"line_number":595,"context_line":""},{"line_number":596,"context_line":"        # DHCP port has not yet been created."},{"line_number":597,"context_line":"        if dhcp_port is None:"},{"line_number":598,"context_line":"            LOG.debug(_(\u0027DHCP port %(device_id)s on network %(network_id)s\u0027"},{"line_number":599,"context_line":"                        \u0027does not yet exist.\u0027), {\u0027device_id\u0027: device_id,"},{"line_number":600,"context_line":"                                                 \u0027network_id\u0027: network.id})"},{"line_number":601,"context_line":"            port_dict \u003d dict("}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2FkpA%3D","line":598,"updated":"2013-05-30 08:47:16.000000000","message":"missing space","commit_id":"8950d7b861b8bcad8ecbcd67796a55964c3a58c5"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":595,"context_line":""},{"line_number":596,"context_line":"        # DHCP port has not yet been created."},{"line_number":597,"context_line":"        if dhcp_port is None:"},{"line_number":598,"context_line":"            LOG.debug(_(\u0027DHCP port %(device_id)s on network %(network_id)s\u0027"},{"line_number":599,"context_line":"                        \u0027does not yet exist.\u0027), {\u0027device_id\u0027: device_id,"},{"line_number":600,"context_line":"                                                 \u0027network_id\u0027: network.id})"},{"line_number":601,"context_line":"            port_dict \u003d dict("}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2FjOM%3D","line":598,"in_reply_to":"AAAAPH%2F%2FkpA%3D","updated":"2013-05-30 18:42:55.000000000","message":"Done","commit_id":"8950d7b861b8bcad8ecbcd67796a55964c3a58c5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"266c052baa5a3b3515340c6817013d1b7db4db51","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        networks \u003d self.plugin_rpc.get_all_network_info()"},{"line_number":177,"context_line":"        pool \u003d eventlet.GreenPool(cfg.CONF.num_sync_threads)"},{"line_number":178,"context_line":"        for network in networks:"},{"line_number":179,"context_line":"            pool.spawn_n(self.configure_dhcp_for_network, network)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def enable_dhcp_helper(self, network_id):"},{"line_number":182,"context_line":"        \"\"\"Enable DHCP for a network that meets enabling criteria.\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAPX%2F%2F6RA%3D","line":179,"updated":"2013-06-06 07:50:04.000000000","message":"Consider calling \"if not network.admin_state_up\" prior to spawning.","commit_id":"808a29ef8d3ddc8ceb009525d7b5e0f072d9fc39"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":176,"context_line":"        networks \u003d self.plugin_rpc.get_all_network_info()"},{"line_number":177,"context_line":"        pool \u003d eventlet.GreenPool(cfg.CONF.num_sync_threads)"},{"line_number":178,"context_line":"        for network in networks:"},{"line_number":179,"context_line":"            pool.spawn_n(self.configure_dhcp_for_network, network)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def enable_dhcp_helper(self, network_id):"},{"line_number":182,"context_line":"        \"\"\"Enable DHCP for a network that meets enabling criteria.\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAPX%2F%2F41g%3D","line":179,"in_reply_to":"AAAAPX%2F%2F6RA%3D","updated":"2013-06-06 18:56:03.000000000","message":"Since this is a greenthread doing the check before spawning saves us very little (probably none). I rather not add the check here as we are already doing this check in configure_dhcp_for_network() on the first line","commit_id":"808a29ef8d3ddc8ceb009525d7b5e0f072d9fc39"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"266c052baa5a3b3515340c6817013d1b7db4db51","unresolved":false,"context_lines":[{"line_number":556,"context_line":"        subnets \u003d {}"},{"line_number":557,"context_line":"        dhcp_enabled_subnet_ids \u003d []"},{"line_number":558,"context_line":"        for subnet in network.subnets:"},{"line_number":559,"context_line":"            if subnet.enable_dhcp:"},{"line_number":560,"context_line":"                dhcp_enabled_subnet_ids.append(subnet.id)"},{"line_number":561,"context_line":"                subnets[subnet.id] \u003d subnet"},{"line_number":562,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAPX%2F%2F6Q4%3D","line":559,"updated":"2013-06-06 07:50:04.000000000","message":"Do we actually need this check? Would it not be more efficient if the plugin would not send the subnets that do not have dhcp_enabled?","commit_id":"808a29ef8d3ddc8ceb009525d7b5e0f072d9fc39"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":556,"context_line":"        subnets \u003d {}"},{"line_number":557,"context_line":"        dhcp_enabled_subnet_ids \u003d []"},{"line_number":558,"context_line":"        for subnet in network.subnets:"},{"line_number":559,"context_line":"            if subnet.enable_dhcp:"},{"line_number":560,"context_line":"                dhcp_enabled_subnet_ids.append(subnet.id)"},{"line_number":561,"context_line":"                subnets[subnet.id] \u003d subnet"},{"line_number":562,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAPX%2F%2F4kA%3D","line":559,"in_reply_to":"AAAAPX%2F%2F6Q4%3D","updated":"2013-06-06 18:56:03.000000000","message":"since we return all the networks/subnets/ports in the initial sync we have to do this filtering here.","commit_id":"808a29ef8d3ddc8ceb009525d7b5e0f072d9fc39"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"266c052baa5a3b3515340c6817013d1b7db4db51","unresolved":false,"context_lines":[{"line_number":561,"context_line":"                subnets[subnet.id] \u003d subnet"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        dhcp_port \u003d None"},{"line_number":564,"context_line":"        for port in network.ports:"},{"line_number":565,"context_line":"            port_device_id \u003d getattr(port, \u0027device_id\u0027, None)"},{"line_number":566,"context_line":"            if port_device_id \u003d\u003d device_id:"},{"line_number":567,"context_line":"                port_fixed_ips \u003d []"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAPX%2F%2F6Qw%3D","line":564,"updated":"2013-06-06 07:50:04.000000000","message":"Maybe this is not related to the patch at all but this code is very ineffcient - we are running over the entire list of ports to find a matching device id.","commit_id":"808a29ef8d3ddc8ceb009525d7b5e0f072d9fc39"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":561,"context_line":"                subnets[subnet.id] \u003d subnet"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        dhcp_port \u003d None"},{"line_number":564,"context_line":"        for port in network.ports:"},{"line_number":565,"context_line":"            port_device_id \u003d getattr(port, \u0027device_id\u0027, None)"},{"line_number":566,"context_line":"            if port_device_id \u003d\u003d device_id:"},{"line_number":567,"context_line":"                port_fixed_ips \u003d []"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAPX%2F%2F4zs%3D","line":564,"in_reply_to":"AAAAPX%2F%2F6Qw%3D","updated":"2013-06-06 18:56:03.000000000","message":"The other way is if we queried quantum for the device_id but that would generate an api call for data that the agent already had.  This code here  is already parallelized and only needs to run once on boot. Building a map of device_id is probably not worth it as it\u0027s only used once.","commit_id":"808a29ef8d3ddc8ceb009525d7b5e0f072d9fc39"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":375,"context_line":""},{"line_number":376,"context_line":"    def get_all_network_info(self):"},{"line_number":377,"context_line":"        \"\"\"Make a remote process call to retrieve all network info.\"\"\""},{"line_number":378,"context_line":"        networks \u003d self.call(self.context,"},{"line_number":379,"context_line":"                             self.make_msg(\u0027get_all_network_info\u0027,"},{"line_number":380,"context_line":"                                           host\u003dself.host),"},{"line_number":381,"context_line":"                             topic\u003dself.topic)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPX%2F%2F3jc%3D","line":378,"updated":"2013-06-07 03:13:06.000000000","message":"can we use the current get_active_networks()?","commit_id":"d02a6ca59c4f9890ce3fc87e29098d47269fded8"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":356,"context_line":"    API version history:"},{"line_number":357,"context_line":"        1.0 - Initial version."},{"line_number":358,"context_line":"        1.1 - Added get_active_networks_info, create_dhcp_port,"},{"line_number":359,"context_line":"              update_dhcp_port, and removed get_dhcp_port methods."},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    \"\"\""},{"line_number":362,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPn%2F%2FZyg%3D","line":359,"updated":"2013-07-02 17:22:07.000000000","message":"Technically, you did not remove get_dhcp_port, or am I wrong?","commit_id":"2a0f39ffff1f7d71d29c4ff184fecf801f644db4"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":356,"context_line":"    API version history:"},{"line_number":357,"context_line":"        1.0 - Initial version."},{"line_number":358,"context_line":"        1.1 - Added get_active_networks_info, create_dhcp_port,"},{"line_number":359,"context_line":"              update_dhcp_port, and removed get_dhcp_port methods."},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    \"\"\""},{"line_number":362,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPn%2F%2FZck%3D","line":359,"in_reply_to":"AAAAPn%2F%2FZyg%3D","updated":"2013-07-02 18:37:57.000000000","message":"gah i missed reverting this change back.","commit_id":"2a0f39ffff1f7d71d29c4ff184fecf801f644db4"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":650,"context_line":"                network_id\u003dnetwork.id,"},{"line_number":651,"context_line":"                tenant_id\u003dnetwork.tenant_id,"},{"line_number":652,"context_line":"                device_owner\u003dconstants.DEVICE_OWNER_DHCP,"},{"line_number":653,"context_line":"                fixed_ips\u003d[dict(subnet_id\u003ds) for s in dhcp_enabled_subnet_ids])"},{"line_number":654,"context_line":"            dhcp_port \u003d self.plugin.create_dhcp_port({\u0027port\u0027: port_dict})"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"        # Convert subnet_id to subnet dict"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPn%2F%2FZwY%3D","line":653,"updated":"2013-07-02 17:22:07.000000000","message":"would it be possible to limit the amount of data send from the agent for creating (and perhaps updating) the dhcp port?\n\nFor instance, can tenant_id be set on the server side?\nSimilarly for IPs and device_owner.\n\nI see two benefits - less payload, and no need to have a method which can be called to create an arbitrary port on the RPC interface, bypassing authN checks.\nI don\u0027t understand anything about security, but this might represent backdoor which could be potentially exploited.","commit_id":"2a0f39ffff1f7d71d29c4ff184fecf801f644db4"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":650,"context_line":"                network_id\u003dnetwork.id,"},{"line_number":651,"context_line":"                tenant_id\u003dnetwork.tenant_id,"},{"line_number":652,"context_line":"                device_owner\u003dconstants.DEVICE_OWNER_DHCP,"},{"line_number":653,"context_line":"                fixed_ips\u003d[dict(subnet_id\u003ds) for s in dhcp_enabled_subnet_ids])"},{"line_number":654,"context_line":"            dhcp_port \u003d self.plugin.create_dhcp_port({\u0027port\u0027: port_dict})"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"        # Convert subnet_id to subnet dict"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPn%2F%2FZVk%3D","line":653,"in_reply_to":"AAAAPn%2F%2FZYc%3D","updated":"2013-07-02 18:56:43.000000000","message":"tenant_id is actually one of the bits that might be worrying from a security perspective; let\u0027s set it on the client side at the moment; we\u0027ll see what we can do.","commit_id":"2a0f39ffff1f7d71d29c4ff184fecf801f644db4"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":650,"context_line":"                network_id\u003dnetwork.id,"},{"line_number":651,"context_line":"                tenant_id\u003dnetwork.tenant_id,"},{"line_number":652,"context_line":"                device_owner\u003dconstants.DEVICE_OWNER_DHCP,"},{"line_number":653,"context_line":"                fixed_ips\u003d[dict(subnet_id\u003ds) for s in dhcp_enabled_subnet_ids])"},{"line_number":654,"context_line":"            dhcp_port \u003d self.plugin.create_dhcp_port({\u0027port\u0027: port_dict})"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"        # Convert subnet_id to subnet dict"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPn%2F%2FZYc%3D","line":653,"in_reply_to":"AAAAPn%2F%2FZcU%3D","updated":"2013-07-02 18:47:18.000000000","message":"tenant_id actually needs to be set on this side unless we want to add an extra query on the server side to look up the tenant_id for the network based on the network id.  I can remove device_owner and set that on the otherside though.","commit_id":"2a0f39ffff1f7d71d29c4ff184fecf801f644db4"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":650,"context_line":"                network_id\u003dnetwork.id,"},{"line_number":651,"context_line":"                tenant_id\u003dnetwork.tenant_id,"},{"line_number":652,"context_line":"                device_owner\u003dconstants.DEVICE_OWNER_DHCP,"},{"line_number":653,"context_line":"                fixed_ips\u003d[dict(subnet_id\u003ds) for s in dhcp_enabled_subnet_ids])"},{"line_number":654,"context_line":"            dhcp_port \u003d self.plugin.create_dhcp_port({\u0027port\u0027: port_dict})"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"        # Convert subnet_id to subnet dict"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPn%2F%2FZcU%3D","line":653,"in_reply_to":"AAAAPn%2F%2FZwY%3D","updated":"2013-07-02 18:37:57.000000000","message":"good idea.","commit_id":"2a0f39ffff1f7d71d29c4ff184fecf801f644db4"}],"quantum/common/utils.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"unresolved":false,"context_lines":[{"line_number":199,"context_line":"class Worker(Thread):"},{"line_number":200,"context_line":"    \"\"\"Thread executing tasks from a given tasks queue\"\"\""},{"line_number":201,"context_line":"    def __init__(self, tasks):"},{"line_number":202,"context_line":"        Thread.__init__(self)"},{"line_number":203,"context_line":"        self.tasks \u003d tasks"},{"line_number":204,"context_line":"        self.daemon \u003d True"},{"line_number":205,"context_line":"        self.start()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FX%2Bc%3D","line":202,"updated":"2013-05-13 09:39:41.000000000","message":"Thread is a new-style class (issubclass(threading.Thread, object) --\u003e True),\nso this should be super(Worker, self).__init__()","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"unresolved":false,"context_lines":[{"line_number":210,"context_line":"            try:"},{"line_number":211,"context_line":"                func(*args, **kargs)"},{"line_number":212,"context_line":"            except Exception, e:"},{"line_number":213,"context_line":"                print e"},{"line_number":214,"context_line":"            finally:"},{"line_number":215,"context_line":"                self.tasks.task_done()"},{"line_number":216,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FYAU%3D","line":213,"updated":"2013-05-13 09:39:41.000000000","message":"shouldn\u0027t this be logged instead?","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"}],"quantum/db/dhcp_rpc_base.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"unresolved":false,"context_lines":[{"line_number":51,"context_line":"        network_to_subnets_map \u003d {}"},{"line_number":52,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":53,"context_line":"        networks \u003d plugin.get_networks(context)"},{"line_number":54,"context_line":"        subnets \u003d plugin.get_subnets(context, filters\u003dNone)"},{"line_number":55,"context_line":"        ports \u003d plugin.get_ports(context, filters\u003dNone)"},{"line_number":56,"context_line":"        for subnet in subnets:"},{"line_number":57,"context_line":"            network_to_subnets_map.setdefault("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FX24%3D","line":54,"updated":"2013-05-13 09:39:41.000000000","message":"nit: filters argument seems to have a default value of None","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        network_to_subnets_map \u003d {}"},{"line_number":52,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":53,"context_line":"        networks \u003d plugin.get_networks(context)"},{"line_number":54,"context_line":"        subnets \u003d plugin.get_subnets(context, filters\u003dNone)"},{"line_number":55,"context_line":"        ports \u003d plugin.get_ports(context, filters\u003dNone)"},{"line_number":56,"context_line":"        for subnet in subnets:"},{"line_number":57,"context_line":"            network_to_subnets_map.setdefault("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FW%2Fc%3D","line":54,"in_reply_to":"AAAAOn%2F%2FX24%3D","updated":"2013-05-13 17:28:40.000000000","message":"Done","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"unresolved":false,"context_lines":[{"line_number":52,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":53,"context_line":"        networks \u003d plugin.get_networks(context)"},{"line_number":54,"context_line":"        subnets \u003d plugin.get_subnets(context, filters\u003dNone)"},{"line_number":55,"context_line":"        ports \u003d plugin.get_ports(context, filters\u003dNone)"},{"line_number":56,"context_line":"        for subnet in subnets:"},{"line_number":57,"context_line":"            network_to_subnets_map.setdefault("},{"line_number":58,"context_line":"                subnet[\u0027network_id\u0027], []).append(subnet)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FX20%3D","line":55,"updated":"2013-05-13 09:39:41.000000000","message":"ditto","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":53,"context_line":"        networks \u003d plugin.get_networks(context)"},{"line_number":54,"context_line":"        subnets \u003d plugin.get_subnets(context, filters\u003dNone)"},{"line_number":55,"context_line":"        ports \u003d plugin.get_ports(context, filters\u003dNone)"},{"line_number":56,"context_line":"        for subnet in subnets:"},{"line_number":57,"context_line":"            network_to_subnets_map.setdefault("},{"line_number":58,"context_line":"                subnet[\u0027network_id\u0027], []).append(subnet)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FW%2Fg%3D","line":55,"in_reply_to":"AAAAOn%2F%2FX20%3D","updated":"2013-05-13 17:28:40.000000000","message":"Done","commit_id":"82a95417855b47fd28930fe70eaed6616552432b"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def get_all_network_info(self, context, **kwargs):"},{"line_number":48,"context_line":"        \"\"\"Returns all the networks/subnets/ports in system.\"\"\""},{"line_number":49,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":50,"context_line":"        LOG.debug(_(\u0027get_all_network_info from %s\u0027) % host)"},{"line_number":51,"context_line":"        network_to_ports_map \u003d {}"},{"line_number":52,"context_line":"        network_to_subnets_map \u003d {}"},{"line_number":53,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FU2w%3D","line":50,"updated":"2013-05-14 17:54:25.000000000","message":"I read somewhere that , should be preferred against % with a single parameter; if this is just a rumor, just ignore my comment ;)","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def get_all_network_info(self, context, **kwargs):"},{"line_number":48,"context_line":"        \"\"\"Returns all the networks/subnets/ports in system.\"\"\""},{"line_number":49,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":50,"context_line":"        LOG.debug(_(\u0027get_all_network_info from %s\u0027) % host)"},{"line_number":51,"context_line":"        network_to_ports_map \u003d {}"},{"line_number":52,"context_line":"        network_to_subnets_map \u003d {}"},{"line_number":53,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUmM%3D","line":50,"in_reply_to":"AAAAOn%2F%2FU2w%3D","updated":"2013-05-14 18:44:00.000000000","message":"idk either.. I commented about this similar thing in the previous file.","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":145,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":146,"context_line":"        port \u003d kwargs.get(\u0027port\u0027)"},{"line_number":147,"context_line":"        LOG.debug(_(\u0027Create dhcp port  %(port)s \u0027"},{"line_number":148,"context_line":"                    \u0027from %(host)s.\u0027),"},{"line_number":149,"context_line":"                  {\u0027port\u0027: port,"},{"line_number":150,"context_line":"                   \u0027host\u0027: host})"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUuw%3D","line":148,"updated":"2013-05-14 17:54:25.000000000","message":", vs %?","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":146,"context_line":"        port \u003d kwargs.get(\u0027port\u0027)"},{"line_number":147,"context_line":"        LOG.debug(_(\u0027Create dhcp port  %(port)s \u0027"},{"line_number":148,"context_line":"                    \u0027from %(host)s.\u0027),"},{"line_number":149,"context_line":"                  {\u0027port\u0027: port,"},{"line_number":150,"context_line":"                   \u0027host\u0027: host})"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUmI%3D","line":148,"in_reply_to":"AAAAOn%2F%2FUuw%3D","updated":"2013-05-14 18:44:00.000000000","message":"ditto.","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":160,"context_line":"        port_id \u003d kwargs.get(\u0027port_id\u0027)"},{"line_number":161,"context_line":"        port \u003d kwargs.get(\u0027port\u0027)"},{"line_number":162,"context_line":"        LOG.debug(_(\u0027Create dhcp port  %(port)s \u0027"},{"line_number":163,"context_line":"                    \u0027from %(host)s.\u0027),"},{"line_number":164,"context_line":"                  {\u0027port\u0027: port,"},{"line_number":165,"context_line":"                   \u0027host\u0027: host})"},{"line_number":166,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUug%3D","line":163,"updated":"2013-05-14 17:54:25.000000000","message":"ditto","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":160,"context_line":"        port_id \u003d kwargs.get(\u0027port_id\u0027)"},{"line_number":161,"context_line":"        port \u003d kwargs.get(\u0027port\u0027)"},{"line_number":162,"context_line":"        LOG.debug(_(\u0027Create dhcp port  %(port)s \u0027"},{"line_number":163,"context_line":"                    \u0027from %(host)s.\u0027),"},{"line_number":164,"context_line":"                  {\u0027port\u0027: port,"},{"line_number":165,"context_line":"                   \u0027host\u0027: host})"},{"line_number":166,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUj8%3D","line":163,"in_reply_to":"AAAAOn%2F%2FUmE%3D","updated":"2013-05-14 18:54:11.000000000","message":":)","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fa1e0bc31dffe5e8d9e0e8e824a010784e5a5766","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        port_id \u003d kwargs.get(\u0027port_id\u0027)"},{"line_number":161,"context_line":"        port \u003d kwargs.get(\u0027port\u0027)"},{"line_number":162,"context_line":"        LOG.debug(_(\u0027Create dhcp port  %(port)s \u0027"},{"line_number":163,"context_line":"                    \u0027from %(host)s.\u0027),"},{"line_number":164,"context_line":"                  {\u0027port\u0027: port,"},{"line_number":165,"context_line":"                   \u0027host\u0027: host})"},{"line_number":166,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FUmE%3D","line":163,"in_reply_to":"AAAAOn%2F%2FUug%3D","updated":"2013-05-14 18:44:00.000000000","message":"ditto.","commit_id":"e8ac1c5b8cdc24e4f851542f59ce899cd81a21c2"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7ecb4456f6438a0538d526d08ce069755f1d33a2","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class DhcpRpcCallbackMixin(object):"},{"line_number":29,"context_line":"    \"\"\"A mix-in that enable DHCP agent support in plugin implementations.\"\"\""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def get_active_networks(self, context, **kwargs):"},{"line_number":32,"context_line":"        \"\"\"Retrieve and return a list of the active network ids.\"\"\""},{"line_number":33,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2F9xE%3D","line":30,"updated":"2013-05-17 16:21:13.000000000","message":"has this been superseded now?","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f82f3d88a2ca3cbe74a6c308d6cd252a9be519e3","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class DhcpRpcCallbackMixin(object):"},{"line_number":29,"context_line":"    \"\"\"A mix-in that enable DHCP agent support in plugin implementations.\"\"\""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def get_active_networks(self, context, **kwargs):"},{"line_number":32,"context_line":"        \"\"\"Retrieve and return a list of the active network ids.\"\"\""},{"line_number":33,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2F4%2Fc%3D","line":30,"in_reply_to":"AAAAPH%2F%2F9xE%3D","updated":"2013-05-28 20:15:55.000000000","message":"nope it\u0027s still used. We call this and tear down all dnsmasq processes before starting the initial sync.","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7ecb4456f6438a0538d526d08ce069755f1d33a2","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def get_all_network_info(self, context, **kwargs):"},{"line_number":48,"context_line":"        \"\"\"Returns all the networks/subnets/ports in system.\"\"\""},{"line_number":49,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":50,"context_line":"        LOG.debug(_(\u0027get_all_network_info from %s\u0027) % host)"},{"line_number":51,"context_line":"        network_to_ports_map \u003d {}"},{"line_number":52,"context_line":"        network_to_subnets_map \u003d {}"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2F9w8%3D","line":49,"updated":"2013-05-17 16:21:13.000000000","message":"we\u0027re losing the ability of getting networks for a specific host","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f82f3d88a2ca3cbe74a6c308d6cd252a9be519e3","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def get_all_network_info(self, context, **kwargs):"},{"line_number":48,"context_line":"        \"\"\"Returns all the networks/subnets/ports in system.\"\"\""},{"line_number":49,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":50,"context_line":"        LOG.debug(_(\u0027get_all_network_info from %s\u0027) % host)"},{"line_number":51,"context_line":"        network_to_ports_map \u003d {}"},{"line_number":52,"context_line":"        network_to_subnets_map \u003d {}"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPH%2F%2F4%2B8%3D","line":49,"in_reply_to":"AAAAPH%2F%2F9w8%3D","updated":"2013-05-28 20:15:55.000000000","message":"Doesn\u0027t look like we need to do that though?","commit_id":"5ae156b5ba95512c61a0cb2ff183f8ec7c6ca7b3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"266c052baa5a3b3515340c6817013d1b7db4db51","unresolved":false,"context_lines":[{"line_number":44,"context_line":"            nets \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":45,"context_line":"        return [net[\u0027id\u0027] for net in nets]"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def get_all_network_info(self, context, **kwargs):"},{"line_number":48,"context_line":"        \"\"\"Returns all the networks/subnets/ports in system.\"\"\""},{"line_number":49,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":50,"context_line":"        LOG.debug(_(\u0027get_all_network_info from %s\u0027) % host)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2Fkoc%3D","line":47,"updated":"2013-05-30 08:47:16.000000000","message":"This could be a considerable amount of data. The code below should at least take into account if the subnet supports dhcp.\nIn addition to this maybe we should also take into account if the network is actually hosted by the dhcp agent (if the scheduling is used).","commit_id":"8950d7b861b8bcad8ecbcd67796a55964c3a58c5"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":44,"context_line":"            nets \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":45,"context_line":"        return [net[\u0027id\u0027] for net in nets]"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def get_all_network_info(self, context, **kwargs):"},{"line_number":48,"context_line":"        \"\"\"Returns all the networks/subnets/ports in system.\"\"\""},{"line_number":49,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":50,"context_line":"        LOG.debug(_(\u0027get_all_network_info from %s\u0027) % host)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2FjNA%3D","line":47,"in_reply_to":"AAAAPH%2F%2Fkoc%3D","updated":"2013-05-30 18:42:55.000000000","message":"Yes will do as yong pointed out. \n\nWe want to return all the data because if a network had dhcp enabled and  then dhcp was disabled. During this time if the dhcp-agent was restarted. When the agent resync\u0027ed all the data down we would want it to tear down the dnsmasq process but we would miss that and dhcp would still continue to be served.","commit_id":"8950d7b861b8bcad8ecbcd67796a55964c3a58c5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"266c052baa5a3b3515340c6817013d1b7db4db51","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def get_all_network_info(self, context, **kwargs):"},{"line_number":48,"context_line":"        \"\"\"Returns all the networks/subnets/ports in system.\"\"\""},{"line_number":49,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":50,"context_line":"        LOG.debug(_(\u0027get_all_network_info from %s\u0027) % host)"},{"line_number":51,"context_line":"        network_to_ports_map \u003d {}"},{"line_number":52,"context_line":"        network_to_subnets_map \u003d {}"},{"line_number":53,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2Fkow%3D","line":50,"updated":"2013-05-30 08:47:16.000000000","message":"you can use a , instead of the %","commit_id":"8950d7b861b8bcad8ecbcd67796a55964c3a58c5"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def get_all_network_info(self, context, **kwargs):"},{"line_number":48,"context_line":"        \"\"\"Returns all the networks/subnets/ports in system.\"\"\""},{"line_number":49,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":50,"context_line":"        LOG.debug(_(\u0027get_all_network_info from %s\u0027) % host)"},{"line_number":51,"context_line":"        network_to_ports_map \u003d {}"},{"line_number":52,"context_line":"        network_to_subnets_map \u003d {}"},{"line_number":53,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2FjM8%3D","line":50,"in_reply_to":"AAAAPH%2F%2Fkow%3D","updated":"2013-05-30 18:42:55.000000000","message":"Done","commit_id":"8950d7b861b8bcad8ecbcd67796a55964c3a58c5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"266c052baa5a3b3515340c6817013d1b7db4db51","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        \"\"\"Create the dhcp port.\"\"\""},{"line_number":149,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":150,"context_line":"        port \u003d kwargs.get(\u0027port\u0027)"},{"line_number":151,"context_line":"        LOG.debug(_(\u0027Create dhcp port  %(port)s \u0027"},{"line_number":152,"context_line":"                    \u0027from %(host)s.\u0027),"},{"line_number":153,"context_line":"                  {\u0027port\u0027: port,"},{"line_number":154,"context_line":"                   \u0027host\u0027: host})"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAPX%2F%2F6Ro%3D","line":151,"updated":"2013-06-06 07:50:04.000000000","message":"Too many spaces\nport  %( \u003d\u003e port %(","commit_id":"808a29ef8d3ddc8ceb009525d7b5e0f072d9fc39"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":148,"context_line":"        \"\"\"Create the dhcp port.\"\"\""},{"line_number":149,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":150,"context_line":"        port \u003d kwargs.get(\u0027port\u0027)"},{"line_number":151,"context_line":"        LOG.debug(_(\u0027Create dhcp port  %(port)s \u0027"},{"line_number":152,"context_line":"                    \u0027from %(host)s.\u0027),"},{"line_number":153,"context_line":"                  {\u0027port\u0027: port,"},{"line_number":154,"context_line":"                   \u0027host\u0027: host})"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAPX%2F%2F4rg%3D","line":151,"in_reply_to":"AAAAPX%2F%2F6Ro%3D","updated":"2013-06-06 18:56:03.000000000","message":"Done","commit_id":"808a29ef8d3ddc8ceb009525d7b5e0f072d9fc39"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"266c052baa5a3b3515340c6817013d1b7db4db51","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":164,"context_line":"        port_id \u003d kwargs.get(\u0027port_id\u0027)"},{"line_number":165,"context_line":"        port \u003d kwargs.get(\u0027port\u0027)"},{"line_number":166,"context_line":"        LOG.debug(_(\u0027Create dhcp port  %(port)s \u0027"},{"line_number":167,"context_line":"                    \u0027from %(host)s.\u0027),"},{"line_number":168,"context_line":"                  {\u0027port\u0027: port,"},{"line_number":169,"context_line":"                   \u0027host\u0027: host})"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAPX%2F%2F6Rk%3D","line":166,"updated":"2013-06-06 07:50:04.000000000","message":"ditto","commit_id":"808a29ef8d3ddc8ceb009525d7b5e0f072d9fc39"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":163,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":164,"context_line":"        port_id \u003d kwargs.get(\u0027port_id\u0027)"},{"line_number":165,"context_line":"        port \u003d kwargs.get(\u0027port\u0027)"},{"line_number":166,"context_line":"        LOG.debug(_(\u0027Create dhcp port  %(port)s \u0027"},{"line_number":167,"context_line":"                    \u0027from %(host)s.\u0027),"},{"line_number":168,"context_line":"                  {\u0027port\u0027: port,"},{"line_number":169,"context_line":"                   \u0027host\u0027: host})"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAPX%2F%2F4rc%3D","line":166,"in_reply_to":"AAAAPX%2F%2F6Rk%3D","updated":"2013-06-06 18:56:03.000000000","message":"Done","commit_id":"808a29ef8d3ddc8ceb009525d7b5e0f072d9fc39"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":44,"context_line":"            nets \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":45,"context_line":"        return [net[\u0027id\u0027] for net in nets]"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def get_all_network_info(self, context, **kwargs):"},{"line_number":48,"context_line":"        \"\"\"Returns all the networks/subnets/ports in system.\"\"\""},{"line_number":49,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":50,"context_line":"        LOG.debug(_(\u0027get_all_network_info from %s\u0027), host)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPX%2F%2F3kI%3D","line":47,"updated":"2013-06-07 03:13:06.000000000","message":"we can implement this logic in get_active_networks, so no need to add this function.","commit_id":"d02a6ca59c4f9890ce3fc87e29098d47269fded8"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":163,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":164,"context_line":"        port_id \u003d kwargs.get(\u0027port_id\u0027)"},{"line_number":165,"context_line":"        port \u003d kwargs.get(\u0027port\u0027)"},{"line_number":166,"context_line":"        LOG.debug(_(\u0027Create dhcp port %(port)s \u0027"},{"line_number":167,"context_line":"                    \u0027from %(host)s.\u0027),"},{"line_number":168,"context_line":"                  {\u0027port\u0027: port,"},{"line_number":169,"context_line":"                   \u0027host\u0027: host})"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPX%2F%2F3jk%3D","line":166,"updated":"2013-06-07 03:13:06.000000000","message":"update","commit_id":"d02a6ca59c4f9890ce3fc87e29098d47269fded8"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":45,"context_line":"        else:"},{"line_number":46,"context_line":"            filters \u003d dict(admin_state_up\u003d[True])"},{"line_number":47,"context_line":"            networks \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":48,"context_line":"        subnets \u003d plugin.get_subnets(context)"},{"line_number":49,"context_line":"        ports \u003d plugin.get_ports(context)"},{"line_number":50,"context_line":"        for subnet in subnets:"},{"line_number":51,"context_line":"            network_to_subnets_map.setdefault("}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPX%2F%2F07I%3D","line":48,"updated":"2013-06-08 10:02:01.000000000","message":"can we use the networks got above to avoid to querying subnets that do not belong to the networks?","commit_id":"64587921eddc26ef58c8899f8d1350b0ce4a9213"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":45,"context_line":"        else:"},{"line_number":46,"context_line":"            filters \u003d dict(admin_state_up\u003d[True])"},{"line_number":47,"context_line":"            networks \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":48,"context_line":"        subnets \u003d plugin.get_subnets(context)"},{"line_number":49,"context_line":"        ports \u003d plugin.get_ports(context)"},{"line_number":50,"context_line":"        for subnet in subnets:"},{"line_number":51,"context_line":"            network_to_subnets_map.setdefault("}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPX%2F%2F0qs%3D","line":48,"in_reply_to":"AAAAPX%2F%2F07I%3D","updated":"2013-06-08 18:15:51.000000000","message":"why would a subnet ever not belong to a network. We need to query for subnets here.","commit_id":"64587921eddc26ef58c8899f8d1350b0ce4a9213"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":45,"context_line":"        else:"},{"line_number":46,"context_line":"            filters \u003d dict(admin_state_up\u003d[True])"},{"line_number":47,"context_line":"            networks \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":48,"context_line":"        subnets \u003d plugin.get_subnets(context)"},{"line_number":49,"context_line":"        ports \u003d plugin.get_ports(context)"},{"line_number":50,"context_line":"        for subnet in subnets:"},{"line_number":51,"context_line":"            network_to_subnets_map.setdefault("}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPX%2F%2F0gQ%3D","line":48,"in_reply_to":"AAAAPX%2F%2F0hE%3D","updated":"2013-06-09 01:32:44.000000000","message":"I see. If using network_auto_schedule that can happen..","commit_id":"64587921eddc26ef58c8899f8d1350b0ce4a9213"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":45,"context_line":"        else:"},{"line_number":46,"context_line":"            filters \u003d dict(admin_state_up\u003d[True])"},{"line_number":47,"context_line":"            networks \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":48,"context_line":"        subnets \u003d plugin.get_subnets(context)"},{"line_number":49,"context_line":"        ports \u003d plugin.get_ports(context)"},{"line_number":50,"context_line":"        for subnet in subnets:"},{"line_number":51,"context_line":"            network_to_subnets_map.setdefault("}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPX%2F%2F0hE%3D","line":48,"in_reply_to":"AAAAPX%2F%2F0qA%3D","updated":"2013-06-09 00:45:18.000000000","message":"one agent just needs the subnets which are belonging to that agents\u0027 networks.","commit_id":"64587921eddc26ef58c8899f8d1350b0ce4a9213"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":45,"context_line":"        else:"},{"line_number":46,"context_line":"            filters \u003d dict(admin_state_up\u003d[True])"},{"line_number":47,"context_line":"            networks \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":48,"context_line":"        subnets \u003d plugin.get_subnets(context)"},{"line_number":49,"context_line":"        ports \u003d plugin.get_ports(context)"},{"line_number":50,"context_line":"        for subnet in subnets:"},{"line_number":51,"context_line":"            network_to_subnets_map.setdefault("}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPX%2F%2F0qA%3D","line":48,"in_reply_to":"AAAAPX%2F%2F0qM%3D","updated":"2013-06-08 18:45:06.000000000","message":"yes but you can\u0027t have a subnet without a network so adding that filter would result in the same thing as get_subnets()","commit_id":"64587921eddc26ef58c8899f8d1350b0ce4a9213"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":45,"context_line":"        else:"},{"line_number":46,"context_line":"            filters \u003d dict(admin_state_up\u003d[True])"},{"line_number":47,"context_line":"            networks \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":48,"context_line":"        subnets \u003d plugin.get_subnets(context)"},{"line_number":49,"context_line":"        ports \u003d plugin.get_ports(context)"},{"line_number":50,"context_line":"        for subnet in subnets:"},{"line_number":51,"context_line":"            network_to_subnets_map.setdefault("}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPX%2F%2F0qM%3D","line":48,"in_reply_to":"AAAAPX%2F%2F0qs%3D","updated":"2013-06-08 18:36:56.000000000","message":"I understood gongysh\u0027s comment to mean you could filter on networks.\n\n    filters \u003d {\u0027network_id\u0027: [network[\u0027id\u0027] for network in networks]}\n    subnets \u003d plugin.get_subnets(context, filters\u003dfilters)","commit_id":"64587921eddc26ef58c8899f8d1350b0ce4a9213"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":40,"context_line":"            if cfg.CONF.network_auto_schedule:"},{"line_number":41,"context_line":"                plugin.auto_schedule_networks(context, host)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"            networks \u003d plugin.list_networks_on_dhcp_agent("},{"line_number":44,"context_line":"                context, host\u003dhost)[\u0027networks\u0027]"},{"line_number":45,"context_line":"        else:"},{"line_number":46,"context_line":"            filters \u003d dict(admin_state_up\u003d[True])"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPX%2F%2F0ZU%3D","line":43,"updated":"2013-06-09 05:22:20.000000000","message":"why not use list_active_networks_on_active_dhcp_agent?","commit_id":"9412fb538955aa35c7a42b93e760180bf8308b83"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":40,"context_line":"            if cfg.CONF.network_auto_schedule:"},{"line_number":41,"context_line":"                plugin.auto_schedule_networks(context, host)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"            networks \u003d plugin.list_networks_on_dhcp_agent("},{"line_number":44,"context_line":"                context, host\u003dhost)[\u0027networks\u0027]"},{"line_number":45,"context_line":"        else:"},{"line_number":46,"context_line":"            filters \u003d dict(admin_state_up\u003d[True])"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPX%2F%2F0ZI%3D","line":43,"in_reply_to":"AAAAPX%2F%2F0ZU%3D","updated":"2013-06-12 18:20:39.000000000","message":"Done","commit_id":"9412fb538955aa35c7a42b93e760180bf8308b83"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":47,"context_line":"            networks \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":48,"context_line":"        filters \u003d {\u0027network_id\u0027: [network[\u0027id\u0027] for network in networks]}"},{"line_number":49,"context_line":"        subnets \u003d plugin.get_subnets(context, filters\u003dfilters)"},{"line_number":50,"context_line":"        ports \u003d plugin.get_ports(context)"},{"line_number":51,"context_line":"        for subnet in subnets:"},{"line_number":52,"context_line":"            network_to_subnets_map.setdefault("},{"line_number":53,"context_line":"                subnet[\u0027network_id\u0027], []).append(subnet)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPX%2F%2F0ZY%3D","line":50,"updated":"2013-06-09 05:22:20.000000000","message":"can we filter ports with filters too?","commit_id":"9412fb538955aa35c7a42b93e760180bf8308b83"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":47,"context_line":"            networks \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":48,"context_line":"        filters \u003d {\u0027network_id\u0027: [network[\u0027id\u0027] for network in networks]}"},{"line_number":49,"context_line":"        subnets \u003d plugin.get_subnets(context, filters\u003dfilters)"},{"line_number":50,"context_line":"        ports \u003d plugin.get_ports(context)"},{"line_number":51,"context_line":"        for subnet in subnets:"},{"line_number":52,"context_line":"            network_to_subnets_map.setdefault("},{"line_number":53,"context_line":"                subnet[\u0027network_id\u0027], []).append(subnet)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPX%2F%2FsN4%3D","line":50,"in_reply_to":"AAAAPX%2F%2F0ZY%3D","updated":"2013-06-12 18:20:39.000000000","message":"Done","commit_id":"9412fb538955aa35c7a42b93e760180bf8308b83"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":62,"context_line":"        else:"},{"line_number":63,"context_line":"            filters \u003d dict(admin_state_up\u003d[True])"},{"line_number":64,"context_line":"            networks \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":65,"context_line":"        filters \u003d {\u0027network_id\u0027: [network[\u0027id\u0027] for network in networks]}"},{"line_number":66,"context_line":"        ports \u003d plugin.get_ports(context, filters\u003dfilters)"},{"line_number":67,"context_line":"        filters[\u0027enable_dhcp\u0027] \u003d [True]"},{"line_number":68,"context_line":"        subnets \u003d plugin.get_subnets(context, filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPn%2F%2FZ2A%3D","line":65,"updated":"2013-07-02 17:22:07.000000000","message":"it won\u0027t harm keeping admin_state_up in the filters for ports too","commit_id":"2a0f39ffff1f7d71d29c4ff184fecf801f644db4"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":62,"context_line":"        else:"},{"line_number":63,"context_line":"            filters \u003d dict(admin_state_up\u003d[True])"},{"line_number":64,"context_line":"            networks \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":65,"context_line":"        filters \u003d {\u0027network_id\u0027: [network[\u0027id\u0027] for network in networks]}"},{"line_number":66,"context_line":"        ports \u003d plugin.get_ports(context, filters\u003dfilters)"},{"line_number":67,"context_line":"        filters[\u0027enable_dhcp\u0027] \u003d [True]"},{"line_number":68,"context_line":"        subnets \u003d plugin.get_subnets(context, filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPn%2F%2FZb8%3D","line":65,"in_reply_to":"AAAAPn%2F%2FZ2A%3D","updated":"2013-07-02 18:37:57.000000000","message":"Done","commit_id":"2a0f39ffff1f7d71d29c4ff184fecf801f644db4"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":62,"context_line":"        else:"},{"line_number":63,"context_line":"            filters \u003d dict(admin_state_up\u003d[True])"},{"line_number":64,"context_line":"            networks \u003d plugin.get_networks(context, filters\u003dfilters)"},{"line_number":65,"context_line":"        filters \u003d {\u0027network_id\u0027: [network[\u0027id\u0027] for network in networks]}"},{"line_number":66,"context_line":"        ports \u003d plugin.get_ports(context, filters\u003dfilters)"},{"line_number":67,"context_line":"        filters[\u0027enable_dhcp\u0027] \u003d [True]"},{"line_number":68,"context_line":"        subnets \u003d plugin.get_subnets(context, filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPn%2F%2FZP8%3D","line":65,"in_reply_to":"AAAAPn%2F%2FZb8%3D","updated":"2013-07-02 19:23:18.000000000","message":"actually i disagree. I think we want dhcp information to be there for ports. If one admin_state_up/down a port then up; the dhcp information won\u0027t be at the agent for it to get an ip.","commit_id":"2a0f39ffff1f7d71d29c4ff184fecf801f644db4"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        for network in networks:"},{"line_number":78,"context_line":"            network[\u0027subnets\u0027] \u003d network_to_subnets_map.get(network[\u0027id\u0027], [])"},{"line_number":79,"context_line":"            network[\u0027ports\u0027] \u003d network_to_ports_map.get(network[\u0027id\u0027], [])"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        return networks"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPn%2F%2FZ0k%3D","line":79,"updated":"2013-07-02 17:22:07.000000000","message":"network[\u0027subnets\u0027] \u003d [subnet[\u0027id\u0027] for subnet in subnets if subnet[\u0027network_id\u0027] \u003d\u003d network[\u0027id\u0027]]\n\nand similarly for network[\u0027ports\u0027]\n\nin terms of performance we\u0027ll be saving something like half nanosecond, so it\u0027s not really important.\nStill, makes the diff smaller and (for me) the code more readable.","commit_id":"2a0f39ffff1f7d71d29c4ff184fecf801f644db4"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        for network in networks:"},{"line_number":78,"context_line":"            network[\u0027subnets\u0027] \u003d network_to_subnets_map.get(network[\u0027id\u0027], [])"},{"line_number":79,"context_line":"            network[\u0027ports\u0027] \u003d network_to_ports_map.get(network[\u0027id\u0027], [])"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        return networks"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPn%2F%2FZbU%3D","line":79,"in_reply_to":"AAAAPn%2F%2FZ0k%3D","updated":"2013-07-02 18:37:57.000000000","message":"We won\u0027t be saving anything since we added an extra N but that\u0027s fine with me too.","commit_id":"2a0f39ffff1f7d71d29c4ff184fecf801f644db4"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        for network in networks:"},{"line_number":78,"context_line":"            network[\u0027subnets\u0027] \u003d network_to_subnets_map.get(network[\u0027id\u0027], [])"},{"line_number":79,"context_line":"            network[\u0027ports\u0027] \u003d network_to_ports_map.get(network[\u0027id\u0027], [])"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        return networks"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPn%2F%2FZOU%3D","line":79,"in_reply_to":"AAAAPn%2F%2FZWk%3D","updated":"2013-07-02 19:23:18.000000000","message":"Done","commit_id":"2a0f39ffff1f7d71d29c4ff184fecf801f644db4"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        for network in networks:"},{"line_number":78,"context_line":"            network[\u0027subnets\u0027] \u003d network_to_subnets_map.get(network[\u0027id\u0027], [])"},{"line_number":79,"context_line":"            network[\u0027ports\u0027] \u003d network_to_ports_map.get(network[\u0027id\u0027], [])"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        return networks"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPn%2F%2FZWk%3D","line":79,"in_reply_to":"AAAAPn%2F%2FZbU%3D","updated":"2013-07-02 18:56:43.000000000","message":"You would be saving the computation time needed to create the other dicts, that\u0027s why I said half a nanosecond.","commit_id":"2a0f39ffff1f7d71d29c4ff184fecf801f644db4"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":243,"context_line":"        if \u0027mac_address\u0027 not in port[\u0027port\u0027]:"},{"line_number":244,"context_line":"            port[\u0027port\u0027][\u0027mac_address\u0027] \u003d attributes.ATTR_NOT_SPECIFIED"},{"line_number":245,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":246,"context_line":"        return plugin.create_port(context, port)"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    def update_dhcp_port(self, context, **kwargs):"},{"line_number":249,"context_line":"        \"\"\"Update the dhcp port.\"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPn%2F%2FZ0E%3D","line":246,"updated":"2013-07-02 17:22:07.000000000","message":"Interesting enought this method just creates a port, not a \u0027dhcp\u0027 port","commit_id":"2a0f39ffff1f7d71d29c4ff184fecf801f644db4"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":243,"context_line":"        if \u0027mac_address\u0027 not in port[\u0027port\u0027]:"},{"line_number":244,"context_line":"            port[\u0027port\u0027][\u0027mac_address\u0027] \u003d attributes.ATTR_NOT_SPECIFIED"},{"line_number":245,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":246,"context_line":"        return plugin.create_port(context, port)"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    def update_dhcp_port(self, context, **kwargs):"},{"line_number":249,"context_line":"        \"\"\"Update the dhcp port.\"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPn%2F%2FZa4%3D","line":246,"in_reply_to":"AAAAPn%2F%2FZ0E%3D","updated":"2013-07-02 18:37:57.000000000","message":"so your suggest renaming to create_port/update_port ?","commit_id":"2a0f39ffff1f7d71d29c4ff184fecf801f644db4"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":243,"context_line":"        if \u0027mac_address\u0027 not in port[\u0027port\u0027]:"},{"line_number":244,"context_line":"            port[\u0027port\u0027][\u0027mac_address\u0027] \u003d attributes.ATTR_NOT_SPECIFIED"},{"line_number":245,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":246,"context_line":"        return plugin.create_port(context, port)"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    def update_dhcp_port(self, context, **kwargs):"},{"line_number":249,"context_line":"        \"\"\"Update the dhcp port.\"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPn%2F%2FZWU%3D","line":246,"in_reply_to":"AAAAPn%2F%2FZa4%3D","updated":"2013-07-02 18:56:43.000000000","message":"nope, see related comment on dhcp agent","commit_id":"2a0f39ffff1f7d71d29c4ff184fecf801f644db4"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":255,"context_line":"                  {\u0027port\u0027: port,"},{"line_number":256,"context_line":"                   \u0027host\u0027: host})"},{"line_number":257,"context_line":"        plugin \u003d manager.QuantumManager.get_plugin()"},{"line_number":258,"context_line":"        return plugin.update_port(context, port_id, port)"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPn%2F%2FZz4%3D","line":258,"updated":"2013-07-02 17:22:07.000000000","message":"Same comment as above","commit_id":"2a0f39ffff1f7d71d29c4ff184fecf801f644db4"}],"quantum/plugins/brocade/QuantumPlugin.py":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":164,"context_line":"    API version history:"},{"line_number":165,"context_line":"        1.0 - Initial version."},{"line_number":166,"context_line":"        1.1 - Added get_active_networks_info, create_dhcp_port,"},{"line_number":167,"context_line":"              update_dhcp_port, and removed get_dhcp_port methods."},{"line_number":168,"context_line":""},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAPn%2F%2F1z4%3D","line":167,"updated":"2013-06-20 00:41:40.000000000","message":"whoops need to update that this as get_dhcp_port is not removed now ...","commit_id":"bb15695c148bce7957741b428c31bcc6f4a2c52f"}],"quantum/plugins/nicira/QuantumPlugin.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"266c052baa5a3b3515340c6817013d1b7db4db51","unresolved":false,"context_lines":[{"line_number":1046,"context_line":"            self._extend_network_qos_queue(context, net)"},{"line_number":1047,"context_line":"        return net"},{"line_number":1048,"context_line":""},{"line_number":1049,"context_line":"    def get_ports(self, context, filters\u003dNone, fields\u003dNone):"},{"line_number":1050,"context_line":"        if filters is None:"},{"line_number":1051,"context_line":"            filters \u003d {}"},{"line_number":1052,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2FkoM%3D","line":1049,"updated":"2013-05-30 08:47:16.000000000","message":"maybe this should be done in a seperate patch. is this related to the performance?","commit_id":"8950d7b861b8bcad8ecbcd67796a55964c3a58c5"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":1046,"context_line":"            self._extend_network_qos_queue(context, net)"},{"line_number":1047,"context_line":"        return net"},{"line_number":1048,"context_line":""},{"line_number":1049,"context_line":"    def get_ports(self, context, filters\u003dNone, fields\u003dNone):"},{"line_number":1050,"context_line":"        if filters is None:"},{"line_number":1051,"context_line":"            filters \u003d {}"},{"line_number":1052,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2FjMw%3D","line":1049,"in_reply_to":"AAAAPH%2F%2FkoM%3D","updated":"2013-05-30 18:42:55.000000000","message":"I acknowledged this in my commit message. I\u0027ll break it into it\u0027s own patch if you insist.","commit_id":"8950d7b861b8bcad8ecbcd67796a55964c3a58c5"}]}
