def delete_sf(sfname): logger.info("Received request for SF deletion: %s", sfname) status_code = 204 local_sf_topo = sfc_globals.get_sf_topo() local_sf_threads = sfc_globals.get_sf_threads() logger.info("Received request from ODL to delete SF ...") try: if sfname in local_sf_threads.keys(): stop_sf(sfname) local_sf_topo.pop(sfname) except KeyError: logger.warning("SF name %s not found", sfname) status_code = 404 return '', status_code
def delete_sf(sfname): logger.info("Received request for SF deletion: %s", sfname) status_code = 204 local_sf_topo = sfc_globals.get_sf_topo() local_sf_threads = sfc_globals.get_sf_threads() logger.info("Received request from ODL to delete SF ...") try: if sfname in local_sf_threads.keys(): stop_sf(sfname) local_sf_topo.pop(sfname) except KeyError: logger.warning("SF name %s not found", sfname) status_code = 404 return '', status_code