)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"74c6869613eba1c052a6971ef5fc14052bc89301","unresolved":false,"context_lines":[{"line_number":12,"context_line":"have bindings to the destination host, those bindings are activated."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This will make the source compute host port bindings inactive and"},{"line_number":15,"context_line":"also update the port binding:host_id attribute."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This is part of a larger series of changes for live migration where"},{"line_number":18,"context_line":"ComputeManager._post_live_migration calls migrate_instance_start"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"5f7c97a3_b373a1e8","line":15,"range":{"start_line":15,"start_character":29,"end_line":15,"end_character":36},"updated":"2018-06-18 13:38:41.000000000","message":"isn\u0027t it binding:host ?","commit_id":"ce7fd6b0f91df65b0b4d6200758f7e3847e41ed1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"97fbb19086354628d3fc73c1f4728fd6ffdc1515","unresolved":false,"context_lines":[{"line_number":12,"context_line":"have bindings to the destination host, those bindings are activated."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This will make the source compute host port bindings inactive and"},{"line_number":15,"context_line":"also update the port binding:host_id attribute."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This is part of a larger series of changes for live migration where"},{"line_number":18,"context_line":"ComputeManager._post_live_migration calls migrate_instance_start"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"5f7c97a3_b28cee2e","line":15,"range":{"start_line":15,"start_character":29,"end_line":15,"end_character":36},"in_reply_to":"5f7c97a3_b373a1e8","updated":"2018-06-18 22:49:47.000000000","message":"No it\u0027s binding:host_id:\n\nhttps://review.openstack.org/#/c/556334/15/nova/network/neutronv2/api.py@56\n\nThe binding:host_id change on the port itself are done implicitly in neutron - not literally in this code in nova.","commit_id":"ce7fd6b0f91df65b0b4d6200758f7e3847e41ed1"}],"nova/network/neutronv2/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aa3e7eeaa6c7e836c2ae2497d15bc6d29ee664dc","unresolved":false,"context_lines":[{"line_number":2395,"context_line":"            # port and destination host."},{"line_number":2396,"context_line":"            resp \u003d client.get(\u0027/ports/%s/bindings/%s\u0027 % (vif[\u0027id\u0027], dest_host))"},{"line_number":2397,"context_line":"            if resp:"},{"line_number":2398,"context_line":"                if resp.json()[\u0027binding\u0027][\u0027status\u0027] !\u003d \u0027ACTIVE\u0027:"},{"line_number":2399,"context_line":"                    # Activate this port binding on the destination host."},{"line_number":2400,"context_line":"                    self.activate_port_binding("},{"line_number":2401,"context_line":"                        context, vif[\u0027id\u0027], dest_host, client)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_407d97af","line":2398,"updated":"2018-03-26 14:04:04.000000000","message":"This doesn\u0027t work if I\u0027m using neutronclient:\n\nhttp://logs.openstack.org/34/556334/1/check/tempest-full/8c6114c/controller/logs/screen-n-cpu.txt.gz?level\u003dTRACE#_Mar_26_01_56_46_099968\n\nMar 26 01:56:46.098469 ubuntu-xenial-inap-mtl01-0003181559 nova-compute[13725]: ERROR nova.compute.manager [None req-37663974-b8bc-43a6-9c30-1ed3ad984dd0 service nova] [instance: 3d333cb6-9863-4be7-9e98-1f49ceddd6fd] Setting instance vm_state to ERROR: AttributeError: \u0027_DictWithMeta\u0027 object has no attribute \u0027json\u0027\nMar 26 01:56:46.098687 ubuntu-xenial-inap-mtl01-0003181559 nova-compute[13725]: ERROR nova.compute.manager [instance: 3d333cb6-9863-4be7-9e98-1f49ceddd6fd] Traceback (most recent call last):\nMar 26 01:56:46.098880 ubuntu-xenial-inap-mtl01-0003181559 nova-compute[13725]: ERROR nova.compute.manager [instance: 3d333cb6-9863-4be7-9e98-1f49ceddd6fd]   File \"/opt/stack/nova/nova/compute/manager.py\", line 7479, in _error_out_instance_on_exception\nMar 26 01:56:46.099098 ubuntu-xenial-inap-mtl01-0003181559 nova-compute[13725]: ERROR nova.compute.manager [instance: 3d333cb6-9863-4be7-9e98-1f49ceddd6fd]     yield\nMar 26 01:56:46.099270 ubuntu-xenial-inap-mtl01-0003181559 nova-compute[13725]: ERROR nova.compute.manager [instance: 3d333cb6-9863-4be7-9e98-1f49ceddd6fd]   File \"/opt/stack/nova/nova/compute/manager.py\", line 4296, in _resize_instance\nMar 26 01:56:46.099441 ubuntu-xenial-inap-mtl01-0003181559 nova-compute[13725]: ERROR nova.compute.manager [instance: 3d333cb6-9863-4be7-9e98-1f49ceddd6fd]     migration_p)\nMar 26 01:56:46.099612 ubuntu-xenial-inap-mtl01-0003181559 nova-compute[13725]: ERROR nova.compute.manager [instance: 3d333cb6-9863-4be7-9e98-1f49ceddd6fd]   File \"/opt/stack/nova/nova/network/neutronv2/api.py\", line 2398, in migrate_instance_start\nMar 26 01:56:46.099803 ubuntu-xenial-inap-mtl01-0003181559 nova-compute[13725]: ERROR nova.compute.manager [instance: 3d333cb6-9863-4be7-9e98-1f49ceddd6fd]     if resp.json()[\u0027binding\u0027][\u0027status\u0027] !\u003d \u0027ACTIVE\u0027:\nMar 26 01:56:46.099968 ubuntu-xenial-inap-mtl01-0003181559 nova-compute[13725]: ERROR nova.compute.manager [instance: 3d333cb6-9863-4be7-9e98-1f49ceddd6fd] AttributeError: \u0027_DictWithMeta\u0027 object has no attribute \u0027json\u0027\n\nSo it looks like it will just be a dict-like object in the response.","commit_id":"747c42f6b54e3134c61cb7863df9edc3feacb256"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"79ff61cc9b66dd5905dc8df9cc74e93840258a48","unresolved":false,"context_lines":[{"line_number":2395,"context_line":"            # port and destination host."},{"line_number":2396,"context_line":"            resp \u003d client.get(\u0027/ports/%s/bindings/%s\u0027 % (vif[\u0027id\u0027], dest_host))"},{"line_number":2397,"context_line":"            if resp:"},{"line_number":2398,"context_line":"                if resp.json()[\u0027binding\u0027][\u0027status\u0027] !\u003d \u0027ACTIVE\u0027:"},{"line_number":2399,"context_line":"                    # Activate this port binding on the destination host."},{"line_number":2400,"context_line":"                    self.activate_port_binding("},{"line_number":2401,"context_line":"                        context, vif[\u0027id\u0027], dest_host, client)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_6f1f676c","line":2398,"in_reply_to":"bf659307_407d97af","updated":"2018-03-26 16:02:14.000000000","message":"It\u0027s because of this [1].  You\u0027re already getting the json()ified dict value back.\n\n[1] https://github.com/openstack/python-neutronclient/blob/master/neutronclient/v2_0/client.py#L289","commit_id":"747c42f6b54e3134c61cb7863df9edc3feacb256"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9cab8f1998bbb86fb10c5bb90bf606f262bf38bb","unresolved":false,"context_lines":[{"line_number":2396,"context_line":"            resp \u003d client.get(\u0027/ports/%s/bindings/%s\u0027 % (vif[\u0027id\u0027], dest_host))"},{"line_number":2397,"context_line":"            if resp:"},{"line_number":2398,"context_line":"                if resp.json()[\u0027binding\u0027][\u0027status\u0027] !\u003d \u0027ACTIVE\u0027:"},{"line_number":2399,"context_line":"                    # Activate this port binding on the destination host."},{"line_number":2400,"context_line":"                    self.activate_port_binding("},{"line_number":2401,"context_line":"                        context, vif[\u0027id\u0027], dest_host, client)"},{"line_number":2402,"context_line":"                    # TODO(mriedem): Do we need to call"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_803defbc","line":2399,"range":{"start_line":2399,"start_character":20,"end_line":2399,"end_character":73},"updated":"2018-03-26 15:34:15.000000000","message":"redundant comment","commit_id":"747c42f6b54e3134c61cb7863df9edc3feacb256"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5010ee7b99eafc1bca141d3aac450bf193e87b1b","unresolved":false,"context_lines":[{"line_number":2396,"context_line":"            resp \u003d client.get(\u0027/ports/%s/bindings/%s\u0027 % (vif[\u0027id\u0027], dest_host))"},{"line_number":2397,"context_line":"            if resp:"},{"line_number":2398,"context_line":"                if resp.json()[\u0027binding\u0027][\u0027status\u0027] !\u003d \u0027ACTIVE\u0027:"},{"line_number":2399,"context_line":"                    # Activate this port binding on the destination host."},{"line_number":2400,"context_line":"                    self.activate_port_binding("},{"line_number":2401,"context_line":"                        context, vif[\u0027id\u0027], dest_host, client)"},{"line_number":2402,"context_line":"                    # TODO(mriedem): Do we need to call"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_fa6c9309","line":2399,"range":{"start_line":2399,"start_character":20,"end_line":2399,"end_character":73},"in_reply_to":"bf659307_803defbc","updated":"2018-03-26 16:33:48.000000000","message":"Done","commit_id":"747c42f6b54e3134c61cb7863df9edc3feacb256"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9cab8f1998bbb86fb10c5bb90bf606f262bf38bb","unresolved":false,"context_lines":[{"line_number":2398,"context_line":"                if resp.json()[\u0027binding\u0027][\u0027status\u0027] !\u003d \u0027ACTIVE\u0027:"},{"line_number":2399,"context_line":"                    # Activate this port binding on the destination host."},{"line_number":2400,"context_line":"                    self.activate_port_binding("},{"line_number":2401,"context_line":"                        context, vif[\u0027id\u0027], dest_host, client)"},{"line_number":2402,"context_line":"                    # TODO(mriedem): Do we need to call"},{"line_number":2403,"context_line":"                    # _clear_migration_port_profile? migrate_instance_finish"},{"line_number":2404,"context_line":"                    # would normally take care of clearing the \"migrating_to\""}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_40191777","line":2401,"range":{"start_line":2401,"start_character":55,"end_line":2401,"end_character":61},"updated":"2018-03-26 15:34:15.000000000","message":"name kwargs","commit_id":"747c42f6b54e3134c61cb7863df9edc3feacb256"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5010ee7b99eafc1bca141d3aac450bf193e87b1b","unresolved":false,"context_lines":[{"line_number":2398,"context_line":"                if resp.json()[\u0027binding\u0027][\u0027status\u0027] !\u003d \u0027ACTIVE\u0027:"},{"line_number":2399,"context_line":"                    # Activate this port binding on the destination host."},{"line_number":2400,"context_line":"                    self.activate_port_binding("},{"line_number":2401,"context_line":"                        context, vif[\u0027id\u0027], dest_host, client)"},{"line_number":2402,"context_line":"                    # TODO(mriedem): Do we need to call"},{"line_number":2403,"context_line":"                    # _clear_migration_port_profile? migrate_instance_finish"},{"line_number":2404,"context_line":"                    # would normally take care of clearing the \"migrating_to\""}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_5a681ff4","line":2401,"range":{"start_line":2401,"start_character":55,"end_line":2401,"end_character":61},"in_reply_to":"bf659307_40191777","updated":"2018-03-26 16:33:48.000000000","message":"OK, but I hope you\u0027re not -1ing for this. I don\u0027t generally use named kwargs unless I actually have to skip some other arguments.","commit_id":"747c42f6b54e3134c61cb7863df9edc3feacb256"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"241b270444e5bbfffd8df1e2d87fa5422c6dd5e4","unresolved":false,"context_lines":[{"line_number":2398,"context_line":"                if resp.json()[\u0027binding\u0027][\u0027status\u0027] !\u003d \u0027ACTIVE\u0027:"},{"line_number":2399,"context_line":"                    # Activate this port binding on the destination host."},{"line_number":2400,"context_line":"                    self.activate_port_binding("},{"line_number":2401,"context_line":"                        context, vif[\u0027id\u0027], dest_host, client)"},{"line_number":2402,"context_line":"                    # TODO(mriedem): Do we need to call"},{"line_number":2403,"context_line":"                    # _clear_migration_port_profile? migrate_instance_finish"},{"line_number":2404,"context_line":"                    # would normally take care of clearing the \"migrating_to\""}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_a1cfcb7d","line":2401,"range":{"start_line":2401,"start_character":55,"end_line":2401,"end_character":61},"in_reply_to":"bf659307_5a681ff4","updated":"2018-03-26 21:51:50.000000000","message":"I was, actually.  This is something I feel pretty strongly about.  I\u0027ve been bitten and seen bites by this enough times that it\u0027s definitely worth enforcing IMO, especially since it\u0027s so easy to do.","commit_id":"747c42f6b54e3134c61cb7863df9edc3feacb256"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9cab8f1998bbb86fb10c5bb90bf606f262bf38bb","unresolved":false,"context_lines":[{"line_number":2411,"context_line":"                # exit early."},{"line_number":2412,"context_line":"                return"},{"line_number":2413,"context_line":"            else:"},{"line_number":2414,"context_line":"                # This indicates some unexpected error so log it and continue."},{"line_number":2415,"context_line":"                LOG.error(\u0027Unexpected error trying to get binding info \u0027"},{"line_number":2416,"context_line":"                          \u0027for port %s and destination host %s. Code: %s. \u0027"},{"line_number":2417,"context_line":"                          \u0027Error: %s\u0027, vif[\u0027id\u0027], dest_host, resp.status_code,"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_6040db36","line":2414,"range":{"start_line":2414,"start_character":15,"end_line":2414,"end_character":78},"updated":"2018-03-26 15:34:15.000000000","message":"redundant comment","commit_id":"747c42f6b54e3134c61cb7863df9edc3feacb256"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5010ee7b99eafc1bca141d3aac450bf193e87b1b","unresolved":false,"context_lines":[{"line_number":2411,"context_line":"                # exit early."},{"line_number":2412,"context_line":"                return"},{"line_number":2413,"context_line":"            else:"},{"line_number":2414,"context_line":"                # This indicates some unexpected error so log it and continue."},{"line_number":2415,"context_line":"                LOG.error(\u0027Unexpected error trying to get binding info \u0027"},{"line_number":2416,"context_line":"                          \u0027for port %s and destination host %s. Code: %s. \u0027"},{"line_number":2417,"context_line":"                          \u0027Error: %s\u0027, vif[\u0027id\u0027], dest_host, resp.status_code,"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_1a72a7e6","line":2414,"range":{"start_line":2414,"start_character":15,"end_line":2414,"end_character":78},"in_reply_to":"bf659307_6040db36","updated":"2018-03-26 16:33:48.000000000","message":"Done","commit_id":"747c42f6b54e3134c61cb7863df9edc3feacb256"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3f8688a0f001ed2b5334d6ebce3d24ebe614b316","unresolved":false,"context_lines":[{"line_number":2428,"context_line":"                      \u0027updated later.\u0027, instance\u003dinstance)"},{"line_number":2429,"context_line":"            return"},{"line_number":2430,"context_line":""},{"line_number":2431,"context_line":"        client \u003d get_client(context, admin\u003dTrue)"},{"line_number":2432,"context_line":"        dest_host \u003d migration[\u0027dest_compute\u0027]"},{"line_number":2433,"context_line":"        for vif in instance.get_network_info():"},{"line_number":2434,"context_line":"            # Not all compute migration flows use the port binding-extended"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_50ce3e82","line":2431,"range":{"start_line":2431,"start_character":17,"end_line":2431,"end_character":27},"updated":"2018-03-30 23:30:34.000000000","message":"Need to use ksa adapter here.","commit_id":"b89b8b4bac582769e8f67ee3ec3d9764ba532399"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3f8688a0f001ed2b5334d6ebce3d24ebe614b316","unresolved":false,"context_lines":[{"line_number":2434,"context_line":"            # Not all compute migration flows use the port binding-extended"},{"line_number":2435,"context_line":"            # API yet, so first check to see if there is a binding for the"},{"line_number":2436,"context_line":"            # port and destination host."},{"line_number":2437,"context_line":"            resp \u003d client.get(\u0027/ports/%s/bindings/%s\u0027 % (vif[\u0027id\u0027], dest_host))"},{"line_number":2438,"context_line":"            if resp:"},{"line_number":2439,"context_line":"                if resp[\u0027binding\u0027][\u0027status\u0027] !\u003d \u0027ACTIVE\u0027:"},{"line_number":2440,"context_line":"                    self.activate_port_binding(context, vif[\u0027id\u0027], dest_host)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_f0c67268","line":2437,"updated":"2018-03-30 23:30:34.000000000","message":"Needs to be prefixed with /v2.0/","commit_id":"b89b8b4bac582769e8f67ee3ec3d9764ba532399"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4d0bc2d07feb8eaac7ed6ffeeb8e9722e468b380","unresolved":false,"context_lines":[{"line_number":2453,"context_line":"            resp \u003d client.get(\u0027/v2.0/ports/%s/bindings/%s\u0027 %"},{"line_number":2454,"context_line":"                              (vif[\u0027id\u0027], dest_host), raise_exc\u003dFalse)"},{"line_number":2455,"context_line":"            if resp:"},{"line_number":2456,"context_line":"                if resp.json()[\u0027binding\u0027][\u0027status\u0027] !\u003d \u0027ACTIVE\u0027:"},{"line_number":2457,"context_line":"                    self.activate_port_binding(context, vif[\u0027id\u0027], dest_host)"},{"line_number":2458,"context_line":"                    # TODO(mriedem): Do we need to call"},{"line_number":2459,"context_line":"                    # _clear_migration_port_profile? migrate_instance_finish"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f6a8fd7_1d9df309","line":2456,"updated":"2018-04-26 12:16:04.000000000","message":"nit: it might be nice to log something at debug if there is a port binding resource but it\u0027s already active at this point, because later in the series when we hit post-copy and the event handler calls this method, at least in this one case I\u0027m not seeing the port get activated by that call:\n\nhttp://logs.openstack.org/37/522537/24/check/legacy-tempest-dsvm-multinode-live-migration/71b1e6b/logs/screen-n-cpu.txt.gz#_Apr_25_23_07_18_613579\n\nIt\u0027s also possible that we\u0027re getting the lifecycle event late from the libvirt driver and we\u0027ve already hit _post_live_migration that activates the bindings.","commit_id":"21ca746be475d519f874b07387f47930d71b6055"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"74c6869613eba1c052a6971ef5fc14052bc89301","unresolved":false,"context_lines":[{"line_number":2419,"context_line":"        If the instance has port bindings on the destination compute host,"},{"line_number":2420,"context_line":"        they are activated in this method which will atomically change the"},{"line_number":2421,"context_line":"        source compute host port binding to inactive and also change the port"},{"line_number":2422,"context_line":"        \"binding:host_id\" attribute to the destination host."},{"line_number":2423,"context_line":""},{"line_number":2424,"context_line":"        If there are no binding resources for the attached ports on the given"},{"line_number":2425,"context_line":"        destination host, this method is a no-op."}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_b35c014d","line":2422,"range":{"start_line":2422,"start_character":17,"end_line":2422,"end_character":24},"updated":"2018-06-18 13:38:41.000000000","message":"binding:host?","commit_id":"ce7fd6b0f91df65b0b4d6200758f7e3847e41ed1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8cc8ff8466cc3fcfb3bc46a945cc67a1269d9538","unresolved":false,"context_lines":[{"line_number":2419,"context_line":"        If the instance has port bindings on the destination compute host,"},{"line_number":2420,"context_line":"        they are activated in this method which will atomically change the"},{"line_number":2421,"context_line":"        source compute host port binding to inactive and also change the port"},{"line_number":2422,"context_line":"        \"binding:host_id\" attribute to the destination host."},{"line_number":2423,"context_line":""},{"line_number":2424,"context_line":"        If there are no binding resources for the attached ports on the given"},{"line_number":2425,"context_line":"        destination host, this method is a no-op."}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_140b3f2b","line":2422,"range":{"start_line":2422,"start_character":17,"end_line":2422,"end_character":24},"in_reply_to":"5f7c97a3_72965641","updated":"2018-06-19 13:35:40.000000000","message":"Thanks for the explanation. It is a lot clearer now. It is  binding:host_id in the port resource but it is binding:host in the binding resource.","commit_id":"ce7fd6b0f91df65b0b4d6200758f7e3847e41ed1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"97fbb19086354628d3fc73c1f4728fd6ffdc1515","unresolved":false,"context_lines":[{"line_number":2419,"context_line":"        If the instance has port bindings on the destination compute host,"},{"line_number":2420,"context_line":"        they are activated in this method which will atomically change the"},{"line_number":2421,"context_line":"        source compute host port binding to inactive and also change the port"},{"line_number":2422,"context_line":"        \"binding:host_id\" attribute to the destination host."},{"line_number":2423,"context_line":""},{"line_number":2424,"context_line":"        If there are no binding resources for the attached ports on the given"},{"line_number":2425,"context_line":"        destination host, this method is a no-op."}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_72965641","line":2422,"range":{"start_line":2422,"start_character":17,"end_line":2422,"end_character":24},"in_reply_to":"5f7c97a3_b35c014d","updated":"2018-06-18 22:49:47.000000000","message":"nope\n\nhttps://developer.openstack.org/api-ref/network/v2/index.html#port-binding-extended-attributes","commit_id":"ce7fd6b0f91df65b0b4d6200758f7e3847e41ed1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"74c6869613eba1c052a6971ef5fc14052bc89301","unresolved":false,"context_lines":[{"line_number":2432,"context_line":"            \"dest_compute\": The name of the destination compute host."},{"line_number":2433,"context_line":""},{"line_number":2434,"context_line":"        :raises: nova.exception.PortBindingActivationFailed if any port binding"},{"line_number":2435,"context_line":"            activation fails"},{"line_number":2436,"context_line":"        \"\"\""},{"line_number":2437,"context_line":"        if not self.supports_port_binding_extension(context):"},{"line_number":2438,"context_line":"            # If neutron isn\u0027t new enough yet for the port \"binding-extended\""}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_e6c875a9","line":2435,"updated":"2018-06-18 13:38:41.000000000","message":"This feels problematic as the client might need to do rollback of some of the port activations that happened before this failure but the client will not know what activations needs to be rolled back.","commit_id":"ce7fd6b0f91df65b0b4d6200758f7e3847e41ed1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"97fbb19086354628d3fc73c1f4728fd6ffdc1515","unresolved":false,"context_lines":[{"line_number":2432,"context_line":"            \"dest_compute\": The name of the destination compute host."},{"line_number":2433,"context_line":""},{"line_number":2434,"context_line":"        :raises: nova.exception.PortBindingActivationFailed if any port binding"},{"line_number":2435,"context_line":"            activation fails"},{"line_number":2436,"context_line":"        \"\"\""},{"line_number":2437,"context_line":"        if not self.supports_port_binding_extension(context):"},{"line_number":2438,"context_line":"            # If neutron isn\u0027t new enough yet for the port \"binding-extended\""}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_124842b1","line":2435,"in_reply_to":"5f7c97a3_e6c875a9","updated":"2018-06-18 22:49:47.000000000","message":"What do you propose? If you look at:\n\nhttps://review.openstack.org/#/c/551371/25/nova/compute/manager.py@6389\n\nmigrate_instance_start gets called from post_live_migration while we\u0027re on the source host. Once the guest is on the dest host, things are pretty hard to automatically rollback, see below.","commit_id":"ce7fd6b0f91df65b0b4d6200758f7e3847e41ed1"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5f6e614214e96343adba1ef5cc79522ff0d1d6ac","unresolved":false,"context_lines":[{"line_number":2436,"context_line":"        \"\"\""},{"line_number":2437,"context_line":"        if not self.supports_port_binding_extension(context):"},{"line_number":2438,"context_line":"            # If neutron isn\u0027t new enough yet for the port \"binding-extended\""},{"line_number":2439,"context_line":"            # API extension, we just no-op. The port binding host will be"},{"line_number":2440,"context_line":"            # be updated in migrate_instance_finish, which is functionally OK,"},{"line_number":2441,"context_line":"            # it\u0027s just not optimal."},{"line_number":2442,"context_line":"            LOG.debug(\u0027Neutron is not new enough to perform early destination \u0027"},{"line_number":2443,"context_line":"                      \u0027host port binding activation. Port bindings will be \u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_607a7788","line":2440,"range":{"start_line":2439,"start_character":71,"end_line":2440,"end_character":16},"updated":"2018-06-12 20:46:48.000000000","message":"BB","commit_id":"ce7fd6b0f91df65b0b4d6200758f7e3847e41ed1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fc8166ec6cf5c8c7c5e6cd91039e5d495bde316f","unresolved":false,"context_lines":[{"line_number":2436,"context_line":"        \"\"\""},{"line_number":2437,"context_line":"        if not self.supports_port_binding_extension(context):"},{"line_number":2438,"context_line":"            # If neutron isn\u0027t new enough yet for the port \"binding-extended\""},{"line_number":2439,"context_line":"            # API extension, we just no-op. The port binding host will be"},{"line_number":2440,"context_line":"            # be updated in migrate_instance_finish, which is functionally OK,"},{"line_number":2441,"context_line":"            # it\u0027s just not optimal."},{"line_number":2442,"context_line":"            LOG.debug(\u0027Neutron is not new enough to perform early destination \u0027"},{"line_number":2443,"context_line":"                      \u0027host port binding activation. Port bindings will be \u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_fe7ce7eb","line":2440,"range":{"start_line":2439,"start_character":71,"end_line":2440,"end_character":16},"in_reply_to":"5f7c97a3_607a7788","updated":"2018-06-12 23:38:38.000000000","message":"This is intentional for the mass spell checker contributors out there, I want to keep them fed.","commit_id":"ce7fd6b0f91df65b0b4d6200758f7e3847e41ed1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"74c6869613eba1c052a6971ef5fc14052bc89301","unresolved":false,"context_lines":[{"line_number":2459,"context_line":"                    # _clear_migration_port_profile? migrate_instance_finish"},{"line_number":2460,"context_line":"                    # would normally take care of clearing the \"migrating_to\""},{"line_number":2461,"context_line":"                    # attribute on each port when updating the port\u0027s"},{"line_number":2462,"context_line":"                    # binding:host_id to point to the destination host."},{"line_number":2463,"context_line":"                else:"},{"line_number":2464,"context_line":"                    # We might be racing with another thread that\u0027s handling"},{"line_number":2465,"context_line":"                    # post-migrate operations and already activated the port"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_f310395c","line":2462,"range":{"start_line":2462,"start_character":30,"end_line":2462,"end_character":37},"updated":"2018-06-18 13:38:41.000000000","message":"host?","commit_id":"ce7fd6b0f91df65b0b4d6200758f7e3847e41ed1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"74c6869613eba1c052a6971ef5fc14052bc89301","unresolved":false,"context_lines":[{"line_number":2476,"context_line":"            else:"},{"line_number":2477,"context_line":"                # We don\u0027t raise an exception here because we assume that"},{"line_number":2478,"context_line":"                # port bindings will be updated correctly when"},{"line_number":2479,"context_line":"                # migrate_instance_finish runs."},{"line_number":2480,"context_line":"                LOG.error(\u0027Unexpected error trying to get binding info \u0027"},{"line_number":2481,"context_line":"                          \u0027for port %s and destination host %s. Code: %s. \u0027"},{"line_number":2482,"context_line":"                          \u0027Error: %s\u0027, vif[\u0027id\u0027], dest_host, resp.status_code,"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_c63a19c3","line":2479,"updated":"2018-06-18 13:38:41.000000000","message":"or fail with the same reason and propagate the error properly","commit_id":"ce7fd6b0f91df65b0b4d6200758f7e3847e41ed1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8cc8ff8466cc3fcfb3bc46a945cc67a1269d9538","unresolved":false,"context_lines":[{"line_number":2476,"context_line":"            else:"},{"line_number":2477,"context_line":"                # We don\u0027t raise an exception here because we assume that"},{"line_number":2478,"context_line":"                # port bindings will be updated correctly when"},{"line_number":2479,"context_line":"                # migrate_instance_finish runs."},{"line_number":2480,"context_line":"                LOG.error(\u0027Unexpected error trying to get binding info \u0027"},{"line_number":2481,"context_line":"                          \u0027for port %s and destination host %s. Code: %s. \u0027"},{"line_number":2482,"context_line":"                          \u0027Error: %s\u0027, vif[\u0027id\u0027], dest_host, resp.status_code,"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_173901d7","line":2479,"in_reply_to":"5f7c97a3_9299b26e","updated":"2018-06-19 13:35:40.000000000","message":"fair enough. We log which port failed so the operator can at least troubleshoot it.","commit_id":"ce7fd6b0f91df65b0b4d6200758f7e3847e41ed1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"97fbb19086354628d3fc73c1f4728fd6ffdc1515","unresolved":false,"context_lines":[{"line_number":2476,"context_line":"            else:"},{"line_number":2477,"context_line":"                # We don\u0027t raise an exception here because we assume that"},{"line_number":2478,"context_line":"                # port bindings will be updated correctly when"},{"line_number":2479,"context_line":"                # migrate_instance_finish runs."},{"line_number":2480,"context_line":"                LOG.error(\u0027Unexpected error trying to get binding info \u0027"},{"line_number":2481,"context_line":"                          \u0027for port %s and destination host %s. Code: %s. \u0027"},{"line_number":2482,"context_line":"                          \u0027Error: %s\u0027, vif[\u0027id\u0027], dest_host, resp.status_code,"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_9299b26e","line":2479,"in_reply_to":"5f7c97a3_c63a19c3","updated":"2018-06-18 22:49:47.000000000","message":"idk, hard to say, that\u0027s why I left this since post_live_migration_at_destination calls migrate_instance_finish which might also update the port bindings for the dest host.\n\nIn general, if things fail during post-live migration, what we do is pretty undefined since the guest is already on the dest host, so what do we do? There is no rollback to live migrate the guest *back* to the source host. At this point, if live migration fails in post, it\u0027s really on the operator to have to figure out what blew up and figure out how to resolve it, at least unless we have some specific error situations that we can detect and handle.","commit_id":"ce7fd6b0f91df65b0b4d6200758f7e3847e41ed1"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"b0034738063b49375cec73e624ab0770c7218f7a","unresolved":false,"context_lines":[{"line_number":2513,"context_line":"                # port bindings will be updated correctly when"},{"line_number":2514,"context_line":"                # migrate_instance_finish runs."},{"line_number":2515,"context_line":"                LOG.error(\u0027Unexpected error trying to get binding info \u0027"},{"line_number":2516,"context_line":"                          \u0027for port %s and destination host %s. Code: %s. \u0027"},{"line_number":2517,"context_line":"                          \u0027Error: %s\u0027, vif[\u0027id\u0027], dest_host, resp.status_code,"},{"line_number":2518,"context_line":"                          resp.text)"},{"line_number":2519,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5f7c97a3_01c94423","line":2516,"range":{"start_line":2516,"start_character":70,"end_line":2516,"end_character":73},"updated":"2018-07-09 08:14:11.000000000","message":"%i","commit_id":"424d91c048a908b0b49eeedd6fbefae614819e0b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7e21be0630be3f3ce5788e3d90559e822ffe783b","unresolved":false,"context_lines":[{"line_number":2513,"context_line":"                # port bindings will be updated correctly when"},{"line_number":2514,"context_line":"                # migrate_instance_finish runs."},{"line_number":2515,"context_line":"                LOG.error(\u0027Unexpected error trying to get binding info \u0027"},{"line_number":2516,"context_line":"                          \u0027for port %s and destination host %s. Code: %s. \u0027"},{"line_number":2517,"context_line":"                          \u0027Error: %s\u0027, vif[\u0027id\u0027], dest_host, resp.status_code,"},{"line_number":2518,"context_line":"                          resp.text)"},{"line_number":2519,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5f7c97a3_7edf7737","line":2516,"range":{"start_line":2516,"start_character":70,"end_line":2516,"end_character":73},"in_reply_to":"5f7c97a3_01c94423","updated":"2018-07-19 15:12:00.000000000","message":"Done in a follow up.","commit_id":"424d91c048a908b0b49eeedd6fbefae614819e0b"}],"nova/tests/unit/network/test_neutronv2.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9cab8f1998bbb86fb10c5bb90bf606f262bf38bb","unresolved":false,"context_lines":[{"line_number":4996,"context_line":"                              \u0027172.24.5.15\u0027, \u002710.1.0.9\u0027)"},{"line_number":4997,"context_line":""},{"line_number":4998,"context_line":"    @mock.patch(\u0027nova.network.neutronv2.api.get_client\u0027,"},{"line_number":4999,"context_line":"                new_callable\u003dmock.NonCallableMock)  # asserts not called"},{"line_number":5000,"context_line":"    def test_migrate_instance_start_no_binding_ext(self, get_client_mock):"},{"line_number":5001,"context_line":"        \"\"\"Tests that migrate_instance_start exits early if neutron doesn\u0027t"},{"line_number":5002,"context_line":"        have the binding-extended API extension."}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_0089df73","line":4999,"range":{"start_line":4999,"start_character":16,"end_line":4999,"end_character":28},"updated":"2018-03-26 15:34:15.000000000","message":"I think you can use `new` instead of `new_callable` and get rid of the `get_client_mock` arg, since you\u0027re not using it.","commit_id":"747c42f6b54e3134c61cb7863df9edc3feacb256"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"92da604dd00d1a54fcd82858e734bfa692969de7","unresolved":false,"context_lines":[{"line_number":4996,"context_line":"                              \u0027172.24.5.15\u0027, \u002710.1.0.9\u0027)"},{"line_number":4997,"context_line":""},{"line_number":4998,"context_line":"    @mock.patch(\u0027nova.network.neutronv2.api.get_client\u0027,"},{"line_number":4999,"context_line":"                new_callable\u003dmock.NonCallableMock)  # asserts not called"},{"line_number":5000,"context_line":"    def test_migrate_instance_start_no_binding_ext(self, get_client_mock):"},{"line_number":5001,"context_line":"        \"\"\"Tests that migrate_instance_start exits early if neutron doesn\u0027t"},{"line_number":5002,"context_line":"        have the binding-extended API extension."}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_5a67bf4e","line":4999,"range":{"start_line":4999,"start_character":16,"end_line":4999,"end_character":28},"in_reply_to":"bf659307_0089df73","updated":"2018-03-26 16:27:23.000000000","message":"I\u0027ll test it out.","commit_id":"747c42f6b54e3134c61cb7863df9edc3feacb256"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fbab5684c5a087bd2bb8b4a3488362eadee5c40d","unresolved":false,"context_lines":[{"line_number":4996,"context_line":"                              \u0027172.24.5.15\u0027, \u002710.1.0.9\u0027)"},{"line_number":4997,"context_line":""},{"line_number":4998,"context_line":"    @mock.patch(\u0027nova.network.neutronv2.api.get_client\u0027,"},{"line_number":4999,"context_line":"                new_callable\u003dmock.NonCallableMock)  # asserts not called"},{"line_number":5000,"context_line":"    def test_migrate_instance_start_no_binding_ext(self, get_client_mock):"},{"line_number":5001,"context_line":"        \"\"\"Tests that migrate_instance_start exits early if neutron doesn\u0027t"},{"line_number":5002,"context_line":"        have the binding-extended API extension."}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_6dda0c18","line":4999,"range":{"start_line":4999,"start_character":16,"end_line":4999,"end_character":28},"in_reply_to":"bf659307_5a67bf4e","updated":"2018-03-26 18:55:58.000000000","message":"TypeError: \u0027NonCallableMock\u0027 object is not callable","commit_id":"747c42f6b54e3134c61cb7863df9edc3feacb256"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"241b270444e5bbfffd8df1e2d87fa5422c6dd5e4","unresolved":false,"context_lines":[{"line_number":4996,"context_line":"                              \u0027172.24.5.15\u0027, \u002710.1.0.9\u0027)"},{"line_number":4997,"context_line":""},{"line_number":4998,"context_line":"    @mock.patch(\u0027nova.network.neutronv2.api.get_client\u0027,"},{"line_number":4999,"context_line":"                new_callable\u003dmock.NonCallableMock)  # asserts not called"},{"line_number":5000,"context_line":"    def test_migrate_instance_start_no_binding_ext(self, get_client_mock):"},{"line_number":5001,"context_line":"        \"\"\"Tests that migrate_instance_start exits early if neutron doesn\u0027t"},{"line_number":5002,"context_line":"        have the binding-extended API extension."}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_01b0f7f3","line":4999,"range":{"start_line":4999,"start_character":16,"end_line":4999,"end_character":28},"in_reply_to":"bf659307_6dda0c18","updated":"2018-03-26 21:51:50.000000000","message":"That\u0027s weird, okay.","commit_id":"747c42f6b54e3134c61cb7863df9edc3feacb256"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9cab8f1998bbb86fb10c5bb90bf606f262bf38bb","unresolved":false,"context_lines":[{"line_number":5014,"context_line":"        \"\"\""},{"line_number":5015,"context_line":"        def fake_get(url, *args, **kwargs):"},{"line_number":5016,"context_line":"            # TODO(mriedem): Move"},{"line_number":5017,"context_line":"            # nova.tests.unit.test_identity.FakeResponse into common code"},{"line_number":5018,"context_line":"            # and re-use that here."},{"line_number":5019,"context_line":"            mock_response \u003d mock.MagicMock(status_code\u003d200)"},{"line_number":5020,"context_line":"            mock_response.json.return_value \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_c9d0f3fa","line":5017,"range":{"start_line":5017,"start_character":14,"end_line":5017,"end_character":56},"updated":"2018-03-26 15:34:15.000000000","message":"Having had similar awkwardness trying to fake Response, this was the kick I needed to put this together [1].\n\nBut heck, at the very least fake_get could have been pulled out into a staticmethod, since it\u0027s repeated for every test case.\n\n[1] https://review.openstack.org/556551","commit_id":"747c42f6b54e3134c61cb7863df9edc3feacb256"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9cab8f1998bbb86fb10c5bb90bf606f262bf38bb","unresolved":false,"context_lines":[{"line_number":5031,"context_line":"        instance \u003d objects.Instance(info_cache\u003dobjects.InstanceInfoCache("},{"line_number":5032,"context_line":"            network_info\u003dmodel.NetworkInfo([model.VIF(uuids.port_id)])))"},{"line_number":5033,"context_line":"        migration \u003d {\u0027source_compute\u0027: \u0027source\u0027, \u0027dest_compute\u0027: \u0027dest\u0027}"},{"line_number":5034,"context_line":"        with mock.patch.object(self.api, \u0027activate_port_binding\u0027) as activate:"},{"line_number":5035,"context_line":"            with mock.patch.object(self.api, \u0027supports_port_binding_extension\u0027,"},{"line_number":5036,"context_line":"                                   return_value\u003dTrue):"},{"line_number":5037,"context_line":"                self.api.migrate_instance_start("},{"line_number":5038,"context_line":"                    self.context, instance, migration)"},{"line_number":5039,"context_line":"        activate.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_49be2366","line":5036,"range":{"start_line":5034,"start_character":13,"end_line":5036,"end_character":54},"updated":"2018-03-26 15:34:15.000000000","message":"Combine these rather than nesting.\n\n(throughout)","commit_id":"747c42f6b54e3134c61cb7863df9edc3feacb256"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"241b270444e5bbfffd8df1e2d87fa5422c6dd5e4","unresolved":false,"context_lines":[{"line_number":5031,"context_line":"        instance \u003d objects.Instance(info_cache\u003dobjects.InstanceInfoCache("},{"line_number":5032,"context_line":"            network_info\u003dmodel.NetworkInfo([model.VIF(uuids.port_id)])))"},{"line_number":5033,"context_line":"        migration \u003d {\u0027source_compute\u0027: \u0027source\u0027, \u0027dest_compute\u0027: \u0027dest\u0027}"},{"line_number":5034,"context_line":"        with mock.patch.object(self.api, \u0027activate_port_binding\u0027) as activate:"},{"line_number":5035,"context_line":"            with mock.patch.object(self.api, \u0027supports_port_binding_extension\u0027,"},{"line_number":5036,"context_line":"                                   return_value\u003dTrue):"},{"line_number":5037,"context_line":"                self.api.migrate_instance_start("},{"line_number":5038,"context_line":"                    self.context, instance, migration)"},{"line_number":5039,"context_line":"        activate.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_c19f5f4e","line":5036,"range":{"start_line":5034,"start_character":13,"end_line":5036,"end_character":54},"in_reply_to":"bf659307_3a620b40","updated":"2018-03-26 21:51:50.000000000","message":"I want to make sure we\u0027re talking about the same thing here.  You\u0027re already using two context managers.  I\u0027m just saying that instead of\n\n with A() as a:\n     with B():\n\nyou can instead say:\n\n with A() as a, B():\n\nand save a level of indent.","commit_id":"747c42f6b54e3134c61cb7863df9edc3feacb256"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"92da604dd00d1a54fcd82858e734bfa692969de7","unresolved":false,"context_lines":[{"line_number":5031,"context_line":"        instance \u003d objects.Instance(info_cache\u003dobjects.InstanceInfoCache("},{"line_number":5032,"context_line":"            network_info\u003dmodel.NetworkInfo([model.VIF(uuids.port_id)])))"},{"line_number":5033,"context_line":"        migration \u003d {\u0027source_compute\u0027: \u0027source\u0027, \u0027dest_compute\u0027: \u0027dest\u0027}"},{"line_number":5034,"context_line":"        with mock.patch.object(self.api, \u0027activate_port_binding\u0027) as activate:"},{"line_number":5035,"context_line":"            with mock.patch.object(self.api, \u0027supports_port_binding_extension\u0027,"},{"line_number":5036,"context_line":"                                   return_value\u003dTrue):"},{"line_number":5037,"context_line":"                self.api.migrate_instance_start("},{"line_number":5038,"context_line":"                    self.context, instance, migration)"},{"line_number":5039,"context_line":"        activate.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_3a620b40","line":5036,"range":{"start_line":5034,"start_character":13,"end_line":5036,"end_character":54},"in_reply_to":"bf659307_49be2366","updated":"2018-03-26 16:27:23.000000000","message":"Some people dislike the context manager approach as well, and since I\u0027m not nesting a lot of these I don\u0027t see the big deal.","commit_id":"747c42f6b54e3134c61cb7863df9edc3feacb256"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9cab8f1998bbb86fb10c5bb90bf606f262bf38bb","unresolved":false,"context_lines":[{"line_number":5144,"context_line":"            mock.call(\u0027/ports/%s/bindings/dest\u0027 % uuids.port1),"},{"line_number":5145,"context_line":"            mock.call(\u0027/ports/%s/bindings/dest\u0027 % uuids.port2)])"},{"line_number":5146,"context_line":""},{"line_number":5147,"context_line":""},{"line_number":5148,"context_line":"class TestNeutronv2ModuleMethods(test.NoDBTestCase):"},{"line_number":5149,"context_line":""},{"line_number":5150,"context_line":"    def test_gather_port_ids_and_networks_wrong_params(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_4c31510b","line":5147,"updated":"2018-03-26 15:34:15.000000000","message":"good thorough tests.","commit_id":"747c42f6b54e3134c61cb7863df9edc3feacb256"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"74c6869613eba1c052a6971ef5fc14052bc89301","unresolved":false,"context_lines":[{"line_number":5053,"context_line":"                self.api.migrate_instance_start("},{"line_number":5054,"context_line":"                    self.context, instance, migration)"},{"line_number":5055,"context_line":"        get_client_mock.return_value.get.assert_called_once_with("},{"line_number":5056,"context_line":"            \u0027/v2.0/ports/%s/bindings/dest\u0027 % uuids.port_id, raise_exc\u003dFalse)"},{"line_number":5057,"context_line":""},{"line_number":5058,"context_line":"    @mock.patch(\u0027nova.network.neutronv2.api._get_ksa_client\u0027)"},{"line_number":5059,"context_line":"    def test_migrate_instance_start_no_bindings(self, get_client_mock):"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_e6a155f9","line":5056,"updated":"2018-06-18 13:38:41.000000000","message":"nit: you can assert that activate_port_binding is not called in this case","commit_id":"ce7fd6b0f91df65b0b4d6200758f7e3847e41ed1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"97fbb19086354628d3fc73c1f4728fd6ffdc1515","unresolved":false,"context_lines":[{"line_number":5053,"context_line":"                self.api.migrate_instance_start("},{"line_number":5054,"context_line":"                    self.context, instance, migration)"},{"line_number":5055,"context_line":"        get_client_mock.return_value.get.assert_called_once_with("},{"line_number":5056,"context_line":"            \u0027/v2.0/ports/%s/bindings/dest\u0027 % uuids.port_id, raise_exc\u003dFalse)"},{"line_number":5057,"context_line":""},{"line_number":5058,"context_line":"    @mock.patch(\u0027nova.network.neutronv2.api._get_ksa_client\u0027)"},{"line_number":5059,"context_line":"    def test_migrate_instance_start_no_bindings(self, get_client_mock):"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_f2a9067c","line":5056,"in_reply_to":"5f7c97a3_e6a155f9","updated":"2018-06-18 22:49:47.000000000","message":"That\u0027s done using NonCallableMock on L5050.","commit_id":"ce7fd6b0f91df65b0b4d6200758f7e3847e41ed1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8cc8ff8466cc3fcfb3bc46a945cc67a1269d9538","unresolved":false,"context_lines":[{"line_number":5053,"context_line":"                self.api.migrate_instance_start("},{"line_number":5054,"context_line":"                    self.context, instance, migration)"},{"line_number":5055,"context_line":"        get_client_mock.return_value.get.assert_called_once_with("},{"line_number":5056,"context_line":"            \u0027/v2.0/ports/%s/bindings/dest\u0027 % uuids.port_id, raise_exc\u003dFalse)"},{"line_number":5057,"context_line":""},{"line_number":5058,"context_line":"    @mock.patch(\u0027nova.network.neutronv2.api._get_ksa_client\u0027)"},{"line_number":5059,"context_line":"    def test_migrate_instance_start_no_bindings(self, get_client_mock):"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_d732a9f2","line":5056,"in_reply_to":"5f7c97a3_f2a9067c","updated":"2018-06-19 13:35:40.000000000","message":"You are right. My bad.","commit_id":"ce7fd6b0f91df65b0b4d6200758f7e3847e41ed1"}]}
