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

Added endpoint to delete link #179

Merged
merged 7 commits into from
Dec 11, 2023
Merged

Added endpoint to delete link #179

merged 7 commits into from
Dec 11, 2023

Conversation

Alopalao
Copy link

@Alopalao Alopalao commented Dec 4, 2023

Closes #154

Summary

Added an endpoint to delete a link

Local Tests

Added unit tests
Deleted a link that was previously removed with link s1 s3 down on mininet console.

@Alopalao Alopalao requested a review from a team as a code owner December 4, 2023 21:33
main.py Show resolved Hide resolved
Copy link
Member

@viniarck viniarck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done @Alopalao, overall looks great, but I raised a potential race condition and a corner case that we need to handle and make a decision regarding if we'll only allow disabled links to get deleted or not.

Other than that, please explore these cases too:

  • Try to delete a link that's under and active maintenance and see what happens
  • Disable and delete a link with this new endpoint, but before you do it, make sure to also disable lldp on the underlying interfaces, the end result is that this link shouldn't get rediscovered again unless lldp gets enabled.
  • Repeat the same but without disabling lldp, the link should get rediscovered again

Let's also add at least one new e2e test for this, it can be a simple one, but let's do it, ensuring it's no longer in the response of topology endpoints.

main.py Outdated Show resolved Hide resolved
main.py Outdated Show resolved Hide resolved
main.py Show resolved Hide resolved
openapi.yml Outdated Show resolved Hide resolved
@viniarck viniarck requested a review from a team December 5, 2023 15:19
@Alopalao
Copy link
Author

Alopalao commented Dec 6, 2023

Other than that, please explore these cases too:

I explored those cases. In all of them the results were as described.

@viniarck viniarck self-requested a review December 7, 2023 13:23
Copy link
Member

@viniarck viniarck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, just a minor details left to be addressed @Alopalao

Also, let me know if you had positive outcomes with the local/exploratory tests suggested on #179 (review)

main.py Show resolved Hide resolved
CHANGELOG.rst Outdated Show resolved Hide resolved
main.py Outdated Show resolved Hide resolved
main.py Outdated Show resolved Hide resolved
@Alopalao
Copy link
Author

Alopalao commented Dec 7, 2023

Also, let me know if you had positive outcomes with the local/exploratory tests suggested on #179 (review)

Yes, I tested these tests. They all had positive outcomes.

@Alopalao
Copy link
Author

Alopalao commented Dec 7, 2023

Created PR #273 for End-To-End tests

@viniarck viniarck self-requested a review December 7, 2023 19:53
Copy link
Member

@viniarck viniarck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent PR, Aldo. Just a new trivial detail remaining now in the event body content. Excellent to see the e2e test case, it's very ccomplete and easy to follow.

README.rst Outdated Show resolved Hide resolved
@viniarck viniarck self-requested a review December 8, 2023 12:23
main.py Outdated Show resolved Hide resolved
@viniarck viniarck self-requested a review December 11, 2023 17:13
Copy link
Member

@viniarck viniarck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Alopalao LGTM. Let's merge this.

Can you also map a new UI task for this endpoint? It'd be great to have a button to also allow deleting from the UI. Let me know if you can still deliver this minor one too, otherwise it'll be for the next version.

@Alopalao
Copy link
Author

Alopalao commented Dec 11, 2023

I created the issue and I think I am going to be able to finish it for this version.

@viniarck
Copy link
Member

I created the issue and I think I am going to be able to finish it for this version.

Cool. Appreciated.

@viniarck viniarck merged commit 0aafabd into master Dec 11, 2023
1 check passed
@viniarck viniarck deleted the feature/delete_link branch December 11, 2023 18:20
@Alopalao Alopalao restored the feature/delete_link branch December 13, 2023 16:21
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

Successfully merging this pull request may close these issues.

Topology should allow for delete a link
2 participants