)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"50aa854e3994a722798414d55b93941bce31e1d7","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2018-10-02 22:10:10 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"propagate vnic_type and profile on create port bindings"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"- This change modifies bind_ports_to_host to always"},{"line_number":10,"context_line":"  prefer using the vnic_type and profile enbeded in"},{"line_number":11,"context_line":"  a vif object when set."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f79a3b5_5e207b49","line":8,"updated":"2018-10-02 21:20:14.000000000","message":"Need to explain what the bug is and why this fixes it.","commit_id":"70e85b4de4d983019cd4457f6836aa9c17d52c19"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3618c06077c1fa0fd997ba757d168bf07f721ee7","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2018-10-02 22:10:10 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"propagate vnic_type and profile on create port bindings"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"- This change modifies bind_ports_to_host to always"},{"line_number":10,"context_line":"  prefer using the vnic_type and profile enbeded in"},{"line_number":11,"context_line":"  a vif object when set."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f79a3b5_21e1e22b","line":8,"in_reply_to":"3f79a3b5_5e207b49","updated":"2018-10-02 21:53:35.000000000","message":"yep will do.\nthe clip notes version is today we end up not setting\nvnic_type when creating the bindings for sriov ports and it gets defaulted by neutron to vnic_type normal. \nthis result in the vif_type changing form an sriov port type to an ovs port type on livemigration.\n\nwe never actully do the migration however as createing the port binding in this case results in i think a 500 internal server error as a result of this stack trace in the neutron server http://paste.openstack.org/show/731292/\n\ni think the sriov  ml2 driver is missing multiple port binding supprot as livemigration works fine between the same nodes when the vm has an ovs ports.\n\nanyway ill put this all in the bug.","commit_id":"70e85b4de4d983019cd4457f6836aa9c17d52c19"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"50aa854e3994a722798414d55b93941bce31e1d7","unresolved":false,"context_lines":[{"line_number":7,"context_line":"propagate vnic_type and profile on create port bindings"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"- This change modifies bind_ports_to_host to always"},{"line_number":10,"context_line":"  prefer using the vnic_type and profile enbeded in"},{"line_number":11,"context_line":"  a vif object when set."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"- This change updates bind_ports_to_host to generate"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f79a3b5_fe2f073b","line":10,"range":{"start_line":10,"start_character":41,"end_line":10,"end_character":48},"updated":"2018-10-02 21:20:14.000000000","message":"embedded","commit_id":"70e85b4de4d983019cd4457f6836aa9c17d52c19"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"50aa854e3994a722798414d55b93941bce31e1d7","unresolved":false,"context_lines":[{"line_number":16,"context_line":"  vnic_type and profile data."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I958685ee20676d45e5fbdf020b82d5844dcc85fe"},{"line_number":19,"context_line":"related-blueprint: #bp/libvirt-neutron-sriov-livemigration"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f79a3b5_3ef81fbf","line":19,"updated":"2018-10-02 21:20:14.000000000","message":"Drop this.","commit_id":"70e85b4de4d983019cd4457f6836aa9c17d52c19"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3618c06077c1fa0fd997ba757d168bf07f721ee7","unresolved":false,"context_lines":[{"line_number":16,"context_line":"  vnic_type and profile data."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I958685ee20676d45e5fbdf020b82d5844dcc85fe"},{"line_number":19,"context_line":"related-blueprint: #bp/libvirt-neutron-sriov-livemigration"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f79a3b5_a11c1266","line":19,"in_reply_to":"3f79a3b5_3ef81fbf","updated":"2018-10-02 21:53:35.000000000","message":"yep ill replace this with a bug link instead.","commit_id":"70e85b4de4d983019cd4457f6836aa9c17d52c19"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"80f5693882bedc4b947f63ff715d3e5aed96e046","unresolved":false,"context_lines":[{"line_number":12,"context_line":"  basis."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"- This change updates bind_ports_to_host to generate"},{"line_number":15,"context_line":"  a seperate payload per vif instead of assuming all"},{"line_number":16,"context_line":"  vifs attached to an interface share the same"},{"line_number":17,"context_line":"  vnic_type and profile data."},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"dfd5e7cf_869f1302","line":15,"range":{"start_line":15,"start_character":4,"end_line":15,"end_character":12},"updated":"2019-01-09 18:05:10.000000000","message":"nit: separate","commit_id":"18b4859568243f193a7ed36b197436ea158c921a"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"f9b472147bcb8ce8757f1cdb36c84c9ae4a37598","unresolved":false,"context_lines":[{"line_number":12,"context_line":"  basis."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"- This change updates bind_ports_to_host to generate"},{"line_number":15,"context_line":"  a seperate payload per vif instead of assuming all"},{"line_number":16,"context_line":"  vifs attached to an interface share the same"},{"line_number":17,"context_line":"  vnic_type and profile data."},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"bfdaf3ff_33048b17","line":15,"range":{"start_line":15,"start_character":4,"end_line":15,"end_character":12},"in_reply_to":"dfd5e7cf_869f1302","updated":"2019-01-15 11:17:27.000000000","message":"Done","commit_id":"18b4859568243f193a7ed36b197436ea158c921a"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"80f5693882bedc4b947f63ff715d3e5aed96e046","unresolved":false,"context_lines":[{"line_number":19,"context_line":"- The change aims to extend the existing logic of"},{"line_number":20,"context_line":"  bind_ports_to_host to allow the flexibility for the"},{"line_number":21,"context_line":"  user to augment port attributes on a per-port basis."},{"line_number":22,"context_line":"  The change does not portect the user from wrongfully"},{"line_number":23,"context_line":"  calling this method."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Change-Id: I958685ee20676d45e5fbdf020b82d5844dcc85fe"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"dfd5e7cf_46892bc8","line":22,"range":{"start_line":22,"start_character":22,"end_line":22,"end_character":29},"updated":"2019-01-09 18:05:10.000000000","message":"protect","commit_id":"18b4859568243f193a7ed36b197436ea158c921a"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"f9b472147bcb8ce8757f1cdb36c84c9ae4a37598","unresolved":false,"context_lines":[{"line_number":19,"context_line":"- The change aims to extend the existing logic of"},{"line_number":20,"context_line":"  bind_ports_to_host to allow the flexibility for the"},{"line_number":21,"context_line":"  user to augment port attributes on a per-port basis."},{"line_number":22,"context_line":"  The change does not portect the user from wrongfully"},{"line_number":23,"context_line":"  calling this method."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Change-Id: I958685ee20676d45e5fbdf020b82d5844dcc85fe"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"bfdaf3ff_d6fe4d04","line":22,"range":{"start_line":22,"start_character":22,"end_line":22,"end_character":29},"in_reply_to":"dfd5e7cf_46892bc8","updated":"2019-01-15 11:17:27.000000000","message":"Done","commit_id":"18b4859568243f193a7ed36b197436ea158c921a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"23807815d7d7bfc37d9869be8a7567bd96e5936a","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Today neutronv2\u0027s bind_ports_to_host() method is being used"},{"line_number":10,"context_line":"by the conductor during live-migration to bind neutron ports"},{"line_number":11,"context_line":"to the destination host when neutron port binding extention API"},{"line_number":12,"context_line":"is supported[1]."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Until now, modifying the vnic_type and profile was not required"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":21,"id":"9fdfeff1_ca86a217","line":11,"range":{"start_line":11,"start_character":50,"end_line":11,"end_character":59},"updated":"2019-03-05 01:28:51.000000000","message":"s/extention API/API extension/","commit_id":"b05d0b30b38a71a6b4ab607e2c6a2e8d5b97d629"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"5bc006126c65bef85e5ffef0fbfec4a8661498c5","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Today neutronv2\u0027s bind_ports_to_host() method is being used"},{"line_number":10,"context_line":"by the conductor during live-migration to bind neutron ports"},{"line_number":11,"context_line":"to the destination host when neutron port binding extention API"},{"line_number":12,"context_line":"is supported[1]."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Until now, modifying the vnic_type and profile was not required"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":21,"id":"5fc1f717_702c5847","line":11,"range":{"start_line":11,"start_character":50,"end_line":11,"end_character":59},"in_reply_to":"9fdfeff1_ca86a217","updated":"2019-03-06 14:03:11.000000000","message":"Done","commit_id":"b05d0b30b38a71a6b4ab607e2c6a2e8d5b97d629"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"23807815d7d7bfc37d9869be8a7567bd96e5936a","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Support for live-migration with SR-IOV ports requires updates to"},{"line_number":19,"context_line":"the port\u0027s profile with host specific information e.g the"},{"line_number":20,"context_line":"claimed PCI device address of the destination node."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"- This change modifies bind_ports_to_host to accept a per port"},{"line_number":23,"context_line":"  dictionary for both vnic_type and port profile."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":21,"id":"9fdfeff1_ea8b661b","line":20,"range":{"start_line":20,"start_character":27,"end_line":20,"end_character":29},"updated":"2019-03-05 01:28:51.000000000","message":"on","commit_id":"b05d0b30b38a71a6b4ab607e2c6a2e8d5b97d629"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"5bc006126c65bef85e5ffef0fbfec4a8661498c5","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Support for live-migration with SR-IOV ports requires updates to"},{"line_number":19,"context_line":"the port\u0027s profile with host specific information e.g the"},{"line_number":20,"context_line":"claimed PCI device address of the destination node."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"- This change modifies bind_ports_to_host to accept a per port"},{"line_number":23,"context_line":"  dictionary for both vnic_type and port profile."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":21,"id":"5fc1f717_1021544e","line":20,"range":{"start_line":20,"start_character":27,"end_line":20,"end_character":29},"in_reply_to":"9fdfeff1_ea8b661b","updated":"2019-03-06 14:03:11.000000000","message":"Done","commit_id":"b05d0b30b38a71a6b4ab607e2c6a2e8d5b97d629"}],"nova/network/base_api.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cbb7479f76351f2192a5b5af204f83f6a49fd5bf","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        return False"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"    def bind_ports_to_host(self, context, instance, host,"},{"line_number":402,"context_line":"                           vnic_type\u003dNone, profile\u003dNone):"},{"line_number":403,"context_line":"        \"\"\"Attempts to bind the ports from the instance on the given host"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"        If the ports are already actively bound to another host, like the"}],"source_content_type":"text/x-python","patch_set":23,"id":"5fc1f717_e65e40e5","line":402,"range":{"start_line":402,"start_character":0,"end_line":402,"end_character":57},"updated":"2019-03-07 01:40:27.000000000","message":"Shouldn\u0027t these actually be renamed? Ditto for the nova-net implementations","commit_id":"b4320d0bfe7908797af7f57cdca8c19cfa379ffe"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"41d146834c1bbb303512c2e73b7e8455ef52a69e","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        return False"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"    def bind_ports_to_host(self, context, instance, host,"},{"line_number":402,"context_line":"                           vnic_type\u003dNone, profile\u003dNone):"},{"line_number":403,"context_line":"        \"\"\"Attempts to bind the ports from the instance on the given host"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"        If the ports are already actively bound to another host, like the"}],"source_content_type":"text/x-python","patch_set":23,"id":"5fc1f717_69277c14","line":402,"range":{"start_line":402,"start_character":0,"end_line":402,"end_character":57},"in_reply_to":"5fc1f717_33ffa7ab","updated":"2019-03-07 09:34:54.000000000","message":"Done","commit_id":"b4320d0bfe7908797af7f57cdca8c19cfa379ffe"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"95992eb007b5a9d998424021e38b153d43ee92f5","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        return False"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"    def bind_ports_to_host(self, context, instance, host,"},{"line_number":402,"context_line":"                           vnic_type\u003dNone, profile\u003dNone):"},{"line_number":403,"context_line":"        \"\"\"Attempts to bind the ports from the instance on the given host"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"        If the ports are already actively bound to another host, like the"}],"source_content_type":"text/x-python","patch_set":23,"id":"5fc1f717_33ffa7ab","line":402,"range":{"start_line":402,"start_character":0,"end_line":402,"end_character":57},"in_reply_to":"5fc1f717_e65e40e5","updated":"2019-03-07 07:47:21.000000000","message":"Actually there is no implementation for this in nova.network.api\n\nwill align the definition.","commit_id":"b4320d0bfe7908797af7f57cdca8c19cfa379ffe"}],"nova/network/neutronv2/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"50aa854e3994a722798414d55b93941bce31e1d7","unresolved":false,"context_lines":[{"line_number":1284,"context_line":"            # port that is bound to the resulting binding so we can rollback in"},{"line_number":1285,"context_line":"            # the event of a failure, or return the results if everything is OK"},{"line_number":1286,"context_line":"            binding \u003d dict(host\u003dhost)"},{"line_number":1287,"context_line":"            binding[\u0027vnic_type\u0027] \u003d vif.get(\u0027vnic_type\u0027, vnic_type)"},{"line_number":1288,"context_line":"            binding[\u0027profile\u0027] \u003d vif.get(\u0027profile\u0027, profile)"},{"line_number":1289,"context_line":"            data \u003d dict(binding\u003dbinding)"},{"line_number":1290,"context_line":"            port_id \u003d vif[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_fed4e720","line":1287,"range":{"start_line":1287,"start_character":35,"end_line":1287,"end_character":54},"updated":"2018-10-02 21:20:14.000000000","message":"Shouldn\u0027t this be:\n\nvnic_type or vif.get(\u0027vnic_type\u0027)?\n\nThat would allow the caller to override.","commit_id":"70e85b4de4d983019cd4457f6836aa9c17d52c19"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"df81b61f45e7d3df578bff784d113afbd7040096","unresolved":false,"context_lines":[{"line_number":1284,"context_line":"            # port that is bound to the resulting binding so we can rollback in"},{"line_number":1285,"context_line":"            # the event of a failure, or return the results if everything is OK"},{"line_number":1286,"context_line":"            binding \u003d dict(host\u003dhost)"},{"line_number":1287,"context_line":"            binding[\u0027vnic_type\u0027] \u003d vif.get(\u0027vnic_type\u0027, vnic_type)"},{"line_number":1288,"context_line":"            binding[\u0027profile\u0027] \u003d vif.get(\u0027profile\u0027, profile)"},{"line_number":1289,"context_line":"            data \u003d dict(binding\u003dbinding)"},{"line_number":1290,"context_line":"            port_id \u003d vif[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_120fb68b","line":1287,"range":{"start_line":1287,"start_character":35,"end_line":1287,"end_character":54},"in_reply_to":"3f79a3b5_3f672e27","updated":"2018-10-23 01:38:39.000000000","message":"you are not allowed to change the vnic type of a bound port and as you said this is only used for live migration whre the ports are bound so overriding would be incorrect.","commit_id":"70e85b4de4d983019cd4457f6836aa9c17d52c19"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"223b14c19b5c159b2fc2ba38a512b71194ffc2f2","unresolved":false,"context_lines":[{"line_number":1284,"context_line":"            # port that is bound to the resulting binding so we can rollback in"},{"line_number":1285,"context_line":"            # the event of a failure, or return the results if everything is OK"},{"line_number":1286,"context_line":"            binding \u003d dict(host\u003dhost)"},{"line_number":1287,"context_line":"            binding[\u0027vnic_type\u0027] \u003d vif.get(\u0027vnic_type\u0027, vnic_type)"},{"line_number":1288,"context_line":"            binding[\u0027profile\u0027] \u003d vif.get(\u0027profile\u0027, profile)"},{"line_number":1289,"context_line":"            data \u003d dict(binding\u003dbinding)"},{"line_number":1290,"context_line":"            port_id \u003d vif[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_3f672e27","line":1287,"range":{"start_line":1287,"start_character":35,"end_line":1287,"end_character":54},"in_reply_to":"3f79a3b5_5e239bbe","updated":"2018-10-22 11:51:43.000000000","message":"did some grepping in the code, i see this method is being called only during live migration.\n\nmy 2 cents: allow override of vnic_type and profile per VIF.","commit_id":"70e85b4de4d983019cd4457f6836aa9c17d52c19"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3618c06077c1fa0fd997ba757d168bf07f721ee7","unresolved":false,"context_lines":[{"line_number":1284,"context_line":"            # port that is bound to the resulting binding so we can rollback in"},{"line_number":1285,"context_line":"            # the event of a failure, or return the results if everything is OK"},{"line_number":1286,"context_line":"            binding \u003d dict(host\u003dhost)"},{"line_number":1287,"context_line":"            binding[\u0027vnic_type\u0027] \u003d vif.get(\u0027vnic_type\u0027, vnic_type)"},{"line_number":1288,"context_line":"            binding[\u0027profile\u0027] \u003d vif.get(\u0027profile\u0027, profile)"},{"line_number":1289,"context_line":"            data \u003d dict(binding\u003dbinding)"},{"line_number":1290,"context_line":"            port_id \u003d vif[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_5e239bbe","line":1287,"range":{"start_line":1287,"start_character":35,"end_line":1287,"end_character":54},"in_reply_to":"3f79a3b5_fed4e720","updated":"2018-10-02 21:53:35.000000000","message":"that what i originally wrote but i dont think so.\n\nmy understanding is that this code is only ever used in 2 cases\n\n1 when we are first binding port in this case i belive the the VIF object may not have a vnic_type set in that case the function arguments will be used as teh default.\n\nthe other case is on livemigration in which case the we always want to keep the original ports vnic type.\n\nthat said i will look into how this is called more closely to confirm. i actully debated about remove the fucntion argment entirely as i dont think htere is a vald usecase for updating the vnic_type on for all instance vics with the same value and i know it would be incorrect in the profile cases.","commit_id":"70e85b4de4d983019cd4457f6836aa9c17d52c19"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"50aa854e3994a722798414d55b93941bce31e1d7","unresolved":false,"context_lines":[{"line_number":1285,"context_line":"            # the event of a failure, or return the results if everything is OK"},{"line_number":1286,"context_line":"            binding \u003d dict(host\u003dhost)"},{"line_number":1287,"context_line":"            binding[\u0027vnic_type\u0027] \u003d vif.get(\u0027vnic_type\u0027, vnic_type)"},{"line_number":1288,"context_line":"            binding[\u0027profile\u0027] \u003d vif.get(\u0027profile\u0027, profile)"},{"line_number":1289,"context_line":"            data \u003d dict(binding\u003dbinding)"},{"line_number":1290,"context_line":"            port_id \u003d vif[\u0027id\u0027]"},{"line_number":1291,"context_line":"            resp \u003d client.post(\u0027/v2.0/ports/%s/bindings\u0027 % port_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_9ed7f322","line":1288,"range":{"start_line":1288,"start_character":33,"end_line":1288,"end_character":60},"updated":"2018-10-02 21:20:14.000000000","message":"same","commit_id":"70e85b4de4d983019cd4457f6836aa9c17d52c19"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"16df09119c1febeb72ed4e0939633f038f047d42","unresolved":false,"context_lines":[{"line_number":1398,"context_line":"        raise exception.PciDeviceNotFound(node_id\u003dpci_dev.compute_node_id,"},{"line_number":1399,"context_line":"                                          address\u003dpci_dev.address)"},{"line_number":1400,"context_line":""},{"line_number":1401,"context_line":"    def _populate_neutron_binding_profile(self, instance, pci_request_id,"},{"line_number":1402,"context_line":"                                          port_req_body):"},{"line_number":1403,"context_line":"        \"\"\"Populate neutron binding:profile."},{"line_number":1404,"context_line":""},{"line_number":1405,"context_line":"        Populate it with SR-IOV related information"},{"line_number":1406,"context_line":""},{"line_number":1407,"context_line":"        :raises PciDeviceNotFound: If a claimed PCI device for the given"},{"line_number":1408,"context_line":"            pci_request_id cannot be found on the instance."},{"line_number":1409,"context_line":"        \"\"\""},{"line_number":1410,"context_line":"        if pci_request_id:"},{"line_number":1411,"context_line":"            pci_devices \u003d pci_manager.get_instance_pci_devs("},{"line_number":1412,"context_line":"                instance, pci_request_id)"},{"line_number":1413,"context_line":"            if not pci_devices:"},{"line_number":1414,"context_line":"                # The pci_request_id likely won\u0027t mean much except for tracing"},{"line_number":1415,"context_line":"                # through the logs since it is generated per request."},{"line_number":1416,"context_line":"                LOG.error(\u0027Unable to find PCI device using PCI request ID in \u0027"},{"line_number":1417,"context_line":"                          \u0027list of claimed instance PCI devices: %s. Is the \u0027"},{"line_number":1418,"context_line":"                          \u0027[pci]/passthrough_whitelist configuration correct?\u0027,"},{"line_number":1419,"context_line":"                          # Convert to a primitive list to stringify it."},{"line_number":1420,"context_line":"                          list(instance.pci_devices), instance\u003dinstance)"},{"line_number":1421,"context_line":"                raise exception.PciDeviceNotFound("},{"line_number":1422,"context_line":"                    _(\u0027PCI device not found for request ID %s.\u0027) %"},{"line_number":1423,"context_line":"                    pci_request_id)"},{"line_number":1424,"context_line":"            pci_dev \u003d pci_devices.pop()"},{"line_number":1425,"context_line":"            if port_req_body[\u0027port\u0027].get(BINDING_PROFILE) is None:"},{"line_number":1426,"context_line":"                port_req_body[\u0027port\u0027][BINDING_PROFILE] \u003d {}"},{"line_number":1427,"context_line":"            profile \u003d copy.deepcopy(port_req_body[\u0027port\u0027][BINDING_PROFILE])"},{"line_number":1428,"context_line":"            profile.update(self._get_pci_device_profile(pci_dev))"},{"line_number":1429,"context_line":"            port_req_body[\u0027port\u0027][BINDING_PROFILE] \u003d profile"},{"line_number":1430,"context_line":""},{"line_number":1431,"context_line":"    @staticmethod"},{"line_number":1432,"context_line":"    def _populate_pci_mac_address(instance, pci_request_id, port_req_body):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_a1a97cde","line":1429,"range":{"start_line":1401,"start_character":4,"end_line":1429,"end_character":60},"updated":"2018-11-26 19:30:09.000000000","message":"we might need to modify this code also \nbased on the changes in the previous patch to use random uuids for the request_id.\n\nhttps://review.openstack.org/#/c/609166/4/nova/pci/request.py@200\n\nthis is invoked form line 1477 below","commit_id":"5153f122446905688526436634332bf81660a4f4"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"f79ac279a2c77c10cf7897b3407825a62a737ace","unresolved":false,"context_lines":[{"line_number":1398,"context_line":"        raise exception.PciDeviceNotFound(node_id\u003dpci_dev.compute_node_id,"},{"line_number":1399,"context_line":"                                          address\u003dpci_dev.address)"},{"line_number":1400,"context_line":""},{"line_number":1401,"context_line":"    def _populate_neutron_binding_profile(self, instance, pci_request_id,"},{"line_number":1402,"context_line":"                                          port_req_body):"},{"line_number":1403,"context_line":"        \"\"\"Populate neutron binding:profile."},{"line_number":1404,"context_line":""},{"line_number":1405,"context_line":"        Populate it with SR-IOV related information"},{"line_number":1406,"context_line":""},{"line_number":1407,"context_line":"        :raises PciDeviceNotFound: If a claimed PCI device for the given"},{"line_number":1408,"context_line":"            pci_request_id cannot be found on the instance."},{"line_number":1409,"context_line":"        \"\"\""},{"line_number":1410,"context_line":"        if pci_request_id:"},{"line_number":1411,"context_line":"            pci_devices \u003d pci_manager.get_instance_pci_devs("},{"line_number":1412,"context_line":"                instance, pci_request_id)"},{"line_number":1413,"context_line":"            if not pci_devices:"},{"line_number":1414,"context_line":"                # The pci_request_id likely won\u0027t mean much except for tracing"},{"line_number":1415,"context_line":"                # through the logs since it is generated per request."},{"line_number":1416,"context_line":"                LOG.error(\u0027Unable to find PCI device using PCI request ID in \u0027"},{"line_number":1417,"context_line":"                          \u0027list of claimed instance PCI devices: %s. Is the \u0027"},{"line_number":1418,"context_line":"                          \u0027[pci]/passthrough_whitelist configuration correct?\u0027,"},{"line_number":1419,"context_line":"                          # Convert to a primitive list to stringify it."},{"line_number":1420,"context_line":"                          list(instance.pci_devices), instance\u003dinstance)"},{"line_number":1421,"context_line":"                raise exception.PciDeviceNotFound("},{"line_number":1422,"context_line":"                    _(\u0027PCI device not found for request ID %s.\u0027) %"},{"line_number":1423,"context_line":"                    pci_request_id)"},{"line_number":1424,"context_line":"            pci_dev \u003d pci_devices.pop()"},{"line_number":1425,"context_line":"            if port_req_body[\u0027port\u0027].get(BINDING_PROFILE) is None:"},{"line_number":1426,"context_line":"                port_req_body[\u0027port\u0027][BINDING_PROFILE] \u003d {}"},{"line_number":1427,"context_line":"            profile \u003d copy.deepcopy(port_req_body[\u0027port\u0027][BINDING_PROFILE])"},{"line_number":1428,"context_line":"            profile.update(self._get_pci_device_profile(pci_dev))"},{"line_number":1429,"context_line":"            port_req_body[\u0027port\u0027][BINDING_PROFILE] \u003d profile"},{"line_number":1430,"context_line":""},{"line_number":1431,"context_line":"    @staticmethod"},{"line_number":1432,"context_line":"    def _populate_pci_mac_address(instance, pci_request_id, port_req_body):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_816c7605","line":1429,"range":{"start_line":1401,"start_character":4,"end_line":1429,"end_character":60},"in_reply_to":"3f79a3b5_a1a97cde","updated":"2018-11-27 07:36:01.000000000","message":"IF we go with using a new request uuid, again the patch you mentioned is not being used in later commits, it is there as i cannot abandon it(you are the owner of the patch)\nATM the implementation (see the commits that follow) relies on the fact that the same PCI request is used.\n\neven if we create a new PCI request, we should append it to instance.pci_requests for consistency and no changes will be required.","commit_id":"5153f122446905688526436634332bf81660a4f4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"16df09119c1febeb72ed4e0939633f038f047d42","unresolved":false,"context_lines":[{"line_number":1474,"context_line":"            port_req_body[\u0027port\u0027][\u0027rxtx_factor\u0027] \u003d rxtx_factor"},{"line_number":1475,"context_line":"        port_req_body[\u0027port\u0027][BINDING_HOST_ID] \u003d bind_host_id"},{"line_number":1476,"context_line":"        self._populate_neutron_binding_profile(instance,"},{"line_number":1477,"context_line":"                                               pci_request_id,"},{"line_number":1478,"context_line":"                                               port_req_body)"},{"line_number":1479,"context_line":""},{"line_number":1480,"context_line":"        if self._has_dns_extension():"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_21cd6cb9","line":1477,"range":{"start_line":1477,"start_character":47,"end_line":1477,"end_character":61},"updated":"2018-11-26 19:30:09.000000000","message":"if we we used a deterministic such as a uuid5 and we new this was a migration\ne.g. \nif port_req_body[\u0027port\u0027][BINDING_HOST_ID] !\u003d bind_host_id:\n   ...\nelse:\n   ...\n\nwe could update the pci_request_id here\nother wise the caller of _populate_neutron_extension_values online https://review.openstack.org/#/c/607365/4/nova/network/neutronv2/api.py@1138 will need to pass in the  correct pci_request_id to use and handel the detection of a migration.\n\nnot that this is ultimately called form allocate_for_instance\nvia _update_ports_for_instance\n\nso the full set of calls\n\nallocate_for_instance-\u003e_update_ports_for_instance-\u003e_populate_neutron_extension_values-\u003e_populate_neutron_binding_profile\n\nit is not clear to me that without som eother codecage we will end up populating the binding profile with the correct info the binding host but i also have not been able to figure out if/when this is called in the migration path and how it differs from the spawn path.","commit_id":"5153f122446905688526436634332bf81660a4f4"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"f79ac279a2c77c10cf7897b3407825a62a737ace","unresolved":false,"context_lines":[{"line_number":1474,"context_line":"            port_req_body[\u0027port\u0027][\u0027rxtx_factor\u0027] \u003d rxtx_factor"},{"line_number":1475,"context_line":"        port_req_body[\u0027port\u0027][BINDING_HOST_ID] \u003d bind_host_id"},{"line_number":1476,"context_line":"        self._populate_neutron_binding_profile(instance,"},{"line_number":1477,"context_line":"                                               pci_request_id,"},{"line_number":1478,"context_line":"                                               port_req_body)"},{"line_number":1479,"context_line":""},{"line_number":1480,"context_line":"        if self._has_dns_extension():"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_a4ff40fd","line":1477,"range":{"start_line":1477,"start_character":47,"end_line":1477,"end_character":61},"in_reply_to":"3f79a3b5_21cd6cb9","updated":"2018-11-27 07:36:01.000000000","message":"IF we go with with creating a new PCI request UUID, indeed, additional investigation will be required.\n\nplease have a look at the following commit:\nhttps://review.openstack.org/#/c/620115/","commit_id":"5153f122446905688526436634332bf81660a4f4"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"80f5693882bedc4b947f63ff715d3e5aed96e046","unresolved":false,"context_lines":[{"line_number":1230,"context_line":"        return constants.PORT_BINDING_EXTENDED in self.extensions"},{"line_number":1231,"context_line":""},{"line_number":1232,"context_line":"    def bind_ports_to_host(self, context, instance, host,"},{"line_number":1233,"context_line":"                           vnic_type_per_port\u003dNone, profile_per_port\u003dNone):"},{"line_number":1234,"context_line":"        \"\"\"Attempts to bind the ports from the instance on the given host"},{"line_number":1235,"context_line":""},{"line_number":1236,"context_line":"        If the ports are already actively bound to another host, like the"}],"source_content_type":"text/x-python","patch_set":7,"id":"dfd5e7cf_8614f34f","line":1233,"range":{"start_line":1233,"start_character":0,"end_line":1233,"end_character":75},"updated":"2019-01-09 18:05:10.000000000","message":"If I\u0027m reading things correctly, these were previously unused, right? I only see one non-test reference and it\u0027s in [1]. If might be worth adding a little context to the commit message about whether these were ever used and, if so, why they weren\u0027t?\n\n[1] nova/conductor/tasks/live_migrate.py","commit_id":"18b4859568243f193a7ed36b197436ea158c921a"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"80f5693882bedc4b947f63ff715d3e5aed96e046","unresolved":false,"context_lines":[{"line_number":1230,"context_line":"        return constants.PORT_BINDING_EXTENDED in self.extensions"},{"line_number":1231,"context_line":""},{"line_number":1232,"context_line":"    def bind_ports_to_host(self, context, instance, host,"},{"line_number":1233,"context_line":"                           vnic_type_per_port\u003dNone, profile_per_port\u003dNone):"},{"line_number":1234,"context_line":"        \"\"\"Attempts to bind the ports from the instance on the given host"},{"line_number":1235,"context_line":""},{"line_number":1236,"context_line":"        If the ports are already actively bound to another host, like the"}],"source_content_type":"text/x-python","patch_set":7,"id":"dfd5e7cf_268e67d0","line":1233,"range":{"start_line":1233,"start_character":52,"end_line":1233,"end_character":68},"updated":"2019-01-09 18:05:10.000000000","message":"profile_types?","commit_id":"18b4859568243f193a7ed36b197436ea158c921a"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"80f5693882bedc4b947f63ff715d3e5aed96e046","unresolved":false,"context_lines":[{"line_number":1230,"context_line":"        return constants.PORT_BINDING_EXTENDED in self.extensions"},{"line_number":1231,"context_line":""},{"line_number":1232,"context_line":"    def bind_ports_to_host(self, context, instance, host,"},{"line_number":1233,"context_line":"                           vnic_type_per_port\u003dNone, profile_per_port\u003dNone):"},{"line_number":1234,"context_line":"        \"\"\"Attempts to bind the ports from the instance on the given host"},{"line_number":1235,"context_line":""},{"line_number":1236,"context_line":"        If the ports are already actively bound to another host, like the"}],"source_content_type":"text/x-python","patch_set":7,"id":"dfd5e7cf_069323fc","line":1233,"range":{"start_line":1233,"start_character":27,"end_line":1233,"end_character":45},"updated":"2019-01-09 18:05:10.000000000","message":"vnic_types?","commit_id":"18b4859568243f193a7ed36b197436ea158c921a"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"f9b472147bcb8ce8757f1cdb36c84c9ae4a37598","unresolved":false,"context_lines":[{"line_number":1230,"context_line":"        return constants.PORT_BINDING_EXTENDED in self.extensions"},{"line_number":1231,"context_line":""},{"line_number":1232,"context_line":"    def bind_ports_to_host(self, context, instance, host,"},{"line_number":1233,"context_line":"                           vnic_type_per_port\u003dNone, profile_per_port\u003dNone):"},{"line_number":1234,"context_line":"        \"\"\"Attempts to bind the ports from the instance on the given host"},{"line_number":1235,"context_line":""},{"line_number":1236,"context_line":"        If the ports are already actively bound to another host, like the"}],"source_content_type":"text/x-python","patch_set":7,"id":"bfdaf3ff_53126f5a","line":1233,"range":{"start_line":1233,"start_character":27,"end_line":1233,"end_character":45},"in_reply_to":"dfd5e7cf_069323fc","updated":"2019-01-15 11:17:27.000000000","message":"Agree, i need to get rid of my habit of encoding the type in the parameter name :)","commit_id":"18b4859568243f193a7ed36b197436ea158c921a"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"f9b472147bcb8ce8757f1cdb36c84c9ae4a37598","unresolved":false,"context_lines":[{"line_number":1230,"context_line":"        return constants.PORT_BINDING_EXTENDED in self.extensions"},{"line_number":1231,"context_line":""},{"line_number":1232,"context_line":"    def bind_ports_to_host(self, context, instance, host,"},{"line_number":1233,"context_line":"                           vnic_type_per_port\u003dNone, profile_per_port\u003dNone):"},{"line_number":1234,"context_line":"        \"\"\"Attempts to bind the ports from the instance on the given host"},{"line_number":1235,"context_line":""},{"line_number":1236,"context_line":"        If the ports are already actively bound to another host, like the"}],"source_content_type":"text/x-python","patch_set":7,"id":"bfdaf3ff_730f732e","line":1233,"range":{"start_line":1233,"start_character":52,"end_line":1233,"end_character":68},"in_reply_to":"dfd5e7cf_268e67d0","updated":"2019-01-15 11:17:27.000000000","message":"same as the above. went with port_profiles instead of profile_types.","commit_id":"18b4859568243f193a7ed36b197436ea158c921a"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"f9b472147bcb8ce8757f1cdb36c84c9ae4a37598","unresolved":false,"context_lines":[{"line_number":1230,"context_line":"        return constants.PORT_BINDING_EXTENDED in self.extensions"},{"line_number":1231,"context_line":""},{"line_number":1232,"context_line":"    def bind_ports_to_host(self, context, instance, host,"},{"line_number":1233,"context_line":"                           vnic_type_per_port\u003dNone, profile_per_port\u003dNone):"},{"line_number":1234,"context_line":"        \"\"\"Attempts to bind the ports from the instance on the given host"},{"line_number":1235,"context_line":""},{"line_number":1236,"context_line":"        If the ports are already actively bound to another host, like the"}],"source_content_type":"text/x-python","patch_set":7,"id":"bfdaf3ff_d34c1f78","line":1233,"range":{"start_line":1233,"start_character":0,"end_line":1233,"end_character":75},"in_reply_to":"dfd5e7cf_8614f34f","updated":"2019-01-15 11:17:27.000000000","message":"Yes they were unused, i will add some info in the commit message.","commit_id":"18b4859568243f193a7ed36b197436ea158c921a"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"80f5693882bedc4b947f63ff715d3e5aed96e046","unresolved":false,"context_lines":[{"line_number":1296,"context_line":"                binding[\u0027profile\u0027] \u003d profile_per_port[port_id]"},{"line_number":1297,"context_line":""},{"line_number":1298,"context_line":"            data \u003d dict(binding\u003dbinding)"},{"line_number":1299,"context_line":"            resp \u003d client.post(\u0027/v2.0/ports/%s/bindings\u0027 % port_id,"},{"line_number":1300,"context_line":"                               json\u003ddata, raise_exc\u003dFalse)"},{"line_number":1301,"context_line":"            if resp:"},{"line_number":1302,"context_line":"                bindings_by_port_id[port_id] \u003d resp.json()[\u0027binding\u0027]"},{"line_number":1303,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"dfd5e7cf_e64fff8f","line":1300,"range":{"start_line":1299,"start_character":0,"end_line":1300,"end_character":58},"updated":"2019-01-09 18:05:10.000000000","message":"I haven\u0027t really thought this out, but isn\u0027t this going to result in N requests to neutron for N ports, where before we had 1? If so, I wonder if we want to bundle them based on vnic_type? I can conceive of an instance with six interfaces, but an instance with six different *types* of interface seems less likely :)","commit_id":"18b4859568243f193a7ed36b197436ea158c921a"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"f9b472147bcb8ce8757f1cdb36c84c9ae4a37598","unresolved":false,"context_lines":[{"line_number":1296,"context_line":"                binding[\u0027profile\u0027] \u003d profile_per_port[port_id]"},{"line_number":1297,"context_line":""},{"line_number":1298,"context_line":"            data \u003d dict(binding\u003dbinding)"},{"line_number":1299,"context_line":"            resp \u003d client.post(\u0027/v2.0/ports/%s/bindings\u0027 % port_id,"},{"line_number":1300,"context_line":"                               json\u003ddata, raise_exc\u003dFalse)"},{"line_number":1301,"context_line":"            if resp:"},{"line_number":1302,"context_line":"                bindings_by_port_id[port_id] \u003d resp.json()[\u0027binding\u0027]"},{"line_number":1303,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"bfdaf3ff_f303630c","line":1300,"range":{"start_line":1299,"start_character":0,"end_line":1300,"end_character":58},"in_reply_to":"dfd5e7cf_e64fff8f","updated":"2019-01-15 11:17:27.000000000","message":"Well, the original code also sent the binding request per port so i don\u0027t think we made it any worse.","commit_id":"18b4859568243f193a7ed36b197436ea158c921a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"23807815d7d7bfc37d9869be8a7567bd96e5936a","unresolved":false,"context_lines":[{"line_number":1358,"context_line":"            binding[\u0027profile\u0027] \u003d profile"},{"line_number":1359,"context_line":"        data \u003d dict(binding\u003dbinding)"},{"line_number":1360,"context_line":""},{"line_number":1361,"context_line":"        # TODO(gibi): To support ports with resource request during server"},{"line_number":1362,"context_line":"        # live migrate operation we need to take care of \u0027allocation\u0027 key in"},{"line_number":1363,"context_line":"        # the binding profile per binding."},{"line_number":1364,"context_line":""},{"line_number":1365,"context_line":"        bindings_by_port_id \u003d {}"},{"line_number":1366,"context_line":"        for port_id in port_ids:"}],"source_content_type":"text/x-python","patch_set":21,"id":"9fdfeff1_6a9c565b","side":"PARENT","line":1363,"range":{"start_line":1361,"start_character":0,"end_line":1363,"end_character":42},"updated":"2019-03-05 01:28:51.000000000","message":"any reason this comment was removed?","commit_id":"7d9e3882e1a54ce421c36380817a1f619ccf250d"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"938f94f79d9e7ca89cef29e8c987967427e0abd4","unresolved":false,"context_lines":[{"line_number":1358,"context_line":"            binding[\u0027profile\u0027] \u003d profile"},{"line_number":1359,"context_line":"        data \u003d dict(binding\u003dbinding)"},{"line_number":1360,"context_line":""},{"line_number":1361,"context_line":"        # TODO(gibi): To support ports with resource request during server"},{"line_number":1362,"context_line":"        # live migrate operation we need to take care of \u0027allocation\u0027 key in"},{"line_number":1363,"context_line":"        # the binding profile per binding."},{"line_number":1364,"context_line":""},{"line_number":1365,"context_line":"        bindings_by_port_id \u003d {}"},{"line_number":1366,"context_line":"        for port_id in port_ids:"}],"source_content_type":"text/x-python","patch_set":21,"id":"9fdfeff1_89673ab8","side":"PARENT","line":1363,"range":{"start_line":1361,"start_character":0,"end_line":1363,"end_character":42},"in_reply_to":"9fdfeff1_6a9c565b","updated":"2019-03-05 15:56:20.000000000","message":"Probably was missed in the rebases as this comment was not there when the commit was first submitted. will add it, good catch !","commit_id":"7d9e3882e1a54ce421c36380817a1f619ccf250d"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"23807815d7d7bfc37d9869be8a7567bd96e5936a","unresolved":false,"context_lines":[{"line_number":1353,"context_line":"            # the event of a failure, or return the results if everything is OK"},{"line_number":1354,"context_line":"            port_id \u003d vif[\u0027id\u0027]"},{"line_number":1355,"context_line":"            binding \u003d dict(host\u003dhost)"},{"line_number":1356,"context_line":"            if vnic_types is None or port_id not in vnic_types:"},{"line_number":1357,"context_line":"                binding[\u0027vnic_type\u0027] \u003d vif[\u0027vnic_type\u0027]"},{"line_number":1358,"context_line":"            else:"},{"line_number":1359,"context_line":"                binding[\u0027vnic_type\u0027] \u003d vnic_types[port_id]"}],"source_content_type":"text/x-python","patch_set":21,"id":"9fdfeff1_0ad7caf0","line":1356,"range":{"start_line":1356,"start_character":12,"end_line":1356,"end_character":63},"updated":"2019-03-05 01:28:51.000000000","message":"I don\u0027t see anywhere in this patch where you are changing the *callers* of bind_ports_to_host() to pass a dict for either the vnic_types or port_profiles kwargs.\n\nIf any callers of the bind_ports_to_host() method used kwarg notation instead of arg notation, the call will blow up, of course.\n\nMore dangerously, if the callers used arg notation when calling bind_ports_to_host(), then the above line will actually evaluate whether the port_id is in the *string* argument vnic_type. Which is definitely not what you were going for, I presume?","commit_id":"b05d0b30b38a71a6b4ab607e2c6a2e8d5b97d629"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"938f94f79d9e7ca89cef29e8c987967427e0abd4","unresolved":false,"context_lines":[{"line_number":1353,"context_line":"            # the event of a failure, or return the results if everything is OK"},{"line_number":1354,"context_line":"            port_id \u003d vif[\u0027id\u0027]"},{"line_number":1355,"context_line":"            binding \u003d dict(host\u003dhost)"},{"line_number":1356,"context_line":"            if vnic_types is None or port_id not in vnic_types:"},{"line_number":1357,"context_line":"                binding[\u0027vnic_type\u0027] \u003d vif[\u0027vnic_type\u0027]"},{"line_number":1358,"context_line":"            else:"},{"line_number":1359,"context_line":"                binding[\u0027vnic_type\u0027] \u003d vnic_types[port_id]"}],"source_content_type":"text/x-python","patch_set":21,"id":"9fdfeff1_09102aa8","line":1356,"range":{"start_line":1356,"start_character":12,"end_line":1356,"end_character":63},"in_reply_to":"9fdfeff1_0ad7caf0","updated":"2019-03-05 15:56:20.000000000","message":"The only call to bind_ports_to_host() is being done in LiveMigrateTask[1] where today, it does not specify vnic_types and port_profiles in any way, that is: None is being passed in today. I believe we are in the clear here\n\nHowever i now notice that another change is needed to align\nnova.network.base_api.NetworkAPI.bind_ports_to_host() as well[2] with the new definition.\n\n\n[1]https://github.com/openstack/nova/blob/68d4cb44edfe7b5f85618254cc906dcef44f7ce3/nova/conductor/tasks/live_migrate.py#L289\n[2]https://github.com/openstack/nova/blob/dc4de16784cdc7151967e84aa308889ec2a0a216/nova/network/base_api.py#L401","commit_id":"b05d0b30b38a71a6b4ab607e2c6a2e8d5b97d629"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"5e788adbe4d473af100a598b14633aa11fc15364","unresolved":false,"context_lines":[{"line_number":1340,"context_line":"        # current."},{"line_number":1341,"context_line":"        network_info \u003d instance.get_network_info()"},{"line_number":1342,"context_line":""},{"line_number":1343,"context_line":"        if not network_info:"},{"line_number":1344,"context_line":"            # The instance doesn\u0027t have any ports so there is nothing to do."},{"line_number":1345,"context_line":"            LOG.debug(\u0027Instance does not have any ports.\u0027, instance\u003dinstance)"},{"line_number":1346,"context_line":"            return {}"}],"source_content_type":"text/x-python","patch_set":24,"id":"5fc1f717_7f73aee8","line":1343,"range":{"start_line":1343,"start_character":8,"end_line":1343,"end_character":27},"updated":"2019-03-07 11:31:28.000000000","message":"There\u0027s not a lot of local context to explain this change. I think the debug message should be updated in a follow-up.\n\nFunctionally, from what I can see is that _get_ksa_client will be called if network_info is valid, but has no ports, between base and this changeset.","commit_id":"a7fae371a7fc48a778b2d632b1b90bf5659eda7d"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"515a5456a61015a8161516a03fd66763a7914c2c","unresolved":false,"context_lines":[{"line_number":1340,"context_line":"        # current."},{"line_number":1341,"context_line":"        network_info \u003d instance.get_network_info()"},{"line_number":1342,"context_line":""},{"line_number":1343,"context_line":"        if not network_info:"},{"line_number":1344,"context_line":"            # The instance doesn\u0027t have any ports so there is nothing to do."},{"line_number":1345,"context_line":"            LOG.debug(\u0027Instance does not have any ports.\u0027, instance\u003dinstance)"},{"line_number":1346,"context_line":"            return {}"}],"source_content_type":"text/x-python","patch_set":24,"id":"5fc1f717_e23862d4","line":1343,"range":{"start_line":1343,"start_character":8,"end_line":1343,"end_character":27},"in_reply_to":"5fc1f717_7f73aee8","updated":"2019-03-07 12:23:57.000000000","message":"The original change does the same check on the port_ids list that is rendered from network_info.\n\nnetwork_info (NetworkInfo) is basically a list of vifs.\nit inherits from the `list` class, AFAIK if network_info is empty then the `not network_info` statement will evaluate to True.","commit_id":"a7fae371a7fc48a778b2d632b1b90bf5659eda7d"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"5e788adbe4d473af100a598b14633aa11fc15364","unresolved":false,"context_lines":[{"line_number":1352,"context_line":"        # the binding profile per binding."},{"line_number":1353,"context_line":""},{"line_number":1354,"context_line":"        bindings_by_port_id \u003d {}"},{"line_number":1355,"context_line":"        for vif in network_info:"},{"line_number":1356,"context_line":"            # Now bind each port to the destination host and keep track of each"},{"line_number":1357,"context_line":"            # port that is bound to the resulting binding so we can rollback in"},{"line_number":1358,"context_line":"            # the event of a failure, or return the results if everything is OK"}],"source_content_type":"text/x-python","patch_set":24,"id":"5fc1f717_3fff6502","line":1355,"range":{"start_line":1355,"start_character":8,"end_line":1355,"end_character":32},"updated":"2019-03-07 11:31:28.000000000","message":"This section is much clearer.","commit_id":"a7fae371a7fc48a778b2d632b1b90bf5659eda7d"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"5e788adbe4d473af100a598b14633aa11fc15364","unresolved":false,"context_lines":[{"line_number":1389,"context_line":"                                    instance\u003dinstance)"},{"line_number":1390,"context_line":"                raise exception.PortBindingFailed(port_id\u003dport_id)"},{"line_number":1391,"context_line":""},{"line_number":1392,"context_line":"        return bindings_by_port_id"},{"line_number":1393,"context_line":""},{"line_number":1394,"context_line":"    @staticmethod"},{"line_number":1395,"context_line":"    def _create_port_binding(client, port_id, data):"}],"source_content_type":"text/x-python","patch_set":24,"id":"5fc1f717_5f2d9193","line":1392,"range":{"start_line":1392,"start_character":8,"end_line":1392,"end_character":34},"updated":"2019-03-07 11:31:28.000000000","message":"note to self: if network_info was valid, but contained no vifs, this returns {} but doesn\u0027t print a DEBUG log.","commit_id":"a7fae371a7fc48a778b2d632b1b90bf5659eda7d"}],"nova/tests/unit/network/test_neutronv2.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6b9e8f11647afffe3dbc3ae36dd735e435f2391d","unresolved":false,"context_lines":[{"line_number":6352,"context_line":"    @mock.patch(\u0027nova.network.neutronv2.api._get_ksa_client\u0027)"},{"line_number":6353,"context_line":"    def test_bind_ports_to_host(self, mock_client):"},{"line_number":6354,"context_line":"        \"\"\"Tests a single port happy path where everything is successful.\"\"\""},{"line_number":6355,"context_line":"        def post_side_effect(*args, **kwargs):"},{"line_number":6356,"context_line":"            self.assertDictEqual(binding, kwargs[\u0027json\u0027])"},{"line_number":6357,"context_line":"            return mock.DEFAULT"},{"line_number":6358,"context_line":""},{"line_number":6359,"context_line":"        nwinfo \u003d model.NetworkInfo([model.VIF(uuids.port)])"},{"line_number":6360,"context_line":"        inst \u003d objects.Instance("}],"source_content_type":"text/x-python","patch_set":24,"id":"5fc1f717_eb9ef605","line":6357,"range":{"start_line":6355,"start_character":0,"end_line":6357,"end_character":31},"updated":"2019-03-07 18:16:05.000000000","message":"FYI, a more succinct way of doing this without side_effect would be to get rid of this functor here and do the following below:\n\n ...\n mock_client.return_value.post.return_value \u003d resp\n result \u003d self.api.bind_ports_to_host(...)\n mock_client.return_value.post.assert_called_once_with(\n     mock.ANY, json\u003dbinding)","commit_id":"a7fae371a7fc48a778b2d632b1b90bf5659eda7d"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"5e788adbe4d473af100a598b14633aa11fc15364","unresolved":false,"context_lines":[{"line_number":6406,"context_line":"        inst \u003d objects.Instance("},{"line_number":6407,"context_line":"            info_cache\u003dobjects.InstanceInfoCache(network_info\u003dnwinfo))"},{"line_number":6408,"context_line":"        vif_profile_per_port \u003d {uuids.port: {\u0027foo\u0027: \u0027overridden\u0027}}"},{"line_number":6409,"context_line":"        vnic_type_per_port \u003d {uuids.port: \"direct-overridden\"}"},{"line_number":6410,"context_line":"        binding \u003d {\u0027binding\u0027: {\u0027host\u0027: \u0027fake-host\u0027,"},{"line_number":6411,"context_line":"                               \u0027vnic_type\u0027: \u0027direct-overridden\u0027,"},{"line_number":6412,"context_line":"                               \u0027profile\u0027: {\u0027foo\u0027: \u0027overridden\u0027}}}"}],"source_content_type":"text/x-python","patch_set":24,"id":"5fc1f717_ff66be51","line":6409,"range":{"start_line":6409,"start_character":8,"end_line":6409,"end_character":26},"updated":"2019-03-07 11:31:28.000000000","message":"just a note for a follow-up, this could be changed to vnic_types\nand port_profiles to match the api function signature.","commit_id":"a7fae371a7fc48a778b2d632b1b90bf5659eda7d"}]}
