)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"6adac4ee741a5a0842d482e47722501a54f9ff7f","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The MTU of VLAN subinterfaces must not be greater than"},{"line_number":10,"context_line":"MTU of the trunk port. This commit adds a check that"},{"line_number":11,"context_line":"verifies that this is indeed a case."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ic11e9a2cde4336e8e1533c56b63ff7aaf2b7a510"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa7ab95a_fa14ada0","line":11,"updated":"2016-08-30 15:25:46.000000000","message":"Would be cool to give some rationale here. For example, I find this kernel bug report interesting: https://bugzilla.kernel.org/show_bug.cgi?id\u003d13467","commit_id":"aa5e030d0d79ce13b13d2f056798f7e80e4eb61f"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"6adac4ee741a5a0842d482e47722501a54f9ff7f","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The MTU of VLAN subinterfaces must not be greater than"},{"line_number":10,"context_line":"MTU of the trunk port. This commit adds a check that"},{"line_number":11,"context_line":"verifies that this is indeed a case."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ic11e9a2cde4336e8e1533c56b63ff7aaf2b7a510"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa7ab95a_da1a89c5","line":11,"range":{"start_line":11,"start_character":29,"end_line":11,"end_character":30},"updated":"2016-08-30 15:25:46.000000000","message":"a-\u003ethe","commit_id":"aa5e030d0d79ce13b13d2f056798f7e80e4eb61f"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"3190ddbdd31af8fc35823e2d92bafc412dff805f","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The MTU of VLAN subinterfaces must not be greater than"},{"line_number":10,"context_line":"MTU of the trunk port. This commit adds a check that"},{"line_number":11,"context_line":"verifies that this is indeed a case."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ic11e9a2cde4336e8e1533c56b63ff7aaf2b7a510"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa7ab95a_c8c6fc48","line":11,"in_reply_to":"fa7ab95a_c8f1c36c","updated":"2016-08-31 13:45:51.000000000","message":"I think the fact that Linux does not even allow it makes it not a backend specific concern. I believe that other systems will behave the same way. It just makes total sense when you think about it: otherwise you basically try to \u0027tunnel\u0027 an oversized frame through a \u0027narrow\u0027 interface.","commit_id":"aa5e030d0d79ce13b13d2f056798f7e80e4eb61f"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"bd715b5b5d6b78991e2ba568717982eda365ae88","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The MTU of VLAN subinterfaces must not be greater than"},{"line_number":10,"context_line":"MTU of the trunk port. This commit adds a check that"},{"line_number":11,"context_line":"verifies that this is indeed a case."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ic11e9a2cde4336e8e1533c56b63ff7aaf2b7a510"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa7ab95a_5d3e4c2a","line":11,"in_reply_to":"fa7ab95a_c8f1c36c","updated":"2016-08-31 13:55:58.000000000","message":"It is the linux kernel implementation (not a driver) that limits tagged interface MTUs that must be smaller or equal to the one of corresponding untagged interface. Once this limitation is overcome, I believe this check can be removed. For further info, please see https://bugzilla.kernel.org/show_bug.cgi?id\u003d13467, namely comments 7 and 8","commit_id":"aa5e030d0d79ce13b13d2f056798f7e80e4eb61f"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"bd715b5b5d6b78991e2ba568717982eda365ae88","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The MTU of VLAN subinterfaces must not be greater than"},{"line_number":10,"context_line":"MTU of the trunk port. This commit adds a check that"},{"line_number":11,"context_line":"verifies that this is indeed a case."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ic11e9a2cde4336e8e1533c56b63ff7aaf2b7a510"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa7ab95a_e215bb9b","line":11,"range":{"start_line":11,"start_character":29,"end_line":11,"end_character":30},"in_reply_to":"fa7ab95a_da1a89c5","updated":"2016-08-31 13:55:58.000000000","message":"Done","commit_id":"aa5e030d0d79ce13b13d2f056798f7e80e4eb61f"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"bd715b5b5d6b78991e2ba568717982eda365ae88","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The MTU of VLAN subinterfaces must not be greater than"},{"line_number":10,"context_line":"MTU of the trunk port. This commit adds a check that"},{"line_number":11,"context_line":"verifies that this is indeed a case."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ic11e9a2cde4336e8e1533c56b63ff7aaf2b7a510"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa7ab95a_7d695025","line":11,"in_reply_to":"fa7ab95a_fa14ada0","updated":"2016-08-31 13:55:58.000000000","message":"Done","commit_id":"aa5e030d0d79ce13b13d2f056798f7e80e4eb61f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"ea5e25166daef9c5f671d2453c9ff84e200820c4","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The MTU of VLAN subinterfaces must not be greater than"},{"line_number":10,"context_line":"MTU of the trunk port. This commit adds a check that"},{"line_number":11,"context_line":"verifies that this is indeed a case."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ic11e9a2cde4336e8e1533c56b63ff7aaf2b7a510"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa7ab95a_c8f1c36c","line":11,"in_reply_to":"fa7ab95a_fa14ada0","updated":"2016-08-31 00:24:16.000000000","message":"so did we rule out the possibility of trunks capable of handling different MTUs? This might as well be a driver specific issue. I\u0027d be careful to enforce a blanket rule without too much knowledge of the problem.","commit_id":"aa5e030d0d79ce13b13d2f056798f7e80e4eb61f"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"6adac4ee741a5a0842d482e47722501a54f9ff7f","unresolved":false,"context_lines":[{"line_number":10,"context_line":"MTU of the trunk port. This commit adds a check that"},{"line_number":11,"context_line":"verifies that this is indeed a case."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ic11e9a2cde4336e8e1533c56b63ff7aaf2b7a510"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa7ab95a_fa2d8dfe","line":13,"updated":"2016-08-30 15:25:46.000000000","message":"You should attach it to ongoing vlan-aware-vms blueprint (Partially-Implements: ...)","commit_id":"aa5e030d0d79ce13b13d2f056798f7e80e4eb61f"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"bd715b5b5d6b78991e2ba568717982eda365ae88","unresolved":false,"context_lines":[{"line_number":10,"context_line":"MTU of the trunk port. This commit adds a check that"},{"line_number":11,"context_line":"verifies that this is indeed a case."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ic11e9a2cde4336e8e1533c56b63ff7aaf2b7a510"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa7ab95a_5d6c8c36","line":13,"in_reply_to":"fa7ab95a_fa2d8dfe","updated":"2016-08-31 13:55:58.000000000","message":"Done","commit_id":"aa5e030d0d79ce13b13d2f056798f7e80e4eb61f"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"99382193c6ae301d4dbfcf2fea9f355c5679a774","unresolved":false,"context_lines":[{"line_number":15,"context_line":"interfaces. For details of the current state, see"},{"line_number":16,"context_line":"https://bugzilla.kernel.org/show_bug.cgi?id\u003d13467, namely comments 7"},{"line_number":17,"context_line":"and 8. Once this limitation is overcome, it would be possible to remove"},{"line_number":18,"context_line":"this check."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Partially-Implements: blueprint vlan-aware-vms"},{"line_number":21,"context_line":"Change-Id: Ic11e9a2cde4336e8e1533c56b63ff7aaf2b7a510"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa7ab95a_937df9e9","line":18,"updated":"2016-08-31 17:16:37.000000000","message":"I think it\u0027s actually more broad. Linux kernel forbid it not just because they want it, but because a relaxed alternative does not make much physical sense. You would need your instance operating system to allow oversized frames to fit in through a narrower port, for which we enforce MTU from neutron side using ip link.","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"1b08b144119dace78f70969f15451ad5d49e276e","unresolved":false,"context_lines":[{"line_number":15,"context_line":"interfaces. For details of the current state, see"},{"line_number":16,"context_line":"https://bugzilla.kernel.org/show_bug.cgi?id\u003d13467, namely comments 7"},{"line_number":17,"context_line":"and 8. Once this limitation is overcome, it would be possible to remove"},{"line_number":18,"context_line":"this check."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Partially-Implements: blueprint vlan-aware-vms"},{"line_number":21,"context_line":"Change-Id: Ic11e9a2cde4336e8e1533c56b63ff7aaf2b7a510"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa7ab95a_92b95331","line":18,"in_reply_to":"fa7ab95a_937df9e9","updated":"2016-09-01 09:51:18.000000000","message":"I think the solution with logical separation of MTUs of physical interface and tagged/untagged subinterfaces on the OS level as described in comment 8 of the bug makes sense and works for other systems, though it is unlikely to get into Linux kernel in a foreseeable future. That said, I agree that it does make sense to support it as the kernel (thus also ip link command) would reject such settings.","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"}],"neutron/services/trunk/exceptions.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"796ae70119f89ad72166797a33d6c334907ba925","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"class SubPortMtuGreaterThanTrunkPortMtu(n_exc.Conflict):"},{"line_number":45,"context_line":"    message \u003d _(\"MTU %(port_mtu)s of subport %(port_id)s is greater \""},{"line_number":46,"context_line":"                \"than MTU %(trunk_mtu)s of trunk %(trunk_id)s.\")"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_29c4bc3e","line":45,"updated":"2016-08-31 17:24:09.000000000","message":"I\u0027d phrase this differently: MTU ... cannot be greater than...\n\nbut that\u0027s just me","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"1b08b144119dace78f70969f15451ad5d49e276e","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"class SubPortMtuGreaterThanTrunkPortMtu(n_exc.Conflict):"},{"line_number":45,"context_line":"    message \u003d _(\"MTU %(port_mtu)s of subport %(port_id)s is greater \""},{"line_number":46,"context_line":"                \"than MTU %(trunk_mtu)s of trunk %(trunk_id)s.\")"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_1929e637","line":45,"in_reply_to":"fa7ab95a_29c4bc3e","updated":"2016-09-01 09:51:18.000000000","message":"Done","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"}],"neutron/services/trunk/rules.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"ea5e25166daef9c5f671d2453c9ff84e200820c4","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            if msg:"},{"line_number":133,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":134,"context_line":"        if trunk_validation:"},{"line_number":135,"context_line":"            trunk_port_mtu \u003d self.get_port_mtu(context, self.trunk_port_id)"},{"line_number":136,"context_line":"            return [self._validate(context, s, trunk_port_mtu)"},{"line_number":137,"context_line":"                    for s in self.subports]"},{"line_number":138,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_08bacb6e","line":135,"updated":"2016-08-31 00:24:16.000000000","message":"I see no reason of computing trunk_port_mtu rather than directly in _validate(); can you elaborate?","commit_id":"aa5e030d0d79ce13b13d2f056798f7e80e4eb61f"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"bd715b5b5d6b78991e2ba568717982eda365ae88","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            if msg:"},{"line_number":133,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":134,"context_line":"        if trunk_validation:"},{"line_number":135,"context_line":"            trunk_port_mtu \u003d self.get_port_mtu(context, self.trunk_port_id)"},{"line_number":136,"context_line":"            return [self._validate(context, s, trunk_port_mtu)"},{"line_number":137,"context_line":"                    for s in self.subports]"},{"line_number":138,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_fdbf205e","line":135,"in_reply_to":"fa7ab95a_08bacb6e","updated":"2016-08-31 13:55:58.000000000","message":"_validate is called as many times as there are number of subports and calls get_network() and get_port(). Hence calculating that in advance saves a number of expensive calls  interacting with database.","commit_id":"aa5e030d0d79ce13b13d2f056798f7e80e4eb61f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"ea5e25166daef9c5f671d2453c9ff84e200820c4","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        else:"},{"line_number":139,"context_line":"            return self.subports"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def get_port_mtu(self, context, port_id):"},{"line_number":142,"context_line":"        core_plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":143,"context_line":"        try:"},{"line_number":144,"context_line":"            port \u003d core_plugin.get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_6857d726","line":141,"updated":"2016-08-31 00:24:16.000000000","message":"docsstring please.","commit_id":"aa5e030d0d79ce13b13d2f056798f7e80e4eb61f"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"bd715b5b5d6b78991e2ba568717982eda365ae88","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        else:"},{"line_number":139,"context_line":"            return self.subports"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def get_port_mtu(self, context, port_id):"},{"line_number":142,"context_line":"        core_plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":143,"context_line":"        try:"},{"line_number":144,"context_line":"            port \u003d core_plugin.get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_3d16e855","line":141,"in_reply_to":"fa7ab95a_6857d726","updated":"2016-08-31 13:55:58.000000000","message":"Done","commit_id":"aa5e030d0d79ce13b13d2f056798f7e80e4eb61f"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"6adac4ee741a5a0842d482e47722501a54f9ff7f","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        core_plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":143,"context_line":"        try:"},{"line_number":144,"context_line":"            port \u003d core_plugin.get_port(context, port_id)"},{"line_number":145,"context_line":"            net \u003d core_plugin.get_network(context, port[\u0027network_id\u0027])"},{"line_number":146,"context_line":"            return net[api.MTU]"},{"line_number":147,"context_line":"        except (n_exc.PortNotFound, n_exc.NetworkNotFound):"},{"line_number":148,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_5aa11945","line":145,"updated":"2016-08-30 15:25:46.000000000","message":"minor: do we really need to fetch the network multiple times if it happens that multiple subports belong to the same network (is it even possible with the current code?)","commit_id":"aa5e030d0d79ce13b13d2f056798f7e80e4eb61f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"ea5e25166daef9c5f671d2453c9ff84e200820c4","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        core_plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":143,"context_line":"        try:"},{"line_number":144,"context_line":"            port \u003d core_plugin.get_port(context, port_id)"},{"line_number":145,"context_line":"            net \u003d core_plugin.get_network(context, port[\u0027network_id\u0027])"},{"line_number":146,"context_line":"            return net[api.MTU]"},{"line_number":147,"context_line":"        except (n_exc.PortNotFound, n_exc.NetworkNotFound):"},{"line_number":148,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_c84d439b","line":145,"in_reply_to":"fa7ab95a_5aa11945","updated":"2016-08-31 00:24:16.000000000","message":"although possible, it does not make much sense to trunk the same network twice, we should perhaps consider preventing that, but that would be for another patch.","commit_id":"aa5e030d0d79ce13b13d2f056798f7e80e4eb61f"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"6adac4ee741a5a0842d482e47722501a54f9ff7f","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        except (n_exc.PortNotFound, n_exc.NetworkNotFound):"},{"line_number":148,"context_line":"            return"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def _validate(self, context, subport, trunk_mtu\u003dNone):"},{"line_number":151,"context_line":"        # Check that the subport doesn\u0027t reference the same port_id as a"},{"line_number":152,"context_line":"        # trunk we may be in the middle of trying to create, in other words"},{"line_number":153,"context_line":"        # make the validation idiot proof."}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_3a6c5507","line":150,"updated":"2016-08-30 15:25:46.000000000","message":"is there a case where trunk_mtu is not passed? If not, then maybe make it required.","commit_id":"aa5e030d0d79ce13b13d2f056798f7e80e4eb61f"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"bd715b5b5d6b78991e2ba568717982eda365ae88","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        except (n_exc.PortNotFound, n_exc.NetworkNotFound):"},{"line_number":148,"context_line":"            return"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def _validate(self, context, subport, trunk_mtu\u003dNone):"},{"line_number":151,"context_line":"        # Check that the subport doesn\u0027t reference the same port_id as a"},{"line_number":152,"context_line":"        # trunk we may be in the middle of trying to create, in other words"},{"line_number":153,"context_line":"        # make the validation idiot proof."}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_5daf2c2b","line":150,"in_reply_to":"fa7ab95a_3a6c5507","updated":"2016-08-31 13:55:58.000000000","message":"Done","commit_id":"aa5e030d0d79ce13b13d2f056798f7e80e4eb61f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"796ae70119f89ad72166797a33d6c334907ba925","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from neutron.extensions import portbindings"},{"line_number":21,"context_line":"from neutron import manager"},{"line_number":22,"context_line":"from neutron.objects import trunk as trunk_objects"},{"line_number":23,"context_line":"from neutron.plugins.ml2 import driver_api as api"},{"line_number":24,"context_line":"from neutron.services.trunk import exceptions as trunk_exc"},{"line_number":25,"context_line":"from neutron.services.trunk import utils"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_695fa475","line":23,"updated":"2016-08-31 17:24:09.000000000","message":"I find weird that the MTU variable is defined in this module. I wonder if they are supposed to be relocated.","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"796ae70119f89ad72166797a33d6c334907ba925","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            if msg:"},{"line_number":133,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":134,"context_line":"        if trunk_validation:"},{"line_number":135,"context_line":"            trunk_port_mtu \u003d self.get_port_mtu(context, self.trunk_port_id)"},{"line_number":136,"context_line":"            return [self._validate(context, s, trunk_port_mtu)"},{"line_number":137,"context_line":"                    for s in self.subports]"},{"line_number":138,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_8935c8f8","line":135,"updated":"2016-08-31 17:24:09.000000000","message":"perhaps this can be computed in __init__ and keep the _validate() method signature more coherent.","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"1b08b144119dace78f70969f15451ad5d49e276e","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            if msg:"},{"line_number":133,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":134,"context_line":"        if trunk_validation:"},{"line_number":135,"context_line":"            trunk_port_mtu \u003d self.get_port_mtu(context, self.trunk_port_id)"},{"line_number":136,"context_line":"            return [self._validate(context, s, trunk_port_mtu)"},{"line_number":137,"context_line":"                    for s in self.subports]"},{"line_number":138,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_c5edd38f","line":135,"in_reply_to":"fa7ab95a_8935c8f8","updated":"2016-09-01 09:51:18.000000000","message":"Right, then context parameter needs to be introduced to __init__ as well, stored to self and signatures of the other methods can be cleaned. For the sake of consistency I\u0027ll amend TrunkPortValidator as well.","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8c9d421863e4b85cd4753b8562018c02d23bbc34","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            if msg:"},{"line_number":133,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":134,"context_line":"        if trunk_validation:"},{"line_number":135,"context_line":"            trunk_port_mtu \u003d self.get_port_mtu(context, self.trunk_port_id)"},{"line_number":136,"context_line":"            return [self._validate(context, s, trunk_port_mtu)"},{"line_number":137,"context_line":"                    for s in self.subports]"},{"line_number":138,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_d5a71e4e","line":135,"in_reply_to":"fa7ab95a_c5edd38f","updated":"2016-09-01 16:40:00.000000000","message":"um, you know what..the new patchset looks worse than I anticipated, perhaps computing it here is not that bad after all.","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"43b3d1dca6924a314a0dc89617e0da2706c8c80c","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            if msg:"},{"line_number":133,"context_line":"                raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":134,"context_line":"        if trunk_validation:"},{"line_number":135,"context_line":"            trunk_port_mtu \u003d self.get_port_mtu(context, self.trunk_port_id)"},{"line_number":136,"context_line":"            return [self._validate(context, s, trunk_port_mtu)"},{"line_number":137,"context_line":"                    for s in self.subports]"},{"line_number":138,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_15198688","line":135,"in_reply_to":"fa7ab95a_d5a71e4e","updated":"2016-09-01 16:41:26.000000000","message":"I gave you a bad advice, sorry. Let me rectify that.","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"0c827a816373dc3e4e1d682898115232fdda4aed","unresolved":false,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def get_port_mtu(self, context, port_id):"},{"line_number":142,"context_line":"        \"\"\""},{"line_number":143,"context_line":"        Returns MTU for the network where the given port belongs to."},{"line_number":144,"context_line":"        If the network or port cannot be obtained, or if MTU is not defined,"},{"line_number":145,"context_line":"        returns None."},{"line_number":146,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_a298e16b","line":143,"updated":"2016-08-31 18:13:49.000000000","message":"Returns -\u003e Return","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"1b08b144119dace78f70969f15451ad5d49e276e","unresolved":false,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def get_port_mtu(self, context, port_id):"},{"line_number":142,"context_line":"        \"\"\""},{"line_number":143,"context_line":"        Returns MTU for the network where the given port belongs to."},{"line_number":144,"context_line":"        If the network or port cannot be obtained, or if MTU is not defined,"},{"line_number":145,"context_line":"        returns None."},{"line_number":146,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_25383f3d","line":143,"in_reply_to":"fa7ab95a_a298e16b","updated":"2016-09-01 09:51:18.000000000","message":"Done","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"99382193c6ae301d4dbfcf2fea9f355c5679a774","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            port \u003d core_plugin.get_port(context, port_id)"},{"line_number":150,"context_line":"            net \u003d core_plugin.get_network(context, port[\u0027network_id\u0027])"},{"line_number":151,"context_line":"            return net[api.MTU]"},{"line_number":152,"context_line":"        except (n_exc.PortNotFound, n_exc.NetworkNotFound, KeyError):"},{"line_number":153,"context_line":"            return"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _validate(self, context, subport, trunk_mtu):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_9367b924","line":152,"updated":"2016-08-31 17:16:37.000000000","message":"when do you expect KeyError to happen? Do you think you will see port without network_id?","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"1b08b144119dace78f70969f15451ad5d49e276e","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            port \u003d core_plugin.get_port(context, port_id)"},{"line_number":150,"context_line":"            net \u003d core_plugin.get_network(context, port[\u0027network_id\u0027])"},{"line_number":151,"context_line":"            return net[api.MTU]"},{"line_number":152,"context_line":"        except (n_exc.PortNotFound, n_exc.NetworkNotFound, KeyError):"},{"line_number":153,"context_line":"            return"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _validate(self, context, subport, trunk_mtu):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_a571af46","line":152,"in_reply_to":"fa7ab95a_6cedf28d","updated":"2016-09-01 09:51:18.000000000","message":"Good point, added extension reqirement to the test","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f7e46daf2e8ad870cc8e500d7ab9ebae70646bd4","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            port \u003d core_plugin.get_port(context, port_id)"},{"line_number":150,"context_line":"            net \u003d core_plugin.get_network(context, port[\u0027network_id\u0027])"},{"line_number":151,"context_line":"            return net[api.MTU]"},{"line_number":152,"context_line":"        except (n_exc.PortNotFound, n_exc.NetworkNotFound, KeyError):"},{"line_number":153,"context_line":"            return"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _validate(self, context, subport, trunk_mtu):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_6cedf28d","line":152,"in_reply_to":"fa7ab95a_9367b924","updated":"2016-08-31 17:29:34.000000000","message":"Oh I get it: it may be when plugin does not support mtu extension. Meaning the API test should require mtu extension too?..","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"0c827a816373dc3e4e1d682898115232fdda4aed","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        if subport[\u0027port_id\u0027] \u003d\u003d self.trunk_port_id:"},{"line_number":160,"context_line":"            raise trunk_exc.ParentPortInUse(port_id\u003dsubport[\u0027port_id\u0027])"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        if trunk_mtu:"},{"line_number":163,"context_line":"            port_mtu \u003d self.get_port_mtu(context, subport[\u0027port_id\u0027])"},{"line_number":164,"context_line":"            if port_mtu \u003e trunk_mtu:"},{"line_number":165,"context_line":"                raise trunk_exc.SubPortMtuGreaterThanTrunkPortMtu("}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_a259c190","line":162,"updated":"2016-08-31 18:13:49.000000000","message":"I think it\u0027s worth adding a note here that this rule enforcement is indeed optional, in that if for whatever reason trunk_mtu is not available, the rule can\u0027t be enforced. On the other hand, this makes me wonder what\u0027s the best course of action: whether to run it optionally or to force the trunk extension to depend on the MTU extension (right now it depends on binding, for obvious reasons). I am leaning on the former.\n\nEither way: a comment would be nice.","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"1b08b144119dace78f70969f15451ad5d49e276e","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        if subport[\u0027port_id\u0027] \u003d\u003d self.trunk_port_id:"},{"line_number":160,"context_line":"            raise trunk_exc.ParentPortInUse(port_id\u003dsubport[\u0027port_id\u0027])"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        if trunk_mtu:"},{"line_number":163,"context_line":"            port_mtu \u003d self.get_port_mtu(context, subport[\u0027port_id\u0027])"},{"line_number":164,"context_line":"            if port_mtu \u003e trunk_mtu:"},{"line_number":165,"context_line":"                raise trunk_exc.SubPortMtuGreaterThanTrunkPortMtu("}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_e52d77fe","line":162,"in_reply_to":"fa7ab95a_a259c190","updated":"2016-09-01 09:51:18.000000000","message":"Done","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"3fa1aa23538d6f228522d624d0c8887124dcdc10","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"class TrunkPortValidator(object):"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def __init__(self, context, port_id):"},{"line_number":58,"context_line":"        self.context \u003d context"},{"line_number":59,"context_line":"        self.port_id \u003d port_id"},{"line_number":60,"context_line":"        self._port \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa7ab95a_5dbc306c","line":57,"updated":"2016-09-01 11:07:28.000000000","message":"all those changes to switch to self.context, while I agree of benefit, not sure we want to complicate the review process by merging those with the bug fix.","commit_id":"6745841dc7ff7b605d1e95cac7589f027e0b4345"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"4f0882fe7cb997231c36e29a9bd8d41b0270b069","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"class TrunkPortValidator(object):"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def __init__(self, context, port_id):"},{"line_number":58,"context_line":"        self.context \u003d context"},{"line_number":59,"context_line":"        self.port_id \u003d port_id"},{"line_number":60,"context_line":"        self._port \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa7ab95a_609b07ca","line":57,"in_reply_to":"fa7ab95a_5dbc306c","updated":"2016-09-01 11:09:48.000000000","message":"Nevermind, I see it was triggered by Armando\u0027s suggestion in PS2. I am fine with it.","commit_id":"6745841dc7ff7b605d1e95cac7589f027e0b4345"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"3fa1aa23538d6f228522d624d0c8887124dcdc10","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            port \u003d core_plugin.get_port(self.context, port_id)"},{"line_number":154,"context_line":"            net \u003d core_plugin.get_network(self.context, port[\u0027network_id\u0027])"},{"line_number":155,"context_line":"            return net[api.MTU]"},{"line_number":156,"context_line":"        except (n_exc.PortNotFound, n_exc.NetworkNotFound, KeyError):"},{"line_number":157,"context_line":"            return"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def _validate(self, subport):"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa7ab95a_bd0ffc86","line":156,"updated":"2016-09-01 11:07:28.000000000","message":"should we reduce the scope to catch the KeyError error to just line 155? Otherwise we can swallow some errors coming from lines 153-154. Same for other exceptions caught here.","commit_id":"6745841dc7ff7b605d1e95cac7589f027e0b4345"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"55517113acb3834d3ba80bf6614d61a338cf272f","unresolved":false,"context_lines":[{"line_number":157,"context_line":"            return"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        try:"},{"line_number":160,"context_line":"            return net[api.MTU]"},{"line_number":161,"context_line":"        except KeyError:"},{"line_number":162,"context_line":"            # The MTU extension is not avaiable."},{"line_number":163,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_67352145","line":160,"updated":"2016-09-05 09:11:25.000000000","message":"I was thinking, if we know in advance that MTU extension is not enabled for the core plugin, then maybe it\u0027s wasteful to call lines 150-151? We could call get_supported_extension_aliases for PluginAwareExtensionManager to determine that.","commit_id":"e152c8527156f476e40dc5d999405cacde115821"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"54f87780a9918da3a98c4a9f7a00f2328451d14f","unresolved":false,"context_lines":[{"line_number":156,"context_line":"            # a None MTU here."},{"line_number":157,"context_line":"            return"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        try:"},{"line_number":160,"context_line":"            return net[api.MTU]"},{"line_number":161,"context_line":"        except KeyError:"},{"line_number":162,"context_line":"            # The MTU extension is not avaiable."},{"line_number":163,"context_line":"            return"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def _validate(self, context, subport, trunk_port_mtu):"},{"line_number":166,"context_line":"        # Check that the subport doesn\u0027t reference the same port_id as a"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_10ee5b8b","line":163,"range":{"start_line":159,"start_character":0,"end_line":163,"end_character":18},"updated":"2016-09-04 19:45:54.000000000","message":"Nit: Even though I\u0027m a fan of EAFP, I\u0027d use:\n\n return net.get(api.MTU)","commit_id":"e152c8527156f476e40dc5d999405cacde115821"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"54f87780a9918da3a98c4a9f7a00f2328451d14f","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        # the MTU sanity check cannot be enforced."},{"line_number":175,"context_line":"        if trunk_port_mtu:"},{"line_number":176,"context_line":"            port_mtu \u003d self._get_port_mtu(context, subport[\u0027port_id\u0027])"},{"line_number":177,"context_line":"            if port_mtu and port_mtu \u003e trunk_port_mtu:"},{"line_number":178,"context_line":"                raise trunk_exc.SubPortMtuGreaterThanTrunkPortMtu("},{"line_number":179,"context_line":"                    port_id\u003dsubport[\u0027port_id\u0027],"},{"line_number":180,"context_line":"                    port_mtu\u003dport_mtu,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_30f35f75","line":177,"range":{"start_line":177,"start_character":15,"end_line":177,"end_character":28},"updated":"2016-09-04 19:45:54.000000000","message":"Nit: This is redundant","commit_id":"e152c8527156f476e40dc5d999405cacde115821"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"c99a94b03f8d7bb5b6bccbace04c355de4140766","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        # the MTU sanity check cannot be enforced."},{"line_number":175,"context_line":"        if trunk_port_mtu:"},{"line_number":176,"context_line":"            port_mtu \u003d self._get_port_mtu(context, subport[\u0027port_id\u0027])"},{"line_number":177,"context_line":"            if port_mtu and port_mtu \u003e trunk_port_mtu:"},{"line_number":178,"context_line":"                raise trunk_exc.SubPortMtuGreaterThanTrunkPortMtu("},{"line_number":179,"context_line":"                    port_id\u003dsubport[\u0027port_id\u0027],"},{"line_number":180,"context_line":"                    port_mtu\u003dport_mtu,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_5bbb9fc4","line":177,"range":{"start_line":177,"start_character":15,"end_line":177,"end_character":28},"in_reply_to":"9a89bdaa_30f35f75","updated":"2016-09-05 05:45:49.000000000","message":"It is not:\nhttp://logs.openstack.org/17/362917/4/check/gate-neutron-python34/90b1ce8/console.html#_2016-09-01_12_26_59_579358","commit_id":"e152c8527156f476e40dc5d999405cacde115821"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"6d424e88ca38d7bf878f001253d7c83a8a772bd8","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        # the MTU sanity check cannot be enforced."},{"line_number":175,"context_line":"        if trunk_port_mtu:"},{"line_number":176,"context_line":"            port_mtu \u003d self._get_port_mtu(context, subport[\u0027port_id\u0027])"},{"line_number":177,"context_line":"            if port_mtu and port_mtu \u003e trunk_port_mtu:"},{"line_number":178,"context_line":"                raise trunk_exc.SubPortMtuGreaterThanTrunkPortMtu("},{"line_number":179,"context_line":"                    port_id\u003dsubport[\u0027port_id\u0027],"},{"line_number":180,"context_line":"                    port_mtu\u003dport_mtu,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_75f30c74","line":177,"range":{"start_line":177,"start_character":15,"end_line":177,"end_character":28},"in_reply_to":"9a89bdaa_5bbb9fc4","updated":"2016-09-05 08:23:38.000000000","message":"Aha, I still keep ignoring py3 :-/","commit_id":"e152c8527156f476e40dc5d999405cacde115821"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"19f9695c0b196545946d618c84ff9cb79f8f2fba","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        \"\"\""},{"line_number":149,"context_line":"        core_plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        if not n_utils.is_extension_supported(core_plugin, \u0027net-mtu\u0027):"},{"line_number":152,"context_line":"            return"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a89bdaa_4ea672c2","line":151,"updated":"2016-09-05 10:35:52.000000000","message":"(No action required) It sucks we don\u0027t really have a constant to use here. :(","commit_id":"58abb3d9cc01a7c4888d0bd0c1fb96c78154c714"}],"neutron/tests/contrib/hooks/trunk_mtu":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1ba4a3dc102e2f4d19ba2e87f93d672580326513","unresolved":false,"context_lines":[{"line_number":6,"context_line":"[[post-config|/$Q_PLUGIN_CONF_FILE]]"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"[ml2]"},{"line_number":9,"context_line":"type_drivers\u003dflat,geneve,vlan,gre,local,vxlan"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"fa7ab95a_7dbafec1","line":9,"updated":"2016-08-31 18:20:00.000000000","message":"One other reason for having these tackled separately is also because this hook may not be specific to trunks after all.","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"1b08b144119dace78f70969f15451ad5d49e276e","unresolved":false,"context_lines":[{"line_number":6,"context_line":"[[post-config|/$Q_PLUGIN_CONF_FILE]]"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"[ml2]"},{"line_number":9,"context_line":"type_drivers\u003dflat,geneve,vlan,gre,local,vxlan"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"fa7ab95a_52f8ab7c","line":9,"in_reply_to":"fa7ab95a_7dbafec1","updated":"2016-09-01 09:51:18.000000000","message":"I will extract the API tests into a separate commit so that the check can get in and the question on including API tests can be discussed separately.","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"}],"neutron/tests/tempest/api/test_trunk.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"92977ca9d0db03e00a1c195de7b214f7a079ea1f","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        self.assertEqual(1, len(observed_subports))"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"class TrunkTestMtusJSON(TrunkTestJSONBase):"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    @classmethod"},{"line_number":194,"context_line":"    def skip_checks(cls):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_5690bfec","line":191,"updated":"2016-08-31 17:06:14.000000000","message":"I am hesitant to make this tested at the API layer, the coverage seems superfluous. My suggestion is to remove it and avoid the complication of having to deal with tempest config changes.","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"1b08b144119dace78f70969f15451ad5d49e276e","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        self.assertEqual(1, len(observed_subports))"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"class TrunkTestMtusJSON(TrunkTestJSONBase):"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    @classmethod"},{"line_number":194,"context_line":"    def skip_checks(cls):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_72c5af3b","line":191,"in_reply_to":"fa7ab95a_385fa40f","updated":"2016-09-01 09:51:18.000000000","message":"I will extract the API tests into a separate commit so that the check can get in and the question on including API tests can be discussed separately.","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"f03aa3402c5b69124ff511531bcbfa871db6ce4c","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        self.assertEqual(1, len(observed_subports))"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"class TrunkTestMtusJSON(TrunkTestJSONBase):"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    @classmethod"},{"line_number":194,"context_line":"    def skip_checks(cls):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_385fa40f","line":191,"in_reply_to":"fa7ab95a_4255551b","updated":"2016-08-31 18:26:24.000000000","message":"To be sure I state my position correctly: I am supportive of API coverage in general; I am just a tad concerned of the level of details exposed here and I wouldn\u0027t want to rush into making a bad decision in the interest of merging this rule enforcement in time for feature freeze.","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"99382193c6ae301d4dbfcf2fea9f355c5679a774","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        self.assertEqual(1, len(observed_subports))"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"class TrunkTestMtusJSON(TrunkTestJSONBase):"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    @classmethod"},{"line_number":194,"context_line":"    def skip_checks(cls):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_c9d510ba","line":191,"in_reply_to":"fa7ab95a_5690bfec","updated":"2016-08-31 17:16:37.000000000","message":"This is API validation matter, that\u0027s why I asked Hynek before to add the api test. Otherwise other plugins implementing the same extension cannot validate their behaviour using existing tests.","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e7ac27b802b40a11c317364b049427c34a53f3f5","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        self.assertEqual(1, len(observed_subports))"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"class TrunkTestMtusJSON(TrunkTestJSONBase):"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    @classmethod"},{"line_number":194,"context_line":"    def skip_checks(cls):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_ec94a245","line":191,"in_reply_to":"fa7ab95a_6c0412c6","updated":"2016-08-31 17:26:28.000000000","message":"Right. But you can create networks with different MTUs only when your plugin supports providernet extension AND setup allows different types.","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"796ae70119f89ad72166797a33d6c334907ba925","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        self.assertEqual(1, len(observed_subports))"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"class TrunkTestMtusJSON(TrunkTestJSONBase):"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    @classmethod"},{"line_number":194,"context_line":"    def skip_checks(cls):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_6c0412c6","line":191,"in_reply_to":"fa7ab95a_c9d510ba","updated":"2016-08-31 17:24:09.000000000","message":"Hang on: we\u0027re not making the logic driver dependent, are we? The rule introduced is clearly applied regardless of the deployment configuration. All plugins should behave the same.","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"0c827a816373dc3e4e1d682898115232fdda4aed","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        self.assertEqual(1, len(observed_subports))"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"class TrunkTestMtusJSON(TrunkTestJSONBase):"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    @classmethod"},{"line_number":194,"context_line":"    def skip_checks(cls):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_4255551b","line":191,"in_reply_to":"fa7ab95a_ec94a245","updated":"2016-08-31 18:13:49.000000000","message":"My suggestion would be to defer these tests until we have figure out a cleaner way to abstract some of the implementation details required in these tests and their setup. After all, unit tests already provide the same coverage these tests provide. Thoughts?","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"99382193c6ae301d4dbfcf2fea9f355c5679a774","unresolved":false,"context_lines":[{"line_number":193,"context_line":"    @classmethod"},{"line_number":194,"context_line":"    def skip_checks(cls):"},{"line_number":195,"context_line":"        super(TrunkTestMtusJSON, cls).skip_checks()"},{"line_number":196,"context_line":"        if not test.is_extension_enabled(\u0027trunk\u0027, \u0027network\u0027):"},{"line_number":197,"context_line":"            msg \u003d \"trunk extension not enabled.\""},{"line_number":198,"context_line":"            raise cls.skipException(msg)"},{"line_number":199,"context_line":"        if any(t"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_d60daf38","line":196,"updated":"2016-08-31 17:16:37.000000000","message":"don\u0027t we also need provider extension?","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"1b08b144119dace78f70969f15451ad5d49e276e","unresolved":false,"context_lines":[{"line_number":193,"context_line":"    @classmethod"},{"line_number":194,"context_line":"    def skip_checks(cls):"},{"line_number":195,"context_line":"        super(TrunkTestMtusJSON, cls).skip_checks()"},{"line_number":196,"context_line":"        if not test.is_extension_enabled(\u0027trunk\u0027, \u0027network\u0027):"},{"line_number":197,"context_line":"            msg \u003d \"trunk extension not enabled.\""},{"line_number":198,"context_line":"            raise cls.skipException(msg)"},{"line_number":199,"context_line":"        if any(t"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_3285e706","line":196,"in_reply_to":"fa7ab95a_d60daf38","updated":"2016-09-01 09:51:18.000000000","message":"Done","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"99382193c6ae301d4dbfcf2fea9f355c5679a774","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        vxlan_kwargs \u003d {\u0027network_name\u0027: data_utils.rand_name(\u0027vxlan-net-\u0027),"},{"line_number":209,"context_line":"                        \u0027provider:network_type\u0027: \u0027vxlan\u0027,"},{"line_number":210,"context_line":"                        \u0027provider:segmentation_id\u0027: 100}"},{"line_number":211,"context_line":"        self.vxlan_net \u003d self.create_shared_network(**vxlan_kwargs)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        gre_kwargs \u003d {\u0027network_name\u0027: data_utils.rand_name(\u0027gre-net-\u0027),"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_36625bd9","line":210,"updated":"2016-08-31 17:16:37.000000000","message":"what if the setup does not have this exact ID? Can we rely on neutron to allocate it?","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"1b08b144119dace78f70969f15451ad5d49e276e","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        vxlan_kwargs \u003d {\u0027network_name\u0027: data_utils.rand_name(\u0027vxlan-net-\u0027),"},{"line_number":209,"context_line":"                        \u0027provider:network_type\u0027: \u0027vxlan\u0027,"},{"line_number":210,"context_line":"                        \u0027provider:segmentation_id\u0027: 100}"},{"line_number":211,"context_line":"        self.vxlan_net \u003d self.create_shared_network(**vxlan_kwargs)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        gre_kwargs \u003d {\u0027network_name\u0027: data_utils.rand_name(\u0027gre-net-\u0027),"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_f22e1f41","line":210,"in_reply_to":"fa7ab95a_36625bd9","updated":"2016-09-01 09:51:18.000000000","message":"oh yeah, we can :)","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"99382193c6ae301d4dbfcf2fea9f355c5679a774","unresolved":false,"context_lines":[{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        gre_kwargs \u003d {\u0027network_name\u0027: data_utils.rand_name(\u0027gre-net-\u0027),"},{"line_number":214,"context_line":"                      \u0027provider:network_type\u0027: \u0027gre\u0027,"},{"line_number":215,"context_line":"                      \u0027provider:segmentation_id\u0027: 101}"},{"line_number":216,"context_line":"        self.gre_net \u003d self.create_shared_network(**gre_kwargs)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"        self.vxlan_port \u003d self.create_port(self.vxlan_net)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_969fa7b3","line":215,"updated":"2016-08-31 17:16:37.000000000","message":"ditto","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"}],"neutron/tests/unit/services/trunk/test_rules.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"ea5e25166daef9c5f671d2453c9ff84e200820c4","unresolved":false,"context_lines":[{"line_number":33,"context_line":"from neutron.tests.unit.services.trunk import fakes"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class SubPortsValidatorTestCase(test_plugin.Ml2PluginV2TestCase):"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def setUp(self):"},{"line_number":39,"context_line":"        super(SubPortsValidatorTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_a8163f56","line":36,"updated":"2016-08-31 00:24:16.000000000","message":"Please consider writing a different test case and leave this untouched.","commit_id":"aa5e030d0d79ce13b13d2f056798f7e80e4eb61f"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"bd715b5b5d6b78991e2ba568717982eda365ae88","unresolved":false,"context_lines":[{"line_number":33,"context_line":"from neutron.tests.unit.services.trunk import fakes"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class SubPortsValidatorTestCase(test_plugin.Ml2PluginV2TestCase):"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def setUp(self):"},{"line_number":39,"context_line":"        super(SubPortsValidatorTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_22024370","line":36,"in_reply_to":"fa7ab95a_a8163f56","updated":"2016-08-31 13:55:58.000000000","message":"I\u0027d like to leave it untouched but since with the change in rules.py the validator needs to fetch port and network details, it needs to access core plugin that is not set in BaseTestCase. Hence I\u0027ll split the testcase but will have to introduce mock for the core plugin.","commit_id":"aa5e030d0d79ce13b13d2f056798f7e80e4eb61f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"796ae70119f89ad72166797a33d6c334907ba925","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.segmentation_types \u003d {constants.VLAN: utils.is_valid_vlan_tag}"},{"line_number":42,"context_line":"        self.context \u003d mock.ANY"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        self.get_plugin \u003d mock.patch(\u0027neutron.manager.NeutronManager\u0027"},{"line_number":45,"context_line":"                                     \u0027.get_plugin\u0027).start()"},{"line_number":46,"context_line":"        self.get_plugin.return_value \u003d mock.MagicMock()"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_cc5b5e2d","line":44,"updated":"2016-08-31 17:24:09.000000000","message":"rather than mocking the entire plugin we could mock get_mtu here.","commit_id":"6ef0073ac970887dc20b447cb719dc416a71b5ac"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"3fa1aa23538d6f228522d624d0c8887124dcdc10","unresolved":false,"context_lines":[{"line_number":128,"context_line":"                          basic_validation\u003dTrue)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"class SubPortsValidatorMtuSanityTestCase(test_plugin.Ml2PluginV2TestCase):"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def setUp(self):"},{"line_number":134,"context_line":"        super(SubPortsValidatorMtuSanityTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa7ab95a_a0098f2e","line":131,"updated":"2016-09-01 11:07:28.000000000","message":"_get_port_mtu method is not covered. Would be great to see tests targeting cases like: plugin does not return MTU for fetched networks, port not found, network not present, ...","commit_id":"6745841dc7ff7b605d1e95cac7589f027e0b4345"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"5b0ac1061b7e4a048a9ba4d0b78ec4da113f08ee","unresolved":false,"context_lines":[{"line_number":128,"context_line":"                          basic_validation\u003dTrue)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"class SubPortsValidatorMtuSanityTestCase(test_plugin.Ml2PluginV2TestCase):"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def setUp(self):"},{"line_number":134,"context_line":"        super(SubPortsValidatorMtuSanityTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa7ab95a_514a57ad","line":131,"in_reply_to":"fa7ab95a_a0098f2e","updated":"2016-09-01 12:05:16.000000000","message":"When port is not found, the validation raises an exception already due to the code in TrunkPortValidator.is_bound() (that is called indirectly from SubPortsValidator._validate).\n\nI\u0027ll add the tests for the network not found and no MTU.\n\nThanks for suggestion.","commit_id":"6745841dc7ff7b605d1e95cac7589f027e0b4345"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"2c6991a0d880d088dbdc1e3b4b970c85d0719541","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                self.context,"},{"line_number":191,"context_line":"                self.segmentation_types, trunk[\u0027sub_ports\u0027], trunk[\u0027port_id\u0027])"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"            if subport_net_mtu is None or trunk_net_mtu is None:"},{"line_number":194,"context_line":"                validator.validate(self.context)"},{"line_number":195,"context_line":"            elif subport_net_mtu \u003d\u003d \u0027exc\u0027 or trunk_net_mtu \u003d\u003d \u0027exc\u0027:"},{"line_number":196,"context_line":"                validator.validate(self.context)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa7ab95a_0cf514ca","line":193,"updated":"2016-09-01 12:11:59.000000000","message":"could probably be instead an OR compound statement, but meh...","commit_id":"030f22077e14a8e6012c3613d7239a1e56fdc9fe"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"54f87780a9918da3a98c4a9f7a00f2328451d14f","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.segmentation_types \u003d {constants.VLAN: utils.is_valid_vlan_tag}"},{"line_number":42,"context_line":"        self.context \u003d mock.ANY"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        self.get_port_mtu \u003d mock.patch(\u0027neutron.services.trunk.rules\u0027"},{"line_number":45,"context_line":"                                       \u0027.SubPortsValidator\u0027"},{"line_number":46,"context_line":"                                       \u0027._get_port_mtu\u0027).start()"},{"line_number":47,"context_line":"        self.get_port_mtu.return_value \u003d None"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def test_validate_subport_subport_and_trunk_shared_port_id(self):"},{"line_number":50,"context_line":"        shared_id \u003d uuidutils.generate_uuid()"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_b05bef53","line":47,"range":{"start_line":44,"start_character":0,"end_line":47,"end_character":45},"updated":"2016-09-04 19:45:54.000000000","message":"Is it needed to be an instance attribute? I\u0027d suggest following:\n\n mock.patch.object(\n     rules.SubPortsValidator, \u0027_get_port_mtu\u0027, return_value\u003dNone).start()","commit_id":"e152c8527156f476e40dc5d999405cacde115821"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"c99a94b03f8d7bb5b6bccbace04c355de4140766","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.segmentation_types \u003d {constants.VLAN: utils.is_valid_vlan_tag}"},{"line_number":42,"context_line":"        self.context \u003d mock.ANY"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        self.get_port_mtu \u003d mock.patch(\u0027neutron.services.trunk.rules\u0027"},{"line_number":45,"context_line":"                                       \u0027.SubPortsValidator\u0027"},{"line_number":46,"context_line":"                                       \u0027._get_port_mtu\u0027).start()"},{"line_number":47,"context_line":"        self.get_port_mtu.return_value \u003d None"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def test_validate_subport_subport_and_trunk_shared_port_id(self):"},{"line_number":50,"context_line":"        shared_id \u003d uuidutils.generate_uuid()"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_5be2bfd6","line":47,"range":{"start_line":44,"start_character":0,"end_line":47,"end_character":45},"in_reply_to":"9a89bdaa_b05bef53","updated":"2016-09-05 05:45:49.000000000","message":"Good suggestion, thx.","commit_id":"e152c8527156f476e40dc5d999405cacde115821"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"54f87780a9918da3a98c4a9f7a00f2328451d14f","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            validator \u003d rules.SubPortsValidator("},{"line_number":187,"context_line":"                self.segmentation_types, trunk[\u0027sub_ports\u0027], trunk[\u0027port_id\u0027])"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"            if subport_net_mtu is None or trunk_net_mtu is None:"},{"line_number":190,"context_line":"                validator.validate(self.context)"},{"line_number":191,"context_line":"            elif subport_net_mtu \u003d\u003d \u0027exc\u0027 or trunk_net_mtu \u003d\u003d \u0027exc\u0027:"},{"line_number":192,"context_line":"                validator.validate(self.context)"},{"line_number":193,"context_line":"            elif subport_net_mtu \u003c\u003d trunk_net_mtu:"},{"line_number":194,"context_line":"                validator.validate(self.context)"},{"line_number":195,"context_line":"            else:"},{"line_number":196,"context_line":"                self.assertRaises(trunk_exc.SubPortMtuGreaterThanTrunkPortMtu,"},{"line_number":197,"context_line":"                                  validator.validate, self.context)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_f02c97ad","line":194,"range":{"start_line":189,"start_character":0,"end_line":194,"end_character":48},"updated":"2016-09-04 19:45:54.000000000","message":"This is ... interesting.","commit_id":"e152c8527156f476e40dc5d999405cacde115821"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"c99a94b03f8d7bb5b6bccbace04c355de4140766","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            validator \u003d rules.SubPortsValidator("},{"line_number":187,"context_line":"                self.segmentation_types, trunk[\u0027sub_ports\u0027], trunk[\u0027port_id\u0027])"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"            if subport_net_mtu is None or trunk_net_mtu is None:"},{"line_number":190,"context_line":"                validator.validate(self.context)"},{"line_number":191,"context_line":"            elif subport_net_mtu \u003d\u003d \u0027exc\u0027 or trunk_net_mtu \u003d\u003d \u0027exc\u0027:"},{"line_number":192,"context_line":"                validator.validate(self.context)"},{"line_number":193,"context_line":"            elif subport_net_mtu \u003c\u003d trunk_net_mtu:"},{"line_number":194,"context_line":"                validator.validate(self.context)"},{"line_number":195,"context_line":"            else:"},{"line_number":196,"context_line":"                self.assertRaises(trunk_exc.SubPortMtuGreaterThanTrunkPortMtu,"},{"line_number":197,"context_line":"                                  validator.validate, self.context)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_fbdb9319","line":194,"range":{"start_line":189,"start_character":0,"end_line":194,"end_character":48},"in_reply_to":"9a89bdaa_f02c97ad","updated":"2016-09-05 05:45:49.000000000","message":"... and each condition displays its assertion clearly.","commit_id":"e152c8527156f476e40dc5d999405cacde115821"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"c94bcb6d74c33d7b38e8a180560b56f18ee08259","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    def test_validate_subport_mtu_greater_than_trunks(self):"},{"line_number":139,"context_line":"        self._test_validate_subport_trunk_mtu(1500, 500)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def test_validate_subport_mtu_unset_trunks_set(self):"},{"line_number":142,"context_line":"        self._test_validate_subport_trunk_mtu(None, 500)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def test_validate_subport_mtu_set_trunks_unset(self):"},{"line_number":145,"context_line":"        self._test_validate_subport_trunk_mtu(500, None)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a89bdaa_293768b1","line":142,"range":{"start_line":141,"start_character":0,"end_line":142,"end_character":56},"updated":"2016-09-05 10:53:45.000000000","message":"This becomes now an invalid scenario as if extension is disabled, we won\u0027t trigger _get_port_mtu(). We should consolidate this method and method below and create a new test that validates case where extension is not available.","commit_id":"58abb3d9cc01a7c4888d0bd0c1fb96c78154c714"},{"author":{"_account_id":19797,"name":"Hynek Mlnarik","email":"hmlnarik@redhat.com","username":"hmlnarik"},"change_message_id":"fedbd65efe413eda1aa694f5109b83211eaa485f","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    def test_validate_subport_mtu_greater_than_trunks(self):"},{"line_number":139,"context_line":"        self._test_validate_subport_trunk_mtu(1500, 500)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def test_validate_subport_mtu_unset_trunks_set(self):"},{"line_number":142,"context_line":"        self._test_validate_subport_trunk_mtu(None, 500)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def test_validate_subport_mtu_set_trunks_unset(self):"},{"line_number":145,"context_line":"        self._test_validate_subport_trunk_mtu(500, None)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a89bdaa_097544f8","line":142,"range":{"start_line":141,"start_character":0,"end_line":142,"end_character":56},"in_reply_to":"9a89bdaa_293768b1","updated":"2016-09-05 11:02:58.000000000","message":"Why is this scenario invalid? The subport can be deleted, then PortNotFound would be thrown in _get_port_mtu and None would be returned.","commit_id":"58abb3d9cc01a7c4888d0bd0c1fb96c78154c714"}]}
