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 #19

Closed
ajoaoff opened this issue Jun 8, 2021 · 0 comments · Fixed by #24
Closed

kytos reload napps makes mef_eline list of circuits inconsistent #19

ajoaoff opened this issue Jun 8, 2021 · 0 comments · Fixed by #24
Assignees
Labels
2022.1 Kytos-ng 2022.1 bug Something isn't working

Comments

@ajoaoff
Copy link

ajoaoff commented Jun 8, 2021

Original issue opened by @italovalcy at kytos#247.

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

@ajoaoff ajoaoff added bug Something isn't working pri:important labels Jun 24, 2021
@ajoaoff ajoaoff self-assigned this Jun 24, 2021
italovalcy pushed a commit that referenced this issue Jul 15, 2021
@viniarck viniarck added the 2022.1 Kytos-ng 2022.1 label Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2022.1 Kytos-ng 2022.1 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants