)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c587cd1413a3227ff69a64cd7406fa518b378628","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Optimize get_ports_on_host_by_subnet() dvr rpc handler"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Make one db query to get all needed ports."},{"line_number":10,"context_line":"No need to fetch all ports on the subnet and iterate through"},{"line_number":11,"context_line":"them."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a7e1126_0a891075","line":9,"updated":"2015-12-19 21:27:51.000000000","message":"I just noticed that the way this method is used in unbind_router_servicenode is pretty weird. First, it calls this method, then it iterates on each port and checks if it\u0027s DVR serviced (But the method filters on DVR serviced ports). More importantly, unbind_router_servicenode wants to know if a DVR serviced port exists on the host in any of the router\u0027s subnets, so it calls get_ports_on_host_by_subnet per subnet. Obviously that query could be optimized to accept a list of subnets. For your consideration... (And nothing to do with this patch :)","commit_id":"4bc7e62383c8f1d22599d949a7d07bf11effc843"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"eebe3ba55ab389aa240c44d9c8e7cd34a4b844a4","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Optimize get_ports_on_host_by_subnet() dvr rpc handler"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Make one db query to get all needed ports."},{"line_number":10,"context_line":"No need to fetch all ports on the subnet and iterate through"},{"line_number":11,"context_line":"them."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a7e1126_28bc02db","line":9,"in_reply_to":"3a7e1126_0a891075","updated":"2015-12-21 09:39:31.000000000","message":"This should be cleaned up in scope of bp improve-dvr-l3-agent-binding","commit_id":"4bc7e62383c8f1d22599d949a7d07bf11effc843"}],"neutron/db/dvr_mac_db.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c587cd1413a3227ff69a64cd7406fa518b378628","unresolved":false,"context_lines":[{"line_number":128,"context_line":"                \u0027mac_address\u0027: dvr_mac_entry[\u0027mac_address\u0027]}"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    @log_helpers.log_method_call"},{"line_number":131,"context_line":"    def get_ports_on_host_by_subnet(self, context, host, subnet):"},{"line_number":132,"context_line":"        \"\"\"Returns ports of interest, on a given subnet in the input host"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        This method returns ports that need to be serviced by DVR."}],"source_content_type":"text/x-python","patch_set":2,"id":"3a7e1126_caa78809","line":131,"updated":"2015-12-19 21:27:51.000000000","message":"This method doesn\u0027t seem to have a test. I think it\u0027s reasonable to expect that the patch should include one. If our goal is to improve DVR stability, improving test coverage is certainly the right way to go...","commit_id":"4bc7e62383c8f1d22599d949a7d07bf11effc843"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"eebe3ba55ab389aa240c44d9c8e7cd34a4b844a4","unresolved":false,"context_lines":[{"line_number":128,"context_line":"                \u0027mac_address\u0027: dvr_mac_entry[\u0027mac_address\u0027]}"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    @log_helpers.log_method_call"},{"line_number":131,"context_line":"    def get_ports_on_host_by_subnet(self, context, host, subnet):"},{"line_number":132,"context_line":"        \"\"\"Returns ports of interest, on a given subnet in the input host"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        This method returns ports that need to be serviced by DVR."}],"source_content_type":"text/x-python","patch_set":2,"id":"3a7e1126_377bfa29","line":131,"in_reply_to":"3a7e1126_caa78809","updated":"2015-12-21 09:39:31.000000000","message":"agree","commit_id":"4bc7e62383c8f1d22599d949a7d07bf11effc843"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c587cd1413a3227ff69a64cd7406fa518b378628","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        filters \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet]},"},{"line_number":141,"context_line":"                   portbindings.HOST_ID: [host]}"},{"line_number":142,"context_line":"        ports_query \u003d self.plugin._get_ports_query(context, filters\u003dfilters)"},{"line_number":143,"context_line":"        owner_filter \u003d or_("},{"line_number":144,"context_line":"            models_v2.Port.device_owner.startswith("},{"line_number":145,"context_line":"                constants.DEVICE_OWNER_COMPUTE_PREFIX),"},{"line_number":146,"context_line":"            models_v2.Port.device_owner.in_("}],"source_content_type":"text/x-python","patch_set":2,"id":"3a7e1126_0aa270fd","line":143,"updated":"2015-12-19 21:27:51.000000000","message":"If \u0027is_dvr_serviced\u0027 is changed it won\u0027t be reflected here. We should have a single method that defines the list of DVR serviced device owners, then use it both in \u0027is_dvr_serviced\u0027 and here.","commit_id":"4bc7e62383c8f1d22599d949a7d07bf11effc843"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"eebe3ba55ab389aa240c44d9c8e7cd34a4b844a4","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        filters \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet]},"},{"line_number":141,"context_line":"                   portbindings.HOST_ID: [host]}"},{"line_number":142,"context_line":"        ports_query \u003d self.plugin._get_ports_query(context, filters\u003dfilters)"},{"line_number":143,"context_line":"        owner_filter \u003d or_("},{"line_number":144,"context_line":"            models_v2.Port.device_owner.startswith("},{"line_number":145,"context_line":"                constants.DEVICE_OWNER_COMPUTE_PREFIX),"},{"line_number":146,"context_line":"            models_v2.Port.device_owner.in_("}],"source_content_type":"text/x-python","patch_set":2,"id":"3a7e1126_5411e45b","line":143,"in_reply_to":"3a7e1126_0aa270fd","updated":"2015-12-21 09:39:31.000000000","message":"Actually I tried to do it with get_other_dvr_serviced_device_owners() in a parent patch, the thing is that DEVICE_OWNER_COMPUTE_PREFIX is a prefix and should be handled separately. Any better ideas how to handle it are welcome.","commit_id":"4bc7e62383c8f1d22599d949a7d07bf11effc843"}],"neutron/tests/unit/db/test_dvr_mac_db.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"da2e23493bd5ea7a77eb700d437c21b3602951aa","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        HOST \u003d \u0027host1\u0027"},{"line_number":98,"context_line":"        host_arg \u003d {portbindings.HOST_ID: HOST}"},{"line_number":99,"context_line":"        arg_list \u003d (portbindings.HOST_ID,)"},{"line_number":100,"context_line":"        with self.subnet() as subnet,\\"},{"line_number":101,"context_line":"                self.port(subnet\u003dsubnet,"},{"line_number":102,"context_line":"                          device_owner\u003dconstants.DEVICE_OWNER_COMPUTE_PREFIX,"},{"line_number":103,"context_line":"                          arg_list\u003darg_list, **host_arg) as compute_port,\\"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa69d971_5b5f6372","line":100,"updated":"2015-12-30 19:01:35.000000000","message":"@Brandon,\n\nUnfortunately the built in context managers don\u0027t seem to allow wrapping with parenthesis. If you find a way to make it work, please let us know!","commit_id":"87ee9563e88c0243dd21439b8291f0e1e100778d"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"b5c174878d7c99c530c984a665e4418f278ca2fd","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        HOST \u003d \u0027host1\u0027"},{"line_number":98,"context_line":"        host_arg \u003d {portbindings.HOST_ID: HOST}"},{"line_number":99,"context_line":"        arg_list \u003d (portbindings.HOST_ID,)"},{"line_number":100,"context_line":"        with self.subnet() as subnet,\\"},{"line_number":101,"context_line":"                self.port(subnet\u003dsubnet,"},{"line_number":102,"context_line":"                          device_owner\u003dconstants.DEVICE_OWNER_COMPUTE_PREFIX,"},{"line_number":103,"context_line":"                          arg_list\u003darg_list, **host_arg) as compute_port,\\"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a7b0d38_da5b6253","line":100,"updated":"2015-12-23 05:12:06.000000000","message":"can\u0027t you wrap this all in parentheses instead of usinge slashes?","commit_id":"87ee9563e88c0243dd21439b8291f0e1e100778d"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"f1a633426d3fc09faa439e9eca6dbcff05367ae6","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        HOST \u003d \u0027host1\u0027"},{"line_number":98,"context_line":"        host_arg \u003d {portbindings.HOST_ID: HOST}"},{"line_number":99,"context_line":"        arg_list \u003d (portbindings.HOST_ID,)"},{"line_number":100,"context_line":"        with self.subnet() as subnet,\\"},{"line_number":101,"context_line":"                self.port(subnet\u003dsubnet,"},{"line_number":102,"context_line":"                          device_owner\u003dconstants.DEVICE_OWNER_COMPUTE_PREFIX,"},{"line_number":103,"context_line":"                          arg_list\u003darg_list, **host_arg) as compute_port,\\"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a7b0d38_f8542155","line":100,"in_reply_to":"1a7b0d38_6f9b8dca","updated":"2015-12-23 09:17:14.000000000","message":"must say i\u0027m surprised i haven\u0027t noticed this yet bc i don\u0027t like the inconsistency, but obviously its already there, sorry for the misinformed -1.","commit_id":"87ee9563e88c0243dd21439b8291f0e1e100778d"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"e83716f6b99bf2fcdc5a417fcc53e28134f4268c","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        HOST \u003d \u0027host1\u0027"},{"line_number":98,"context_line":"        host_arg \u003d {portbindings.HOST_ID: HOST}"},{"line_number":99,"context_line":"        arg_list \u003d (portbindings.HOST_ID,)"},{"line_number":100,"context_line":"        with self.subnet() as subnet,\\"},{"line_number":101,"context_line":"                self.port(subnet\u003dsubnet,"},{"line_number":102,"context_line":"                          device_owner\u003dconstants.DEVICE_OWNER_COMPUTE_PREFIX,"},{"line_number":103,"context_line":"                          arg_list\u003darg_list, **host_arg) as compute_port,\\"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a7b0d38_6f9b8dca","line":100,"in_reply_to":"1a7b0d38_da5b6253","updated":"2015-12-23 07:42:14.000000000","message":"This is a common way to break out such statements throughout our unit tests","commit_id":"87ee9563e88c0243dd21439b8291f0e1e100778d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f7e238f256c1cba33a8001920ff31856fe675911","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        HOST \u003d \u0027host1\u0027"},{"line_number":98,"context_line":"        host_arg \u003d {portbindings.HOST_ID: HOST}"},{"line_number":99,"context_line":"        arg_list \u003d (portbindings.HOST_ID,)"},{"line_number":100,"context_line":"        with self.subnet() as subnet,\\"},{"line_number":101,"context_line":"                self.port(subnet\u003dsubnet,"},{"line_number":102,"context_line":"                          device_owner\u003dconstants.DEVICE_OWNER_COMPUTE_PREFIX,"},{"line_number":103,"context_line":"                          arg_list\u003darg_list, **host_arg) as compute_port,\\"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a7b0d38_0921a14d","line":100,"in_reply_to":"1a7b0d38_f8542155","updated":"2015-12-23 10:02:47.000000000","message":"yea, this is ugly but sadly it is what we have at the moment","commit_id":"87ee9563e88c0243dd21439b8291f0e1e100778d"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"a9ce0f5ef67924534de01cb27f05990240988d32","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        HOST \u003d \u0027host1\u0027"},{"line_number":98,"context_line":"        host_arg \u003d {portbindings.HOST_ID: HOST}"},{"line_number":99,"context_line":"        arg_list \u003d (portbindings.HOST_ID,)"},{"line_number":100,"context_line":"        with self.subnet() as subnet,\\"},{"line_number":101,"context_line":"                self.port(subnet\u003dsubnet,"},{"line_number":102,"context_line":"                          device_owner\u003dconstants.DEVICE_OWNER_COMPUTE_PREFIX,"},{"line_number":103,"context_line":"                          arg_list\u003darg_list, **host_arg) as compute_port,\\"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa69d971_122a092d","line":100,"in_reply_to":"fa69d971_5b5f6372","updated":"2016-01-02 06:07:47.000000000","message":"well there is a way, but it aint pretty, but if the goal is to totally remove the backslash for some automated pep8 tests then this would work:\n\n\nwith self.subnet() as subnet1, (\n        self.subnet()) as subnet2, (\n        self.subnet()) as subnet3:\n    pass","commit_id":"87ee9563e88c0243dd21439b8291f0e1e100778d"}]}
