)]}'
{"neutron/db/dvr_mac_db.py":[{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9f5fc1ce0c3e86f8938185a253ce826cae85b8a1","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        return ports_by_host"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    @log_helpers.log_method_call"},{"line_number":159,"context_line":"    def get_subnet_for_dvr(self, context, subnet_id, fixed_ips\u003dNone):"},{"line_number":160,"context_line":"        try:"},{"line_number":161,"context_line":"            subnet_info \u003d self.plugin.get_subnet("},{"line_number":162,"context_line":"                context, subnet_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa69d971_67ef6c1e","line":159,"range":{"start_line":159,"start_character":67,"end_line":159,"end_character":69},"updated":"2016-01-06 19:55:51.000000000","message":"There was a valid reason for adding this check in here when I fixed a bug related to error being thrown \"no gateway\".\n\nthis will be seen when we try to add a port to the router instead of a subnet.\nchange id: I87a3983951f814350e79f5e2274f4639bb6bc0f5\n\nI don\u0027t want to introduce the bug again for this fix.","commit_id":"e35143f71209fabdcf9fbbff178381260a118048"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"dd23fd8c0fb4a239903dcd6a47bddd6c9f6ed36e","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        return ports_by_host"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    @log_helpers.log_method_call"},{"line_number":159,"context_line":"    def get_subnet_for_dvr(self, context, subnet_id, fixed_ips\u003dNone):"},{"line_number":160,"context_line":"        try:"},{"line_number":161,"context_line":"            subnet_info \u003d self.plugin.get_subnet("},{"line_number":162,"context_line":"                context, subnet_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da6ed579_71e1109a","line":159,"updated":"2016-01-12 22:01:18.000000000","message":"so is it the case that either subnet_id or fixed_ips is used? I don\u0027t understand why the original code was required. Can you elaborate a bit Swami?","commit_id":"e35143f71209fabdcf9fbbff178381260a118048"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"281679e9a99e310ea9245219105181802ac7d001","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        return ports_by_host"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    @log_helpers.log_method_call"},{"line_number":159,"context_line":"    def get_subnet_for_dvr(self, context, subnet_id, fixed_ips\u003dNone):"},{"line_number":160,"context_line":"        try:"},{"line_number":161,"context_line":"            subnet_info \u003d self.plugin.get_subnet("},{"line_number":162,"context_line":"                context, subnet_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa69d971_c20b712a","line":159,"range":{"start_line":159,"start_character":67,"end_line":159,"end_character":69},"in_reply_to":"fa69d971_67ef6c1e","updated":"2016-01-07 19:20:49.000000000","message":"No problem, this might not cause any issue.\nWe don\u0027t need the subnet_id, when fixed_ips are passed.\nIt is safe to remove.\n\nSorry for the confusion.","commit_id":"e35143f71209fabdcf9fbbff178381260a118048"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"abfca07e397f279a842d27d008798060ead41818","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        return ports_by_host"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    @log_helpers.log_method_call"},{"line_number":159,"context_line":"    def get_subnet_for_dvr(self, context, subnet_id, fixed_ips\u003dNone):"},{"line_number":160,"context_line":"        try:"},{"line_number":161,"context_line":"            subnet_info \u003d self.plugin.get_subnet("},{"line_number":162,"context_line":"                context, subnet_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa69d971_945cc2ee","line":159,"range":{"start_line":159,"start_character":67,"end_line":159,"end_character":69},"in_reply_to":"fa69d971_c20b712a","updated":"2016-01-08 02:17:21.000000000","message":"Hi, Swami, your previous comments also confused me, but well, it\u0027s clear now, thanks for your review :)","commit_id":"e35143f71209fabdcf9fbbff178381260a118048"}],"neutron/tests/unit/db/test_dvr_mac_db.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d4bc0df51fdbcfdefd9c199fdf672d51ff293fd2","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                self.ctx, subnet_id)"},{"line_number":144,"context_line":"            ret2 \u003d self.mixin.get_subnet_for_dvr("},{"line_number":145,"context_line":"                self.ctx, subnet_id, fixed_ips)"},{"line_number":146,"context_line":"            self.assertEqual(ret1, ret2)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_d43006eb","line":146,"updated":"2016-01-17 14:04:42.000000000","message":"I think the result in line 146 will always be true, with/without your code. For example, because the \u0027subnet_id\u0027 in \u0027fixed_ips\u0027 equals with the subnet_id that is passed to the method, the UT should pass without your code.","commit_id":"0bc17d41264071200fa040c0c7e54471cbe942ea"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"1bf501362cddeebbec97f810d0a3ef3056770621","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                self.ctx, subnet_id)"},{"line_number":144,"context_line":"            ret2 \u003d self.mixin.get_subnet_for_dvr("},{"line_number":145,"context_line":"                self.ctx, subnet_id, fixed_ips)"},{"line_number":146,"context_line":"            self.assertEqual(ret1, ret2)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_dfa9ff7c","line":146,"in_reply_to":"da6ed579_d43006eb","updated":"2016-01-17 16:39:28.000000000","message":"Indeed, my plan for this test case is not only to test get_subnet_for_dvr itself, but also to test its caller.\n\nSince L160-163 in https://review.openstack.org/#/c/263563/3/neutron/db/dvr_mac_db.py is removed in this patch, and https://review.openstack.org/#/c/262574/ add plenty tests for get_subnet_for_dvr, so I want to also add a checking for make sure subnet and fixed_ips[0][\u0027subnet_id\u0027] should always be consistent.\n\nAn alternative way is adding a functional test, but I think that\u0027s too over test than current UT.","commit_id":"0bc17d41264071200fa040c0c7e54471cbe942ea"}]}
