)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"1acd91350d5dfeaaed1b226bcda502dd2847e107","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Moshe Levi \u003cmoshele@mellanox.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-09-25 10:29:37 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"don\u0027t overwrite binding-profile"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I80106707a037d567d0f690570f2cf9cfcd30d594"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7f515b1d_955c194c","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":31},"updated":"2017-09-25 08:57:21.000000000","message":"We\u0027re going to need more context and possibly a bug report here","commit_id":"8d90c13a457e797f68327dd095c41fda681006b3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f9d57b323ac55553fe3f1c164c4ce1808a2eb550","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Don\u0027t overwrite binding-profile"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently when provding existing direct port, nova-compute"},{"line_number":10,"context_line":"will overwrite the binding-profile information with pci_vendor_info"},{"line_number":11,"context_line":"and pci_slot. The binding-profile will be used to request"},{"line_number":12,"context_line":"NIC capabilities for SR-IOV ports [1]. This also allows to distinguish"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"7f515b1d_20339316","line":9,"range":{"start_line":9,"start_character":15,"end_line":9,"end_character":23},"updated":"2017-09-27 09:14:38.000000000","message":"providing","commit_id":"1c87fba37a36a4d393e8f43cee7c01bb930abc5c"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"f328da16eb2650097e91a0de6a82d307063bcb32","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Don\u0027t overwrite binding-profile"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently when provding existing direct port, nova-compute"},{"line_number":10,"context_line":"will overwrite the binding-profile information with pci_vendor_info"},{"line_number":11,"context_line":"and pci_slot. The binding-profile will be used to request"},{"line_number":12,"context_line":"NIC capabilities for SR-IOV ports [1]. This also allows to distinguish"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"7f515b1d_93750367","line":9,"range":{"start_line":9,"start_character":15,"end_line":9,"end_character":23},"in_reply_to":"7f515b1d_20339316","updated":"2017-09-27 09:27:45.000000000","message":"Done","commit_id":"1c87fba37a36a4d393e8f43cee7c01bb930abc5c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f9d57b323ac55553fe3f1c164c4ce1808a2eb550","unresolved":false,"context_lines":[{"line_number":12,"context_line":"NIC capabilities for SR-IOV ports [1]. This also allows to distinguish"},{"line_number":13,"context_line":"which neutron mechanism driver will bind the port [2]."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This patch updates the behaviour that on update port it will update"},{"line_number":16,"context_line":"the binding-profile information with pci_vendor_info and pci_slot."},{"line_number":17,"context_line":"And on unbind port it will remove the pci_vendor_info and pci_slot"},{"line_number":18,"context_line":"from the port binding-profile."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"7f515b1d_201cb376","line":15,"range":{"start_line":15,"start_character":61,"end_line":15,"end_character":67},"updated":"2017-09-27 09:14:38.000000000","message":"update, rather than overwrite,\n\n(right?)","commit_id":"1c87fba37a36a4d393e8f43cee7c01bb930abc5c"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"f328da16eb2650097e91a0de6a82d307063bcb32","unresolved":false,"context_lines":[{"line_number":12,"context_line":"NIC capabilities for SR-IOV ports [1]. This also allows to distinguish"},{"line_number":13,"context_line":"which neutron mechanism driver will bind the port [2]."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This patch updates the behaviour that on update port it will update"},{"line_number":16,"context_line":"the binding-profile information with pci_vendor_info and pci_slot."},{"line_number":17,"context_line":"And on unbind port it will remove the pci_vendor_info and pci_slot"},{"line_number":18,"context_line":"from the port binding-profile."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"7f515b1d_f30b17d3","line":15,"range":{"start_line":15,"start_character":61,"end_line":15,"end_character":67},"in_reply_to":"7f515b1d_201cb376","updated":"2017-09-27 09:27:45.000000000","message":"yes","commit_id":"1c87fba37a36a4d393e8f43cee7c01bb930abc5c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f9d57b323ac55553fe3f1c164c4ce1808a2eb550","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This patch updates the behaviour that on update port it will update"},{"line_number":16,"context_line":"the binding-profile information with pci_vendor_info and pci_slot."},{"line_number":17,"context_line":"And on unbind port it will remove the pci_vendor_info and pci_slot"},{"line_number":18,"context_line":"from the port binding-profile."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"[1] https://review.openstack.org/#/c/435954/"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"7f515b1d_531aeb6e","line":17,"range":{"start_line":17,"start_character":34,"end_line":17,"end_character":37},"updated":"2017-09-27 09:14:38.000000000","message":"only the","commit_id":"1c87fba37a36a4d393e8f43cee7c01bb930abc5c"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"f328da16eb2650097e91a0de6a82d307063bcb32","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This patch updates the behaviour that on update port it will update"},{"line_number":16,"context_line":"the binding-profile information with pci_vendor_info and pci_slot."},{"line_number":17,"context_line":"And on unbind port it will remove the pci_vendor_info and pci_slot"},{"line_number":18,"context_line":"from the port binding-profile."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"[1] https://review.openstack.org/#/c/435954/"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"7f515b1d_33fd2fb1","line":17,"range":{"start_line":17,"start_character":34,"end_line":17,"end_character":37},"in_reply_to":"7f515b1d_531aeb6e","updated":"2017-09-27 09:27:45.000000000","message":"Done","commit_id":"1c87fba37a36a4d393e8f43cee7c01bb930abc5c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f9d57b323ac55553fe3f1c164c4ce1808a2eb550","unresolved":false,"context_lines":[{"line_number":15,"context_line":"This patch updates the behaviour that on update port it will update"},{"line_number":16,"context_line":"the binding-profile information with pci_vendor_info and pci_slot."},{"line_number":17,"context_line":"And on unbind port it will remove the pci_vendor_info and pci_slot"},{"line_number":18,"context_line":"from the port binding-profile."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"[1] https://review.openstack.org/#/c/435954/"},{"line_number":21,"context_line":"[2] https://review.openstack.org/#/c/499203/"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"7f515b1d_132a337e","line":18,"updated":"2017-09-27 09:14:38.000000000","message":"rather than unsetting the entire field","commit_id":"1c87fba37a36a4d393e8f43cee7c01bb930abc5c"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"f328da16eb2650097e91a0de6a82d307063bcb32","unresolved":false,"context_lines":[{"line_number":15,"context_line":"This patch updates the behaviour that on update port it will update"},{"line_number":16,"context_line":"the binding-profile information with pci_vendor_info and pci_slot."},{"line_number":17,"context_line":"And on unbind port it will remove the pci_vendor_info and pci_slot"},{"line_number":18,"context_line":"from the port binding-profile."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"[1] https://review.openstack.org/#/c/435954/"},{"line_number":21,"context_line":"[2] https://review.openstack.org/#/c/499203/"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"7f515b1d_73204749","line":18,"in_reply_to":"7f515b1d_132a337e","updated":"2017-09-27 09:27:45.000000000","message":"Done","commit_id":"1c87fba37a36a4d393e8f43cee7c01bb930abc5c"}],"nova/network/neutronv2/api.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"dc64041e4377ecc2b1dad2d2d467ec289da16d75","unresolved":false,"context_lines":[{"line_number":498,"context_line":"            port \u003d self._show_port(context, port_id,"},{"line_number":499,"context_line":"                                   neutron_client\u003dneutron,"},{"line_number":500,"context_line":"                                   fields\u003dBINDING_PROFILE)"},{"line_number":501,"context_line":"            port_profile \u003d port.get(BINDING_PROFILE, {})"},{"line_number":502,"context_line":"            if port_profile:"},{"line_number":503,"context_line":"                for profile_key in port_profile.copy().keys():"},{"line_number":504,"context_line":"                    if profile_key in (\u0027pci_vendor_info\u0027, \u0027pci_slot\u0027):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f515b1d_4ac6be4a","line":501,"range":{"start_line":501,"start_character":0,"end_line":501,"end_character":56},"updated":"2017-09-26 20:29:44.000000000","message":"If you instead say\n\n port_profile \u003d port.get(BINDING_PROFILE) or {}\n\nthen you don\u0027t need `if port_profile` below.","commit_id":"ef754b2a5d5dd573ccd23835acd71838de95b29d"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"b1a32d6b0b3afcced8150cb9d3f00b4cb158b419","unresolved":false,"context_lines":[{"line_number":498,"context_line":"            port \u003d self._show_port(context, port_id,"},{"line_number":499,"context_line":"                                   neutron_client\u003dneutron,"},{"line_number":500,"context_line":"                                   fields\u003dBINDING_PROFILE)"},{"line_number":501,"context_line":"            port_profile \u003d port.get(BINDING_PROFILE, {})"},{"line_number":502,"context_line":"            if port_profile:"},{"line_number":503,"context_line":"                for profile_key in port_profile.copy().keys():"},{"line_number":504,"context_line":"                    if profile_key in (\u0027pci_vendor_info\u0027, \u0027pci_slot\u0027):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f515b1d_767723d6","line":501,"range":{"start_line":501,"start_character":0,"end_line":501,"end_character":56},"in_reply_to":"7f515b1d_4ac6be4a","updated":"2017-09-26 23:15:25.000000000","message":"Done","commit_id":"ef754b2a5d5dd573ccd23835acd71838de95b29d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"812b6a7bbbee0685143f98b676539c977c87dec5","unresolved":false,"context_lines":[{"line_number":498,"context_line":"            port \u003d self._show_port(context, port_id,"},{"line_number":499,"context_line":"                                   neutron_client\u003dneutron,"},{"line_number":500,"context_line":"                                   fields\u003dBINDING_PROFILE)"},{"line_number":501,"context_line":"            port_profile \u003d port.get(BINDING_PROFILE, {})"},{"line_number":502,"context_line":"            if port_profile:"},{"line_number":503,"context_line":"                for profile_key in port_profile.copy().keys():"},{"line_number":504,"context_line":"                    if profile_key in (\u0027pci_vendor_info\u0027, \u0027pci_slot\u0027):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f515b1d_a7caf24a","line":501,"range":{"start_line":501,"start_character":0,"end_line":501,"end_character":56},"in_reply_to":"7f515b1d_767723d6","updated":"2017-09-27 13:38:55.000000000","message":"Not done.  If it\u0027s not possible for port[BINDING_PROFILE] to be present-but-None, then it doesn\u0027t matter.","commit_id":"ef754b2a5d5dd573ccd23835acd71838de95b29d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"dc64041e4377ecc2b1dad2d2d467ec289da16d75","unresolved":false,"context_lines":[{"line_number":500,"context_line":"                                   fields\u003dBINDING_PROFILE)"},{"line_number":501,"context_line":"            port_profile \u003d port.get(BINDING_PROFILE, {})"},{"line_number":502,"context_line":"            if port_profile:"},{"line_number":503,"context_line":"                for profile_key in port_profile.copy().keys():"},{"line_number":504,"context_line":"                    if profile_key in (\u0027pci_vendor_info\u0027, \u0027pci_slot\u0027):"},{"line_number":505,"context_line":"                        del port_profile[profile_key]"},{"line_number":506,"context_line":"            port_req_body[\u0027port\u0027][BINDING_PROFILE] \u003d port_profile"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f515b1d_0a1b2681","line":503,"range":{"start_line":503,"start_character":35,"end_line":503,"end_character":61},"updated":"2017-09-26 20:29:44.000000000","message":"Uck, let\u0027s get rid of the copy().  Two options: 1) change this line to:\n\n for profile_key in list(port_profile):\n\n(the list() makes a local copy of the keys (but not the whole dict))\n\nor more efficient, 2) redo the block as:\n\n for profile_key in (\u0027pci_vendor_info\u0027, \u0027pci_slot\u0027):\n     try:\n         del port_profile[profile_key]\n     except KeyError:\n         pass","commit_id":"ef754b2a5d5dd573ccd23835acd71838de95b29d"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"b1a32d6b0b3afcced8150cb9d3f00b4cb158b419","unresolved":false,"context_lines":[{"line_number":500,"context_line":"                                   fields\u003dBINDING_PROFILE)"},{"line_number":501,"context_line":"            port_profile \u003d port.get(BINDING_PROFILE, {})"},{"line_number":502,"context_line":"            if port_profile:"},{"line_number":503,"context_line":"                for profile_key in port_profile.copy().keys():"},{"line_number":504,"context_line":"                    if profile_key in (\u0027pci_vendor_info\u0027, \u0027pci_slot\u0027):"},{"line_number":505,"context_line":"                        del port_profile[profile_key]"},{"line_number":506,"context_line":"            port_req_body[\u0027port\u0027][BINDING_PROFILE] \u003d port_profile"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f515b1d_16558f1d","line":503,"range":{"start_line":503,"start_character":35,"end_line":503,"end_character":61},"in_reply_to":"7f515b1d_0a1b2681","updated":"2017-09-26 23:15:25.000000000","message":"Done","commit_id":"ef754b2a5d5dd573ccd23835acd71838de95b29d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f9d57b323ac55553fe3f1c164c4ce1808a2eb550","unresolved":false,"context_lines":[{"line_number":975,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027device_id\u0027: instance.uuid,"},{"line_number":976,"context_line":"                                      \u0027device_owner\u0027: zone}}"},{"line_number":977,"context_line":"            if (requested_ports_dict and"},{"line_number":978,"context_line":"                request.port_id in requested_ports_dict and"},{"line_number":979,"context_line":"                requested_ports_dict[request.port_id].get(BINDING_PROFILE)):"},{"line_number":980,"context_line":"                port_req_body[\u0027port\u0027][BINDING_PROFILE] \u003d ("},{"line_number":981,"context_line":"                    requested_ports_dict[request.port_id][BINDING_PROFILE])"},{"line_number":982,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f515b1d_f32e7790","line":979,"range":{"start_line":978,"start_character":0,"end_line":979,"end_character":76},"updated":"2017-09-27 09:14:38.000000000","message":"nit: these should probably be indented another four spaces, if possible","commit_id":"1c87fba37a36a4d393e8f43cee7c01bb930abc5c"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"f328da16eb2650097e91a0de6a82d307063bcb32","unresolved":false,"context_lines":[{"line_number":975,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027device_id\u0027: instance.uuid,"},{"line_number":976,"context_line":"                                      \u0027device_owner\u0027: zone}}"},{"line_number":977,"context_line":"            if (requested_ports_dict and"},{"line_number":978,"context_line":"                request.port_id in requested_ports_dict and"},{"line_number":979,"context_line":"                requested_ports_dict[request.port_id].get(BINDING_PROFILE)):"},{"line_number":980,"context_line":"                port_req_body[\u0027port\u0027][BINDING_PROFILE] \u003d ("},{"line_number":981,"context_line":"                    requested_ports_dict[request.port_id][BINDING_PROFILE])"},{"line_number":982,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f515b1d_5319cb1f","line":979,"range":{"start_line":978,"start_character":0,"end_line":979,"end_character":76},"in_reply_to":"7f515b1d_f32e7790","updated":"2017-09-27 09:27:45.000000000","message":"Line 979 will be too long","commit_id":"1c87fba37a36a4d393e8f43cee7c01bb930abc5c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"812b6a7bbbee0685143f98b676539c977c87dec5","unresolved":false,"context_lines":[{"line_number":499,"context_line":"                                   neutron_client\u003dneutron,"},{"line_number":500,"context_line":"                                   fields\u003dBINDING_PROFILE)"},{"line_number":501,"context_line":"            port_profile \u003d port.get(BINDING_PROFILE, {})"},{"line_number":502,"context_line":"            for profile_key in (\u0027pci_vendor_info\u0027, \u0027pci_slot\u0027):"},{"line_number":503,"context_line":"                if profile_key in port_profile:"},{"line_number":504,"context_line":"                    del port_profile[profile_key]"},{"line_number":505,"context_line":"            port_req_body[\u0027port\u0027][BINDING_PROFILE] \u003d port_profile"},{"line_number":506,"context_line":"            if self._has_dns_extension():"},{"line_number":507,"context_line":"                port_req_body[\u0027port\u0027][\u0027dns_name\u0027] \u003d \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_e7e90ab7","line":504,"range":{"start_line":502,"start_character":0,"end_line":504,"end_character":49},"updated":"2017-09-27 13:38:55.000000000","message":"Yeah, or that.  Pretty.","commit_id":"17d4f0249cd4a496a90230edbf149e26554260fc"},{"author":{"_account_id":26999,"name":"jinke","email":"jin.ke@99cloud.net","username":"jinke"},"change_message_id":"8e54bb8ec62428c8ff26dc3078dd7e7410afc0b8","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                                   neutron_client\u003dneutron,"},{"line_number":513,"context_line":"                                   fields\u003dBINDING_PROFILE)"},{"line_number":514,"context_line":"            port_profile \u003d port.get(BINDING_PROFILE, {})"},{"line_number":515,"context_line":"            for profile_key in (\u0027pci_vendor_info\u0027, \u0027pci_slot\u0027):"},{"line_number":516,"context_line":"                if profile_key in port_profile:"},{"line_number":517,"context_line":"                    del port_profile[profile_key]"},{"line_number":518,"context_line":"            port_req_body[\u0027port\u0027][BINDING_PROFILE] \u003d port_profile"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f4e5783_522bca81","line":515,"updated":"2017-10-17 06:38:16.000000000","message":"physical_network field of profile not delete ???","commit_id":"12ea5ad7b99e687f9e5fb41e367ea25b39ac9e8c"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"f77afa39057f23beceb591b8f9be1c1f896f174f","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                                   neutron_client\u003dneutron,"},{"line_number":513,"context_line":"                                   fields\u003dBINDING_PROFILE)"},{"line_number":514,"context_line":"            port_profile \u003d port.get(BINDING_PROFILE, {})"},{"line_number":515,"context_line":"            for profile_key in (\u0027pci_vendor_info\u0027, \u0027pci_slot\u0027):"},{"line_number":516,"context_line":"                if profile_key in port_profile:"},{"line_number":517,"context_line":"                    del port_profile[profile_key]"},{"line_number":518,"context_line":"            port_req_body[\u0027port\u0027][BINDING_PROFILE] \u003d port_profile"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f4e5783_d010cd50","line":515,"in_reply_to":"5f4e5783_522bca81","updated":"2017-10-17 11:24:29.000000000","message":"Done","commit_id":"12ea5ad7b99e687f9e5fb41e367ea25b39ac9e8c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9a88d2444d8ef3b896125214c6950e633e0674be","unresolved":false,"context_lines":[{"line_number":511,"context_line":"            port \u003d self._show_port(context, port_id,"},{"line_number":512,"context_line":"                                   neutron_client\u003dneutron,"},{"line_number":513,"context_line":"                                   fields\u003dBINDING_PROFILE)"},{"line_number":514,"context_line":"            port_profile \u003d port.get(BINDING_PROFILE, {})"},{"line_number":515,"context_line":"            for profile_key in (\u0027pci_vendor_info\u0027, \u0027pci_slot\u0027,"},{"line_number":516,"context_line":"                                \u0027physical_network\u0027):"},{"line_number":517,"context_line":"                if profile_key in port_profile:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f4b6375_c6f877c5","line":514,"updated":"2017-11-01 14:04:04.000000000","message":"Please add a code comment in here stating that we\u0027re doing this to remove the binding information for the physical device but don\u0027t want to overwrite the other information in the binding profile.","commit_id":"877e4b769b76e6f028bc7e430af2ddf43dc6f8ce"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e6d833c1fdf52081c2fb2145974aae1f06009355","unresolved":false,"context_lines":[{"line_number":511,"context_line":"            port \u003d self._show_port(context, port_id,"},{"line_number":512,"context_line":"                                   neutron_client\u003dneutron,"},{"line_number":513,"context_line":"                                   fields\u003dBINDING_PROFILE)"},{"line_number":514,"context_line":"            port_profile \u003d port.get(BINDING_PROFILE, {})"},{"line_number":515,"context_line":"            for profile_key in (\u0027pci_vendor_info\u0027, \u0027pci_slot\u0027,"},{"line_number":516,"context_line":"                                \u0027physical_network\u0027):"},{"line_number":517,"context_line":"                if profile_key in port_profile:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f4b6375_2254c920","line":514,"in_reply_to":"3f4b6375_c6f877c5","updated":"2017-11-01 23:10:38.000000000","message":"Done","commit_id":"877e4b769b76e6f028bc7e430af2ddf43dc6f8ce"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9a88d2444d8ef3b896125214c6950e633e0674be","unresolved":false,"context_lines":[{"line_number":1092,"context_line":"                instance, pci_request_id).pop()"},{"line_number":1093,"context_line":"            if port_req_body[\u0027port\u0027].get(BINDING_PROFILE) is None:"},{"line_number":1094,"context_line":"                port_req_body[\u0027port\u0027][BINDING_PROFILE] \u003d {}"},{"line_number":1095,"context_line":"            profile \u003d port_req_body[\u0027port\u0027][BINDING_PROFILE].copy()"},{"line_number":1096,"context_line":"            profile.update(self._get_pci_device_profile(pci_dev))"},{"line_number":1097,"context_line":"            port_req_body[\u0027port\u0027][BINDING_PROFILE] \u003d profile"},{"line_number":1098,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3f4b6375_86771f3b","line":1095,"range":{"start_line":1095,"start_character":22,"end_line":1095,"end_character":67},"updated":"2017-11-01 14:04:04.000000000","message":"this needs to use copy.deepcopy() since the binding profile is a nested dict.","commit_id":"877e4b769b76e6f028bc7e430af2ddf43dc6f8ce"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e6d833c1fdf52081c2fb2145974aae1f06009355","unresolved":false,"context_lines":[{"line_number":1092,"context_line":"                instance, pci_request_id).pop()"},{"line_number":1093,"context_line":"            if port_req_body[\u0027port\u0027].get(BINDING_PROFILE) is None:"},{"line_number":1094,"context_line":"                port_req_body[\u0027port\u0027][BINDING_PROFILE] \u003d {}"},{"line_number":1095,"context_line":"            profile \u003d port_req_body[\u0027port\u0027][BINDING_PROFILE].copy()"},{"line_number":1096,"context_line":"            profile.update(self._get_pci_device_profile(pci_dev))"},{"line_number":1097,"context_line":"            port_req_body[\u0027port\u0027][BINDING_PROFILE] \u003d profile"},{"line_number":1098,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3f4b6375_c23a95e5","line":1095,"range":{"start_line":1095,"start_character":22,"end_line":1095,"end_character":67},"in_reply_to":"3f4b6375_86771f3b","updated":"2017-11-01 23:10:38.000000000","message":"Done","commit_id":"877e4b769b76e6f028bc7e430af2ddf43dc6f8ce"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ebd71b30f3d1cccfa8786ae415487c849a10cb08","unresolved":false,"context_lines":[{"line_number":509,"context_line":"                continue"},{"line_number":510,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027device_id\u0027: \u0027\u0027, \u0027device_owner\u0027: \u0027\u0027}}"},{"line_number":511,"context_line":"            port_req_body[\u0027port\u0027][BINDING_HOST_ID] \u003d None"},{"line_number":512,"context_line":"            port \u003d self._show_port(context, port_id,"},{"line_number":513,"context_line":"                                   neutron_client\u003dneutron,"},{"line_number":514,"context_line":"                                   fields\u003dBINDING_PROFILE)"},{"line_number":515,"context_line":"            port_profile \u003d port.get(BINDING_PROFILE, {})"}],"source_content_type":"text/x-python","patch_set":19,"id":"3f4b6375_1942e63e","line":512,"updated":"2017-11-07 22:31:37.000000000","message":"Would it be more efficient to perform a single query to neutron for all of the port IDs in this loop and get back the results with just the binding profile field? I don\u0027t know if that\u0027s more performant than doing a GET call in a loop. It could be an issue if you had a lot of ports on a single instance (max of 50 by default) at which point you might need to chunk the requests, so maybe not worth it.","commit_id":"258c754a4a1336cf746ed4b54a5a8b10ae996de0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ebd71b30f3d1cccfa8786ae415487c849a10cb08","unresolved":false,"context_lines":[{"line_number":939,"context_line":""},{"line_number":940,"context_line":"    def _update_ports_for_instance(self, context, instance, neutron,"},{"line_number":941,"context_line":"            admin_client, requests_and_created_ports, nets,"},{"line_number":942,"context_line":"            bind_host_id, available_macs, requested_ports_dict):"},{"line_number":943,"context_line":"        \"\"\"Update ports from network_requests."},{"line_number":944,"context_line":""},{"line_number":945,"context_line":"        Updates the pre-existing ports and the ones created in"}],"source_content_type":"text/x-python","patch_set":19,"id":"3f4b6375_b942b239","line":942,"range":{"start_line":942,"start_character":42,"end_line":942,"end_character":62},"updated":"2017-11-07 22:31:37.000000000","message":"Please update the docstring in here, work has actually gone into documenting the plethora of parameters in this module so I\u0027d like to keep that going.","commit_id":"258c754a4a1336cf746ed4b54a5a8b10ae996de0"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"86f76063e850045cb3cb31ecf5ad81940e18ecdf","unresolved":false,"context_lines":[{"line_number":939,"context_line":""},{"line_number":940,"context_line":"    def _update_ports_for_instance(self, context, instance, neutron,"},{"line_number":941,"context_line":"            admin_client, requests_and_created_ports, nets,"},{"line_number":942,"context_line":"            bind_host_id, available_macs, requested_ports_dict):"},{"line_number":943,"context_line":"        \"\"\"Update ports from network_requests."},{"line_number":944,"context_line":""},{"line_number":945,"context_line":"        Updates the pre-existing ports and the ones created in"}],"source_content_type":"text/x-python","patch_set":19,"id":"3f4b6375_233b2bea","line":942,"range":{"start_line":942,"start_character":42,"end_line":942,"end_character":62},"in_reply_to":"3f4b6375_b942b239","updated":"2017-11-08 07:28:52.000000000","message":"Done","commit_id":"258c754a4a1336cf746ed4b54a5a8b10ae996de0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b8fc7a1dd527e9472ec1c23b95c23d600abeac64","unresolved":false,"context_lines":[{"line_number":1097,"context_line":"                instance, pci_request_id).pop()"},{"line_number":1098,"context_line":"            if port_req_body[\u0027port\u0027].get(BINDING_PROFILE) is None:"},{"line_number":1099,"context_line":"                port_req_body[\u0027port\u0027][BINDING_PROFILE] \u003d {}"},{"line_number":1100,"context_line":"            profile \u003d copy.deepcopy(port_req_body[\u0027port\u0027][BINDING_PROFILE])"},{"line_number":1101,"context_line":"            profile.update(self._get_pci_device_profile(pci_dev))"},{"line_number":1102,"context_line":"            port_req_body[\u0027port\u0027][BINDING_PROFILE] \u003d profile"},{"line_number":1103,"context_line":""},{"line_number":1104,"context_line":"    @staticmethod"},{"line_number":1105,"context_line":"    def _populate_pci_mac_address(instance, pci_request_id, port_req_body):"}],"source_content_type":"text/x-python","patch_set":20,"id":"1f485f77_499f65b4","line":1102,"range":{"start_line":1100,"start_character":0,"end_line":1102,"end_character":60},"updated":"2017-11-09 09:54:52.000000000","message":"Why profile needs to be copied? Can we simply say the follwing?\n\nport_req_body[\u0027port\u0027][BINDING_PROFILE].update(self._get_pci_device_profile(pci_dev))","commit_id":"ee7858ffcaf3f874feb0ea0c68871f2c93254fdd"}],"nova/tests/fixtures.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"95594086e5f005dc4f84de711333b36222bb4937","unresolved":false,"context_lines":[{"line_number":1216,"context_line":"        else:"},{"line_number":1217,"context_line":"            return None"},{"line_number":1218,"context_line":""},{"line_number":1219,"context_line":"    def _fillter_ports(self, **_params):"},{"line_number":1220,"context_line":"        ports \u003d copy.deepcopy(self._ports)"},{"line_number":1221,"context_line":"        for opt in _params:"},{"line_number":1222,"context_line":"            filtered_ports \u003d ("}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_487e6daf","line":1219,"range":{"start_line":1219,"start_character":9,"end_line":1219,"end_character":16},"updated":"2017-11-06 14:37:06.000000000","message":"should be \"filter\" :)","commit_id":"f88c6a7632f7cb12ce1ef4b0730b62d57ae76322"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"6566a7864eac7fd1c00f32583d954f63471fec67","unresolved":false,"context_lines":[{"line_number":1216,"context_line":"        else:"},{"line_number":1217,"context_line":"            return None"},{"line_number":1218,"context_line":""},{"line_number":1219,"context_line":"    def _fillter_ports(self, **_params):"},{"line_number":1220,"context_line":"        ports \u003d copy.deepcopy(self._ports)"},{"line_number":1221,"context_line":"        for opt in _params:"},{"line_number":1222,"context_line":"            filtered_ports \u003d ("}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_a3b2a2e3","line":1219,"range":{"start_line":1219,"start_character":9,"end_line":1219,"end_character":16},"in_reply_to":"3f4b6375_487e6daf","updated":"2017-11-06 15:00:43.000000000","message":"Done","commit_id":"f88c6a7632f7cb12ce1ef4b0730b62d57ae76322"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"95594086e5f005dc4f84de711333b36222bb4937","unresolved":false,"context_lines":[{"line_number":1219,"context_line":"    def _fillter_ports(self, **_params):"},{"line_number":1220,"context_line":"        ports \u003d copy.deepcopy(self._ports)"},{"line_number":1221,"context_line":"        for opt in _params:"},{"line_number":1222,"context_line":"            filtered_ports \u003d ("},{"line_number":1223,"context_line":"                [port for port in ports if port.get(opt) \u003d\u003d _params[opt]])"},{"line_number":1224,"context_line":"            ports \u003d filtered_ports"},{"line_number":1225,"context_line":"        return {\u0027ports\u0027: ports}"},{"line_number":1226,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_c8381def","line":1223,"range":{"start_line":1222,"start_character":12,"end_line":1223,"end_character":74},"updated":"2017-11-06 14:37:06.000000000","message":"FYI, you don\u0027t need the outer parens or the filtered_ports variable... just do this:\n\n ports \u003d [p for p in ports if p.get(opt) \u003d\u003d _params[opt]]","commit_id":"f88c6a7632f7cb12ce1ef4b0730b62d57ae76322"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"6566a7864eac7fd1c00f32583d954f63471fec67","unresolved":false,"context_lines":[{"line_number":1219,"context_line":"    def _fillter_ports(self, **_params):"},{"line_number":1220,"context_line":"        ports \u003d copy.deepcopy(self._ports)"},{"line_number":1221,"context_line":"        for opt in _params:"},{"line_number":1222,"context_line":"            filtered_ports \u003d ("},{"line_number":1223,"context_line":"                [port for port in ports if port.get(opt) \u003d\u003d _params[opt]])"},{"line_number":1224,"context_line":"            ports \u003d filtered_ports"},{"line_number":1225,"context_line":"        return {\u0027ports\u0027: ports}"},{"line_number":1226,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_e3e1bad1","line":1223,"range":{"start_line":1222,"start_character":12,"end_line":1223,"end_character":74},"in_reply_to":"3f4b6375_c8381def","updated":"2017-11-06 15:00:43.000000000","message":"Done","commit_id":"f88c6a7632f7cb12ce1ef4b0730b62d57ae76322"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b8fc7a1dd527e9472ec1c23b95c23d600abeac64","unresolved":false,"context_lines":[{"line_number":1217,"context_line":"            return None"},{"line_number":1218,"context_line":""},{"line_number":1219,"context_line":"    def _filter_ports(self, **_params):"},{"line_number":1220,"context_line":"        ports \u003d copy.deepcopy(self._ports)"},{"line_number":1221,"context_line":"        for opt in _params:"},{"line_number":1222,"context_line":"            filtered_ports \u003d [p for p in ports if p.get(opt) \u003d\u003d _params[opt]]"},{"line_number":1223,"context_line":"            ports \u003d filtered_ports"},{"line_number":1224,"context_line":"        return {\u0027ports\u0027: ports}"},{"line_number":1225,"context_line":""},{"line_number":1226,"context_line":"    def list_extensions(self, *args, **kwargs):"},{"line_number":1227,"context_line":"        return copy.deepcopy({\u0027extensions\u0027: self._extensions})"}],"source_content_type":"text/x-python","patch_set":20,"id":"1f485f77_8c17abee","line":1224,"range":{"start_line":1220,"start_character":1,"end_line":1224,"end_character":31},"updated":"2017-11-09 09:54:52.000000000","message":"As we are filtering ports here it seems more logical to me to iterate on ports and check them against our filters. Something like:\n\nfiltered_ports \u003d []\nfor port in self._ports:\n    if all(_params[opt] \u003d\u003d port.get(opt) for opt in _params]):\n        filtered_ports.append(copy.deepcopy(port))\nreturn {\u0027ports\u0027: filtered_ports}\n\nThis also make sure to only copy those ports that are returned.","commit_id":"ee7858ffcaf3f874feb0ea0c68871f2c93254fdd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b8fc7a1dd527e9472ec1c23b95c23d600abeac64","unresolved":false,"context_lines":[{"line_number":1236,"context_line":"        for current_port in self._ports:"},{"line_number":1237,"context_line":"            if current_port[\u0027id\u0027] \u003d\u003d port:"},{"line_number":1238,"context_line":"                self._ports.remove(current_port)"},{"line_number":1239,"context_line":"                return"},{"line_number":1240,"context_line":""},{"line_number":1241,"context_line":"    def list_networks(self, retrieve_all\u003dTrue, **_params):"},{"line_number":1242,"context_line":"        return copy.deepcopy({\u0027networks\u0027: self._networks})"}],"source_content_type":"text/x-python","patch_set":20,"id":"1f485f77_49a525b5","line":1239,"updated":"2017-11-09 09:54:52.000000000","message":"while it make sense to return here, this change seems unrelated to this patch","commit_id":"ee7858ffcaf3f874feb0ea0c68871f2c93254fdd"}]}
