def _set_vhostuser_settings(vif, obj):
 obj.mode = vif['details'].get(model.VIF_DETAILS_VHOSTUSER_MODE, 'server')
 path = vif['details'].get(model.VIF_DETAILS_VHOSTUSER_SOCKET, None)
 if path:
  obj.path = path
 else:
  raise exception.VifDetailsMissingVhostuserSockPath(vif_id=vif['id'])

def _set_vhostuser_settings ( vif , obj ) : obj . mode = vif [ 'details' ] . get ( model . VIF_DETAILS_VHOSTUSER_MODE , 'server' ) path = vif [ 'details' ] . get ( model . VIF_DETAILS_VHOSTUSER_SOCKET , None ) if path : obj . path = path else : raise exception . VifDetailsMissingVhostuserSockPath ( vif_id = vif [ 'id' ] )
set vhostuser socket mode and path .