)]}'
{"nova/tests/unit/virt/vmwareapi/test_vif.py":[{"author":{"_account_id":16929,"name":"Giridhar Jayavelu","email":"gjayavelu@vmware.com","username":"gjayavelu"},"change_message_id":"1bebd372ec5427279e270eef4e0017ccfb50fef9","unresolved":false,"context_lines":[{"line_number":275,"context_line":"                            \u0027dvpg\u0027: \u0027pg1\u0027,"},{"line_number":276,"context_line":"                            \u0027dvsw\u0027: \u0027fake-props\u0027,"},{"line_number":277,"context_line":"                            \u0027dvs_port_key\u0027: \u0027key1\u0027}"},{"line_number":278,"context_line":"        mock_network_name.return_value \u003d fake_network_obj"},{"line_number":279,"context_line":"        vif_info \u003d network_model.NetworkInfo(["},{"line_number":280,"context_line":"                network_model.VIF(type\u003dnetwork_model.VIF_TYPE_DVS,"},{"line_number":281,"context_line":"                                  details\u003d{\u0027dvs_port_key\u0027: \u0027key1\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_9aa11797","line":278,"updated":"2016-03-03 22:55:53.000000000","message":"to match the implementation, get_network_with_the_name() does not return network ref with dvs_port_key set. It is set only in _get_neutron_network(). So, line 277 has be removed. may be set fake_network_obj[\u0027dvs_port_key\u0027] \u003d \u0027key1\u0027 after L288.","commit_id":"444020ca48fc081ebcca25d96e2d42d4f24c39d5"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"a121fcb21eaf8b7b764d6317d75ad75920812794","unresolved":false,"context_lines":[{"line_number":275,"context_line":"                            \u0027dvpg\u0027: \u0027pg1\u0027,"},{"line_number":276,"context_line":"                            \u0027dvsw\u0027: \u0027fake-props\u0027,"},{"line_number":277,"context_line":"                            \u0027dvs_port_key\u0027: \u0027key1\u0027}"},{"line_number":278,"context_line":"        mock_network_name.return_value \u003d fake_network_obj"},{"line_number":279,"context_line":"        vif_info \u003d network_model.NetworkInfo(["},{"line_number":280,"context_line":"                network_model.VIF(type\u003dnetwork_model.VIF_TYPE_DVS,"},{"line_number":281,"context_line":"                                  details\u003d{\u0027dvs_port_key\u0027: \u0027key1\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_cc3909a6","line":278,"in_reply_to":"7af24918_9aa11797","updated":"2016-03-04 14:16:08.000000000","message":"It looks like the assertion is just verifying the object is the original one (i.e. network_ref is fake_network_obj). If that\u0027s the case, I won\u0027t need to add the dvs_port_key in afterwards. I\u0027ll try this out (along with removing it from the fake_network_obj) and resubmit.","commit_id":"444020ca48fc081ebcca25d96e2d42d4f24c39d5"},{"author":{"_account_id":16929,"name":"Giridhar Jayavelu","email":"gjayavelu@vmware.com","username":"gjayavelu"},"change_message_id":"1bebd372ec5427279e270eef4e0017ccfb50fef9","unresolved":false,"context_lines":[{"line_number":282,"context_line":"                                           \u0027dvs_port_group\u0027: \u0027pg1\u0027},"},{"line_number":283,"context_line":"                                  address\u003d\u0027DE:AD:BE:EF:00:00\u0027,"},{"line_number":284,"context_line":"                                  network\u003dself._network)]"},{"line_number":285,"context_line":"        )[0]"},{"line_number":286,"context_line":"        network_ref \u003d vif._get_neutron_network(\u0027fake-session\u0027,"},{"line_number":287,"context_line":"                                               \u0027fake-cluster\u0027,"},{"line_number":288,"context_line":"                                               vif_info)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_b4618a07","line":285,"updated":"2016-03-03 22:55:53.000000000","message":"nit: can go to previous line itself instead of dangling in separate line.","commit_id":"444020ca48fc081ebcca25d96e2d42d4f24c39d5"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"a121fcb21eaf8b7b764d6317d75ad75920812794","unresolved":false,"context_lines":[{"line_number":282,"context_line":"                                           \u0027dvs_port_group\u0027: \u0027pg1\u0027},"},{"line_number":283,"context_line":"                                  address\u003d\u0027DE:AD:BE:EF:00:00\u0027,"},{"line_number":284,"context_line":"                                  network\u003dself._network)]"},{"line_number":285,"context_line":"        )[0]"},{"line_number":286,"context_line":"        network_ref \u003d vif._get_neutron_network(\u0027fake-session\u0027,"},{"line_number":287,"context_line":"                                               \u0027fake-cluster\u0027,"},{"line_number":288,"context_line":"                                               vif_info)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_ec42050e","line":285,"in_reply_to":"7af24918_b4618a07","updated":"2016-03-04 14:16:08.000000000","message":"Will fix.","commit_id":"444020ca48fc081ebcca25d96e2d42d4f24c39d5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9db7c0500ff388cac4d76fe5d9dcba919681def6","unresolved":false,"context_lines":[{"line_number":269,"context_line":"                                                  \u0027fake-cluster\u0027)"},{"line_number":270,"context_line":"        self.assertEqual(fake_network_obj, network_ref)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    @mock.patch.object(network_util, \u0027get_network_with_the_name\u0027)"},{"line_number":273,"context_line":"    def test_get_neutron_network_dvs_vif_details(self, mock_network_name):"},{"line_number":274,"context_line":"        fake_network_obj \u003d {\u0027type\u0027: \u0027DistributedVirtualPortgroup\u0027,"},{"line_number":275,"context_line":"                            \u0027dvpg\u0027: \u0027pg1\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba0121b8_dd5d8d48","line":272,"updated":"2016-03-30 20:51:00.000000000","message":"Wow, we have a function called \"get_network_with_the_name\"... amazing.","commit_id":"2fcb2c9aac93f5b422bd65d6704a959443c7a045"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"0bcff24912e724f95ba8c198ebe2ffbae47a248d","unresolved":false,"context_lines":[{"line_number":269,"context_line":"                                                  \u0027fake-cluster\u0027)"},{"line_number":270,"context_line":"        self.assertEqual(fake_network_obj, network_ref)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    @mock.patch.object(network_util, \u0027get_network_with_the_name\u0027)"},{"line_number":273,"context_line":"    def test_get_neutron_network_dvs_vif_details(self, mock_network_name):"},{"line_number":274,"context_line":"        fake_network_obj \u003d {\u0027type\u0027: \u0027DistributedVirtualPortgroup\u0027,"},{"line_number":275,"context_line":"                            \u0027dvpg\u0027: \u0027pg1\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba0121b8_a00cf03b","line":272,"in_reply_to":"ba0121b8_dd5d8d48","updated":"2016-03-30 20:55:15.000000000","message":":-).","commit_id":"2fcb2c9aac93f5b422bd65d6704a959443c7a045"}],"nova/virt/vmwareapi/vif.py":[{"author":{"_account_id":16929,"name":"Giridhar Jayavelu","email":"gjayavelu@vmware.com","username":"gjayavelu"},"change_message_id":"edb322ffbc361274ffda59a49da759d241b2112c","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                session, network_id, cluster)"},{"line_number":138,"context_line":"        if not network_ref:"},{"line_number":139,"context_line":"            raise exception.NetworkNotFoundForBridge(bridge\u003dnetwork_id)"},{"line_number":140,"context_line":"        if vif.get(\u0027details\u0027) and vif[\u0027details\u0027].get(\u0027dvs_port_group\u0027):"},{"line_number":141,"context_line":"            network_name \u003d vif[\u0027details\u0027][\u0027dvs_port_group\u0027]"},{"line_number":142,"context_line":"    else:"},{"line_number":143,"context_line":"        reason \u003d _(\u0027vif type %s not supported\u0027) % vif[\u0027type\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_7bf1bb6a","line":140,"updated":"2016-03-03 19:42:41.000000000","message":"can you point to neutron driver which uses dvs_port_group, dv_port_key? or is this some random key injected when creating a neutron network?","commit_id":"f6b5589ab988c03a4ccc91db767bc40281d8d6e5"},{"author":{"_account_id":16929,"name":"Giridhar Jayavelu","email":"gjayavelu@vmware.com","username":"gjayavelu"},"change_message_id":"efa44fab9314706314381dfc6c4326da0b2af2d1","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                session, network_id, cluster)"},{"line_number":138,"context_line":"        if not network_ref:"},{"line_number":139,"context_line":"            raise exception.NetworkNotFoundForBridge(bridge\u003dnetwork_id)"},{"line_number":140,"context_line":"        if vif.get(\u0027details\u0027) and vif[\u0027details\u0027].get(\u0027dvs_port_group\u0027):"},{"line_number":141,"context_line":"            network_name \u003d vif[\u0027details\u0027][\u0027dvs_port_group\u0027]"},{"line_number":142,"context_line":"    else:"},{"line_number":143,"context_line":"        reason \u003d _(\u0027vif type %s not supported\u0027) % vif[\u0027type\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_b07ebd67","line":140,"in_reply_to":"7af24918_6da73ebd","updated":"2016-03-03 22:23:29.000000000","message":"Thanks for the link. My only concern was that if the key \u0027dvs_port_group\u0027 and \u0027dvs_port_key\u0027 are not standard, then this patch would not completely solve the issue reported in bug1552786. i.e it may solve the purpose of one specific dvs driver but not all. On other side, since this is the first dvs driver to specify portkey directly, I guess other drivers have to standardize to these keys.","commit_id":"f6b5589ab988c03a4ccc91db767bc40281d8d6e5"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"28a336521ede9f55a76cdc6edccc1e32dd618d49","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                session, network_id, cluster)"},{"line_number":138,"context_line":"        if not network_ref:"},{"line_number":139,"context_line":"            raise exception.NetworkNotFoundForBridge(bridge\u003dnetwork_id)"},{"line_number":140,"context_line":"        if vif.get(\u0027details\u0027) and vif[\u0027details\u0027].get(\u0027dvs_port_group\u0027):"},{"line_number":141,"context_line":"            network_name \u003d vif[\u0027details\u0027][\u0027dvs_port_group\u0027]"},{"line_number":142,"context_line":"    else:"},{"line_number":143,"context_line":"        reason \u003d _(\u0027vif type %s not supported\u0027) % vif[\u0027type\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_6da73ebd","line":140,"in_reply_to":"7af24918_7bf1bb6a","updated":"2016-03-03 19:52:35.000000000","message":"There is a DVS driver that Mirantis maintains:\n\nhttps://github.com/Mirantis/vmware-dvs/blob/master/vmware_dvs/driver/dvs_mechanism_driver.py\n\nThe idea here is that an association is needed between the neutron port ID and the port key in vCenter. That\u0027s needed if security groups are implemented using the new filter APIs available in vCenter. The dvs_port_group is a way of providing this parameter explicitly in the binding:vif_details.","commit_id":"f6b5589ab988c03a4ccc91db767bc40281d8d6e5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"00a852c789d4f7b00f477cd52e02a58c3182d9ef","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        if not network_ref:"},{"line_number":139,"context_line":"            raise exception.NetworkNotFoundForBridge(bridge\u003dnetwork_id)"},{"line_number":140,"context_line":"        if vif.get(\u0027details\u0027) and vif[\u0027details\u0027].get(\u0027dvs_port_group\u0027):"},{"line_number":141,"context_line":"            network_name \u003d vif[\u0027details\u0027][\u0027dvs_port_group\u0027]"},{"line_number":142,"context_line":"    else:"},{"line_number":143,"context_line":"        reason \u003d _(\u0027vif type %s not supported\u0027) % vif[\u0027type\u0027]"},{"line_number":144,"context_line":"        raise exception.InvalidInput(reason\u003dreason)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_3b4bb35a","line":141,"updated":"2016-03-03 19:34:32.000000000","message":"This variable isn\u0027t actually used...","commit_id":"f6b5589ab988c03a4ccc91db767bc40281d8d6e5"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"28a336521ede9f55a76cdc6edccc1e32dd618d49","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        if not network_ref:"},{"line_number":139,"context_line":"            raise exception.NetworkNotFoundForBridge(bridge\u003dnetwork_id)"},{"line_number":140,"context_line":"        if vif.get(\u0027details\u0027) and vif[\u0027details\u0027].get(\u0027dvs_port_group\u0027):"},{"line_number":141,"context_line":"            network_name \u003d vif[\u0027details\u0027][\u0027dvs_port_group\u0027]"},{"line_number":142,"context_line":"    else:"},{"line_number":143,"context_line":"        reason \u003d _(\u0027vif type %s not supported\u0027) % vif[\u0027type\u0027]"},{"line_number":144,"context_line":"        raise exception.InvalidInput(reason\u003dreason)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_8d08cadb","line":141,"in_reply_to":"7af24918_3b4bb35a","updated":"2016-03-03 19:52:35.000000000","message":"Yeah -- I\u0027ve got the wrong patch set (which having UT for would have caught ;-). This actually moves to just below line 135, and should be stored as network_id and not network_name. I\u0027ll fix this, along with adding UTs for it.","commit_id":"f6b5589ab988c03a4ccc91db767bc40281d8d6e5"},{"author":{"_account_id":16929,"name":"Giridhar Jayavelu","email":"gjayavelu@vmware.com","username":"gjayavelu"},"change_message_id":"edb322ffbc361274ffda59a49da759d241b2112c","unresolved":false,"context_lines":[{"line_number":148,"context_line":"def get_network_ref(session, cluster, vif, is_neutron):"},{"line_number":149,"context_line":"    if is_neutron:"},{"line_number":150,"context_line":"        network_ref \u003d _get_neutron_network(session, cluster, vif)"},{"line_number":151,"context_line":"        try:"},{"line_number":152,"context_line":"            network_ref[\u0027dvs_port_key\u0027] \u003d vif[\u0027details\u0027][\u0027dvs_port_key\u0027]"},{"line_number":153,"context_line":"        except KeyError:"},{"line_number":154,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_7b637b42","line":151,"updated":"2016-03-03 19:42:41.000000000","message":"this could move before L142. Otherwise, the network_ref may point to non-dvs network and the portgroup key doesn\u0027t make sense for non-dvs networks.","commit_id":"f6b5589ab988c03a4ccc91db767bc40281d8d6e5"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"28a336521ede9f55a76cdc6edccc1e32dd618d49","unresolved":false,"context_lines":[{"line_number":148,"context_line":"def get_network_ref(session, cluster, vif, is_neutron):"},{"line_number":149,"context_line":"    if is_neutron:"},{"line_number":150,"context_line":"        network_ref \u003d _get_neutron_network(session, cluster, vif)"},{"line_number":151,"context_line":"        try:"},{"line_number":152,"context_line":"            network_ref[\u0027dvs_port_key\u0027] \u003d vif[\u0027details\u0027][\u0027dvs_port_key\u0027]"},{"line_number":153,"context_line":"        except KeyError:"},{"line_number":154,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_2d9a566e","line":151,"in_reply_to":"7af24918_7b637b42","updated":"2016-03-03 19:52:35.000000000","message":"Will fix -- thanks!","commit_id":"f6b5589ab988c03a4ccc91db767bc40281d8d6e5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4abdd30a902df3c40b79b17826bb8483c6b16ea0","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                       \u0027use-external-id\u0027: use_external_id}"},{"line_number":134,"context_line":"    elif vif[\u0027type\u0027] \u003d\u003d model.VIF_TYPE_DVS:"},{"line_number":135,"context_line":"        network_id \u003d vif[\u0027network\u0027][\u0027bridge\u0027]"},{"line_number":136,"context_line":"        if vif.get(\u0027details\u0027) and vif[\u0027details\u0027].get(\u0027dvs_port_group\u0027):"},{"line_number":137,"context_line":"            network_id \u003d vif[\u0027details\u0027][\u0027dvs_port_group\u0027]"},{"line_number":138,"context_line":"        network_ref \u003d network_util.get_network_with_the_name("},{"line_number":139,"context_line":"                session, network_id, cluster)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afc51ec_99ba5ee0","line":136,"updated":"2016-03-13 12:32:40.000000000","message":"can you please point us to the code that popultaes the vif[\u0027details\u0027] with the port group?\nI am not familiar with any VC neutron code that does this","commit_id":"0ef30dd1feaa0ee619f0508467cc60b8a87cf996"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2d19ec2bcf185e6caa241e29f886e5b461c5a4b5","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                       \u0027use-external-id\u0027: use_external_id}"},{"line_number":134,"context_line":"    elif vif[\u0027type\u0027] \u003d\u003d model.VIF_TYPE_DVS:"},{"line_number":135,"context_line":"        network_id \u003d vif[\u0027network\u0027][\u0027bridge\u0027]"},{"line_number":136,"context_line":"        if vif.get(\u0027details\u0027) and vif[\u0027details\u0027].get(\u0027dvs_port_group\u0027):"},{"line_number":137,"context_line":"            network_id \u003d vif[\u0027details\u0027][\u0027dvs_port_group\u0027]"},{"line_number":138,"context_line":"        network_ref \u003d network_util.get_network_with_the_name("},{"line_number":139,"context_line":"                session, network_id, cluster)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afc51ec_fc10b050","line":136,"in_reply_to":"3afc51ec_39c22a34","updated":"2016-03-13 13:33:31.000000000","message":"the current logic is that the network id is read. then you are overriding this with an alternative network name/id and then doing the search below for the correct port group to attach to.\nIt would be ideal if all drivers could pass the same information here and then it could be leveraged by all. The dvs_port_group that you are passing here is something that you guys have created in your driver and could be misleading to other neutron drivers/consumers.","commit_id":"0ef30dd1feaa0ee619f0508467cc60b8a87cf996"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b9b134046f1b6d0987e102342141c0d001a26d41","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                       \u0027use-external-id\u0027: use_external_id}"},{"line_number":134,"context_line":"    elif vif[\u0027type\u0027] \u003d\u003d model.VIF_TYPE_DVS:"},{"line_number":135,"context_line":"        network_id \u003d vif[\u0027network\u0027][\u0027bridge\u0027]"},{"line_number":136,"context_line":"        if vif.get(\u0027details\u0027) and vif[\u0027details\u0027].get(\u0027dvs_port_group\u0027):"},{"line_number":137,"context_line":"            network_id \u003d vif[\u0027details\u0027][\u0027dvs_port_group\u0027]"},{"line_number":138,"context_line":"        network_ref \u003d network_util.get_network_with_the_name("},{"line_number":139,"context_line":"                session, network_id, cluster)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afc51ec_e3baafe0","line":136,"in_reply_to":"3afc51ec_727e87e5","updated":"2016-03-14 13:48:40.000000000","message":"i really do not want to block this for you guys. would it be an option to change this to\nport-group-name?\nThat is really what is being searched for by the method get_network_with_the_name","commit_id":"0ef30dd1feaa0ee619f0508467cc60b8a87cf996"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"ef41acbcbfb7dbea501e4e37ef542f04dc19c033","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                       \u0027use-external-id\u0027: use_external_id}"},{"line_number":134,"context_line":"    elif vif[\u0027type\u0027] \u003d\u003d model.VIF_TYPE_DVS:"},{"line_number":135,"context_line":"        network_id \u003d vif[\u0027network\u0027][\u0027bridge\u0027]"},{"line_number":136,"context_line":"        if vif.get(\u0027details\u0027) and vif[\u0027details\u0027].get(\u0027dvs_port_group\u0027):"},{"line_number":137,"context_line":"            network_id \u003d vif[\u0027details\u0027][\u0027dvs_port_group\u0027]"},{"line_number":138,"context_line":"        network_ref \u003d network_util.get_network_with_the_name("},{"line_number":139,"context_line":"                session, network_id, cluster)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afc51ec_39c22a34","line":136,"in_reply_to":"3afc51ec_99ba5ee0","updated":"2016-03-13 12:44:37.000000000","message":"There this:\n\nhttps://review.openstack.org/#/c/280475/17/gbpservice/neutron/plugins/ml2/drivers/grouppolicy/apic/driver.py\n\nIn addition, Mirantis is considering passing the port group using this in their DVS driver (not yet implemented, but providing the link for reference):\n\nhttps://github.com/Mirantis/vmware-dvs","commit_id":"0ef30dd1feaa0ee619f0508467cc60b8a87cf996"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"9e1be244d8bc3d39b642f37558174f6eac79a74b","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                       \u0027use-external-id\u0027: use_external_id}"},{"line_number":134,"context_line":"    elif vif[\u0027type\u0027] \u003d\u003d model.VIF_TYPE_DVS:"},{"line_number":135,"context_line":"        network_id \u003d vif[\u0027network\u0027][\u0027bridge\u0027]"},{"line_number":136,"context_line":"        if vif.get(\u0027details\u0027) and vif[\u0027details\u0027].get(\u0027dvs_port_group\u0027):"},{"line_number":137,"context_line":"            network_id \u003d vif[\u0027details\u0027][\u0027dvs_port_group\u0027]"},{"line_number":138,"context_line":"        network_ref \u003d network_util.get_network_with_the_name("},{"line_number":139,"context_line":"                session, network_id, cluster)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afc51ec_97e84112","line":136,"in_reply_to":"3afc51ec_e3baafe0","updated":"2016-03-14 15:04:11.000000000","message":"That seems reasonable. Will change in update of this patch set.","commit_id":"0ef30dd1feaa0ee619f0508467cc60b8a87cf996"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"92d59dddd83965f8486169cc09863dbd68e43273","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                       \u0027use-external-id\u0027: use_external_id}"},{"line_number":134,"context_line":"    elif vif[\u0027type\u0027] \u003d\u003d model.VIF_TYPE_DVS:"},{"line_number":135,"context_line":"        network_id \u003d vif[\u0027network\u0027][\u0027bridge\u0027]"},{"line_number":136,"context_line":"        if vif.get(\u0027details\u0027) and vif[\u0027details\u0027].get(\u0027dvs_port_group\u0027):"},{"line_number":137,"context_line":"            network_id \u003d vif[\u0027details\u0027][\u0027dvs_port_group\u0027]"},{"line_number":138,"context_line":"        network_ref \u003d network_util.get_network_with_the_name("},{"line_number":139,"context_line":"                session, network_id, cluster)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afc51ec_727e87e5","line":136,"in_reply_to":"3afc51ec_fc10b050","updated":"2016-03-13 17:33:14.000000000","message":"My thinking is that the use of [\u0027network\u0027][\u0027bridge\u0027] is a form of overloading, so it seemed reasonable to pass this using a parameter specific to the DVS VIF. I agree that it would be best to have a single way of passing this. Maybe we could propose a patch to the neutron drivers that use this to pass it via the dvs_port_group parameter instead?","commit_id":"0ef30dd1feaa0ee619f0508467cc60b8a87cf996"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b9b134046f1b6d0987e102342141c0d001a26d41","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        if not network_ref:"},{"line_number":141,"context_line":"            raise exception.NetworkNotFoundForBridge(bridge\u003dnetwork_id)"},{"line_number":142,"context_line":"        try:"},{"line_number":143,"context_line":"            network_ref[\u0027dvs_port_key\u0027] \u003d vif[\u0027details\u0027][\u0027dvs_port_key\u0027]"},{"line_number":144,"context_line":"        except KeyError:"},{"line_number":145,"context_line":"            pass"},{"line_number":146,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afc51ec_83c48b5f","line":143,"updated":"2016-03-14 13:48:40.000000000","message":"Can you please drop this till you can show the use and consumption of it?","commit_id":"0ef30dd1feaa0ee619f0508467cc60b8a87cf996"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"9e1be244d8bc3d39b642f37558174f6eac79a74b","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        if not network_ref:"},{"line_number":141,"context_line":"            raise exception.NetworkNotFoundForBridge(bridge\u003dnetwork_id)"},{"line_number":142,"context_line":"        try:"},{"line_number":143,"context_line":"            network_ref[\u0027dvs_port_key\u0027] \u003d vif[\u0027details\u0027][\u0027dvs_port_key\u0027]"},{"line_number":144,"context_line":"        except KeyError:"},{"line_number":145,"context_line":"            pass"},{"line_number":146,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afc51ec_92596f5d","line":143,"in_reply_to":"3afc51ec_83c48b5f","updated":"2016-03-14 15:04:11.000000000","message":"Sorry -- didn\u0027t realize I hadn\u0027t provided this. Here is the agent code that obtains the port key (liberty branch -- not yet in their master):\nhttps://github.com/Mirantis/vmware-dvs/blob/liberty/vmware_dvs/utils/dvs_util.py#L154-L182\n\nIt\u0027s called here:\nhttps://github.com/Mirantis/vmware-dvs/blob/liberty/vmware_dvs/agent/dvs_neutron_agent.py#L147\n\nHere\u0027s are some examples of the agent using it:\nhttps://github.com/Mirantis/vmware-dvs/blob/liberty/vmware_dvs/utils/security_group_utils.py#L195-L197\n\nhttps://github.com/Mirantis/vmware-dvs/blob/liberty/vmware_dvs/agent/firewalls/vcenter_firewall.py#L122\n\nIs that what you were looking for?","commit_id":"0ef30dd1feaa0ee619f0508467cc60b8a87cf996"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"c32af229ab0a5c9870013200d1c6a4ecf3abed17","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                       \u0027use-external-id\u0027: use_external_id}"},{"line_number":134,"context_line":"    elif vif[\u0027type\u0027] \u003d\u003d model.VIF_TYPE_DVS:"},{"line_number":135,"context_line":"        network_id \u003d vif[\u0027network\u0027][\u0027bridge\u0027]"},{"line_number":136,"context_line":"        if vif.get(\u0027details\u0027) and vif[\u0027details\u0027].get(\u0027port_group_name\u0027):"},{"line_number":137,"context_line":"            network_id \u003d vif[\u0027details\u0027][\u0027port_group_name\u0027]"},{"line_number":138,"context_line":"        network_ref \u003d network_util.get_network_with_the_name("},{"line_number":139,"context_line":"                session, network_id, cluster)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afc51ec_b583ab03","line":136,"updated":"2016-03-14 17:37:40.000000000","message":"Shouldn\u0027t this be dvs_port_group_name, or shouldn\u0027t line 143 be just port_key? I\u0027d prefer to prefix both with dvs_ to make it clear these are defined for VIF_TYPE_DVS.","commit_id":"94ad988fb4b0d101e052dfb5ce90d90073793fec"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"0224bac8742baf71d004169810cf2b1d042c2fa4","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                       \u0027use-external-id\u0027: use_external_id}"},{"line_number":134,"context_line":"    elif vif[\u0027type\u0027] \u003d\u003d model.VIF_TYPE_DVS:"},{"line_number":135,"context_line":"        network_id \u003d vif[\u0027network\u0027][\u0027bridge\u0027]"},{"line_number":136,"context_line":"        if vif.get(\u0027details\u0027) and vif[\u0027details\u0027].get(\u0027port_group_name\u0027):"},{"line_number":137,"context_line":"            network_id \u003d vif[\u0027details\u0027][\u0027port_group_name\u0027]"},{"line_number":138,"context_line":"        network_ref \u003d network_util.get_network_with_the_name("},{"line_number":139,"context_line":"                session, network_id, cluster)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afc51ec_f8b08a45","line":136,"in_reply_to":"3afc51ec_b583ab03","updated":"2016-03-14 17:55:22.000000000","message":"Will fix.","commit_id":"94ad988fb4b0d101e052dfb5ce90d90073793fec"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5608317daf156f3d8f254f4761cf27d8424a795e","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        network_ref \u003d network_util.get_network_with_the_name("},{"line_number":139,"context_line":"                session, network_id, cluster)"},{"line_number":140,"context_line":"        if not network_ref:"},{"line_number":141,"context_line":"            raise exception.NetworkNotFoundForBridge(bridge\u003dnetwork_id)"},{"line_number":142,"context_line":"        try:"},{"line_number":143,"context_line":"            network_ref[\u0027dvs_port_key\u0027] \u003d vif[\u0027details\u0027][\u0027dvs_port_key\u0027]"},{"line_number":144,"context_line":"        except KeyError:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_8f01293b","line":141,"updated":"2016-03-15 06:01:24.000000000","message":"why note:\n    network_ref[\u0027dvs_port_key\u0027] \u003d vif.get(\u0027details\u0027) and vif[\u0027details\u0027].get(\u0027dvs_port_key\u0027)","commit_id":"096d3929b2998c736af182b2f46542c759e77759"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"e4491b79e8fd57dcd85931df34f46c4641f9bf7a","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        network_ref \u003d network_util.get_network_with_the_name("},{"line_number":139,"context_line":"                session, network_id, cluster)"},{"line_number":140,"context_line":"        if not network_ref:"},{"line_number":141,"context_line":"            raise exception.NetworkNotFoundForBridge(bridge\u003dnetwork_id)"},{"line_number":142,"context_line":"        try:"},{"line_number":143,"context_line":"            network_ref[\u0027dvs_port_key\u0027] \u003d vif[\u0027details\u0027][\u0027dvs_port_key\u0027]"},{"line_number":144,"context_line":"        except KeyError:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_5e7e31af","line":141,"in_reply_to":"1af94dfe_bed2d532","updated":"2016-03-15 11:48:39.000000000","message":"Just to clarify -- I think (?) it makes sense to have this code path wrapped with an if clause -- just to ensure that a \u0027dvs_port_key\u0027 property doesn\u0027t exist if it\u0027s not in the details (will include this in the next patch set).","commit_id":"096d3929b2998c736af182b2f46542c759e77759"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"aa4eb6b14c016eae15a6af90d0b9c8ab7bdbd454","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        network_ref \u003d network_util.get_network_with_the_name("},{"line_number":139,"context_line":"                session, network_id, cluster)"},{"line_number":140,"context_line":"        if not network_ref:"},{"line_number":141,"context_line":"            raise exception.NetworkNotFoundForBridge(bridge\u003dnetwork_id)"},{"line_number":142,"context_line":"        try:"},{"line_number":143,"context_line":"            network_ref[\u0027dvs_port_key\u0027] \u003d vif[\u0027details\u0027][\u0027dvs_port_key\u0027]"},{"line_number":144,"context_line":"        except KeyError:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_bed2d532","line":141,"in_reply_to":"3afc51ec_8f01293b","updated":"2016-03-15 11:44:46.000000000","message":"This was taken from the original patch created by Mirantis:\nhttps://github.com/Mirantis/vmware-dvs/blob/liberty/nova.patch\n\nMy guess is they were applying the \"Easier to ask forgiveness than permission\" (EAFP) principle:\nhttp://stackoverflow.com/questions/7604636/better-to-try-something-and-catch-the-exception-or-test-if-its-possible-first\n\nI\u0027ll go ahead and change it to your suggestion, so that both changes in this file will have the same style.","commit_id":"096d3929b2998c736af182b2f46542c759e77759"},{"author":{"_account_id":20772,"name":"Sergei Chipiga","email":"schipiga@mirantis.com","username":"schipiga"},"change_message_id":"ecd43574ae45f61f980d939a9d9c6415ea64541a","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                       \u0027use-external-id\u0027: use_external_id}"},{"line_number":134,"context_line":"    elif vif[\u0027type\u0027] \u003d\u003d model.VIF_TYPE_DVS:"},{"line_number":135,"context_line":"        network_id \u003d vif[\u0027network\u0027][\u0027bridge\u0027]"},{"line_number":136,"context_line":"        if vif.get(\u0027details\u0027) and vif[\u0027details\u0027].get(\u0027dvs_port_group_name\u0027):"},{"line_number":137,"context_line":"            network_id \u003d vif[\u0027details\u0027][\u0027dvs_port_group_name\u0027]"},{"line_number":138,"context_line":"        network_ref \u003d network_util.get_network_with_the_name("},{"line_number":139,"context_line":"                session, network_id, cluster)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa0719c6_3479d030","line":136,"updated":"2016-03-20 18:39:59.000000000","message":"It\u0027s a bit simpler\n\n  if vif.get(\u0027details\u0027, {}).get(\u0027dvs_port_group_name\u0027):","commit_id":"fe8b3c4f44a2d2539b28067285b645e8cae8bbe3"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"31e25d320ce8c7781d0a03edc496ce03b04ae63c","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                       \u0027use-external-id\u0027: use_external_id}"},{"line_number":134,"context_line":"    elif vif[\u0027type\u0027] \u003d\u003d model.VIF_TYPE_DVS:"},{"line_number":135,"context_line":"        network_id \u003d vif[\u0027network\u0027][\u0027bridge\u0027]"},{"line_number":136,"context_line":"        if vif.get(\u0027details\u0027) and vif[\u0027details\u0027].get(\u0027dvs_port_group_name\u0027):"},{"line_number":137,"context_line":"            network_id \u003d vif[\u0027details\u0027][\u0027dvs_port_group_name\u0027]"},{"line_number":138,"context_line":"        network_ref \u003d network_util.get_network_with_the_name("},{"line_number":139,"context_line":"                session, network_id, cluster)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa0719c6_4faf8de3","line":136,"in_reply_to":"fa0719c6_3479d030","updated":"2016-03-20 20:43:36.000000000","message":"Will fix.","commit_id":"fe8b3c4f44a2d2539b28067285b645e8cae8bbe3"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"9ed35097e233914df44fce963ada3f4c59095662","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    elif vif[\u0027type\u0027] \u003d\u003d model.VIF_TYPE_DVS:"},{"line_number":135,"context_line":"        network_id \u003d vif[\u0027network\u0027][\u0027bridge\u0027]"},{"line_number":136,"context_line":"        if vif.get(\u0027details\u0027, {}).get(\u0027dvs_port_group_name\u0027):"},{"line_number":137,"context_line":"            network_id \u003d vif[\u0027details\u0027][\u0027dvs_port_group_name\u0027]"},{"line_number":138,"context_line":"        network_ref \u003d network_util.get_network_with_the_name("},{"line_number":139,"context_line":"                session, network_id, cluster)"},{"line_number":140,"context_line":"        if not network_ref:"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa0719c6_f4ee5c20","line":137,"updated":"2016-03-24 14:53:41.000000000","message":"This override is troubling to me. It\u0027s not clear where it comes from, when it can be set, and why it should override network_id. I mean all that\u0027s in the review comments, but not at all clear in the code.\n\nWhy can\u0027t the method of passing a network_id be standardized between Neutron drivers? In other words, why can\u0027t the DVS driver pass this info in vif[\u0027network\u0027][\u0027bridge\u0027]?","commit_id":"2ebdb564a938321d229bd979b2ef04cddb54d4ef"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"8d8a87c5c9ceafbaf0dda6897640b93ef7184484","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    elif vif[\u0027type\u0027] \u003d\u003d model.VIF_TYPE_DVS:"},{"line_number":135,"context_line":"        network_id \u003d vif[\u0027network\u0027][\u0027bridge\u0027]"},{"line_number":136,"context_line":"        if vif.get(\u0027details\u0027, {}).get(\u0027dvs_port_group_name\u0027):"},{"line_number":137,"context_line":"            network_id \u003d vif[\u0027details\u0027][\u0027dvs_port_group_name\u0027]"},{"line_number":138,"context_line":"        network_ref \u003d network_util.get_network_with_the_name("},{"line_number":139,"context_line":"                session, network_id, cluster)"},{"line_number":140,"context_line":"        if not network_ref:"}],"source_content_type":"text/x-python","patch_set":9,"id":"da0c15f0_0c03da74","line":137,"in_reply_to":"da0c15f0_8e06c71e","updated":"2016-03-24 22:09:52.000000000","message":"The DVS VIF driver in Nova should be where these definitions (which are specific to that VIF driver) are kept, so mechanism drivers in Neutron should use existing VIF detail key definitions when available. So for example, if port binding requires the port group or port key then mechanism drivers should use the key definitions specified in the DVS VIF driver. However, if a new VIF parameter is needed for port binding (say some networking-related DVS parameter about the port), then the VIF driver would define it and mechanism drivers that use it for port binding would have to provide it in the binding:vif_details.","commit_id":"2ebdb564a938321d229bd979b2ef04cddb54d4ef"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"2dfa34deeb515d6531127afdf5ce9267f345b79e","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    elif vif[\u0027type\u0027] \u003d\u003d model.VIF_TYPE_DVS:"},{"line_number":135,"context_line":"        network_id \u003d vif[\u0027network\u0027][\u0027bridge\u0027]"},{"line_number":136,"context_line":"        if vif.get(\u0027details\u0027, {}).get(\u0027dvs_port_group_name\u0027):"},{"line_number":137,"context_line":"            network_id \u003d vif[\u0027details\u0027][\u0027dvs_port_group_name\u0027]"},{"line_number":138,"context_line":"        network_ref \u003d network_util.get_network_with_the_name("},{"line_number":139,"context_line":"                session, network_id, cluster)"},{"line_number":140,"context_line":"        if not network_ref:"}],"source_content_type":"text/x-python","patch_set":9,"id":"da0c15f0_8e06c71e","line":137,"in_reply_to":"fa0719c6_370e168c","updated":"2016-03-24 19:37:26.000000000","message":"That does help explain it. I\u0027m still concerned though. What happens when another Neutron driver is proposed that adds \u0027foo_port_group_name\u0027 and then that also needs to be checked against? I can deal with one override if that\u0027s necessary here, but it shouldn\u0027t be specific to the Neutron driver in use.","commit_id":"2ebdb564a938321d229bd979b2ef04cddb54d4ef"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"8d7613ec729da71ab207fdd8c49c9bfe7908eb2c","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    elif vif[\u0027type\u0027] \u003d\u003d model.VIF_TYPE_DVS:"},{"line_number":135,"context_line":"        network_id \u003d vif[\u0027network\u0027][\u0027bridge\u0027]"},{"line_number":136,"context_line":"        if vif.get(\u0027details\u0027, {}).get(\u0027dvs_port_group_name\u0027):"},{"line_number":137,"context_line":"            network_id \u003d vif[\u0027details\u0027][\u0027dvs_port_group_name\u0027]"},{"line_number":138,"context_line":"        network_ref \u003d network_util.get_network_with_the_name("},{"line_number":139,"context_line":"                session, network_id, cluster)"},{"line_number":140,"context_line":"        if not network_ref:"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa0719c6_370e168c","line":137,"in_reply_to":"fa0719c6_f4ee5c20","updated":"2016-03-24 15:13:35.000000000","message":"It\u0027s a good question, and if I understand correctly where you\u0027re coming from here, you\u0027re asking why not use the existing construct?  Our thinking/belief was that this was overloading an existing construct, and more importantly wasn\u0027t specific to the DVS VIF port binding. The VIF details is used for passing this, and since this is something specific to the DVS port binding, it seemed best to pass it explicitly (along with the other DVS port binding parameter that\u0027s been added -- dvs_port_key). Our goal was also not to break port binding of existing mechanism drivers as well. I understand the concern about multiple ways of passing this information, so I\u0027d propose that we create patches for drivers that use the existing vif[\u0027network\u0027][\u0027bridge\u0027] to use the dvs_port_group_name.\n\nAs far as code that provides this -- I believe Mirantis is working on adding this to their DVS mechanism driver/agent, and there\u0027s also this implementation (see line 115):\nhttps://review.openstack.org/#/c/280475/17/gbpservice/neutron/plugins/ml2/drivers/grouppolicy/apic/driver.py\n\n(note: the code above needs a new patch to change from dvs_port_group to dvs_port_group_name, as a result of the nova code reviews).\n\nDoes that help provide context/rationale/explanation?","commit_id":"2ebdb564a938321d229bd979b2ef04cddb54d4ef"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"9ed35097e233914df44fce963ada3f4c59095662","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        if not network_ref:"},{"line_number":141,"context_line":"            raise exception.NetworkNotFoundForBridge(bridge\u003dnetwork_id)"},{"line_number":142,"context_line":"        if vif.get(\u0027details\u0027) and vif[\u0027details\u0027].get(\u0027dvs_port_key\u0027):"},{"line_number":143,"context_line":"            network_ref[\u0027dvs_port_key\u0027] \u003d vif[\u0027details\u0027][\u0027dvs_port_key\u0027]"},{"line_number":144,"context_line":"    else:"},{"line_number":145,"context_line":"        reason \u003d _(\u0027vif type %s not supported\u0027) % vif[\u0027type\u0027]"},{"line_number":146,"context_line":"        raise exception.InvalidInput(reason\u003dreason)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa0719c6_f452dc11","line":143,"updated":"2016-03-24 14:53:41.000000000","message":"This seems reasonable since you\u0027re adding additional information to be passed around.","commit_id":"2ebdb564a938321d229bd979b2ef04cddb54d4ef"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9db7c0500ff388cac4d76fe5d9dcba919681def6","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        # Port binding for DVS VIF types may pass the name"},{"line_number":136,"context_line":"        # of the port group, so use it if present"},{"line_number":137,"context_line":"        network_id \u003d vif.get(\u0027details\u0027, {}).get(\u0027dvs_port_group_name\u0027)"},{"line_number":138,"context_line":"        if not network_id:"},{"line_number":139,"context_line":"            # Make use of the original one, in the event that the"},{"line_number":140,"context_line":"            # port binding does not provide this key in VIF details"},{"line_number":141,"context_line":"            network_id \u003d vif[\u0027network\u0027][\u0027bridge\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba0121b8_1d54251f","line":138,"updated":"2016-03-30 20:51:00.000000000","message":"Can network_id be 0? If so, better to do:\n\n if network_id is None:","commit_id":"2fcb2c9aac93f5b422bd65d6704a959443c7a045"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"0bcff24912e724f95ba8c198ebe2ffbae47a248d","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        # Port binding for DVS VIF types may pass the name"},{"line_number":136,"context_line":"        # of the port group, so use it if present"},{"line_number":137,"context_line":"        network_id \u003d vif.get(\u0027details\u0027, {}).get(\u0027dvs_port_group_name\u0027)"},{"line_number":138,"context_line":"        if not network_id:"},{"line_number":139,"context_line":"            # Make use of the original one, in the event that the"},{"line_number":140,"context_line":"            # port binding does not provide this key in VIF details"},{"line_number":141,"context_line":"            network_id \u003d vif[\u0027network\u0027][\u0027bridge\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba0121b8_e039c8d8","line":138,"in_reply_to":"ba0121b8_1d54251f","updated":"2016-03-30 20:55:15.000000000","message":"Seems like a good fix, in any case -- will fix and provide an updated patch set.","commit_id":"2fcb2c9aac93f5b422bd65d6704a959443c7a045"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e265bc8b963b51eaef9cd305cc3353821b4fe29f","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        network_id \u003d vif.get(\u0027details\u0027, {}).get(\u0027dvs_port_group_name\u0027)"},{"line_number":149,"context_line":"        if network_id is None:"},{"line_number":150,"context_line":"            # Make use of the original one, in the event that the"},{"line_number":151,"context_line":"            # port binding does not provide this key in VIF details"},{"line_number":152,"context_line":"            network_id \u003d vif[\u0027network\u0027][\u0027bridge\u0027]"},{"line_number":153,"context_line":"        network_ref \u003d network_util.get_network_with_the_name("},{"line_number":154,"context_line":"                session, network_id, cluster)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba0121b8_dc560f29","line":151,"updated":"2016-03-31 13:02:19.000000000","message":"at the moment the vmware_nsx plugin does not return the name so this code is required.","commit_id":"e964b4778cfe6a1864718bdad4ab037ddf976766"}],"nova/virt/vmwareapi/vm_util.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2d19ec2bcf185e6caa241e29f886e5b461c5a4b5","unresolved":false,"context_lines":[{"line_number":453,"context_line":"        portgroup.switchUuid \u003d network_ref[\u0027dvsw\u0027]"},{"line_number":454,"context_line":"        portgroup.portgroupKey \u003d network_ref[\u0027dvpg\u0027]"},{"line_number":455,"context_line":"        try:"},{"line_number":456,"context_line":"            portgroup.portKey \u003d network_ref[\u0027dvs_port_key\u0027]"},{"line_number":457,"context_line":"        except KeyError:"},{"line_number":458,"context_line":"            pass"},{"line_number":459,"context_line":"        backing.port \u003d portgroup"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afc51ec_5c3564d8","line":456,"updated":"2016-03-13 13:33:31.000000000","message":"how do you know the physical mappings to the vnics in neutron to be able to pass this information to Nova?\nDo all of the hosts need to have the same  configuration? Or is the Cisco device able to determine this?\n\nWhere is this information created? I did not see any information regarding that in the patches that you posted. Can you please post a link to this","commit_id":"0ef30dd1feaa0ee619f0508467cc60b8a87cf996"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"92d59dddd83965f8486169cc09863dbd68e43273","unresolved":false,"context_lines":[{"line_number":453,"context_line":"        portgroup.switchUuid \u003d network_ref[\u0027dvsw\u0027]"},{"line_number":454,"context_line":"        portgroup.portgroupKey \u003d network_ref[\u0027dvpg\u0027]"},{"line_number":455,"context_line":"        try:"},{"line_number":456,"context_line":"            portgroup.portKey \u003d network_ref[\u0027dvs_port_key\u0027]"},{"line_number":457,"context_line":"        except KeyError:"},{"line_number":458,"context_line":"            pass"},{"line_number":459,"context_line":"        backing.port \u003d portgroup"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afc51ec_1240e3a4","line":456,"in_reply_to":"3afc51ec_5c3564d8","updated":"2016-03-13 17:33:14.000000000","message":"We are pursuing an architecture with the Mirantis DVS agent, where the DVS agent handles all networking interaction with vCenter, and therefore creates the association between Neutron ports and vCenter port keys, and provides them back to the mechanism driver which places this in the dvs_port_key field of binding:vif_details. Our mechanism driver would need to change to interact with this agent, and pass this mapping on to Nova. This change would happen in a follow-on patch.","commit_id":"0ef30dd1feaa0ee619f0508467cc60b8a87cf996"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5608317daf156f3d8f254f4761cf27d8424a795e","unresolved":false,"context_lines":[{"line_number":452,"context_line":"                    \u0027ns0:DistributedVirtualSwitchPortConnection\u0027)"},{"line_number":453,"context_line":"        portgroup.switchUuid \u003d network_ref[\u0027dvsw\u0027]"},{"line_number":454,"context_line":"        portgroup.portgroupKey \u003d network_ref[\u0027dvpg\u0027]"},{"line_number":455,"context_line":"        try:"},{"line_number":456,"context_line":"            portgroup.portKey \u003d network_ref[\u0027dvs_port_key\u0027]"},{"line_number":457,"context_line":"        except KeyError:"},{"line_number":458,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_cf8e91cf","line":455,"updated":"2016-03-15 06:01:24.000000000","message":"this is really ugly\nif network_ref[\u0027dvs_port_key\u0027]:\n    portgroup.portKey \u003d network_ref[\u0027dvs_port_key\u0027]","commit_id":"096d3929b2998c736af182b2f46542c759e77759"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"aa4eb6b14c016eae15a6af90d0b9c8ab7bdbd454","unresolved":false,"context_lines":[{"line_number":452,"context_line":"                    \u0027ns0:DistributedVirtualSwitchPortConnection\u0027)"},{"line_number":453,"context_line":"        portgroup.switchUuid \u003d network_ref[\u0027dvsw\u0027]"},{"line_number":454,"context_line":"        portgroup.portgroupKey \u003d network_ref[\u0027dvpg\u0027]"},{"line_number":455,"context_line":"        try:"},{"line_number":456,"context_line":"            portgroup.portKey \u003d network_ref[\u0027dvs_port_key\u0027]"},{"line_number":457,"context_line":"        except KeyError:"},{"line_number":458,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_9e8c3937","line":455,"in_reply_to":"3afc51ec_cf8e91cf","updated":"2016-03-15 11:44:46.000000000","message":"This was taken from the original patch created by Mirantis:\nhttps://github.com/Mirantis/vmware-dvs/blob/liberty/nova.patch\n\nMy guess is they were applying the \"Easier to ask forgiveness than permission\" (EAFP) principle:\nhttp://stackoverflow.com/questions/7604636/better-to-try-something-and-catch-the-exception-or-test-if-its-possible-first\n\nI\u0027ll change this to your suggestion, so that the code paths for this patch all use the same style.","commit_id":"096d3929b2998c736af182b2f46542c759e77759"},{"author":{"_account_id":20772,"name":"Sergei Chipiga","email":"schipiga@mirantis.com","username":"schipiga"},"change_message_id":"7c45d665548678c324c7959764a3507e10a657f0","unresolved":false,"context_lines":[{"line_number":452,"context_line":"                    \u0027ns0:DistributedVirtualSwitchPortConnection\u0027)"},{"line_number":453,"context_line":"        portgroup.switchUuid \u003d network_ref[\u0027dvsw\u0027]"},{"line_number":454,"context_line":"        portgroup.portgroupKey \u003d network_ref[\u0027dvpg\u0027]"},{"line_number":455,"context_line":"        if network_ref.get(\u0027dvs_port_key\u0027):"},{"line_number":456,"context_line":"            portgroup.portKey \u003d network_ref[\u0027dvs_port_key\u0027]"},{"line_number":457,"context_line":"        backing.port \u003d portgroup"},{"line_number":458,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa0719c6_f49d985a","line":455,"updated":"2016-03-20 18:42:42.000000000","message":"In my opinion it\u0027s better:\n\n  if \u0027dvs_port_key\u0027 in network_ref:\n\nhttp://stackoverflow.com/questions/1323410/has-key-or-in","commit_id":"fe8b3c4f44a2d2539b28067285b645e8cae8bbe3"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"2d476c04494e268ab0094a49e40006885de296cd","unresolved":false,"context_lines":[{"line_number":452,"context_line":"                    \u0027ns0:DistributedVirtualSwitchPortConnection\u0027)"},{"line_number":453,"context_line":"        portgroup.switchUuid \u003d network_ref[\u0027dvsw\u0027]"},{"line_number":454,"context_line":"        portgroup.portgroupKey \u003d network_ref[\u0027dvpg\u0027]"},{"line_number":455,"context_line":"        if network_ref.get(\u0027dvs_port_key\u0027):"},{"line_number":456,"context_line":"            portgroup.portKey \u003d network_ref[\u0027dvs_port_key\u0027]"},{"line_number":457,"context_line":"        backing.port \u003d portgroup"},{"line_number":458,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa0719c6_0fa59503","line":455,"in_reply_to":"fa0719c6_f49d985a","updated":"2016-03-20 20:43:14.000000000","message":"Will fix.","commit_id":"fe8b3c4f44a2d2539b28067285b645e8cae8bbe3"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9db7c0500ff388cac4d76fe5d9dcba919681def6","unresolved":false,"context_lines":[{"line_number":454,"context_line":"        portgroup.switchUuid \u003d network_ref[\u0027dvsw\u0027]"},{"line_number":455,"context_line":"        portgroup.portgroupKey \u003d network_ref[\u0027dvpg\u0027]"},{"line_number":456,"context_line":"        if \u0027dvs_port_key\u0027 in network_ref:"},{"line_number":457,"context_line":"            portgroup.portKey \u003d network_ref[\u0027dvs_port_key\u0027]"},{"line_number":458,"context_line":"        backing.port \u003d portgroup"},{"line_number":459,"context_line":"    else:"},{"line_number":460,"context_line":"        backing \u003d client_factory.create("}],"source_content_type":"text/x-python","patch_set":10,"id":"ba0121b8_3d576927","line":457,"updated":"2016-03-30 20:51:00.000000000","message":"There is no unit test coverage for the above change.","commit_id":"2fcb2c9aac93f5b422bd65d6704a959443c7a045"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"0bcff24912e724f95ba8c198ebe2ffbae47a248d","unresolved":false,"context_lines":[{"line_number":454,"context_line":"        portgroup.switchUuid \u003d network_ref[\u0027dvsw\u0027]"},{"line_number":455,"context_line":"        portgroup.portgroupKey \u003d network_ref[\u0027dvpg\u0027]"},{"line_number":456,"context_line":"        if \u0027dvs_port_key\u0027 in network_ref:"},{"line_number":457,"context_line":"            portgroup.portKey \u003d network_ref[\u0027dvs_port_key\u0027]"},{"line_number":458,"context_line":"        backing.port \u003d portgroup"},{"line_number":459,"context_line":"    else:"},{"line_number":460,"context_line":"        backing \u003d client_factory.create("}],"source_content_type":"text/x-python","patch_set":10,"id":"ba0121b8_605498fe","line":457,"in_reply_to":"ba0121b8_3d576927","updated":"2016-03-30 20:55:15.000000000","message":"I\u0027ll add a test case for this -- thanks!","commit_id":"2fcb2c9aac93f5b422bd65d6704a959443c7a045"}]}
