)]}'
{"networking_ovn/common/ovn_client.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"78ec77e23578da633f3198e7ce1b9236b5d3d0e2","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            # DHCP agents."},{"line_number":231,"context_line":"            if (port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DHCP and"},{"line_number":232,"context_line":"                    not port[\u0027device_id\u0027].startswith(\u0027dhcp\u0027)):"},{"line_number":233,"context_line":"                port_type \u003d ovn_const.OVN_NEUTRON_OWNER_TO_PORT_TYPE.get("},{"line_number":234,"context_line":"                    port[\u0027device_owner\u0027], \u0027\u0027)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        dhcpv4_options \u003d self._get_port_dhcp_options(port, const.IP_VERSION_4)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_2ab26b32","line":233,"range":{"start_line":233,"start_character":28,"end_line":233,"end_character":68},"updated":"2018-11-21 11:34:39.000000000","message":"Perhaps we don\u0027t need this constant anymore, it has only 1 value:\n\nhttps://github.com/openstack/networking-ovn/blob/0a6a14de3cc7c0ebc283dbdb98940e59415aaef3/networking_ovn/common/constants.py#L55\n\nAlso, this is the only place it\u0027s used.\n\nWe can set \"port_type \u003d \u0027localport\u0027\" here directly, it will be less confusing than using a mapping dict with one item in it.","commit_id":"2c3a72c76ed38f9925dad657957c02724e0b5da6"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"1575671d89a9560baac0e6ec2af78ed7dc8ae594","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            # DHCP agents."},{"line_number":231,"context_line":"            if (port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DHCP and"},{"line_number":232,"context_line":"                    not port[\u0027device_id\u0027].startswith(\u0027dhcp\u0027)):"},{"line_number":233,"context_line":"                port_type \u003d ovn_const.OVN_NEUTRON_OWNER_TO_PORT_TYPE.get("},{"line_number":234,"context_line":"                    port[\u0027device_owner\u0027], \u0027\u0027)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        dhcpv4_options \u003d self._get_port_dhcp_options(port, const.IP_VERSION_4)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_ea04737f","line":233,"range":{"start_line":233,"start_character":28,"end_line":233,"end_character":68},"in_reply_to":"3f79a3b5_2ab26b32","updated":"2018-11-21 11:46:20.000000000","message":"ack","commit_id":"2c3a72c76ed38f9925dad657957c02724e0b5da6"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"98292918a1b4d7e4a77f849f1aa05a0921690446","unresolved":false,"context_lines":[{"line_number":1723,"context_line":"        # Metadata ports are DHCP ports without a device_id starting by \u0027dhcp\u0027"},{"line_number":1724,"context_line":"        # since those belong to Neutron DHCP agents."},{"line_number":1725,"context_line":"        for port in ports:"},{"line_number":1726,"context_line":"            if not port[\u0027device_id\u0027].startswith(\u0027dhcp\u0027):"},{"line_number":1727,"context_line":"                return port"},{"line_number":1728,"context_line":""},{"line_number":1729,"context_line":"    def _find_metadata_port_ip(self, context, subnet):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_cd24311d","line":1726,"updated":"2018-11-21 12:28:43.000000000","message":"I think","commit_id":"2c3a72c76ed38f9925dad657957c02724e0b5da6"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"78ec77e23578da633f3198e7ce1b9236b5d3d0e2","unresolved":false,"context_lines":[{"line_number":1724,"context_line":"        # since those belong to Neutron DHCP agents."},{"line_number":1725,"context_line":"        for port in ports:"},{"line_number":1726,"context_line":"            if not port[\u0027device_id\u0027].startswith(\u0027dhcp\u0027):"},{"line_number":1727,"context_line":"                return port"},{"line_number":1728,"context_line":""},{"line_number":1729,"context_line":"    def _find_metadata_port_ip(self, context, subnet):"},{"line_number":1730,"context_line":"        metadata_port \u003d self._find_metadata_port(context, subnet[\u0027network_id\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_cacc1798","line":1727,"updated":"2018-11-21 11:34:39.000000000","message":"We will need to migrate the existing ports DHCP ports to add the device_id attribute to them right ?","commit_id":"2c3a72c76ed38f9925dad657957c02724e0b5da6"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"b65bdac02dcb012a92667a778778c08b91efda59","unresolved":false,"context_lines":[{"line_number":1724,"context_line":"        # since those belong to Neutron DHCP agents."},{"line_number":1725,"context_line":"        for port in ports:"},{"line_number":1726,"context_line":"            if not port[\u0027device_id\u0027].startswith(\u0027dhcp\u0027):"},{"line_number":1727,"context_line":"                return port"},{"line_number":1728,"context_line":""},{"line_number":1729,"context_line":"    def _find_metadata_port_ip(self, context, subnet):"},{"line_number":1730,"context_line":"        metadata_port \u003d self._find_metadata_port(context, subnet[\u0027network_id\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_cd94319b","line":1727,"in_reply_to":"3f79a3b5_4a07a71f","updated":"2018-11-21 12:09:10.000000000","message":"If they decide to use the same method we\u0027re gonna get broken by the empty case :) I thought of doing what you said as well.. to be honest I\u0027m not sure, I think this is more explicit and readable unless we force to use \u0027ovnmeta-%network_id\u0027 format in which case we need to have a migration path to update all the ports existing on a cluster.","commit_id":"2c3a72c76ed38f9925dad657957c02724e0b5da6"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"b6495a3a2f7fdf4c92c86eca896f6a61cdfe5b6a","unresolved":false,"context_lines":[{"line_number":1724,"context_line":"        # since those belong to Neutron DHCP agents."},{"line_number":1725,"context_line":"        for port in ports:"},{"line_number":1726,"context_line":"            if not port[\u0027device_id\u0027].startswith(\u0027dhcp\u0027):"},{"line_number":1727,"context_line":"                return port"},{"line_number":1728,"context_line":""},{"line_number":1729,"context_line":"    def _find_metadata_port_ip(self, context, subnet):"},{"line_number":1730,"context_line":"        metadata_port \u003d self._find_metadata_port(context, subnet[\u0027network_id\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_986515e7","line":1727,"in_reply_to":"3f79a3b5_6df07d93","updated":"2018-11-21 12:49:14.000000000","message":"Yeah, perhaps you\u0027re right and it\u0027s more clear :)))","commit_id":"2c3a72c76ed38f9925dad657957c02724e0b5da6"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9717e618c5205766f15f7d72053dca84894077c7","unresolved":false,"context_lines":[{"line_number":1724,"context_line":"        # since those belong to Neutron DHCP agents."},{"line_number":1725,"context_line":"        for port in ports:"},{"line_number":1726,"context_line":"            if not port[\u0027device_id\u0027].startswith(\u0027dhcp\u0027):"},{"line_number":1727,"context_line":"                return port"},{"line_number":1728,"context_line":""},{"line_number":1729,"context_line":"    def _find_metadata_port_ip(self, context, subnet):"},{"line_number":1730,"context_line":"        metadata_port \u003d self._find_metadata_port(context, subnet[\u0027network_id\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_4a07a71f","line":1727,"in_reply_to":"3f79a3b5_cacc1798","updated":"2018-11-21 12:06:34.000000000","message":"May be we can be more specific, like:\n\nif port[\u0027device_id\u0027].startswith(\u0027ovnmeta\u0027) or port[\u0027device_id\u0027]\u003d\u003d\u0027\u0027\n\nFor just in case anybody decides to use the same method as us \u0027:D","commit_id":"2c3a72c76ed38f9925dad657957c02724e0b5da6"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"98292918a1b4d7e4a77f849f1aa05a0921690446","unresolved":false,"context_lines":[{"line_number":1724,"context_line":"        # since those belong to Neutron DHCP agents."},{"line_number":1725,"context_line":"        for port in ports:"},{"line_number":1726,"context_line":"            if not port[\u0027device_id\u0027].startswith(\u0027dhcp\u0027):"},{"line_number":1727,"context_line":"                return port"},{"line_number":1728,"context_line":""},{"line_number":1729,"context_line":"    def _find_metadata_port_ip(self, context, subnet):"},{"line_number":1730,"context_line":"        metadata_port \u003d self._find_metadata_port(context, subnet[\u0027network_id\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_6df07d93","line":1727,"in_reply_to":"3f79a3b5_cd94319b","updated":"2018-11-21 12:28:43.000000000","message":"Just opinion, but I think it\u0027s more readable the other way around, because you say which ports are you exactly looking for \u0027:D, but fair point about the empty \u0027\u0027 case.","commit_id":"2c3a72c76ed38f9925dad657957c02724e0b5da6"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"7d778769b8ccde810e88441046f7f17b0e7f5ef3","unresolved":false,"context_lines":[{"line_number":1749,"context_line":"                        {\u0027network_id\u0027: network[\u0027id\u0027],"},{"line_number":1750,"context_line":"                         \u0027tenant_id\u0027: network[\u0027project_id\u0027],"},{"line_number":1751,"context_line":"                         \u0027device_owner\u0027: const.DEVICE_OWNER_DHCP,"},{"line_number":1752,"context_line":"                         \u0027device_id\u0027: \u0027ovnmeta-%s\u0027 % network[\u0027id\u0027]}}"},{"line_number":1753,"context_line":"                # TODO(boden): rehome create_port into neutron-lib"},{"line_number":1754,"context_line":"                p_utils.create_port(self._plugin, context, port)"},{"line_number":1755,"context_line":"            elif len(metadata_ports) \u003e 1:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_6a094327","line":1752,"range":{"start_line":1752,"start_character":25,"end_line":1752,"end_character":66},"updated":"2018-11-21 11:09:57.000000000","message":"This can go to a different patch if you want me to :)","commit_id":"2c3a72c76ed38f9925dad657957c02724e0b5da6"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"1575671d89a9560baac0e6ec2af78ed7dc8ae594","unresolved":false,"context_lines":[{"line_number":1749,"context_line":"                        {\u0027network_id\u0027: network[\u0027id\u0027],"},{"line_number":1750,"context_line":"                         \u0027tenant_id\u0027: network[\u0027project_id\u0027],"},{"line_number":1751,"context_line":"                         \u0027device_owner\u0027: const.DEVICE_OWNER_DHCP,"},{"line_number":1752,"context_line":"                         \u0027device_id\u0027: \u0027ovnmeta-%s\u0027 % network[\u0027id\u0027]}}"},{"line_number":1753,"context_line":"                # TODO(boden): rehome create_port into neutron-lib"},{"line_number":1754,"context_line":"                p_utils.create_port(self._plugin, context, port)"},{"line_number":1755,"context_line":"            elif len(metadata_ports) \u003e 1:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_ea29d3f0","line":1752,"range":{"start_line":1752,"start_character":25,"end_line":1752,"end_character":66},"in_reply_to":"3f79a3b5_0ae68f15","updated":"2018-11-21 11:46:20.000000000","message":"This is the preferred solution in a long term but the reason why we\u0027re using dhcp owner ports is that they\u0027re autodeleted in Neutron so when a network gets deleted, the port is deleted as well without throwing the famous error \"ports still in use\". The right way would be to create a new port type in Neutron which is also autodelete and consume it from networking-ovn but that wouldn\u0027t be backportable to stable/rocky where we want the bug to be fixed.","commit_id":"2c3a72c76ed38f9925dad657957c02724e0b5da6"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"78ec77e23578da633f3198e7ce1b9236b5d3d0e2","unresolved":false,"context_lines":[{"line_number":1749,"context_line":"                        {\u0027network_id\u0027: network[\u0027id\u0027],"},{"line_number":1750,"context_line":"                         \u0027tenant_id\u0027: network[\u0027project_id\u0027],"},{"line_number":1751,"context_line":"                         \u0027device_owner\u0027: const.DEVICE_OWNER_DHCP,"},{"line_number":1752,"context_line":"                         \u0027device_id\u0027: \u0027ovnmeta-%s\u0027 % network[\u0027id\u0027]}}"},{"line_number":1753,"context_line":"                # TODO(boden): rehome create_port into neutron-lib"},{"line_number":1754,"context_line":"                p_utils.create_port(self._plugin, context, port)"},{"line_number":1755,"context_line":"            elif len(metadata_ports) \u003e 1:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_0ae68f15","line":1752,"range":{"start_line":1752,"start_character":25,"end_line":1752,"end_character":66},"in_reply_to":"3f79a3b5_6a094327","updated":"2018-11-21 11:34:39.000000000","message":"Question, why not use a different device owner ? That would be less confusing no ?","commit_id":"2c3a72c76ed38f9925dad657957c02724e0b5da6"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"670a3b2d4825162363ab075961e1300c9ac04438","unresolved":false,"context_lines":[{"line_number":1749,"context_line":"                        {\u0027network_id\u0027: network[\u0027id\u0027],"},{"line_number":1750,"context_line":"                         \u0027tenant_id\u0027: network[\u0027project_id\u0027],"},{"line_number":1751,"context_line":"                         \u0027device_owner\u0027: const.DEVICE_OWNER_DHCP,"},{"line_number":1752,"context_line":"                         \u0027device_id\u0027: \u0027ovnmeta-%s\u0027 % network[\u0027id\u0027]}}"},{"line_number":1753,"context_line":"                # TODO(boden): rehome create_port into neutron-lib"},{"line_number":1754,"context_line":"                p_utils.create_port(self._plugin, context, port)"},{"line_number":1755,"context_line":"            elif len(metadata_ports) \u003e 1:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_6a7f03bc","line":1752,"range":{"start_line":1752,"start_character":25,"end_line":1752,"end_character":66},"in_reply_to":"3f79a3b5_ea29d3f0","updated":"2018-11-21 11:58:02.000000000","message":"Fair enough","commit_id":"2c3a72c76ed38f9925dad657957c02724e0b5da6"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a7541acb3e967e2a9e92410cf78721f78314e035","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            # DHCP agents."},{"line_number":231,"context_line":"            if (port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DHCP and"},{"line_number":232,"context_line":"                    not port[\u0027device_id\u0027].startswith(\u0027dhcp\u0027)):"},{"line_number":233,"context_line":"                port_type \u003d \u0027localport\u0027"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        dhcpv4_options \u003d self._get_port_dhcp_options(port, const.IP_VERSION_4)"},{"line_number":236,"context_line":"        dhcpv6_options \u003d self._get_port_dhcp_options(port, const.IP_VERSION_6)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_d8ea5b75","line":233,"updated":"2018-11-27 11:27:48.000000000","message":"Do we need to add something to db sync so that we rename the existing metadata ports to add that \"ovnmeta-\" prefix ?\n\nI\u0027m wondering because this method (_get_port_options) is also used in the update_port(), so, if we created metadata ports prior to updating to this patch this won\u0027t match them.","commit_id":"d28495fe42ea9a940260e951b32e0a814c75ce70"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"937bfa016cacf111bf4282b55368894ba0b9eae6","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            # DHCP agents."},{"line_number":231,"context_line":"            if (port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DHCP and"},{"line_number":232,"context_line":"                    not port[\u0027device_id\u0027].startswith(\u0027dhcp\u0027)):"},{"line_number":233,"context_line":"                port_type \u003d \u0027localport\u0027"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        dhcpv4_options \u003d self._get_port_dhcp_options(port, const.IP_VERSION_4)"},{"line_number":236,"context_line":"        dhcpv6_options \u003d self._get_port_dhcp_options(port, const.IP_VERSION_6)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_389d8ffc","line":233,"in_reply_to":"3f79a3b5_1889b3c6","updated":"2018-11-27 11:31:34.000000000","message":"Ack! Thanks for clarifying","commit_id":"d28495fe42ea9a940260e951b32e0a814c75ce70"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"45aea01a2827faf237b6ed27053cf5d9aeba6dfa","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            # DHCP agents."},{"line_number":231,"context_line":"            if (port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DHCP and"},{"line_number":232,"context_line":"                    not port[\u0027device_id\u0027].startswith(\u0027dhcp\u0027)):"},{"line_number":233,"context_line":"                port_type \u003d \u0027localport\u0027"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        dhcpv4_options \u003d self._get_port_dhcp_options(port, const.IP_VERSION_4)"},{"line_number":236,"context_line":"        dhcpv6_options \u003d self._get_port_dhcp_options(port, const.IP_VERSION_6)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_1889b3c6","line":233,"in_reply_to":"3f79a3b5_d8ea5b75","updated":"2018-11-27 11:30:36.000000000","message":"Not really. I thought of this when I rote the code and did it in such way that it doesn\u0027t check ovnmeta- prefix just for compatibility so that we don\u0027t need to sync all device-ids.\nIn order to avoid it, this code is just checking device-ids that start by \u0027dchp\u0027, ie. those ports created by Neutron DHCP agent. The \u0027ovnmeta\u0027 prefix this patch is adding is mainly for clarity so that one can distinguish better which ports will be used for metadata and which ones will be used by Neutron DHCP agent at a glance.","commit_id":"d28495fe42ea9a940260e951b32e0a814c75ce70"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a7541acb3e967e2a9e92410cf78721f78314e035","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        if utils.is_lsp_ignored(port):"},{"line_number":368,"context_line":"            return"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        port_info \u003d self._get_port_options(port, qos_options)"},{"line_number":371,"context_line":"        external_ids \u003d {ovn_const.OVN_PORT_NAME_EXT_ID_KEY: port[\u0027name\u0027],"},{"line_number":372,"context_line":"                        ovn_const.OVN_DEVID_EXT_ID_KEY: port[\u0027device_id\u0027],"},{"line_number":373,"context_line":"                        ovn_const.OVN_PROJID_EXT_ID_KEY: port[\u0027project_id\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_78d0e7c6","line":370,"updated":"2018-11-27 11:27:48.000000000","message":"here","commit_id":"d28495fe42ea9a940260e951b32e0a814c75ce70"}]}
