)]}'
{"nova/virt/libvirt/vif.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5c4391795bd92bca546459fcae11170c2f877156","unresolved":false,"context_lines":[{"line_number":694,"context_line":"        mtu \u003d network.get_meta(\u0027mtu\u0027) if network else None"},{"line_number":695,"context_line":"        nova.privsep.linux_net.set_device_mtu(dev, mtu)"},{"line_number":696,"context_line":""},{"line_number":697,"context_line":"    def plug_vhostuser(self, instance, vif):"},{"line_number":698,"context_line":"        pass"},{"line_number":699,"context_line":""},{"line_number":700,"context_line":"    def _plug_os_vif(self, instance, vif):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_de47b04b","side":"PARENT","line":697,"updated":"2019-07-16 17:52:29.000000000","message":"this used to be the fall back for generic vhost-user\nwhich is used by only two netwrok backedns.\n\nsnab switch which i do not think is still developed and\nvpp which is. this function is never called directly and should only be called via plug below ...","commit_id":"ff0feed25d56c8ccd2298d5b5b82e636880fa986"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5c4391795bd92bca546459fcae11170c2f877156","unresolved":false,"context_lines":[{"line_number":723,"context_line":"                  \"for this vif_driver implementation\"))"},{"line_number":724,"context_line":""},{"line_number":725,"context_line":"        # Try os-vif codepath first"},{"line_number":726,"context_line":"        vif_obj \u003d os_vif_util.nova_to_osvif_vif(vif)"},{"line_number":727,"context_line":"        if vif_obj is not None:"},{"line_number":728,"context_line":"            self._plug_os_vif(instance, vif_obj)"},{"line_number":729,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_3ea12495","side":"PARENT","line":726,"range":{"start_line":726,"start_character":8,"end_line":726,"end_character":52},"updated":"2019-07-16 17:52:29.000000000","message":"in the generic vhost-user case teh vif type will be \u0027vhostuser\u0027 so we will not raise an excpetion above and will call this convertion fuction.\n\nhttps://github.com/openstack/nova/blob/0a62d9765bc67ac375a33e77e4633e90afe44331/nova/network/os_vif_util.py#L574\n\ninternally that applys a template and contruct a function name of  \"_nova_to_osvif_vif_vhostuser\"\n\nfor the case of generic vhost-user we take the final branch\n\nhttps://github.com/openstack/nova/blob/0a62d9765bc67ac375a33e77e4633e90afe44331/nova/network/os_vif_util.py#L441-L446\n\nso vif_obj will be an instance of the noop plugin which as the name sugges does nothing.\n\nto determin which path will be taken we need to look at the _nw_info_build_network function in the neutorn api module\n\nhttps://github.com/openstack/nova/blob/0a62d9765bc67ac375a33e77e4633e90afe44331/nova/network/neutronv2/api.py#L2766-L2836\n\nand the networking-vpp ml2 driver\n\nhttps://github.com/openstack/networking-vpp/blob/master/networking_vpp/mech_vpp.py\n\nwalking through this quickly \nlooking at networiking-vpp we see that teh only vif details that are set for vhost user are teh socket path and the socket mode\nhttps://github.com/openstack/networking-vpp/blob/master/networking_vpp/mech_vpp.py#L175-L182\n\n\nthe vif_type will always be set to vhostuser for vm interface by networking-vpp and it will alway be tap for dhcp and router interfaces.\n\n\ngoing back to nova when we look at the _nw_info_build_network we se that the only specal handeling that is done for vhost user is for ovs or 6wids fast path stack.\n\nhttps://github.com/openstack/nova/blob/0a62d9765bc67ac375a33e77e4633e90afe44331/nova/network/neutronv2/api.py#L2803-L2813\n\n\nas a result when we are converting the nova.network.model.vif object into a an os-vif vif object all of the specal cases in _nova_to_osvif_vif_vhostuser will be false as the VIF_DETAILS_VHOSTUSER_*_PLUG fields will be unset\n\nhttps://github.com/openstack/nova/blob/0a62d9765bc67ac375a33e77e4633e90afe44331/nova/network/os_vif_util.py#L399-L440\n\nso in the generic case we alway execute the else\n\nhttps://github.com/openstack/nova/blob/0a62d9765bc67ac375a33e77e4633e90afe44331/nova/network/os_vif_util.py#L441-L446","commit_id":"ff0feed25d56c8ccd2298d5b5b82e636880fa986"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5c4391795bd92bca546459fcae11170c2f877156","unresolved":false,"context_lines":[{"line_number":724,"context_line":""},{"line_number":725,"context_line":"        # Try os-vif codepath first"},{"line_number":726,"context_line":"        vif_obj \u003d os_vif_util.nova_to_osvif_vif(vif)"},{"line_number":727,"context_line":"        if vif_obj is not None:"},{"line_number":728,"context_line":"            self._plug_os_vif(instance, vif_obj)"},{"line_number":729,"context_line":"            return"},{"line_number":730,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_dea9f07b","side":"PARENT","line":727,"range":{"start_line":727,"start_character":11,"end_line":727,"end_character":18},"updated":"2019-07-16 17:52:29.000000000","message":"since this is never none for generic vhost-user.","commit_id":"ff0feed25d56c8ccd2298d5b5b82e636880fa986"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5c4391795bd92bca546459fcae11170c2f877156","unresolved":false,"context_lines":[{"line_number":729,"context_line":"            return"},{"line_number":730,"context_line":""},{"line_number":731,"context_line":"        # Legacy non-os-vif codepath"},{"line_number":732,"context_line":"        vif_slug \u003d self._normalize_vif_type(vif_type)"},{"line_number":733,"context_line":"        func \u003d getattr(self, \u0027plug_%s\u0027 % vif_slug, None)"},{"line_number":734,"context_line":"        if not func:"},{"line_number":735,"context_line":"            raise exception.VirtualInterfacePlugException("},{"line_number":736,"context_line":"                _(\"Plug vif failed because of unexpected \""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_fea62cab","side":"PARENT","line":733,"range":{"start_line":732,"start_character":8,"end_line":733,"end_character":56},"updated":"2019-07-16 17:52:29.000000000","message":"we never call this and the plug_vhostuser function above is dead code","commit_id":"ff0feed25d56c8ccd2298d5b5b82e636880fa986"}]}
