def delete_flow(env_id, flow_id, user_id): """ Deletes one flow by id using the async task """ eqpts = get_controller_by_envid(env_id) plugins = [] for eqpt in eqpts: plugins.append(PluginFactory.factory(eqpt, env_id=env_id)) try: return async_delete_flow.apply_async(args=[plugins, user_id, flow_id], queue='napi.odl_flow') except Exception as err: log.error(err) raise NetworkAPIException('Failed to delete flow with error: %s' % err)
def delete_flow(env_id, flow_id, user_id): """ Deletes one flow by id using the async task """ eqpts = get_controller_by_envid(env_id) plugins = [] for eqpt in eqpts: plugins.append(PluginFactory.factory(eqpt, env_id=env_id)) try: return async_delete_flow.apply_async( args=[plugins, user_id, flow_id], queue='napi.odl_flow' ) except Exception as err: log.error(err) raise NetworkAPIException('Failed to delete flow with error: %s' % err)