Closed gretelliz closed 2 years ago
@gretelliz great to have this enhancement here too, and fewer shared memory structures when it makes sense.
The connection errors that you're seeing on tests seem to be related to requests
not being completely mocked.
Hi @viniarck, the problem with the unittest is solved.
This PR relates to #51 too. I tested with the topology that you used. Please double-check it. The change is in tracepath
if (switch is None) or \
(switch.dpid not in list(stored_flows.keys())):
result = None
else:
result = self.trace_step(switch, entries, stored_flows)
2022-11-02 15:42:00,883 - INFO [kytos.core.controller] (MainThread) Shutting down NApp kytos/mef_eline...
2022-11-02 15:42:00,883 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/schedule/ - POST,OPTIONS
2022-11-02 15:42:00,883 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/schedule - HEAD,OPTIONS,GET
2022-11-02 15:42:00,883 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/ - POST,OPTIONS
2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/ - HEAD,OPTIONS,GET
2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/schedule/<schedule_id> - OPTIONS,DELETE
2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/schedule/<schedule_id> - PATCH,OPTIONS
2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/<circuit_id>/metadata/<key> - OPTIONS,DELETE
2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/<circuit_id>/metadata - POST,OPTIONS
2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/<circuit_id>/metadata - HEAD,OPTIONS,GET
2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/<circuit_id>/redeploy - PATCH,OPTIONS
2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/<circuit_id> - OPTIONS,DELETE
2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/<circuit_id> - HEAD,OPTIONS,GET
2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/<circuit_id> - PATCH,OPTIONS
2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) The Rest endpoints from /api/kytos/mef_eline/ were disabled.
Hi @viniarck, the problem with the unittest is solved.
This PR relates to #51 too. I tested with the topology that you used. Please double-check it. The change is in tracepath
if (switch is None) or \ (switch.dpid not in list(stored_flows.keys())): result = None else: result = self.trace_step(switch, entries, stored_flows)
2022-11-02 15:42:00,883 - INFO [kytos.core.controller] (MainThread) Shutting down NApp kytos/mef_eline... 2022-11-02 15:42:00,883 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/schedule/ - POST,OPTIONS 2022-11-02 15:42:00,883 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/schedule - HEAD,OPTIONS,GET 2022-11-02 15:42:00,883 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/ - POST,OPTIONS 2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/ - HEAD,OPTIONS,GET 2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/schedule/<schedule_id> - OPTIONS,DELETE 2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/schedule/<schedule_id> - PATCH,OPTIONS 2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/<circuit_id>/metadata/<key> - OPTIONS,DELETE 2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/<circuit_id>/metadata - POST,OPTIONS 2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/<circuit_id>/metadata - HEAD,OPTIONS,GET 2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/<circuit_id>/redeploy - PATCH,OPTIONS 2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/<circuit_id> - OPTIONS,DELETE 2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/<circuit_id> - HEAD,OPTIONS,GET 2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) Stopped /api/kytos/mef_eline/v2/evc/<circuit_id> - PATCH,OPTIONS 2022-11-02 15:42:00,884 - INFO [kytos.core.api_server] (MainThread) The Rest endpoints from /api/kytos/mef_eline/ were disabled.
Cool. Thanks for fixing this @gretelliz . I left a minor thread open, other than that looks good to me, I'll leave the PR pre-approved, feel free to merge it once the thread is addressed since unit tests and your local tests are passing.
Fix issue #48
The self._circuits structure is removed from sdntrace_cp Automate. Flows are now fetched from /flow_manager/v2/stored_flows whenever needed.
It is no longer subscribed to the amlight/flow_stats.flows_updated event. So, I'm wondering in which case(s) the Main.update_circuits function is called now.
Anyway, the tests pass and things seem well in local tests.
This PR needs to be approved to update flow_stats.