)]}'
{"nova/network/neutronv2/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"879b12c763ecc44790724ad7166d5ad9d968d4ed","unresolved":false,"context_lines":[{"line_number":1264,"context_line":"        # to ACTIVE, it\u0027s more like a POST action method in the compute API."},{"line_number":1265,"context_line":"        resp \u003d client.put("},{"line_number":1266,"context_line":"            \u0027/ports/%s/bindings/%s/activate\u0027 % (port_id, host))"},{"line_number":1267,"context_line":"        if resp:"},{"line_number":1268,"context_line":"            LOG.debug(\u0027Activated binding for port %s and host %s.\u0027,"},{"line_number":1269,"context_line":"                      port_id, host)"},{"line_number":1270,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_005f8e0e","line":1267,"updated":"2018-03-27 01:03:55.000000000","message":"As in earlier patches in the series, this likely needs to change since it\u0027s not a requests.Response object.","commit_id":"be82dbf10c87503cab42cfc12ec3dafad4e654fa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c94854e3c6cb3e73ad0a17fc103de9a44cbe4f01","unresolved":false,"context_lines":[{"line_number":1287,"context_line":"        # This is a bit weird in that we don\u0027t PUT and update the status"},{"line_number":1288,"context_line":"        # to ACTIVE, it\u0027s more like a POST action method in the compute API."},{"line_number":1289,"context_line":"        resp \u003d client.put("},{"line_number":1290,"context_line":"            \u0027/ports/%s/bindings/%s/activate\u0027 % (port_id, host),"},{"line_number":1291,"context_line":"            raise_exc\u003dFalse)"},{"line_number":1292,"context_line":"        if resp:"},{"line_number":1293,"context_line":"            LOG.debug(\u0027Activated binding for port %s and host %s.\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf659307_d0d9ee56","line":1290,"range":{"start_line":1290,"start_character":13,"end_line":1290,"end_character":19},"updated":"2018-03-30 23:29:45.000000000","message":"Needs to be prefixed with /v2.0/","commit_id":"33b9bd5ed1ad09c6d456718cd9ed8181edd1a382"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"aaeedda34ff2710e9a2275a2acbab75e69ef0670","unresolved":false,"context_lines":[{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    def setup_networks_on_host(self, context, instance, host\u003dNone,"},{"line_number":358,"context_line":"                               teardown\u003dFalse):"},{"line_number":359,"context_line":"        \"\"\"Setup or teardown the network structures."},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"        :param context: The user request context."},{"line_number":362,"context_line":"        :param instance: The instance with attached ports."},{"line_number":363,"context_line":"        :param host: Optional host used to control the setup. If provided and"},{"line_number":364,"context_line":"            is not the same as the current instance.host, this method assumes"},{"line_number":365,"context_line":"            the instance is being migrated and sets the \"migrating_to\""},{"line_number":366,"context_line":"            attribute in the binding profile for the attached ports."},{"line_number":367,"context_line":"        :param teardown: Whether or not network information for the ports"},{"line_number":368,"context_line":"            should be cleaned up. If True, at a minimum the \"migrating_to\""},{"line_number":369,"context_line":"            attribute is cleared in the binding profile for the ports. If a"},{"line_number":370,"context_line":"            host is also provided, then port bindings for that host are"},{"line_number":371,"context_line":"            deleted when teardown is True as long as the host does not match"},{"line_number":372,"context_line":"            the current instance.host."},{"line_number":373,"context_line":"        :raises: nova.exception.PortBindingDeletionFailed if host is not None,"},{"line_number":374,"context_line":"            teardown is True, and port binding deletion fails."},{"line_number":375,"context_line":"        \"\"\""},{"line_number":376,"context_line":"        # Check if the instance is migrating to a new host."},{"line_number":377,"context_line":"        port_migrating \u003d host and (instance.host !\u003d host)"},{"line_number":378,"context_line":"        # If the port is migrating to a new host or if it is a"},{"line_number":379,"context_line":"        # teardown on the original host, then proceed."},{"line_number":380,"context_line":"        if port_migrating or teardown:"},{"line_number":381,"context_line":"            search_opts \u003d {\u0027device_id\u0027: instance.uuid,"},{"line_number":382,"context_line":"                           \u0027tenant_id\u0027: instance.project_id,"},{"line_number":383,"context_line":"                           BINDING_HOST_ID: instance.host}"},{"line_number":384,"context_line":"            # Now get the port details to process the ports"},{"line_number":385,"context_line":"            # binding profile info."},{"line_number":386,"context_line":"            data \u003d self.list_ports(context, **search_opts)"},{"line_number":387,"context_line":"            ports \u003d data[\u0027ports\u0027]"},{"line_number":388,"context_line":"            admin_client \u003d get_client(context, admin\u003dTrue)"},{"line_number":389,"context_line":"            if teardown:"},{"line_number":390,"context_line":"                # Reset the port profile"},{"line_number":391,"context_line":"                self._clear_migration_port_profile("},{"line_number":392,"context_line":"                    context, instance, admin_client, ports)"},{"line_number":393,"context_line":"                # If a host was provided, delete any bindings between that"},{"line_number":394,"context_line":"                # host and the ports as long as the host isn\u0027t the same as"},{"line_number":395,"context_line":"                # the current instance.host."},{"line_number":396,"context_line":"                has_binding_ext \u003d self.supports_port_binding_extension(context)"},{"line_number":397,"context_line":"                if port_migrating and has_binding_ext:"},{"line_number":398,"context_line":"                    for port in ports:"},{"line_number":399,"context_line":"                        # This call is safe in that 404s for non-existing"},{"line_number":400,"context_line":"                        # bindings are ignored."},{"line_number":401,"context_line":"                        self.delete_port_binding("},{"line_number":402,"context_line":"                            context, port[\u0027id\u0027], host)"},{"line_number":403,"context_line":"            elif port_migrating:"},{"line_number":404,"context_line":"                # Setup the port profile"},{"line_number":405,"context_line":"                self._setup_migration_port_profile("}],"source_content_type":"text/x-python","patch_set":7,"id":"bf659307_3f7c6871","line":402,"range":{"start_line":359,"start_character":0,"end_line":402,"end_character":54},"updated":"2018-04-04 20:46:13.000000000","message":"This looks like a bad rebase","commit_id":"9c9e08fdc67b7efc35b0e44c8e44c59976e9ab17"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ec5b6a8f4bc9cc31b9d52639147442f3be0fbed1","unresolved":false,"context_lines":[{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    def setup_networks_on_host(self, context, instance, host\u003dNone,"},{"line_number":358,"context_line":"                               teardown\u003dFalse):"},{"line_number":359,"context_line":"        \"\"\"Setup or teardown the network structures."},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"        :param context: The user request context."},{"line_number":362,"context_line":"        :param instance: The instance with attached ports."},{"line_number":363,"context_line":"        :param host: Optional host used to control the setup. If provided and"},{"line_number":364,"context_line":"            is not the same as the current instance.host, this method assumes"},{"line_number":365,"context_line":"            the instance is being migrated and sets the \"migrating_to\""},{"line_number":366,"context_line":"            attribute in the binding profile for the attached ports."},{"line_number":367,"context_line":"        :param teardown: Whether or not network information for the ports"},{"line_number":368,"context_line":"            should be cleaned up. If True, at a minimum the \"migrating_to\""},{"line_number":369,"context_line":"            attribute is cleared in the binding profile for the ports. If a"},{"line_number":370,"context_line":"            host is also provided, then port bindings for that host are"},{"line_number":371,"context_line":"            deleted when teardown is True as long as the host does not match"},{"line_number":372,"context_line":"            the current instance.host."},{"line_number":373,"context_line":"        :raises: nova.exception.PortBindingDeletionFailed if host is not None,"},{"line_number":374,"context_line":"            teardown is True, and port binding deletion fails."},{"line_number":375,"context_line":"        \"\"\""},{"line_number":376,"context_line":"        # Check if the instance is migrating to a new host."},{"line_number":377,"context_line":"        port_migrating \u003d host and (instance.host !\u003d host)"},{"line_number":378,"context_line":"        # If the port is migrating to a new host or if it is a"},{"line_number":379,"context_line":"        # teardown on the original host, then proceed."},{"line_number":380,"context_line":"        if port_migrating or teardown:"},{"line_number":381,"context_line":"            search_opts \u003d {\u0027device_id\u0027: instance.uuid,"},{"line_number":382,"context_line":"                           \u0027tenant_id\u0027: instance.project_id,"},{"line_number":383,"context_line":"                           BINDING_HOST_ID: instance.host}"},{"line_number":384,"context_line":"            # Now get the port details to process the ports"},{"line_number":385,"context_line":"            # binding profile info."},{"line_number":386,"context_line":"            data \u003d self.list_ports(context, **search_opts)"},{"line_number":387,"context_line":"            ports \u003d data[\u0027ports\u0027]"},{"line_number":388,"context_line":"            admin_client \u003d get_client(context, admin\u003dTrue)"},{"line_number":389,"context_line":"            if teardown:"},{"line_number":390,"context_line":"                # Reset the port profile"},{"line_number":391,"context_line":"                self._clear_migration_port_profile("},{"line_number":392,"context_line":"                    context, instance, admin_client, ports)"},{"line_number":393,"context_line":"                # If a host was provided, delete any bindings between that"},{"line_number":394,"context_line":"                # host and the ports as long as the host isn\u0027t the same as"},{"line_number":395,"context_line":"                # the current instance.host."},{"line_number":396,"context_line":"                has_binding_ext \u003d self.supports_port_binding_extension(context)"},{"line_number":397,"context_line":"                if port_migrating and has_binding_ext:"},{"line_number":398,"context_line":"                    for port in ports:"},{"line_number":399,"context_line":"                        # This call is safe in that 404s for non-existing"},{"line_number":400,"context_line":"                        # bindings are ignored."},{"line_number":401,"context_line":"                        self.delete_port_binding("},{"line_number":402,"context_line":"                            context, port[\u0027id\u0027], host)"},{"line_number":403,"context_line":"            elif port_migrating:"},{"line_number":404,"context_line":"                # Setup the port profile"},{"line_number":405,"context_line":"                self._setup_migration_port_profile("}],"source_content_type":"text/x-python","patch_set":7,"id":"bf659307_f5c36f89","line":402,"range":{"start_line":359,"start_character":0,"end_line":402,"end_character":54},"in_reply_to":"bf659307_3f7c6871","updated":"2018-04-04 22:09:09.000000000","message":"Yup I messed up and lost https://review.openstack.org/#/c/556333/.","commit_id":"9c9e08fdc67b7efc35b0e44c8e44c59976e9ab17"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"3cad38f83f02ada41e79b44be6787b2d2b0b7106","unresolved":false,"context_lines":[{"line_number":1306,"context_line":"        if resp:"},{"line_number":1307,"context_line":"            LOG.debug(\u0027Activated binding for port %s and host %s.\u0027,"},{"line_number":1308,"context_line":"                      port_id, host)"},{"line_number":1309,"context_line":"        else:"},{"line_number":1310,"context_line":"            # A 409 means the port binding is already active, which shouldn\u0027t"},{"line_number":1311,"context_line":"            # happen if the caller is doing things in the correct order."},{"line_number":1312,"context_line":"            if resp.status_code \u003d\u003d 409:"},{"line_number":1313,"context_line":"                LOG.warning(\u0027Binding for port %s and host %s is already \u0027"},{"line_number":1314,"context_line":"                            \u0027active.\u0027, port_id, host)"},{"line_number":1315,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f6a8fd7_20f6a2d8","line":1312,"range":{"start_line":1309,"start_character":0,"end_line":1312,"end_character":39},"updated":"2018-04-25 18:19:29.000000000","message":"nit: We can remove deep indents with\n\n elif resp.status_code \u003d\u003d 409:\n    # A 409 means the port binding is already active, which shouldn\u0027t\n    # happen if the caller is doing things in the correct order.\n    LOG.warning(..\n else:\n    # Log the ...","commit_id":"9579130d068dab2869adc1620a32a5142ad34fc7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b8dca6530e9397ee21dc1865b44cc86d126563a6","unresolved":false,"context_lines":[{"line_number":1306,"context_line":"        if resp:"},{"line_number":1307,"context_line":"            LOG.debug(\u0027Activated binding for port %s and host %s.\u0027,"},{"line_number":1308,"context_line":"                      port_id, host)"},{"line_number":1309,"context_line":"        else:"},{"line_number":1310,"context_line":"            # A 409 means the port binding is already active, which shouldn\u0027t"},{"line_number":1311,"context_line":"            # happen if the caller is doing things in the correct order."},{"line_number":1312,"context_line":"            if resp.status_code \u003d\u003d 409:"},{"line_number":1313,"context_line":"                LOG.warning(\u0027Binding for port %s and host %s is already \u0027"},{"line_number":1314,"context_line":"                            \u0027active.\u0027, port_id, host)"},{"line_number":1315,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f6a8fd7_cc27ddc6","line":1312,"range":{"start_line":1309,"start_character":0,"end_line":1312,"end_character":39},"in_reply_to":"9f6a8fd7_20f6a2d8","updated":"2018-04-25 21:47:04.000000000","message":"Yeah I\u0027m not sure why I didn\u0027t do that. Probably started with if/else and then added the 409 check later.","commit_id":"9579130d068dab2869adc1620a32a5142ad34fc7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a5f2cbd80a9527a34ad4b4b8dfaacb4a1d1f38f5","unresolved":false,"context_lines":[{"line_number":1306,"context_line":"        if resp:"},{"line_number":1307,"context_line":"            LOG.debug(\u0027Activated binding for port %s and host %s.\u0027,"},{"line_number":1308,"context_line":"                      port_id, host)"},{"line_number":1309,"context_line":"        else:"},{"line_number":1310,"context_line":"            # A 409 means the port binding is already active, which shouldn\u0027t"},{"line_number":1311,"context_line":"            # happen if the caller is doing things in the correct order."},{"line_number":1312,"context_line":"            if resp.status_code \u003d\u003d 409:"},{"line_number":1313,"context_line":"                LOG.warning(\u0027Binding for port %s and host %s is already \u0027"},{"line_number":1314,"context_line":"                            \u0027active.\u0027, port_id, host)"},{"line_number":1315,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_00670326","line":1312,"range":{"start_line":1309,"start_character":0,"end_line":1312,"end_character":39},"in_reply_to":"9f6a8fd7_cc27ddc6","updated":"2018-07-19 13:35:42.000000000","message":"Will address in a follow up patch at the end of the series.","commit_id":"9579130d068dab2869adc1620a32a5142ad34fc7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"54511607aca5d5b390a08de5234628d67bff01b9","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"        else:"},{"line_number":1310,"context_line":"            # A 409 means the port binding is already active, which shouldn\u0027t"},{"line_number":1311,"context_line":"            # happen if the caller is doing things in the correct order."},{"line_number":1312,"context_line":"            if resp.status_code \u003d\u003d 409:"},{"line_number":1313,"context_line":"                LOG.warning(\u0027Binding for port %s and host %s is already \u0027"},{"line_number":1314,"context_line":"                            \u0027active.\u0027, port_id, host)"},{"line_number":1315,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_d07093dd","line":1312,"updated":"2018-06-18 13:05:03.000000000","message":"The spec only states 4xx, I looked at the neutron patches but I failed to find where it returns 409.","commit_id":"77d27474ba86340d0b39135c4cec70d02bd4bec8"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e03c81201255c2218abbbe69ece8271359ce3620","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"        else:"},{"line_number":1310,"context_line":"            # A 409 means the port binding is already active, which shouldn\u0027t"},{"line_number":1311,"context_line":"            # happen if the caller is doing things in the correct order."},{"line_number":1312,"context_line":"            if resp.status_code \u003d\u003d 409:"},{"line_number":1313,"context_line":"                LOG.warning(\u0027Binding for port %s and host %s is already \u0027"},{"line_number":1314,"context_line":"                            \u0027active.\u0027, port_id, host)"},{"line_number":1315,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_f5d1c6cd","line":1312,"in_reply_to":"5f7c97a3_6c967b41","updated":"2018-06-20 10:59:57.000000000","message":"Thanks!","commit_id":"77d27474ba86340d0b39135c4cec70d02bd4bec8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6667bde06cbeaee9663dfb032bda818cb56b5721","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"        else:"},{"line_number":1310,"context_line":"            # A 409 means the port binding is already active, which shouldn\u0027t"},{"line_number":1311,"context_line":"            # happen if the caller is doing things in the correct order."},{"line_number":1312,"context_line":"            if resp.status_code \u003d\u003d 409:"},{"line_number":1313,"context_line":"                LOG.warning(\u0027Binding for port %s and host %s is already \u0027"},{"line_number":1314,"context_line":"                            \u0027active.\u0027, port_id, host)"},{"line_number":1315,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_6c967b41","line":1312,"in_reply_to":"5f7c97a3_d07093dd","updated":"2018-06-18 21:12:30.000000000","message":"https://review.openstack.org/#/c/414251/66/neutron/plugins/ml2/plugin.py@2165","commit_id":"77d27474ba86340d0b39135c4cec70d02bd4bec8"}]}
