)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"7075d09d5ef5de7d0c07fda3b3f53705f27db925","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Check port VNIC type when associating a floating IP"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When associating a floating IP to a port, the VNIC type of this port"},{"line_number":10,"context_line":"must be \"normal\" only. In any other case, the floating IP can\u0027t be"},{"line_number":11,"context_line":"assigned."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug: #1566951"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"3f79a3b5_978c342e","line":10,"range":{"start_line":9,"start_character":59,"end_line":10,"end_character":40},"updated":"2018-10-21 14:32:50.000000000","message":"This seems now not so much precise.","commit_id":"1deb9ed3de00405c17e8651f0610323ca814f7be"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"73e0c1576aab6df63511e2aec23ad69f79d9a296","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Check port VNIC type when associating a floating IP"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When associating a floating IP to a port, the VNIC type of this port"},{"line_number":10,"context_line":"must be \"normal\" only. In any other case, the floating IP can\u0027t be"},{"line_number":11,"context_line":"assigned."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug: #1566951"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"3f79a3b5_b77a90b8","line":10,"range":{"start_line":9,"start_character":59,"end_line":10,"end_character":40},"in_reply_to":"3f79a3b5_978c342e","updated":"2018-10-21 16:20:07.000000000","message":"No, I need to rewrite this message.","commit_id":"1deb9ed3de00405c17e8651f0610323ca814f7be"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"ef18508fe650c747b73916c3be789b8eacf687d5","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When associating a floating IP to a port and the router is distributed,"},{"line_number":10,"context_line":"the VNIC type of this port must be \"normal\" only. In any other case,"},{"line_number":11,"context_line":"the floating IP can\u0027t be assigned. For example, a SR-IOV can have a"},{"line_number":12,"context_line":"floating IP if the router is distributed (the router is in the same"},{"line_number":13,"context_line":"host of the port)."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3f79a3b5_3a6b3286","line":11,"range":{"start_line":11,"start_character":57,"end_line":11,"end_character":60},"updated":"2018-10-29 10:21:37.000000000","message":"can or can\u0027t?","commit_id":"616d706e7816068e08afcc811db356cc83ba5b45"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"c3a813a5e770f1cf301f5525a218e3fd87e98085","unresolved":false,"context_lines":[{"line_number":13,"context_line":"host of the port)."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Closes-Bug: #1566951"},{"line_number":16,"context_line":"Depends-On: https://review.openstack.org/#/c/615126/"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I4944041df81e24683bc612560808bcdcc2db6bf2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"3f79a3b5_21da9e1b","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":52},"updated":"2018-11-05 15:10:15.000000000","message":"Seems this does not work, how about try replace with change-id?","commit_id":"b89f65e66d46d4f9b510fa92eda04087b9904783"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"9e5eea50e706febab98bd82c84ab48f20ffecc2f","unresolved":false,"context_lines":[{"line_number":13,"context_line":"host of the port)."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Closes-Bug: #1566951"},{"line_number":16,"context_line":"Depends-On: https://review.openstack.org/#/c/615126/"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I4944041df81e24683bc612560808bcdcc2db6bf2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"3f79a3b5_8fa398fd","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":52},"in_reply_to":"3f79a3b5_21da9e1b","updated":"2018-11-05 17:41:55.000000000","message":"Using change id here is deprecated for some time now. This will not work because we are installing neutron-lib from pypi so we need new release with this patch merged to make this patch working fine","commit_id":"b89f65e66d46d4f9b510fa92eda04087b9904783"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"896a3ededaa1c249b7f30a6865a47c55a217b42c","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When associating a floating IP to a port and the router is distributed,"},{"line_number":10,"context_line":"the VNIC type of this port must be \"normal\" only. In any other case,"},{"line_number":11,"context_line":"the floating IP can\u0027t be assigned. For example, a SR-IOV can have a"},{"line_number":12,"context_line":"floating IP if the router is distributed (the router is in the same"},{"line_number":13,"context_line":"host of the port)."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":22,"id":"3f79a3b5_e3973c38","line":11,"range":{"start_line":11,"start_character":57,"end_line":11,"end_character":60},"updated":"2018-12-11 23:59:03.000000000","message":"Should this be cannot","commit_id":"1966ad3945a7a44beeefc603f9d6da54ac67f9a3"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"55aceb3d99c821a6a75b3dd7bc0e8466265237a9","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When associating a floating IP to a port and the router is distributed,"},{"line_number":10,"context_line":"the VNIC type of this port must be \"normal\" only. In any other case,"},{"line_number":11,"context_line":"the floating IP can\u0027t be assigned. For example, a SR-IOV can have a"},{"line_number":12,"context_line":"floating IP if the router is distributed (the router is in the same"},{"line_number":13,"context_line":"host of the port)."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":22,"id":"3f79a3b5_0f3616e2","line":11,"range":{"start_line":11,"start_character":57,"end_line":11,"end_character":60},"in_reply_to":"3f79a3b5_e3973c38","updated":"2018-12-12 08:38:42.000000000","message":"Yes, IMO it should be \"cannot\" here :)","commit_id":"1966ad3945a7a44beeefc603f9d6da54ac67f9a3"}],"neutron/common/exceptions.py":[{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d07beacd8d30c10acd64c2c0841ff938c6a44f32","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                \"created or updated.\")"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"class PortVnicTypeError(exceptions.BadRequest):"},{"line_number":119,"context_line":"    message \u003d _(\"Port VNIC type cannot be \u0027%(vnic_type)s\u0027. %(reason)s\")"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"3f79a3b5_2ba67f0e","line":118,"range":{"start_line":118,"start_character":6,"end_line":118,"end_character":23},"updated":"2018-10-29 19:04:51.000000000","message":"Seems like this exception should go straight into neutron-lib. See comment on line 101.","commit_id":"616d706e7816068e08afcc811db356cc83ba5b45"}],"neutron/common/utils.py":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"7075d09d5ef5de7d0c07fda3b3f53705f27db925","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            device_owner in get_other_dvr_serviced_device_owners())"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"def is_distributed_router(router):"},{"line_number":204,"context_line":"    \"\"\"Return True if router to be handled is distributed.\"\"\""},{"line_number":205,"context_line":"    # See if router is a request body"},{"line_number":206,"context_line":"    if isinstance(router, dict):"},{"line_number":207,"context_line":"        requested_router_type \u003d router.get(\u0027distributed\u0027)"},{"line_number":208,"context_line":"    # If not, see if router DB or OVO object contains Extra Attributes"},{"line_number":209,"context_line":"    elif router.extra_attributes:"},{"line_number":210,"context_line":"        requested_router_type \u003d router.extra_attributes.distributed"},{"line_number":211,"context_line":"    else:"},{"line_number":212,"context_line":"        requested_router_type \u003d None"},{"line_number":213,"context_line":"    if validators.is_attr_set(requested_router_type):"},{"line_number":214,"context_line":"        return requested_router_type"},{"line_number":215,"context_line":"    return cfg.CONF.router_distributed"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"def is_fip_serviced(device_owner):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_f79c885d","line":215,"range":{"start_line":203,"start_character":0,"end_line":215,"end_character":38},"updated":"2018-10-21 14:32:50.000000000","message":"I think the smaller patch set we submit, the better review for others. So split the refactor and fix looks better.","commit_id":"1deb9ed3de00405c17e8651f0610323ca814f7be"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"73e0c1576aab6df63511e2aec23ad69f79d9a296","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            device_owner in get_other_dvr_serviced_device_owners())"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"def is_distributed_router(router):"},{"line_number":204,"context_line":"    \"\"\"Return True if router to be handled is distributed.\"\"\""},{"line_number":205,"context_line":"    # See if router is a request body"},{"line_number":206,"context_line":"    if isinstance(router, dict):"},{"line_number":207,"context_line":"        requested_router_type \u003d router.get(\u0027distributed\u0027)"},{"line_number":208,"context_line":"    # If not, see if router DB or OVO object contains Extra Attributes"},{"line_number":209,"context_line":"    elif router.extra_attributes:"},{"line_number":210,"context_line":"        requested_router_type \u003d router.extra_attributes.distributed"},{"line_number":211,"context_line":"    else:"},{"line_number":212,"context_line":"        requested_router_type \u003d None"},{"line_number":213,"context_line":"    if validators.is_attr_set(requested_router_type):"},{"line_number":214,"context_line":"        return requested_router_type"},{"line_number":215,"context_line":"    return cfg.CONF.router_distributed"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"def is_fip_serviced(device_owner):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_d775ccca","line":215,"range":{"start_line":203,"start_character":0,"end_line":215,"end_character":38},"in_reply_to":"3f79a3b5_f79c885d","updated":"2018-10-21 16:20:07.000000000","message":"Yes, I\u0027ll do this.","commit_id":"1deb9ed3de00405c17e8651f0610323ca814f7be"}],"neutron/db/l3_db.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"41f75663cce106766f7ba53e09d8fc05da8f8066","unresolved":false,"context_lines":[{"line_number":1325,"context_line":"            msg \u003d _(\"Network %s does not contain any IPv4 subnet\") % f_net_id"},{"line_number":1326,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":1327,"context_line":""},{"line_number":1328,"context_line":"        self._check_port_vnic_type(context, fip[\u0027port_id\u0027])"},{"line_number":1329,"context_line":""},{"line_number":1330,"context_line":"        # This external port is never exposed to the tenant."},{"line_number":1331,"context_line":"        # it is used purely for internal system and admin use when"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_7198e4ca","line":1328,"updated":"2018-10-16 18:13:10.000000000","message":"This seems to break the layering as L3 shouldn\u0027t be looking at L2 information.  I think the correct way is to use the registry notification code, sending a \"FLOATING_IP, BEFORE_CREATE\" message and have something in the ML2 code subscribe and complain in this case.","commit_id":"f9541cb377cc0145c3d46a4c8fe535b489a4f4e4"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"19ecccbc6e7e1b2f77ce96ab65e571c47840cb3a","unresolved":false,"context_lines":[{"line_number":1325,"context_line":"            msg \u003d _(\"Network %s does not contain any IPv4 subnet\") % f_net_id"},{"line_number":1326,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":1327,"context_line":""},{"line_number":1328,"context_line":"        self._check_port_vnic_type(context, fip[\u0027port_id\u0027])"},{"line_number":1329,"context_line":""},{"line_number":1330,"context_line":"        # This external port is never exposed to the tenant."},{"line_number":1331,"context_line":"        # it is used purely for internal system and admin use when"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_3d0d53e7","line":1328,"in_reply_to":"3f79a3b5_7198e4ca","updated":"2018-10-17 07:38:45.000000000","message":"Thank you. I didn\u0027t know that, but it makes sense. Thank you for the tip.","commit_id":"f9541cb377cc0145c3d46a4c8fe535b489a4f4e4"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"15ab40e2314bf4dc3fb15e045d558844c1bd9652","unresolved":false,"context_lines":[{"line_number":1306,"context_line":"        fip \u003d floatingip[\u0027floatingip\u0027]"},{"line_number":1307,"context_line":"        fip_id \u003d uuidutils.generate_uuid()"},{"line_number":1308,"context_line":"        if fip.get(\u0027port_id\u0027):"},{"line_number":1309,"context_line":"            registry.notify(resources.FLOATING_IP, events.BEFORE_CREATE,"},{"line_number":1310,"context_line":"                            self, context\u003dcontext, port_id\u003dfip[\u0027port_id\u0027])"},{"line_number":1311,"context_line":""},{"line_number":1312,"context_line":"        f_net_id \u003d fip[\u0027floating_network_id\u0027]"},{"line_number":1313,"context_line":"        if not self._core_plugin._network_is_external(context, f_net_id):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_00dd7c6c","line":1310,"range":{"start_line":1309,"start_character":12,"end_line":1310,"end_character":74},"updated":"2018-10-17 21:08:32.000000000","message":"since notify is marked deprecated [1]. already, I think this will increase technical debt for work already in progress to use publish and payload across all networking projects. I\u0027d suggest using publish and payload here.\n\n[1]. https://github.com/openstack/neutron-lib/blob/master/neutron_lib/callbacks/registry.py#L53","commit_id":"96e189f78c08a2b0c2791bf496c64262ea68de11"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"065d7de3fea94441bbf455f3d3810df0b5c1df42","unresolved":false,"context_lines":[{"line_number":1306,"context_line":"        fip \u003d floatingip[\u0027floatingip\u0027]"},{"line_number":1307,"context_line":"        fip_id \u003d uuidutils.generate_uuid()"},{"line_number":1308,"context_line":"        if fip.get(\u0027port_id\u0027):"},{"line_number":1309,"context_line":"            registry.notify(resources.FLOATING_IP, events.BEFORE_CREATE,"},{"line_number":1310,"context_line":"                            self, context\u003dcontext, port_id\u003dfip[\u0027port_id\u0027])"},{"line_number":1311,"context_line":""},{"line_number":1312,"context_line":"        f_net_id \u003d fip[\u0027floating_network_id\u0027]"},{"line_number":1313,"context_line":"        if not self._core_plugin._network_is_external(context, f_net_id):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_b8c5d592","line":1310,"range":{"start_line":1309,"start_character":12,"end_line":1310,"end_character":74},"in_reply_to":"3f79a3b5_00dd7c6c","updated":"2018-10-18 09:00:37.000000000","message":"You are right, I\u0027ll change it.","commit_id":"96e189f78c08a2b0c2791bf496c64262ea68de11"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"15ab40e2314bf4dc3fb15e045d558844c1bd9652","unresolved":false,"context_lines":[{"line_number":1413,"context_line":"    def _update_floatingip(self, context, id, floatingip):"},{"line_number":1414,"context_line":"        fip \u003d floatingip[\u0027floatingip\u0027]"},{"line_number":1415,"context_line":"        if fip.get(\u0027port_id\u0027):"},{"line_number":1416,"context_line":"            registry.notify(resources.FLOATING_IP, events.BEFORE_UPDATE,"},{"line_number":1417,"context_line":"                            self, context\u003dcontext, port_id\u003dfip[\u0027port_id\u0027])"},{"line_number":1418,"context_line":""},{"line_number":1419,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1420,"context_line":"            floatingip_obj \u003d self._get_floatingip(context, id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_c0d0e455","line":1417,"range":{"start_line":1416,"start_character":11,"end_line":1417,"end_character":74},"updated":"2018-10-17 21:08:32.000000000","message":"same comment ad L1310","commit_id":"96e189f78c08a2b0c2791bf496c64262ea68de11"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"065d7de3fea94441bbf455f3d3810df0b5c1df42","unresolved":false,"context_lines":[{"line_number":1413,"context_line":"    def _update_floatingip(self, context, id, floatingip):"},{"line_number":1414,"context_line":"        fip \u003d floatingip[\u0027floatingip\u0027]"},{"line_number":1415,"context_line":"        if fip.get(\u0027port_id\u0027):"},{"line_number":1416,"context_line":"            registry.notify(resources.FLOATING_IP, events.BEFORE_UPDATE,"},{"line_number":1417,"context_line":"                            self, context\u003dcontext, port_id\u003dfip[\u0027port_id\u0027])"},{"line_number":1418,"context_line":""},{"line_number":1419,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1420,"context_line":"            floatingip_obj \u003d self._get_floatingip(context, id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_d8ca119f","line":1417,"range":{"start_line":1416,"start_character":11,"end_line":1417,"end_character":74},"in_reply_to":"3f79a3b5_c0d0e455","updated":"2018-10-18 09:00:37.000000000","message":"Done","commit_id":"96e189f78c08a2b0c2791bf496c64262ea68de11"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"7075d09d5ef5de7d0c07fda3b3f53705f27db925","unresolved":false,"context_lines":[{"line_number":1233,"context_line":"        return (fip[\u0027port_id\u0027], internal_ip_address, router_id)"},{"line_number":1234,"context_line":""},{"line_number":1235,"context_line":"    def _check_and_get_fip_assoc(self, context, fip, floatingip_obj):"},{"line_number":1236,"context_line":"        port_id \u003d internal_ip_address \u003d router_id \u003d router_distributed \u003d None"},{"line_number":1237,"context_line":"        if fip.get(\u0027fixed_ip_address\u0027) and not fip.get(\u0027port_id\u0027):"},{"line_number":1238,"context_line":"            msg \u003d _(\"fixed_ip_address cannot be specified without a port_id\")"},{"line_number":1239,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_37e1a0d0","line":1236,"range":{"start_line":1236,"start_character":52,"end_line":1236,"end_character":70},"updated":"2018-10-21 14:32:50.000000000","message":"IMO, dvr related code should be placed to l3_dvr_db, so maybe you can rewrite the function to l3_dvr_db.","commit_id":"1deb9ed3de00405c17e8651f0610323ca814f7be"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"73e0c1576aab6df63511e2aec23ad69f79d9a296","unresolved":false,"context_lines":[{"line_number":1233,"context_line":"        return (fip[\u0027port_id\u0027], internal_ip_address, router_id)"},{"line_number":1234,"context_line":""},{"line_number":1235,"context_line":"    def _check_and_get_fip_assoc(self, context, fip, floatingip_obj):"},{"line_number":1236,"context_line":"        port_id \u003d internal_ip_address \u003d router_id \u003d router_distributed \u003d None"},{"line_number":1237,"context_line":"        if fip.get(\u0027fixed_ip_address\u0027) and not fip.get(\u0027port_id\u0027):"},{"line_number":1238,"context_line":"            msg \u003d _(\"fixed_ip_address cannot be specified without a port_id\")"},{"line_number":1239,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_82d0742c","line":1236,"range":{"start_line":1236,"start_character":52,"end_line":1236,"end_character":70},"in_reply_to":"3f79a3b5_37e1a0d0","updated":"2018-10-21 16:20:07.000000000","message":"This is the key point of this review. What I\u0027m going to do is to implement a function the L3_NAT_db_mixin to retrieve the distributed status of a router and override it in NAT_with_dvr_db_mixin.","commit_id":"1deb9ed3de00405c17e8651f0610323ca814f7be"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"7075d09d5ef5de7d0c07fda3b3f53705f27db925","unresolved":false,"context_lines":[{"line_number":1239,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":1240,"context_line":"        if fip.get(\u0027port_id\u0027):"},{"line_number":1241,"context_line":"            port_id, internal_ip_address, router_id \u003d self._get_assoc_data("},{"line_number":1242,"context_line":"                context, fip, floatingip_obj.project_id,"},{"line_number":1243,"context_line":"                floatingip_obj.floating_network_id)"},{"line_number":1244,"context_line":""},{"line_number":1245,"context_line":"            if port_id \u003d\u003d floatingip_obj.fixed_port_id:"},{"line_number":1246,"context_line":"                # Floating IP association is not changed."}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_57e45cdf","line":1243,"range":{"start_line":1242,"start_character":30,"end_line":1243,"end_character":50},"updated":"2018-10-21 14:32:50.000000000","message":"one floatingip_obj is enough?","commit_id":"1deb9ed3de00405c17e8651f0610323ca814f7be"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"73e0c1576aab6df63511e2aec23ad69f79d9a296","unresolved":false,"context_lines":[{"line_number":1239,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":1240,"context_line":"        if fip.get(\u0027port_id\u0027):"},{"line_number":1241,"context_line":"            port_id, internal_ip_address, router_id \u003d self._get_assoc_data("},{"line_number":1242,"context_line":"                context, fip, floatingip_obj.project_id,"},{"line_number":1243,"context_line":"                floatingip_obj.floating_network_id)"},{"line_number":1244,"context_line":""},{"line_number":1245,"context_line":"            if port_id \u003d\u003d floatingip_obj.fixed_port_id:"},{"line_number":1246,"context_line":"                # Floating IP association is not changed."}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_f759e85b","line":1243,"range":{"start_line":1242,"start_character":30,"end_line":1243,"end_character":50},"in_reply_to":"3f79a3b5_57e45cdf","updated":"2018-10-21 16:20:07.000000000","message":"I\u0027ll remove this. That was part of a test I should have removed.","commit_id":"1deb9ed3de00405c17e8651f0610323ca814f7be"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"7075d09d5ef5de7d0c07fda3b3f53705f27db925","unresolved":false,"context_lines":[{"line_number":1268,"context_line":"            # updating dict."},{"line_number":1269,"context_line":"            fip[\u0027port_id\u0027] \u003d floatingip_obj.fixed_port_id"},{"line_number":1270,"context_line":"            port_id, internal_ip_address, router_id \u003d self._get_assoc_data("},{"line_number":1271,"context_line":"                context, fip, floatingip_obj.project_id,"},{"line_number":1272,"context_line":"                floatingip_obj.floating_network_id)"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"        if router_id:"},{"line_number":1275,"context_line":"            router \u003d self.get_router(context.elevated(), router_id)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_f7ca4845","line":1272,"range":{"start_line":1271,"start_character":30,"end_line":1272,"end_character":50},"updated":"2018-10-21 14:32:50.000000000","message":"ditto","commit_id":"1deb9ed3de00405c17e8651f0610323ca814f7be"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"73e0c1576aab6df63511e2aec23ad69f79d9a296","unresolved":false,"context_lines":[{"line_number":1268,"context_line":"            # updating dict."},{"line_number":1269,"context_line":"            fip[\u0027port_id\u0027] \u003d floatingip_obj.fixed_port_id"},{"line_number":1270,"context_line":"            port_id, internal_ip_address, router_id \u003d self._get_assoc_data("},{"line_number":1271,"context_line":"                context, fip, floatingip_obj.project_id,"},{"line_number":1272,"context_line":"                floatingip_obj.floating_network_id)"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"        if router_id:"},{"line_number":1275,"context_line":"            router \u003d self.get_router(context.elevated(), router_id)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_1755841f","line":1272,"range":{"start_line":1271,"start_character":30,"end_line":1272,"end_character":50},"in_reply_to":"3f79a3b5_f7ca4845","updated":"2018-10-21 16:20:07.000000000","message":"ditto","commit_id":"1deb9ed3de00405c17e8651f0610323ca814f7be"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"7075d09d5ef5de7d0c07fda3b3f53705f27db925","unresolved":false,"context_lines":[{"line_number":1296,"context_line":"        return {\u0027fixed_ip_address\u0027: internal_ip_address,"},{"line_number":1297,"context_line":"                \u0027fixed_port_id\u0027: port_id,"},{"line_number":1298,"context_line":"                \u0027router_id\u0027: router_id,"},{"line_number":1299,"context_line":"                \u0027router_distributed\u0027: router_distributed,"},{"line_number":1300,"context_line":"                \u0027last_known_router_id\u0027: previous_router_id,"},{"line_number":1301,"context_line":"                \u0027floating_ip_address\u0027: floating_ip_address,"},{"line_number":1302,"context_line":"                \u0027floating_network_id\u0027: floatingip_obj.floating_network_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_d7cf0c52","line":1299,"range":{"start_line":1299,"start_character":16,"end_line":1299,"end_character":57},"updated":"2018-10-21 14:32:50.000000000","message":"Doing so much code refactor and adjust is to get this one attribute, so can this attribute be retrieved in that \u0027registry.receives\u0027 function?","commit_id":"1deb9ed3de00405c17e8651f0610323ca814f7be"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"73e0c1576aab6df63511e2aec23ad69f79d9a296","unresolved":false,"context_lines":[{"line_number":1296,"context_line":"        return {\u0027fixed_ip_address\u0027: internal_ip_address,"},{"line_number":1297,"context_line":"                \u0027fixed_port_id\u0027: port_id,"},{"line_number":1298,"context_line":"                \u0027router_id\u0027: router_id,"},{"line_number":1299,"context_line":"                \u0027router_distributed\u0027: router_distributed,"},{"line_number":1300,"context_line":"                \u0027last_known_router_id\u0027: previous_router_id,"},{"line_number":1301,"context_line":"                \u0027floating_ip_address\u0027: floating_ip_address,"},{"line_number":1302,"context_line":"                \u0027floating_network_id\u0027: floatingip_obj.floating_network_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_171a647f","line":1299,"range":{"start_line":1299,"start_character":16,"end_line":1299,"end_character":57},"in_reply_to":"3f79a3b5_d7cf0c52","updated":"2018-10-21 16:20:07.000000000","message":"I\u0027ll remove this.","commit_id":"1deb9ed3de00405c17e8651f0610323ca814f7be"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"0891a41ee99db9594dce01c58078a852a73b8b77","unresolved":false,"context_lines":[{"line_number":2038,"context_line":"    def is_router_distributed(self, context, router_id):"},{"line_number":2039,"context_line":"        \"\"\"Returns if a router is distributed or not"},{"line_number":2040,"context_line":""},{"line_number":2041,"context_line":"        By default, a router is not distributed. This function is overridden in"},{"line_number":2042,"context_line":"        L3_NAT_with_dvr_db_mixin in case the DVR service plugin is loaded."},{"line_number":2043,"context_line":"        \"\"\""},{"line_number":2044,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_d5c05280","line":2041,"range":{"start_line":2041,"start_character":7,"end_line":2041,"end_character":48},"updated":"2018-10-22 17:10:25.000000000","message":"this depends on setup, is router_distributeed \u003d True which is by default in most testing environments, then router you create will be distributed by default unless you explicitly set --distributed False flag.\n\nhttp://paste.openstack.org/show/732604/","commit_id":"e3edb63ab6b9f7b04fa7b8be7fffd3f057c8e61f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"456e7f68cf324336b185d026af75bc11ac48e003","unresolved":false,"context_lines":[{"line_number":2038,"context_line":"    def is_router_distributed(self, context, router_id):"},{"line_number":2039,"context_line":"        \"\"\"Returns if a router is distributed or not"},{"line_number":2040,"context_line":""},{"line_number":2041,"context_line":"        By default, a router is not distributed. This function is overridden in"},{"line_number":2042,"context_line":"        L3_NAT_with_dvr_db_mixin in case the DVR service plugin is loaded."},{"line_number":2043,"context_line":"        \"\"\""},{"line_number":2044,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_75937e00","line":2041,"range":{"start_line":2041,"start_character":7,"end_line":2041,"end_character":48},"in_reply_to":"3f79a3b5_d5c05280","updated":"2018-10-22 17:27:32.000000000","message":"This is not the best description at all, I\u0027ll change it. What I need to say is that if DVR is not enabled, no router will be distributed. This function is overridden in the mentioned class in case any DVR plugin is enabled.","commit_id":"e3edb63ab6b9f7b04fa7b8be7fffd3f057c8e61f"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"d0f743e9a57ec843a3abbcc3f4c0df15370235dc","unresolved":false,"context_lines":[{"line_number":2038,"context_line":"    def is_router_distributed(self, context, router_id):"},{"line_number":2039,"context_line":"        \"\"\"Returns if a router is distributed or not"},{"line_number":2040,"context_line":""},{"line_number":2041,"context_line":"        If DVR plugin is not enabled, no router will be distributed. This"},{"line_number":2042,"context_line":"        function is overridden in L3_NAT_with_dvr_db_mixin in case the DVR"},{"line_number":2043,"context_line":"        service plugin is loaded."},{"line_number":2044,"context_line":"        \"\"\""},{"line_number":2045,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_3ebaa9b9","line":2043,"range":{"start_line":2041,"start_character":8,"end_line":2043,"end_character":33},"updated":"2018-10-23 19:29:33.000000000","message":"thanks for rewording, not confusing anymore !","commit_id":"4d5816fe83da98e03e7b95e05d57469e16d42d8e"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d1875cac125697eaaa33787a396a1794e7bf6185","unresolved":false,"context_lines":[{"line_number":2038,"context_line":"    def is_router_distributed(self, context, router_id):"},{"line_number":2039,"context_line":"        \"\"\"Returns if a router is distributed or not"},{"line_number":2040,"context_line":""},{"line_number":2041,"context_line":"        If DVR plugin is not enabled, no router will be distributed. This"},{"line_number":2042,"context_line":"        function is overridden in L3_NAT_with_dvr_db_mixin in case the DVR"},{"line_number":2043,"context_line":"        service plugin is loaded."},{"line_number":2044,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_abc8ab74","line":2041,"range":{"start_line":2041,"start_character":15,"end_line":2041,"end_character":21},"updated":"2018-10-24 12:44:38.000000000","message":"extension?","commit_id":"a208a0ebeb4d8a7a715a1e7e69cbeb6b59da53a6"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"62dccbf0ecc3e335411c5111686de588d9963975","unresolved":false,"context_lines":[{"line_number":2038,"context_line":"    def is_router_distributed(self, context, router_id):"},{"line_number":2039,"context_line":"        \"\"\"Returns if a router is distributed or not"},{"line_number":2040,"context_line":""},{"line_number":2041,"context_line":"        If DVR plugin is not enabled, no router will be distributed. This"},{"line_number":2042,"context_line":"        function is overridden in L3_NAT_with_dvr_db_mixin in case the DVR"},{"line_number":2043,"context_line":"        service plugin is loaded."},{"line_number":2044,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_13da3149","line":2041,"range":{"start_line":2041,"start_character":15,"end_line":2041,"end_character":21},"in_reply_to":"3f79a3b5_abc8ab74","updated":"2018-10-24 14:33:14.000000000","message":"Done","commit_id":"a208a0ebeb4d8a7a715a1e7e69cbeb6b59da53a6"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d1875cac125697eaaa33787a396a1794e7bf6185","unresolved":false,"context_lines":[{"line_number":2040,"context_line":""},{"line_number":2041,"context_line":"        If DVR plugin is not enabled, no router will be distributed. This"},{"line_number":2042,"context_line":"        function is overridden in L3_NAT_with_dvr_db_mixin in case the DVR"},{"line_number":2043,"context_line":"        service plugin is loaded."},{"line_number":2044,"context_line":"        \"\"\""},{"line_number":2045,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_6bbe13cf","line":2043,"range":{"start_line":2043,"start_character":8,"end_line":2043,"end_character":22},"updated":"2018-10-24 12:44:38.000000000","message":"ditto","commit_id":"a208a0ebeb4d8a7a715a1e7e69cbeb6b59da53a6"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"62dccbf0ecc3e335411c5111686de588d9963975","unresolved":false,"context_lines":[{"line_number":2040,"context_line":""},{"line_number":2041,"context_line":"        If DVR plugin is not enabled, no router will be distributed. This"},{"line_number":2042,"context_line":"        function is overridden in L3_NAT_with_dvr_db_mixin in case the DVR"},{"line_number":2043,"context_line":"        service plugin is loaded."},{"line_number":2044,"context_line":"        \"\"\""},{"line_number":2045,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_b3e25d01","line":2043,"range":{"start_line":2043,"start_character":8,"end_line":2043,"end_character":22},"in_reply_to":"3f79a3b5_6bbe13cf","updated":"2018-10-24 14:33:14.000000000","message":"Done","commit_id":"a208a0ebeb4d8a7a715a1e7e69cbeb6b59da53a6"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"ace1b2fd11e76eb29caa044362dbedd1420c3576","unresolved":false,"context_lines":[{"line_number":2227,"context_line":"                                               events.BEFORE_UPDATE])"},{"line_number":2228,"context_line":"    def _check_port_vnic_type_for_fip(self, rtype, event, trigger, context,"},{"line_number":2229,"context_line":"                                      port_id, **kwargs):"},{"line_number":2230,"context_line":"        if port_id:"},{"line_number":2231,"context_line":"            port_vnic_type \u003d self.get_port(context.elevated(),"},{"line_number":2232,"context_line":"                                           id\u003dport_id)[portbindings.VNIC_TYPE]"},{"line_number":2233,"context_line":"            if port_vnic_type !\u003d portbindings.VNIC_NORMAL:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_c5a47d4f","line":2230,"updated":"2018-10-17 15:59:35.000000000","message":"nit: the caller checks before, so probably not required","commit_id":"96e189f78c08a2b0c2791bf496c64262ea68de11"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"065d7de3fea94441bbf455f3d3810df0b5c1df42","unresolved":false,"context_lines":[{"line_number":2227,"context_line":"                                               events.BEFORE_UPDATE])"},{"line_number":2228,"context_line":"    def _check_port_vnic_type_for_fip(self, rtype, event, trigger, context,"},{"line_number":2229,"context_line":"                                      port_id, **kwargs):"},{"line_number":2230,"context_line":"        if port_id:"},{"line_number":2231,"context_line":"            port_vnic_type \u003d self.get_port(context.elevated(),"},{"line_number":2232,"context_line":"                                           id\u003dport_id)[portbindings.VNIC_TYPE]"},{"line_number":2233,"context_line":"            if port_vnic_type !\u003d portbindings.VNIC_NORMAL:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_38b9c515","line":2230,"in_reply_to":"3f79a3b5_c5a47d4f","updated":"2018-10-18 09:00:37.000000000","message":"Yes, I made this change before realizing I need to check this value before calling the function. Thanks!","commit_id":"96e189f78c08a2b0c2791bf496c64262ea68de11"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"fba4015143730066674fb3a7b61a557c7380e764","unresolved":false,"context_lines":[{"line_number":2231,"context_line":"            payload.context.elevated(),"},{"line_number":2232,"context_line":"            id\u003dpayload.resource_id)[portbindings.VNIC_TYPE]"},{"line_number":2233,"context_line":"        if port_vnic_type !\u003d portbindings.VNIC_NORMAL:"},{"line_number":2234,"context_line":"            msg \u003d (\"Port %s VNIC type must be \u0027%s\u0027\""},{"line_number":2235,"context_line":"                   % (payload.resource_id, portbindings.VNIC_NORMAL))"},{"line_number":2236,"context_line":"            raise ml2_exc.MechanismDriverError("},{"line_number":2237,"context_line":"                method\u003d\u0027_check_port_vnic_type\u0027, errors\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_19b5d9ed","line":2234,"range":{"start_line":2234,"start_character":12,"end_line":2234,"end_character":51},"updated":"2018-10-19 01:47:44.000000000","message":"This err msg not very clear for the goal which is \"Port XX VNIC type must be Normal, can not associate with fip.\"\n\nAlso, I raise a question here, please feel free to correct. ;). That\u0027s correct there is a issue that in DVR and SR-IOV cases, but I don\u0027t think we hit the issue in SR-IOV and centrilized Router or normal virtualize network implementation, eventhrough in ovs/linux bridge cases. What your proposal is limiting the users can not associate a fip to sr-iov port in normal cases(non-DVR), as this func is in the ml2 plugin(why not just in DVR related module), so could you please explain the reason about that? Thank you, ;-)","commit_id":"3406d527975040b3fdbc037e6df52187db8d830e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"2b571a7d958add2cd472df2d0cdeaa462a331f24","unresolved":false,"context_lines":[{"line_number":2231,"context_line":"            payload.context.elevated(),"},{"line_number":2232,"context_line":"            id\u003dpayload.resource_id)[portbindings.VNIC_TYPE]"},{"line_number":2233,"context_line":"        if port_vnic_type !\u003d portbindings.VNIC_NORMAL:"},{"line_number":2234,"context_line":"            msg \u003d (\"Port %s VNIC type must be \u0027%s\u0027\""},{"line_number":2235,"context_line":"                   % (payload.resource_id, portbindings.VNIC_NORMAL))"},{"line_number":2236,"context_line":"            raise ml2_exc.MechanismDriverError("},{"line_number":2237,"context_line":"                method\u003d\u0027_check_port_vnic_type\u0027, errors\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_25142350","line":2234,"range":{"start_line":2234,"start_character":12,"end_line":2234,"end_character":51},"in_reply_to":"3f79a3b5_19b5d9ed","updated":"2018-10-19 13:25:28.000000000","message":"You are totally right. I need first to check if, in case the fip dict given to the functions create/update has \"port_id\", the router associated to this port/network is DVR.\n\nThanks!","commit_id":"3406d527975040b3fdbc037e6df52187db8d830e"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"7075d09d5ef5de7d0c07fda3b3f53705f27db925","unresolved":false,"context_lines":[{"line_number":2227,"context_line":"                                               events.PRECOMMIT_UPDATE])"},{"line_number":2228,"context_line":"    def _check_port_vnic_type_for_fip(self, rtype, event, trigger, context,"},{"line_number":2229,"context_line":"                                      **kwargs):"},{"line_number":2230,"context_line":"        if not kwargs[\u0027router_distributed\u0027]:"},{"line_number":2231,"context_line":"            return"},{"line_number":2232,"context_line":"        fip_db \u003d kwargs[\u0027floatingip_db\u0027]"},{"line_number":2233,"context_line":"        port \u003d ports_obj.Port.get_object("},{"line_number":2234,"context_line":"            context.elevated(), id\u003dfip_db.fixed_port_id)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_9703d475","line":2231,"range":{"start_line":2230,"start_character":8,"end_line":2231,"end_character":18},"updated":"2018-10-21 14:32:50.000000000","message":"So many information is sent here, so why not get the router distributed attribute here to save the l3 db refactor code?","commit_id":"1deb9ed3de00405c17e8651f0610323ca814f7be"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"523c10c1cc07fac3a60aa96ef584c17efb9d0d17","unresolved":false,"context_lines":[{"line_number":2227,"context_line":"                                               events.PRECOMMIT_UPDATE])"},{"line_number":2228,"context_line":"    def _check_port_vnic_type_for_fip(self, rtype, event, trigger, context,"},{"line_number":2229,"context_line":"                                      **kwargs):"},{"line_number":2230,"context_line":"        if not kwargs[\u0027router_distributed\u0027]:"},{"line_number":2231,"context_line":"            return"},{"line_number":2232,"context_line":"        fip_db \u003d kwargs[\u0027floatingip_db\u0027]"},{"line_number":2233,"context_line":"        port \u003d ports_obj.Port.get_object("},{"line_number":2234,"context_line":"            context.elevated(), id\u003dfip_db.fixed_port_id)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_52168ef4","line":2231,"range":{"start_line":2230,"start_character":8,"end_line":2231,"end_character":18},"in_reply_to":"3f79a3b5_4296dc3f","updated":"2018-10-23 01:13:10.000000000","message":"Thanks, : )","commit_id":"1deb9ed3de00405c17e8651f0610323ca814f7be"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"950095fe433451fee26fb01f9e209cdbd3e7725c","unresolved":false,"context_lines":[{"line_number":2227,"context_line":"                                               events.PRECOMMIT_UPDATE])"},{"line_number":2228,"context_line":"    def _check_port_vnic_type_for_fip(self, rtype, event, trigger, context,"},{"line_number":2229,"context_line":"                                      **kwargs):"},{"line_number":2230,"context_line":"        if not kwargs[\u0027router_distributed\u0027]:"},{"line_number":2231,"context_line":"            return"},{"line_number":2232,"context_line":"        fip_db \u003d kwargs[\u0027floatingip_db\u0027]"},{"line_number":2233,"context_line":"        port \u003d ports_obj.Port.get_object("},{"line_number":2234,"context_line":"            context.elevated(), id\u003dfip_db.fixed_port_id)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_4296dc3f","line":2231,"range":{"start_line":2230,"start_character":8,"end_line":2231,"end_character":18},"in_reply_to":"3f79a3b5_9703d475","updated":"2018-10-21 16:32:16.000000000","message":"Please, review the next refactor. I think you\u0027ll like it!!","commit_id":"1deb9ed3de00405c17e8651f0610323ca814f7be"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"df88033d90cf218065a82243050e990f09020bf1","unresolved":false,"context_lines":[{"line_number":2231,"context_line":"            return"},{"line_number":2232,"context_line":"        fip_db \u003d kwargs[\u0027floatingip_db\u0027]"},{"line_number":2233,"context_line":"        port \u003d ports_obj.Port.get_object("},{"line_number":2234,"context_line":"            context.elevated(), id\u003dfip_db.fixed_port_id)"},{"line_number":2235,"context_line":"        port_vnic_type \u003d port.bindings[0].vnic_type"},{"line_number":2236,"context_line":"        if port_vnic_type !\u003d portbindings.VNIC_NORMAL:"},{"line_number":2237,"context_line":"            msg \u003d (\"Port %s VNIC type must be \u0027%s\u0027, cannnot associate FIP in \""}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_9938b79e","line":2234,"range":{"start_line":2234,"start_character":42,"end_line":2234,"end_character":55},"updated":"2018-10-23 20:16:49.000000000","message":"Are you sure this won\u0027t be null? If you are sure, then it is fine.","commit_id":"4d5816fe83da98e03e7b95e05d57469e16d42d8e"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"e5a9c92263b86a35dd3aebc9cc2a5a62b5648344","unresolved":false,"context_lines":[{"line_number":2231,"context_line":"            return"},{"line_number":2232,"context_line":"        fip_db \u003d kwargs[\u0027floatingip_db\u0027]"},{"line_number":2233,"context_line":"        port \u003d ports_obj.Port.get_object("},{"line_number":2234,"context_line":"            context.elevated(), id\u003dfip_db.fixed_port_id)"},{"line_number":2235,"context_line":"        port_vnic_type \u003d port.bindings[0].vnic_type"},{"line_number":2236,"context_line":"        if port_vnic_type !\u003d portbindings.VNIC_NORMAL:"},{"line_number":2237,"context_line":"            msg \u003d (\"Port %s VNIC type must be \u0027%s\u0027, cannnot associate FIP in \""}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_eb5d527c","line":2234,"range":{"start_line":2234,"start_character":42,"end_line":2234,"end_character":55},"in_reply_to":"3f79a3b5_9938b79e","updated":"2018-10-23 21:26:06.000000000","message":"fip_db.fixed_port_id could be None when users are disassociate the floating IP address, so we need to detect this case and skip the validation accordingly. In addition, we\u0027d better to have a unit test for that.","commit_id":"4d5816fe83da98e03e7b95e05d57469e16d42d8e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"dcdb5372de37c0dd970e7b9398aa31aea2ec7f6a","unresolved":false,"context_lines":[{"line_number":2231,"context_line":"            return"},{"line_number":2232,"context_line":"        fip_db \u003d kwargs[\u0027floatingip_db\u0027]"},{"line_number":2233,"context_line":"        port \u003d ports_obj.Port.get_object("},{"line_number":2234,"context_line":"            context.elevated(), id\u003dfip_db.fixed_port_id)"},{"line_number":2235,"context_line":"        port_vnic_type \u003d port.bindings[0].vnic_type"},{"line_number":2236,"context_line":"        if port_vnic_type !\u003d portbindings.VNIC_NORMAL:"},{"line_number":2237,"context_line":"            msg \u003d (\"Port %s VNIC type must be \u0027%s\u0027, cannnot associate FIP in \""}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_ea9b0113","line":2234,"range":{"start_line":2234,"start_character":42,"end_line":2234,"end_character":55},"in_reply_to":"3f79a3b5_eb5d527c","updated":"2018-10-24 10:17:29.000000000","message":"If \"fixed_port_id\" is None, there is no router associated and this function is never called. Only if a port is given in the create/update FIP parameters or in update the FIP object has a \"port_id\", the router is retrieved [1][2][3].\n\nIn case router_id is None (with or without fixed_port_id set), then self.is_router_distributed is called. This function:\n- In no DVR case, returns False always and this function ends in L2231\n- If DVR and the router_id is None, same result.\n- If DVR and router_id and distributed, there MUST be always a fixed_port_id and this code is executed.\n\n[1]https://github.com/openstack/neutron/blob/master/neutron/db/l3_db.py#L1279\n[2]https://github.com/openstack/neutron/blob/master/neutron/db/l3_db.py#L1239\n[3]https://github.com/openstack/neutron/blob/master/neutron/db/l3_db.py#L1264","commit_id":"4d5816fe83da98e03e7b95e05d57469e16d42d8e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"dad37dd6c9c694e81f5bf4c2c435c9f61c26c385","unresolved":false,"context_lines":[{"line_number":2231,"context_line":"            return"},{"line_number":2232,"context_line":"        fip_db \u003d kwargs[\u0027floatingip_db\u0027]"},{"line_number":2233,"context_line":"        port \u003d ports_obj.Port.get_object("},{"line_number":2234,"context_line":"            context.elevated(), id\u003dfip_db.fixed_port_id)"},{"line_number":2235,"context_line":"        port_vnic_type \u003d port.bindings[0].vnic_type"},{"line_number":2236,"context_line":"        if port_vnic_type !\u003d portbindings.VNIC_NORMAL:"},{"line_number":2237,"context_line":"            msg \u003d (\"Port %s VNIC type must be \u0027%s\u0027, cannnot associate FIP in \""}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_b8e3e605","line":2234,"range":{"start_line":2234,"start_character":42,"end_line":2234,"end_character":55},"in_reply_to":"3f79a3b5_eb5d527c","updated":"2018-10-26 14:08:23.000000000","message":"Now, because of https://review.openstack.org/#/c/613543, I need to check it.","commit_id":"4d5816fe83da98e03e7b95e05d57469e16d42d8e"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"df88033d90cf218065a82243050e990f09020bf1","unresolved":false,"context_lines":[{"line_number":2232,"context_line":"        fip_db \u003d kwargs[\u0027floatingip_db\u0027]"},{"line_number":2233,"context_line":"        port \u003d ports_obj.Port.get_object("},{"line_number":2234,"context_line":"            context.elevated(), id\u003dfip_db.fixed_port_id)"},{"line_number":2235,"context_line":"        port_vnic_type \u003d port.bindings[0].vnic_type"},{"line_number":2236,"context_line":"        if port_vnic_type !\u003d portbindings.VNIC_NORMAL:"},{"line_number":2237,"context_line":"            msg \u003d (\"Port %s VNIC type must be \u0027%s\u0027, cannnot associate FIP in \""},{"line_number":2238,"context_line":"                   \"DVR mode\" % (fip_db.fixed_port_id,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_9990b743","line":2235,"range":{"start_line":2235,"start_character":38,"end_line":2235,"end_character":41},"updated":"2018-10-23 20:16:49.000000000","message":"Are you sure the binding won\u0027t be an empty list?","commit_id":"4d5816fe83da98e03e7b95e05d57469e16d42d8e"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"e5a9c92263b86a35dd3aebc9cc2a5a62b5648344","unresolved":false,"context_lines":[{"line_number":2232,"context_line":"        fip_db \u003d kwargs[\u0027floatingip_db\u0027]"},{"line_number":2233,"context_line":"        port \u003d ports_obj.Port.get_object("},{"line_number":2234,"context_line":"            context.elevated(), id\u003dfip_db.fixed_port_id)"},{"line_number":2235,"context_line":"        port_vnic_type \u003d port.bindings[0].vnic_type"},{"line_number":2236,"context_line":"        if port_vnic_type !\u003d portbindings.VNIC_NORMAL:"},{"line_number":2237,"context_line":"            msg \u003d (\"Port %s VNIC type must be \u0027%s\u0027, cannnot associate FIP in \""},{"line_number":2238,"context_line":"                   \"DVR mode\" % (fip_db.fixed_port_id,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_8b205efa","line":2235,"range":{"start_line":2235,"start_character":38,"end_line":2235,"end_character":41},"in_reply_to":"3f79a3b5_9990b743","updated":"2018-10-23 21:26:06.000000000","message":"Never mind. It won\u0027t be an empty list.","commit_id":"4d5816fe83da98e03e7b95e05d57469e16d42d8e"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"e5a9c92263b86a35dd3aebc9cc2a5a62b5648344","unresolved":false,"context_lines":[{"line_number":2237,"context_line":"            msg \u003d (\"Port %s VNIC type must be \u0027%s\u0027, cannnot associate FIP in \""},{"line_number":2238,"context_line":"                   \"DVR mode\" % (fip_db.fixed_port_id,"},{"line_number":2239,"context_line":"                                 portbindings.VNIC_NORMAL))"},{"line_number":2240,"context_line":"            raise ml2_exc.MechanismDriverError("},{"line_number":2241,"context_line":"                method\u003d\u0027_check_port_vnic_type\u0027, errors\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_ce6c24d1","line":2240,"range":{"start_line":2240,"start_character":26,"end_line":2240,"end_character":46},"updated":"2018-10-23 21:26:06.000000000","message":"The error message won\u0027t be rendered correctly because the \u0027errors\u0027 parameter should be a list of exception object but \u0027msg\u0027 is a string.\n\nWe\u0027d better to have a unit test to verify the exception message as well.","commit_id":"4d5816fe83da98e03e7b95e05d57469e16d42d8e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"dcdb5372de37c0dd970e7b9398aa31aea2ec7f6a","unresolved":false,"context_lines":[{"line_number":2237,"context_line":"            msg \u003d (\"Port %s VNIC type must be \u0027%s\u0027, cannnot associate FIP in \""},{"line_number":2238,"context_line":"                   \"DVR mode\" % (fip_db.fixed_port_id,"},{"line_number":2239,"context_line":"                                 portbindings.VNIC_NORMAL))"},{"line_number":2240,"context_line":"            raise ml2_exc.MechanismDriverError("},{"line_number":2241,"context_line":"                method\u003d\u0027_check_port_vnic_type\u0027, errors\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_4aa31545","line":2240,"range":{"start_line":2240,"start_character":26,"end_line":2240,"end_character":46},"in_reply_to":"3f79a3b5_ce6c24d1","updated":"2018-10-24 10:17:29.000000000","message":"You are right, I\u0027ll change this and I\u0027ll modify the tests.","commit_id":"4d5816fe83da98e03e7b95e05d57469e16d42d8e"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d1875cac125697eaaa33787a396a1794e7bf6185","unresolved":false,"context_lines":[{"line_number":2234,"context_line":"            context.elevated(), id\u003dfip_db.fixed_port_id)"},{"line_number":2235,"context_line":"        port_vnic_type \u003d port.bindings[0].vnic_type"},{"line_number":2236,"context_line":"        if port_vnic_type !\u003d portbindings.VNIC_NORMAL:"},{"line_number":2237,"context_line":"            msg \u003d (\"Port %s VNIC type must be \u0027%s\u0027, cannnot associate FIP in \""},{"line_number":2238,"context_line":"                   \"DVR mode\" % (fip_db.fixed_port_id,"},{"line_number":2239,"context_line":"                                 portbindings.VNIC_NORMAL))"},{"line_number":2240,"context_line":"            raise ml2_exc.MechanismDriverError("}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_ab8d0b36","line":2237,"range":{"start_line":2237,"start_character":52,"end_line":2237,"end_character":59},"updated":"2018-10-24 12:44:38.000000000","message":"cannot","commit_id":"a208a0ebeb4d8a7a715a1e7e69cbeb6b59da53a6"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"62dccbf0ecc3e335411c5111686de588d9963975","unresolved":false,"context_lines":[{"line_number":2234,"context_line":"            context.elevated(), id\u003dfip_db.fixed_port_id)"},{"line_number":2235,"context_line":"        port_vnic_type \u003d port.bindings[0].vnic_type"},{"line_number":2236,"context_line":"        if port_vnic_type !\u003d portbindings.VNIC_NORMAL:"},{"line_number":2237,"context_line":"            msg \u003d (\"Port %s VNIC type must be \u0027%s\u0027, cannnot associate FIP in \""},{"line_number":2238,"context_line":"                   \"DVR mode\" % (fip_db.fixed_port_id,"},{"line_number":2239,"context_line":"                                 portbindings.VNIC_NORMAL))"},{"line_number":2240,"context_line":"            raise ml2_exc.MechanismDriverError("}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_73e845df","line":2237,"range":{"start_line":2237,"start_character":52,"end_line":2237,"end_character":59},"in_reply_to":"3f79a3b5_ab8d0b36","updated":"2018-10-24 14:33:14.000000000","message":"Done","commit_id":"a208a0ebeb4d8a7a715a1e7e69cbeb6b59da53a6"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"81c935431bac9ee10bbd9e9fd0d481fc11812d82","unresolved":false,"context_lines":[{"line_number":2233,"context_line":"        port \u003d ports_obj.Port.get_object("},{"line_number":2234,"context_line":"            context.elevated(), id\u003dfip_db.fixed_port_id)"},{"line_number":2235,"context_line":"        port_vnic_type \u003d port.bindings[0].vnic_type"},{"line_number":2236,"context_line":"        if port_vnic_type !\u003d portbindings.VNIC_NORMAL:"},{"line_number":2237,"context_line":"            msg \u003d (\"Port %s VNIC type must be \u0027%s\u0027, cannot associate FIP in \""},{"line_number":2238,"context_line":"                   \"DVR mode\" % (fip_db.fixed_port_id,"},{"line_number":2239,"context_line":"                                 portbindings.VNIC_NORMAL))"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_57c88aa5","line":2236,"range":{"start_line":2236,"start_character":42,"end_line":2236,"end_character":53},"updated":"2018-10-24 22:19:19.000000000","message":"I tested this branch end-to-end with some hacks. It looks the response still doesn\u0027t look correct:\n\n$ openstack floating ip set --port testport 172.24.4.10\nHttpException: 500: Server Error for url: http://10.0.2.15:9696/v2.0/floatingips/f5bf4757-6761-4f44-b933-c3aa6237e6a5, {\"NeutronError\": {\"message\": \"Request Failed: internal server error while processing your request.\", \"type\": \"HTTPInternalServerError\", \"detail\": \"\"}}","commit_id":"1e5886aade3196c0c9142ccd5f61b26cfb0c4a87"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"81c935431bac9ee10bbd9e9fd0d481fc11812d82","unresolved":false,"context_lines":[{"line_number":2238,"context_line":"                   \"DVR mode\" % (fip_db.fixed_port_id,"},{"line_number":2239,"context_line":"                                 portbindings.VNIC_NORMAL))"},{"line_number":2240,"context_line":"            raise ml2_exc.MechanismDriverError("},{"line_number":2241,"context_line":"                method\u003d\u0027_check_port_vnic_type\u0027, errors\u003d[msg])"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_17be92ff","line":2241,"range":{"start_line":2241,"start_character":48,"end_line":2241,"end_character":54},"updated":"2018-10-24 22:19:19.000000000","message":"It looks this parameter should be a list of exception objects, but a list of string is given. That is why convert_exception_to_http_exc doesn\u0027t process the error message correctly.","commit_id":"1e5886aade3196c0c9142ccd5f61b26cfb0c4a87"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"7e1a492267375fabad49a657e5499e41166369ea","unresolved":false,"context_lines":[{"line_number":2238,"context_line":"                   \"DVR mode\" % (fip_db.fixed_port_id,"},{"line_number":2239,"context_line":"                                 portbindings.VNIC_NORMAL))"},{"line_number":2240,"context_line":"            raise ml2_exc.MechanismDriverError("},{"line_number":2241,"context_line":"                method\u003d\u0027_check_port_vnic_type\u0027, errors\u003d[msg])"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_def34ee7","line":2241,"range":{"start_line":2241,"start_character":48,"end_line":2241,"end_character":54},"in_reply_to":"3f79a3b5_17be92ff","updated":"2018-10-25 08:29:23.000000000","message":"I\u0027ll create a specific exception for this error.","commit_id":"1e5886aade3196c0c9142ccd5f61b26cfb0c4a87"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d07beacd8d30c10acd64c2c0841ff938c6a44f32","unresolved":false,"context_lines":[{"line_number":2236,"context_line":"            context.elevated(), id\u003dfip_db.fixed_port_id)"},{"line_number":2237,"context_line":"        port_vnic_type \u003d port.bindings[0].vnic_type"},{"line_number":2238,"context_line":"        if port_vnic_type !\u003d portbindings.VNIC_NORMAL:"},{"line_number":2239,"context_line":"            reason \u003d (\u0027VNIC type must be %s to associate a FIP in DVR mode\u0027"},{"line_number":2240,"context_line":"                      % portbindings.VNIC_NORMAL)"},{"line_number":2241,"context_line":"            raise n_exc.PortVnicTypeError(vnic_type\u003dport_vnic_type,"},{"line_number":2242,"context_line":"                                          reason\u003dreason)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f79a3b5_2b8f5f76","line":2239,"range":{"start_line":2239,"start_character":70,"end_line":2239,"end_character":74},"updated":"2018-10-29 19:04:51.000000000","message":"Nit: period at the end?","commit_id":"616d706e7816068e08afcc811db356cc83ba5b45"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"ef18508fe650c747b73916c3be789b8eacf687d5","unresolved":false,"context_lines":[{"line_number":2236,"context_line":"            context.elevated(), id\u003dfip_db.fixed_port_id)"},{"line_number":2237,"context_line":"        port_vnic_type \u003d port.bindings[0].vnic_type"},{"line_number":2238,"context_line":"        if port_vnic_type !\u003d portbindings.VNIC_NORMAL:"},{"line_number":2239,"context_line":"            reason \u003d (\u0027VNIC type must be %s to associate a FIP in DVR mode\u0027"},{"line_number":2240,"context_line":"                      % portbindings.VNIC_NORMAL)"},{"line_number":2241,"context_line":"            raise n_exc.PortVnicTypeError(vnic_type\u003dport_vnic_type,"},{"line_number":2242,"context_line":"                                          reason\u003dreason)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f79a3b5_9a2a862c","line":2239,"updated":"2018-10-29 10:21:37.000000000","message":"shouldn\u0027t You use translation here?","commit_id":"616d706e7816068e08afcc811db356cc83ba5b45"}],"neutron/tests/unit/db/test_l3_dvr_db.py":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"2fe84af612f605cfc28edec1f28a13e09711c012","unresolved":false,"context_lines":[{"line_number":1076,"context_line":"                mock.patch.object(self.mixin, \u0027_get_router_for_floatingip\u0027) \\"},{"line_number":1077,"context_line":"                as mock_router_fip, \\"},{"line_number":1078,"context_line":"                mock.patch.object(self.mixin, \u0027is_router_distributed\u0027,"},{"line_number":1079,"context_line":"                                  return_value\u003dTrue):"},{"line_number":1080,"context_line":"            port \u003d {portbindings.VNIC_TYPE: portbindings.VNIC_NORMAL}"},{"line_number":1081,"context_line":"            mock_fip_assoc_data.return_value \u003d (port, \u0027subnet_id\u0027, \u0027ip_addr\u0027)"},{"line_number":1082,"context_line":"            mock_router_fip.return_value \u003d \u0027router_id\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f79a3b5_7b22e155","line":1079,"range":{"start_line":1079,"start_character":34,"end_line":1079,"end_character":51},"updated":"2018-12-12 16:26:10.000000000","message":"It\u0027s better to add a follow-up patch to add test case \"type is invlid, and router is not distributed.\"","commit_id":"1966ad3945a7a44beeefc603f9d6da54ac67f9a3"}],"neutron/tests/unit/extensions/test_l3.py":[{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"940293cd5ded737dcd3385072640fe5e9fd68f49","unresolved":false,"context_lines":[{"line_number":3770,"context_line":"                               events.BEFORE_CREATE)"},{"line_number":3771,"context_line":"            with self.floatingip_with_assoc() as f:"},{"line_number":3772,"context_line":"                fake_method.assert_called_once_with("},{"line_number":3773,"context_line":"                    resources.FLOATING_IP, events.BEFORE_CREATE, mock.ANY,"},{"line_number":3774,"context_line":"                    context\u003dmock.ANY, port_id\u003df[\u0027floatingip\u0027][\u0027port_id\u0027])"},{"line_number":3775,"context_line":"        finally:"},{"line_number":3776,"context_line":"            registry.unsubscribe(fake_method, resources.FLOATING_IP,"},{"line_number":3777,"context_line":"                                 events.BEFORE_CREATE)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_f8610212","line":3774,"range":{"start_line":3773,"start_character":21,"end_line":3774,"end_character":72},"updated":"2018-10-18 16:41:06.000000000","message":"I think this should be changed since its now payload not kwargs ?","commit_id":"2669c795bfac76e68a6e35cefa7db9d62cc24a97"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d471a744a98bd0ee62a77f0629c9fa1623153700","unresolved":false,"context_lines":[{"line_number":3770,"context_line":"                               events.BEFORE_CREATE)"},{"line_number":3771,"context_line":"            with self.floatingip_with_assoc() as f:"},{"line_number":3772,"context_line":"                fake_method.assert_called_once_with("},{"line_number":3773,"context_line":"                    resources.FLOATING_IP, events.BEFORE_CREATE, mock.ANY,"},{"line_number":3774,"context_line":"                    context\u003dmock.ANY, port_id\u003df[\u0027floatingip\u0027][\u0027port_id\u0027])"},{"line_number":3775,"context_line":"        finally:"},{"line_number":3776,"context_line":"            registry.unsubscribe(fake_method, resources.FLOATING_IP,"},{"line_number":3777,"context_line":"                                 events.BEFORE_CREATE)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_733513dc","line":3774,"range":{"start_line":3773,"start_character":21,"end_line":3774,"end_character":72},"in_reply_to":"3f79a3b5_f8610212","updated":"2018-10-18 16:50:10.000000000","message":"Yes, I\u0027m modifying this now","commit_id":"2669c795bfac76e68a6e35cefa7db9d62cc24a97"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"940293cd5ded737dcd3385072640fe5e9fd68f49","unresolved":false,"context_lines":[{"line_number":3789,"context_line":"                    self._update(\u0027floatingips\u0027, fip[\u0027floatingip\u0027][\u0027id\u0027],"},{"line_number":3790,"context_line":"                                 {\u0027floatingip\u0027: {\u0027port_id\u0027: port_id}})"},{"line_number":3791,"context_line":"                    fake_method.assert_called_once_with("},{"line_number":3792,"context_line":"                        resources.FLOATING_IP, events.BEFORE_UPDATE, mock.ANY,"},{"line_number":3793,"context_line":"                        context\u003dmock.ANY, port_id\u003dport_id)"},{"line_number":3794,"context_line":"                finally:"},{"line_number":3795,"context_line":"                    registry.unsubscribe(fake_method, resources.FLOATING_IP,"},{"line_number":3796,"context_line":"                                         events.BEFORE_UPDATE)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_9866ce28","line":3793,"range":{"start_line":3792,"start_character":24,"end_line":3793,"end_character":57},"updated":"2018-10-18 16:41:06.000000000","message":"same comment as L3774","commit_id":"2669c795bfac76e68a6e35cefa7db9d62cc24a97"}],"neutron/tests/unit/plugins/ml2/test_plugin.py":[{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"bdca9f5086607c12e544849dc763d4843d49a087","unresolved":false,"context_lines":[{"line_number":1393,"context_line":""},{"line_number":1394,"context_line":"    def test__check_port_vnic_type_vnic_normal(self):"},{"line_number":1395,"context_line":"        with self.port() as port1:"},{"line_number":1396,"context_line":"            self.assertIsNone(self.plugin._check_port_vnic_type_for_fip("},{"line_number":1397,"context_line":"                mock.ANY, mock.ANY, mock.ANY,"},{"line_number":1398,"context_line":"                events.DBEventPayload(self.context,"},{"line_number":1399,"context_line":"                                      resource_id\u003dport1[\u0027port\u0027][\u0027id\u0027])))"},{"line_number":1400,"context_line":""},{"line_number":1401,"context_line":"    def test__check_port_vnic_type_vnic_no_normal(self):"},{"line_number":1402,"context_line":"        kwargs \u003d {portbindings.VNIC_TYPE: portbindings.VNIC_DIRECT}"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_e4887b1b","line":1399,"range":{"start_line":1396,"start_character":12,"end_line":1399,"end_character":72},"updated":"2018-10-18 19:54:07.000000000","message":"_check_port_vnic_type_for_fip doesn\u0027t return anything. if that method ever breaks things it would go unnoticed with this, IMO. asserIsNone is useless, either remove this test or I\u0027d suggest it to do this way.\n\n\ntry:\n  with self.port() as port1:\n     self.plugin._check_port_vnic_type_for_fip(\n                mock.ANY, mock.ANY, mock.ANY,\n                events.DBEventPayload(self.context,                                    \n                resource_id\u003dport1[\u0027port\u0027][\u0027id\u0027])\nexcept typeofexpection:\n       self.fail(\"message......\")","commit_id":"3406d527975040b3fdbc037e6df52187db8d830e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ef286540b76dc241eca90bd08b59f91a7353e093","unresolved":false,"context_lines":[{"line_number":1393,"context_line":""},{"line_number":1394,"context_line":"    def test__check_port_vnic_type_vnic_normal(self):"},{"line_number":1395,"context_line":"        with self.port() as port1:"},{"line_number":1396,"context_line":"            self.assertIsNone(self.plugin._check_port_vnic_type_for_fip("},{"line_number":1397,"context_line":"                mock.ANY, mock.ANY, mock.ANY,"},{"line_number":1398,"context_line":"                events.DBEventPayload(self.context,"},{"line_number":1399,"context_line":"                                      resource_id\u003dport1[\u0027port\u0027][\u0027id\u0027])))"},{"line_number":1400,"context_line":""},{"line_number":1401,"context_line":"    def test__check_port_vnic_type_vnic_no_normal(self):"},{"line_number":1402,"context_line":"        kwargs \u003d {portbindings.VNIC_TYPE: portbindings.VNIC_DIRECT}"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_6e28a935","line":1399,"range":{"start_line":1396,"start_character":12,"end_line":1399,"end_character":72},"in_reply_to":"3f79a3b5_abcc7dbe","updated":"2018-10-20 18:15:50.000000000","message":"If an exception is raised and not captured, the test will fail. I don\u0027t need to assert this, this is done by default.","commit_id":"3406d527975040b3fdbc037e6df52187db8d830e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"2b571a7d958add2cd472df2d0cdeaa462a331f24","unresolved":false,"context_lines":[{"line_number":1393,"context_line":""},{"line_number":1394,"context_line":"    def test__check_port_vnic_type_vnic_normal(self):"},{"line_number":1395,"context_line":"        with self.port() as port1:"},{"line_number":1396,"context_line":"            self.assertIsNone(self.plugin._check_port_vnic_type_for_fip("},{"line_number":1397,"context_line":"                mock.ANY, mock.ANY, mock.ANY,"},{"line_number":1398,"context_line":"                events.DBEventPayload(self.context,"},{"line_number":1399,"context_line":"                                      resource_id\u003dport1[\u0027port\u0027][\u0027id\u0027])))"},{"line_number":1400,"context_line":""},{"line_number":1401,"context_line":"    def test__check_port_vnic_type_vnic_no_normal(self):"},{"line_number":1402,"context_line":"        kwargs \u003d {portbindings.VNIC_TYPE: portbindings.VNIC_DIRECT}"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_a559135d","line":1399,"range":{"start_line":1396,"start_character":12,"end_line":1399,"end_character":72},"in_reply_to":"3f79a3b5_e4887b1b","updated":"2018-10-19 13:25:28.000000000","message":"I have this tests in the following function. Also we should avoid try/catch in tests, but we should use assertRise","commit_id":"3406d527975040b3fdbc037e6df52187db8d830e"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"940cb71ae78b3e3ff2dcf8625317736c532aaa59","unresolved":false,"context_lines":[{"line_number":1393,"context_line":""},{"line_number":1394,"context_line":"    def test__check_port_vnic_type_vnic_normal(self):"},{"line_number":1395,"context_line":"        with self.port() as port1:"},{"line_number":1396,"context_line":"            self.assertIsNone(self.plugin._check_port_vnic_type_for_fip("},{"line_number":1397,"context_line":"                mock.ANY, mock.ANY, mock.ANY,"},{"line_number":1398,"context_line":"                events.DBEventPayload(self.context,"},{"line_number":1399,"context_line":"                                      resource_id\u003dport1[\u0027port\u0027][\u0027id\u0027])))"},{"line_number":1400,"context_line":""},{"line_number":1401,"context_line":"    def test__check_port_vnic_type_vnic_no_normal(self):"},{"line_number":1402,"context_line":"        kwargs \u003d {portbindings.VNIC_TYPE: portbindings.VNIC_DIRECT}"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_abcc7dbe","line":1399,"range":{"start_line":1396,"start_character":12,"end_line":1399,"end_character":72},"in_reply_to":"3f79a3b5_e4887b1b","updated":"2018-10-19 17:00:46.000000000","message":"this is a positive case, I\u0027ve seen tests having try catch and they\u0027re fine, I think its way of testing assertNotRaises which doesn\u0027t exist.","commit_id":"3406d527975040b3fdbc037e6df52187db8d830e"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d1875cac125697eaaa33787a396a1794e7bf6185","unresolved":false,"context_lines":[{"line_number":1411,"context_line":"                                    mock.ANY, mock.ANY, mock.ANY, ctx,"},{"line_number":1412,"context_line":"                                    router_distributed\u003dTrue,"},{"line_number":1413,"context_line":"                                    floatingip_db\u003dmock_fip)"},{"line_number":1414,"context_line":"            msg \u003d (\"Port %s VNIC type must be \u0027normal\u0027, cannnot associate FIP \""},{"line_number":1415,"context_line":"                   \"in DVR mode\" % port1[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1416,"context_line":"            self.assertEqual(msg, exc.inner_exceptions[0])"},{"line_number":1417,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_eba783ba","line":1414,"range":{"start_line":1414,"start_character":56,"end_line":1414,"end_character":63},"updated":"2018-10-24 12:44:38.000000000","message":"cannot","commit_id":"a208a0ebeb4d8a7a715a1e7e69cbeb6b59da53a6"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"62dccbf0ecc3e335411c5111686de588d9963975","unresolved":false,"context_lines":[{"line_number":1411,"context_line":"                                    mock.ANY, mock.ANY, mock.ANY, ctx,"},{"line_number":1412,"context_line":"                                    router_distributed\u003dTrue,"},{"line_number":1413,"context_line":"                                    floatingip_db\u003dmock_fip)"},{"line_number":1414,"context_line":"            msg \u003d (\"Port %s VNIC type must be \u0027normal\u0027, cannnot associate FIP \""},{"line_number":1415,"context_line":"                   \"in DVR mode\" % port1[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1416,"context_line":"            self.assertEqual(msg, exc.inner_exceptions[0])"},{"line_number":1417,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_93e5e109","line":1414,"range":{"start_line":1414,"start_character":56,"end_line":1414,"end_character":63},"in_reply_to":"3f79a3b5_eba783ba","updated":"2018-10-24 14:33:14.000000000","message":"Done","commit_id":"a208a0ebeb4d8a7a715a1e7e69cbeb6b59da53a6"}]}
