)]}'
{"neutron/services/trunk/drivers/__init__.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"81708c2e3820362760948c39371190b6c894b0cf","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"# under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from neutron.services.trunk.drivers import openvswitch"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"# Register drivers."},{"line_number":19,"context_line":"openvswitch.register()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_dea72009","line":16,"updated":"2016-07-20 17:09:21.000000000","message":"we should revisit this after conversations as occurred on [1] and that led to [2]\n\n[1] https://review.openstack.org/#/c/339283/\n[2] https://review.openstack.org/#/c/344526/","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"914a7833d9f9fd4253838b2977dce5446c435a41","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"# under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from neutron.services.trunk.drivers import openvswitch"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"# Register drivers."},{"line_number":19,"context_line":"openvswitch.register()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_fefb0479","line":16,"in_reply_to":"dada55a8_dea72009","updated":"2016-07-20 17:26:18.000000000","message":"Agreed.","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"c1abc4cfa0f372694866e853674c464f147f2443","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from neutron.services.trunk.drivers import openvswitch"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"# Register drivers."},{"line_number":19,"context_line":"openvswitch.register()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_0f21b7fb","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":22},"updated":"2016-07-25 20:31:18.000000000","message":"Nothing currently imports this module, so this line is never executed. Is this driver expected to be loaded whenever the trunk service plugin is enabled?","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"4514822e5965eb8481ac24975fb53d9b7522c7ba","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from neutron.services.trunk.drivers import openvswitch"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"# Register drivers."},{"line_number":19,"context_line":"openvswitch.register()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_aaaa19d0","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":22},"in_reply_to":"dada55a8_0f21b7fb","updated":"2016-07-25 20:36:44.000000000","message":"I showed Adolfo where to put it, but it got swallowed in his rebase.","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"429b76e52fd06a0afb31fc09dca4a476948788ea","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from neutron.services.trunk.drivers import openvswitch"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"# Register drivers."},{"line_number":19,"context_line":"openvswitch.register()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_ea74c3cf","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":22},"in_reply_to":"dada55a8_a0b3154c","updated":"2016-07-27 05:13:29.000000000","message":"I am in the middle of moving things around. I agree with points a \u0026 b made by Armando. Point a really speaks to me, this leave the deployer out of it. This driver just loads, no conf files to deal with.","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"d9491c25b1366a41a69c2924fd3dbb4a0b6530fa","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from neutron.services.trunk.drivers import openvswitch"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"# Register drivers."},{"line_number":19,"context_line":"openvswitch.register()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_caa30d9d","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":22},"in_reply_to":"dada55a8_aaaa19d0","updated":"2016-07-25 20:47:54.000000000","message":"Yes, I saw where this should go.  I have this change queued up.","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"22a3d69904893ba76d04f11f6f58f86622745310","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from neutron.services.trunk.drivers import openvswitch"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"# Register drivers."},{"line_number":19,"context_line":"openvswitch.register()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_a0b3154c","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":22},"in_reply_to":"dada55a8_c048c95e","updated":"2016-07-27 00:04:31.000000000","message":"Ok, this can be moved somewhere else, but the outcome doesn\u0027t really change, so I wouldn\u0027t personally get hung up on it.\n\nIn fact this call can be made explicitly (e.g. in the plugin module itself), but the main point here is two-fold:\n\na) we should not allow drivers support to be overridden. A trunk plugin that ships with Neutron is always meant to support the in-tree drivers, in other words we do not want to make trunk drivers a deployer\u0027s business.\n\nb) any other module that may be out of tree can easily plug in this framework, and do not need an explicit registration as listening to registry events would suffice.","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1e886eede1dd1af11b4858b601f92e05b60f3ea2","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from neutron.services.trunk.drivers import openvswitch"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"# Register drivers."},{"line_number":19,"context_line":"openvswitch.register()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_c048c95e","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":22},"in_reply_to":"dada55a8_caa30d9d","updated":"2016-07-26 23:52:13.000000000","message":"in general i dislike haveing a side efect to importing a module like this. so i would suggest move this to someware else.","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"}],"neutron/services/trunk/drivers/openvswitch.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8d43740eded77681e0ee4c436179789ab4ecf647","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# (c) Copyright 2016 Hewlett Packard Enterprise Development LP"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_02f9cec8","line":1,"updated":"2016-07-23 04:58:07.000000000","message":"After looking at [1], I am thinking that\u0027s probably best to turn this into a module dedicated to openvswitch alone. I am thinking of the following structure:\n\n.\n`-- openswitch\n    |-- __init__.py\n    |-- agent\n    |   `-- __init__.py\n    |   `-- driver.py # this handles the agent side of the OVS implementation\n    `-- driver.py  # this handles the server side of the OVS implementation\n\nObviously more modules can be added as it makes sense.\n\n[1] https://review.openstack.org/#/c/335536","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"4e9f506b87294610fcf1ace00fdfce367008cf19","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    context \u003d kwargs[\u0027context\u0027]"},{"line_number":42,"context_line":"    core_plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":43,"context_line":"    trunk_parent \u003d core_plugin.get_port(context, trunk[\u0027port_id\u0027])"},{"line_number":44,"context_line":"    vif_type \u003d trunk_parent.get(\u0027binding:vif_type\u0027)"},{"line_number":45,"context_line":"    binding_host \u003d trunk_parent.get(\u0027binding:host_id\u0027)"},{"line_number":46,"context_line":"    ignore_notification \u003d vif_type !\u003d \u0027ovs\u0027 or not binding_host"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_b050cc5f","line":44,"range":{"start_line":44,"start_character":32,"end_line":44,"end_character":50},"updated":"2016-07-19 22:25:39.000000000","message":"This and \u0027binding:host_id\u0027 can be used as constants from neutron.extensions.portbindings (same for these string literals in the unit tests as well).","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"f47cf66348e11f11d19449f7807afdb567972d4e","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    context \u003d kwargs[\u0027context\u0027]"},{"line_number":42,"context_line":"    core_plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":43,"context_line":"    trunk_parent \u003d core_plugin.get_port(context, trunk[\u0027port_id\u0027])"},{"line_number":44,"context_line":"    vif_type \u003d trunk_parent.get(\u0027binding:vif_type\u0027)"},{"line_number":45,"context_line":"    binding_host \u003d trunk_parent.get(\u0027binding:host_id\u0027)"},{"line_number":46,"context_line":"    ignore_notification \u003d vif_type !\u003d \u0027ovs\u0027 or not binding_host"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_4ea8c8db","line":44,"range":{"start_line":44,"start_character":32,"end_line":44,"end_character":50},"in_reply_to":"dada55a8_3edd9ce0","updated":"2016-07-26 01:10:08.000000000","message":"and for VIF_TYPE_OVS too.","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"914a7833d9f9fd4253838b2977dce5446c435a41","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    context \u003d kwargs[\u0027context\u0027]"},{"line_number":42,"context_line":"    core_plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":43,"context_line":"    trunk_parent \u003d core_plugin.get_port(context, trunk[\u0027port_id\u0027])"},{"line_number":44,"context_line":"    vif_type \u003d trunk_parent.get(\u0027binding:vif_type\u0027)"},{"line_number":45,"context_line":"    binding_host \u003d trunk_parent.get(\u0027binding:host_id\u0027)"},{"line_number":46,"context_line":"    ignore_notification \u003d vif_type !\u003d \u0027ovs\u0027 or not binding_host"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_3edd9ce0","line":44,"range":{"start_line":44,"start_character":32,"end_line":44,"end_character":50},"in_reply_to":"dada55a8_b050cc5f","updated":"2016-07-20 17:26:18.000000000","message":"Done","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"f47cf66348e11f11d19449f7807afdb567972d4e","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    trunk_parent \u003d core_plugin.get_port(context, trunk[\u0027port_id\u0027])"},{"line_number":44,"context_line":"    vif_type \u003d trunk_parent.get(\u0027binding:vif_type\u0027)"},{"line_number":45,"context_line":"    binding_host \u003d trunk_parent.get(\u0027binding:host_id\u0027)"},{"line_number":46,"context_line":"    ignore_notification \u003d vif_type !\u003d \u0027ovs\u0027 or not binding_host"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    if ignore_notification:"},{"line_number":49,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_0e9ed0b7","line":46,"updated":"2016-07-26 01:10:08.000000000","message":"I\u0027d personally switch the order of these conditions: in other words if the the port is bound to a host, we should expect a valid vif type.\n\nBear in mind that a number of backends know how to handle the OVS vif type and potentially we may be sending out notifications when in reality these may not be required because the backend that bound the port is agentless. One extra check we may want to consider is whether the host to which the port is bound to has a registered OVS agent. That\u0027s ultimately the check that would prevent flooding the queue needlessly.\n\nNow we could use [2] to check if the host runs an OVS agent, but beware that this depends on the availability of the agent extension, which is not something that every core plugin implements, so you may want to use [3].\n\nFinally, I think it is now worth starting to think about some state management on the trunk, because we should keep track of the fact that management on the trunk is expected to progress, and complete or fail based on whether a driver has fulfilled the task.\n\nWe need to agree on the state machine: we can assume that the plugin makes the first state transition (if allowed), e.g. ACTIVE -\u003e PREBUILD (the desired state is committed). Then a driver can do the state transition PREBUILD -\u003e BUILD (desired state is acknowledged by driver), and eventually from BUILD back to ACTIVE when the desired state is realized. We may need a few more state transitions, but that\u0027s a good start, I think.\n\n[1] https://github.com/openstack/networking-ovn/blob/master/networking_ovn/ml2/mech_driver.py#L122\n[2] http://git.openstack.org/cgit/openstack/neutron/tree/neutron/db/agents_db.py#n275\n[3] http://git.openstack.org/cgit/openstack/neutron/tree/neutron/common/utils.py#n179","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1e886eede1dd1af11b4858b601f92e05b60f3ea2","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    trunk_parent \u003d core_plugin.get_port(context, trunk[\u0027port_id\u0027])"},{"line_number":44,"context_line":"    vif_type \u003d trunk_parent.get(\u0027binding:vif_type\u0027)"},{"line_number":45,"context_line":"    binding_host \u003d trunk_parent.get(\u0027binding:host_id\u0027)"},{"line_number":46,"context_line":"    ignore_notification \u003d vif_type !\u003d \u0027ovs\u0027 or not binding_host"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    if ignore_notification:"},{"line_number":49,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_65c80f56","line":46,"range":{"start_line":46,"start_character":26,"end_line":46,"end_character":43},"updated":"2016-07-26 23:52:13.000000000","message":"dont forget that this will work with vhost-user also so \n\nyou need to check vif_type not in [\u0027ovs\u0027,\u0027vhost-user\u0027] but as mentrioned above the constants from the portbindigs extetion should be used.","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1e886eede1dd1af11b4858b601f92e05b60f3ea2","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    trunk_parent \u003d core_plugin.get_port(context, trunk[\u0027port_id\u0027])"},{"line_number":44,"context_line":"    vif_type \u003d trunk_parent.get(\u0027binding:vif_type\u0027)"},{"line_number":45,"context_line":"    binding_host \u003d trunk_parent.get(\u0027binding:host_id\u0027)"},{"line_number":46,"context_line":"    ignore_notification \u003d vif_type !\u003d \u0027ovs\u0027 or not binding_host"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    if ignore_notification:"},{"line_number":49,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_8526e3cb","line":46,"in_reply_to":"dada55a8_0e9ed0b7","updated":"2016-07-26 23:52:13.000000000","message":"the only thing i would caution about with checking the agent type is that networking-sfc have a forked agent that inherits from the ovs neutron agent but dose not change its agent type.\n\nunless the support for trunking works transparently with the sfc version of the agent there might be some strange behavior.\n\ni dont see why this would not work but just taught i would highlight it.\n\nthe other issue is that the agent type is also a config option\nhttps://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/openvswitch/agent/common/config.py#L157-L159\n\nas far as i am ware this is nologer used but there may be out of tree ml2 drivers set this to reuse the neutron agent with there driver.","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"429b76e52fd06a0afb31fc09dca4a476948788ea","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    trunk_parent \u003d core_plugin.get_port(context, trunk[\u0027port_id\u0027])"},{"line_number":44,"context_line":"    vif_type \u003d trunk_parent.get(\u0027binding:vif_type\u0027)"},{"line_number":45,"context_line":"    binding_host \u003d trunk_parent.get(\u0027binding:host_id\u0027)"},{"line_number":46,"context_line":"    ignore_notification \u003d vif_type !\u003d \u0027ovs\u0027 or not binding_host"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    if ignore_notification:"},{"line_number":49,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_8af0a768","line":46,"in_reply_to":"dada55a8_20f565ec","updated":"2016-07-27 05:13:29.000000000","message":"I agree that there may not be much we can do about people forking the agent, but I can imagine there being interest in bringing this together with networking-sfc. In that case they could always provide their own driver. I\u0027m not sure I want to concern ourselves with this.","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"429b76e52fd06a0afb31fc09dca4a476948788ea","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    trunk_parent \u003d core_plugin.get_port(context, trunk[\u0027port_id\u0027])"},{"line_number":44,"context_line":"    vif_type \u003d trunk_parent.get(\u0027binding:vif_type\u0027)"},{"line_number":45,"context_line":"    binding_host \u003d trunk_parent.get(\u0027binding:host_id\u0027)"},{"line_number":46,"context_line":"    ignore_notification \u003d vif_type !\u003d \u0027ovs\u0027 or not binding_host"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    if ignore_notification:"},{"line_number":49,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_0a05d744","line":46,"range":{"start_line":46,"start_character":26,"end_line":46,"end_character":43},"in_reply_to":"dada55a8_65c80f56","updated":"2016-07-27 05:13:29.000000000","message":"Yes, that is an oversight. We should handle vhost-user as well.","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"22a3d69904893ba76d04f11f6f58f86622745310","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    trunk_parent \u003d core_plugin.get_port(context, trunk[\u0027port_id\u0027])"},{"line_number":44,"context_line":"    vif_type \u003d trunk_parent.get(\u0027binding:vif_type\u0027)"},{"line_number":45,"context_line":"    binding_host \u003d trunk_parent.get(\u0027binding:host_id\u0027)"},{"line_number":46,"context_line":"    ignore_notification \u003d vif_type !\u003d \u0027ovs\u0027 or not binding_host"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    if ignore_notification:"},{"line_number":49,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_20f565ec","line":46,"in_reply_to":"dada55a8_8526e3cb","updated":"2016-07-27 00:04:31.000000000","message":"good point, we want to be caution about this, but if folks step away from defined boundaries (e.g. a fork) I am not sure there\u0027s much that can be done to prevent things from going south.","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"f47cf66348e11f11d19449f7807afdb567972d4e","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                                   namespace\u003dtrunk_consts.TRUNK_PLUGIN)"},{"line_number":54,"context_line":"    rpc_client \u003d n_rpc.get_client(target)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    if event \u003d\u003d events.AFTER_CREATE:"},{"line_number":57,"context_line":"        add_subports_handler(context, rpc_client, binding_host, trunk,"},{"line_number":58,"context_line":"                             kwargs.get(\u0027added_subports\u0027))"},{"line_number":59,"context_line":"    elif event \u003d\u003d events.AFTER_DELETE:"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_ee77fcff","line":56,"updated":"2016-07-26 01:10:08.000000000","message":"these could be more cleverly handled if we had a lookup map, like so:\n\n action \u003d {\n    events.AFTER_CREATE: add_subports_handler,\n    events.AFTER_DELETE: remove_subports_handler,\n }\n\nI think that the current notification payload makes no distinction of the type of subports (i.e. added_subports vs removed_subports), but that\u0027s not overly important..","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"81708c2e3820362760948c39371190b6c894b0cf","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def notification_cast(context, rpc_client, host, method, payload):"},{"line_number":86,"context_line":"    cctxt \u003d rpc_client.prepare(topic\u003dtrunk_consts.TRUNK_PLUGIN, server\u003dhost)"},{"line_number":87,"context_line":"    cctxt.cast(context, method, payload\u003dpayload)"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_9e53e816","line":87,"updated":"2016-07-20 17:09:21.000000000","message":"we should considered whether a call is more appropriate than a cast. Either way we should drop the _cast from the method name so that should we change the paradigm later we don\u0027t have to make the handlers aware of the change.","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"914a7833d9f9fd4253838b2977dce5446c435a41","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def notification_cast(context, rpc_client, host, method, payload):"},{"line_number":86,"context_line":"    cctxt \u003d rpc_client.prepare(topic\u003dtrunk_consts.TRUNK_PLUGIN, server\u003dhost)"},{"line_number":87,"context_line":"    cctxt.cast(context, method, payload\u003dpayload)"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_fece642b","line":87,"in_reply_to":"dada55a8_9e53e816","updated":"2016-07-20 17:26:18.000000000","message":"I had weighed call vs. cast. In this case, the notification is invoked by the registry callback, which is invoked by a user-initiated action. By going with a call here, you\u0027re essentially blocking a user-initiated PUT on a synchronous RPC call. The PUT will not return until the call returns. With a cast, we can return from the API call while the RPC is handled asynchronously.\n\nYour point about renaming the method is well-taken.","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"f47cf66348e11f11d19449f7807afdb567972d4e","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def notification_cast(context, rpc_client, host, method, payload):"},{"line_number":86,"context_line":"    cctxt \u003d rpc_client.prepare(topic\u003dtrunk_consts.TRUNK_PLUGIN, server\u003dhost)"},{"line_number":87,"context_line":"    cctxt.cast(context, method, payload\u003dpayload)"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_ae5ea442","line":87,"in_reply_to":"dada55a8_fece642b","updated":"2016-07-26 01:10:08.000000000","message":"See comments above, cast is fine assuming we have a way to detect an error in case of message delivery loss (or any other failure). Perhaps a watcher that periodically scans for trunks stuck in states other than steady states can help us be more resilient.","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"}],"neutron/tests/unit/services/trunk/drivers/test_openvswitch.py":[{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"c1abc4cfa0f372694866e853674c464f147f2443","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    @mock.patch(\u0027neutron.services.trunk.drivers.openvswitch.\u0027"},{"line_number":36,"context_line":"                \u0027add_subports_handler\u0027)"},{"line_number":37,"context_line":"    def test_subports_after_create_handler_registeration(self, handler_mock):"},{"line_number":38,"context_line":"        ovs_driver.register()"},{"line_number":39,"context_line":"        subport \u003d trunk_objects.SubPort(context\u003dself.context,"},{"line_number":40,"context_line":"                                        port_id\u003duuidutils.generate_uuid(),"},{"line_number":41,"context_line":"                                        segmentation_id\u003d2,"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_6fb95379","line":38,"range":{"start_line":38,"start_character":8,"end_line":38,"end_character":29},"updated":"2016-07-25 20:31:18.000000000","message":"should we have to call this explicitly?","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"22a3d69904893ba76d04f11f6f58f86622745310","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    @mock.patch(\u0027neutron.services.trunk.drivers.openvswitch.\u0027"},{"line_number":36,"context_line":"                \u0027add_subports_handler\u0027)"},{"line_number":37,"context_line":"    def test_subports_after_create_handler_registeration(self, handler_mock):"},{"line_number":38,"context_line":"        ovs_driver.register()"},{"line_number":39,"context_line":"        subport \u003d trunk_objects.SubPort(context\u003dself.context,"},{"line_number":40,"context_line":"                                        port_id\u003duuidutils.generate_uuid(),"},{"line_number":41,"context_line":"                                        segmentation_id\u003d2,"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_20cc45ba","line":38,"range":{"start_line":38,"start_character":8,"end_line":38,"end_character":29},"in_reply_to":"dada55a8_00002100","updated":"2016-07-27 00:04:31.000000000","message":"+1","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"429b76e52fd06a0afb31fc09dca4a476948788ea","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    @mock.patch(\u0027neutron.services.trunk.drivers.openvswitch.\u0027"},{"line_number":36,"context_line":"                \u0027add_subports_handler\u0027)"},{"line_number":37,"context_line":"    def test_subports_after_create_handler_registeration(self, handler_mock):"},{"line_number":38,"context_line":"        ovs_driver.register()"},{"line_number":39,"context_line":"        subport \u003d trunk_objects.SubPort(context\u003dself.context,"},{"line_number":40,"context_line":"                                        port_id\u003duuidutils.generate_uuid(),"},{"line_number":41,"context_line":"                                        segmentation_id\u003d2,"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_0a8cb7d8","line":38,"range":{"start_line":38,"start_character":8,"end_line":38,"end_character":29},"in_reply_to":"dada55a8_20cc45ba","updated":"2016-07-27 05:13:29.000000000","message":"Done","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1e886eede1dd1af11b4858b601f92e05b60f3ea2","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    @mock.patch(\u0027neutron.services.trunk.drivers.openvswitch.\u0027"},{"line_number":36,"context_line":"                \u0027add_subports_handler\u0027)"},{"line_number":37,"context_line":"    def test_subports_after_create_handler_registeration(self, handler_mock):"},{"line_number":38,"context_line":"        ovs_driver.register()"},{"line_number":39,"context_line":"        subport \u003d trunk_objects.SubPort(context\u003dself.context,"},{"line_number":40,"context_line":"                                        port_id\u003duuidutils.generate_uuid(),"},{"line_number":41,"context_line":"                                        segmentation_id\u003d2,"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_00002100","line":38,"range":{"start_line":38,"start_character":8,"end_line":38,"end_character":29},"in_reply_to":"dada55a8_6fb95379","updated":"2016-07-26 23:52:13.000000000","message":"it should probably be in the setUp function\nif it should be called explicitly as it is used in all testes","commit_id":"0e788ed3f345d55ecab05ef3181c79a7e6c6c1de"}]}
