Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kytos reload napps makes mef_eline list of circuits inconsistent #247

Open
italovalcy opened this issue May 6, 2021 · 0 comments
Open

Comments

@italovalcy
Copy link

Dear folks,

When we use kytos reload napps kytos/mef_eline the list of circuits in mef_eline seems to become inconsistent: you can get a circuit, you can get more information about that circuit, but you cannot remove it (returns 404 / Not Found)

Steps to reproduce:

  1. Create a basic scenario with kytos and mininet (kytos and napps from master branch):
mn --topo single,2 --controller=remote,ip=127.0.0.1
  1. Create an EVC:
ID=788; curl -X POST -H 'Content-type: application/json' http://127.0.0.1:8181/api/kytos/mef_eline/v2/evc/ -d "{\"name\": \"evc $ID\", \"enabled\": true, \"dynamic_backup_path\": true, \"uni_a\":{\"interface_id\":\"00:00:00:00:00:00:00:01:15\",\"tag\":{\"tag_type\":1,\"value\":$ID}},\"uni_z\":{\"interface_id\":\"00:00:00:00:00:00:00:01:16\",\"tag\":{\"tag_type\":1,\"value\":$ID}}}"
  1. Reload Kytos mef_eline napp:
kytos napps reload kytos/mef_eline
  1. Get information about the recently created EVC:
curl -s http://127.0.0.1:8181/api/kytos/mef_eline/v2/evc/e089ef8d7d4746
  1. Try to delete the EVC:
curl -X DELETE http://127.0.0.1:8181/api/kytos/mef_eline/v2/evc/e089ef8d7d4746

Expected result: the EVC should be deleted

Actual result: {"code":404,"description":"circuit_id e089ef8d7d4746 not found","name":"Not Found"}

This seems to be happening because the way the GET method get the list of circuits is different from the way the DELETE method does:

https://github.com/kytos/mef_eline/blob/master/main.py#L87

https://github.com/kytos/mef_eline/blob/master/main.py#L235

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant