)]}'
{"nova/network/neutronv2/api.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"400cd859e8fa5b2fe58d527cb0c6bd60336e67a4","unresolved":false,"context_lines":[{"line_number":403,"context_line":"                                      instance\u003dinstance)"},{"line_number":404,"context_line":"                            raise exception.PortNotUsable("},{"line_number":405,"context_line":"                                port_id\u003drequest.port_id,"},{"line_number":406,"context_line":"                                instance\u003dinstance.uuid)"},{"line_number":407,"context_line":"                        # Don\u0027t try to use this MAC if we need to create a"},{"line_number":408,"context_line":"                        # port on the fly later. Identical MACs may be"},{"line_number":409,"context_line":"                        # configured by users into multiple ports so we"}],"source_content_type":"text/x-python","patch_set":7,"id":"3aaa91ec_18a8141f","side":"PARENT","line":406,"updated":"2016-06-22 14:02:11.000000000","message":"So, I\u0027m just trying to wrap my head around this functional change here. Before, we could raise PortNotUsable early in allocate_for_instance and not overwrite the mac, right?","commit_id":"ea377abf2fa96df00e7829ebe408a1ae7ac37a4e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"cc56e78487f86066db328082ce0a4b2e00a9d301","unresolved":false,"context_lines":[{"line_number":403,"context_line":"                                      instance\u003dinstance)"},{"line_number":404,"context_line":"                            raise exception.PortNotUsable("},{"line_number":405,"context_line":"                                port_id\u003drequest.port_id,"},{"line_number":406,"context_line":"                                instance\u003dinstance.uuid)"},{"line_number":407,"context_line":"                        # Don\u0027t try to use this MAC if we need to create a"},{"line_number":408,"context_line":"                        # port on the fly later. Identical MACs may be"},{"line_number":409,"context_line":"                        # configured by users into multiple ports so we"}],"source_content_type":"text/x-python","patch_set":7,"id":"3aaa91ec_ceda4678","side":"PARENT","line":406,"in_reply_to":"3aaa91ec_18a8141f","updated":"2016-06-22 14:26:38.000000000","message":"Ah, so here we never update the port, so we must check if the mac address is OK. After this change we always overwrite the mac address and update it to a value that does work.\n\nSo its actually really dumb what works today. If you happen to pass in a port with a matching mac address, it will work, and we make sure when we create ports we don\u0027t use the mac the user passed in. In all other cases we seem to just give up (if the hypervisor has some mac addresses).","commit_id":"ea377abf2fa96df00e7829ebe408a1ae7ac37a4e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c88e514f937d6c9cd2e9b1595fea809dbbf5b45c","unresolved":false,"context_lines":[{"line_number":257,"context_line":"    @staticmethod"},{"line_number":258,"context_line":"    def _populate_mac_address(instance, port_req_body, available_macs):"},{"line_number":259,"context_line":"        # NOTE(johngarbutt) On port_update, this will cause us to override"},{"line_number":260,"context_line":"        # any previous mac address the port may have had."},{"line_number":261,"context_line":"        if available_macs is not None:"},{"line_number":262,"context_line":"            if not available_macs:"},{"line_number":263,"context_line":"                raise exception.PortNotFree("}],"source_content_type":"text/x-python","patch_set":7,"id":"3aaa91ec_79914999","line":260,"range":{"start_line":260,"start_character":27,"end_line":260,"end_character":34},"updated":"2016-06-22 19:39:04.000000000","message":"This is just fine in general.  Core Neutron supports port updates that update the mac address.\n\nThe ML2 plugin specifically will prevent updating the mac address if the port is bound [1].  It will raise a PortBound exception [2].  Other monolithic plugins may also prevent it but probably don\u0027t.\n\n [1] https://github.com/openstack/neutron/blob/91376c1e6b/neutron/plugins/ml2/plugin.py#L269\n [2] https://github.com/openstack/neutron-lib/blob/c494673df2/neutron_lib/exceptions.py#L143","commit_id":"e0bda50b8f5c885aff52d1c95180949365718b4a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"400cd859e8fa5b2fe58d527cb0c6bd60336e67a4","unresolved":false,"context_lines":[{"line_number":545,"context_line":"        dhcp_opts \u003d kwargs.get(\u0027dhcp_options\u0027, None)"},{"line_number":546,"context_line":"        bind_host_id \u003d kwargs.get(\u0027bind_host_id\u0027)"},{"line_number":547,"context_line":"        ports, net_ids, ordered_networks, available_macs \u003d ("},{"line_number":548,"context_line":"            self._process_requested_networks(context,"},{"line_number":549,"context_line":"                instance, neutron, requested_networks, hypervisor_macs))"},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"        nets \u003d self._get_available_networks(context, instance.project_id,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3aaa91ec_38823095","line":548,"updated":"2016-06-22 14:02:11.000000000","message":"Here we would bail if the mac isn\u0027t valid, but now we will proceed.","commit_id":"e0bda50b8f5c885aff52d1c95180949365718b4a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"cc56e78487f86066db328082ce0a4b2e00a9d301","unresolved":false,"context_lines":[{"line_number":545,"context_line":"        dhcp_opts \u003d kwargs.get(\u0027dhcp_options\u0027, None)"},{"line_number":546,"context_line":"        bind_host_id \u003d kwargs.get(\u0027bind_host_id\u0027)"},{"line_number":547,"context_line":"        ports, net_ids, ordered_networks, available_macs \u003d ("},{"line_number":548,"context_line":"            self._process_requested_networks(context,"},{"line_number":549,"context_line":"                instance, neutron, requested_networks, hypervisor_macs))"},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"        nets \u003d self._get_available_networks(context, instance.project_id,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3aaa91ec_8ecf9eaf","line":548,"in_reply_to":"3aaa91ec_38823095","updated":"2016-06-22 14:26:38.000000000","message":"Yes, we now update the mac to a matching one, if it doesn\u0027t match, instead of just bailing out here.","commit_id":"e0bda50b8f5c885aff52d1c95180949365718b4a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"400cd859e8fa5b2fe58d527cb0c6bd60336e67a4","unresolved":false,"context_lines":[{"line_number":644,"context_line":"                    created_port_ids.append(created_port_id)"},{"line_number":645,"context_line":"                    ports_in_requested_order.append(created_port_id)"},{"line_number":646,"context_line":"                else:"},{"line_number":647,"context_line":"                    self._update_port("},{"line_number":648,"context_line":"                        port_client, instance, request.port_id, port_req_body)"},{"line_number":649,"context_line":"                    preexisting_port_ids.append(request.port_id)"},{"line_number":650,"context_line":"                    ports_in_requested_order.append(request.port_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3aaa91ec_b309212f","line":647,"updated":"2016-06-22 14:02:11.000000000","message":"Here we will fail with a new PortInUse error inside this for loop... I guess the cleanup on L657 ensures that we still exit this cleanly?\n\nDo we need to handle this new exception (and/or remove handling of the old one) anywhere in the callers of this?","commit_id":"e0bda50b8f5c885aff52d1c95180949365718b4a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cfe978825e9e2e88895e63b1f9e7e2a8ae7f3fcb","unresolved":false,"context_lines":[{"line_number":644,"context_line":"                    created_port_ids.append(created_port_id)"},{"line_number":645,"context_line":"                    ports_in_requested_order.append(created_port_id)"},{"line_number":646,"context_line":"                else:"},{"line_number":647,"context_line":"                    self._update_port("},{"line_number":648,"context_line":"                        port_client, instance, request.port_id, port_req_body)"},{"line_number":649,"context_line":"                    preexisting_port_ids.append(request.port_id)"},{"line_number":650,"context_line":"                    ports_in_requested_order.append(request.port_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3aaa91ec_6ebcf26c","line":647,"in_reply_to":"3aaa91ec_0eabae75","updated":"2016-06-22 14:33:46.000000000","message":"Ah, I see.","commit_id":"e0bda50b8f5c885aff52d1c95180949365718b4a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"cc56e78487f86066db328082ce0a4b2e00a9d301","unresolved":false,"context_lines":[{"line_number":644,"context_line":"                    created_port_ids.append(created_port_id)"},{"line_number":645,"context_line":"                    ports_in_requested_order.append(created_port_id)"},{"line_number":646,"context_line":"                else:"},{"line_number":647,"context_line":"                    self._update_port("},{"line_number":648,"context_line":"                        port_client, instance, request.port_id, port_req_body)"},{"line_number":649,"context_line":"                    preexisting_port_ids.append(request.port_id)"},{"line_number":650,"context_line":"                    ports_in_requested_order.append(request.port_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3aaa91ec_0eabae75","line":647,"in_reply_to":"3aaa91ec_b309212f","updated":"2016-06-22 14:26:38.000000000","message":"See ln236, port_create always used to raise this anyway, so the same cleanup triggers in both cases.","commit_id":"e0bda50b8f5c885aff52d1c95180949365718b4a"}],"nova/tests/unit/network/test_neutronv2.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"0f5dcc28f84788f93c32a8a8f431c2a16b186565","unresolved":false,"context_lines":[{"line_number":1017,"context_line":"        self._allocate_for_instance(net_idx\u003d1,"},{"line_number":1018,"context_line":"                                    requested_networks\u003drequested_networks,"},{"line_number":1019,"context_line":"                                    macs\u003dset([\u0027ab:cd:ef:01:23:45\u0027]))"},{"line_number":1020,"context_line":""},{"line_number":1021,"context_line":"    def test_allocate_for_instance_accepts_only_portid(self):"},{"line_number":1022,"context_line":"        # Make sure allocate_for_instance works when only a portid is provided"},{"line_number":1023,"context_line":"        self._returned_nw_info \u003d self.port_data1"}],"source_content_type":"text/x-python","patch_set":7,"id":"3aaa91ec_2b13bcb9","line":1020,"updated":"2016-06-23 14:12:32.000000000","message":"thanks for covering the change in that new test.","commit_id":"e0bda50b8f5c885aff52d1c95180949365718b4a"}]}
