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

Fix test issues after adding veth-delete test #661

Merged
merged 4 commits into from
Sep 27, 2024
Merged

Fix test issues after adding veth-delete test #661

merged 4 commits into from
Sep 27, 2024

Conversation

troglobit
Copy link
Contributor

@troglobit troglobit commented Sep 27, 2024

Description

  • Fixes a regression introduced on main while fixing issue confd: fails removing veth pair after a multple reconfigurations #658
  • Check for control-plane-protocol in startup-config before migrating and causing empty startup-config
  • Return None on 404 return for fetching a given operational XPath in RESTCONF test backend
  • Fix tcpdump permissions for admin user in CLI

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

Copy link
Contributor

@wkz wkz left a comment

Choose a reason for hiding this comment

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

Possible improvement. Probably unlikely to trigger another exception, then again, it will be that much hard to find in that case 🤷‍♂️

test/infamy/restconf.py Outdated Show resolved Hide resolved
Fixes to following exception calling iface.interface_exist(target, veth0): requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://[fe80::2a0:85ff:fe00:201%d2a]:443/restconf/ds/ietf-datastores%3Aoperational/ietf-interfaces%3Ainterfaces/interface=veth0a/name

Removing interface veth0a, and then checking operational if it has been
properly removed, should not cause an exception.  Better to return None
object instead.

Signed-off-by: Joachim Wiberg <[email protected]>
Refactor 0f9d429 to first check if the .cfg file has any routing
protocol active before converting the type's value.

This fixes a regression in the release cycle that otherwise would
cause a fresh startup-config, created from a plain factory-config
from v24.08, to be converted to an empty file.

Inspired by this fix, the same mitigation, albeit highyl unlikely,
has been applied to the v1.0 user shell type migration.

Signed-off-by: Joachim Wiberg <[email protected]>
Introduced in 35eeae5.

Signed-off-by: Joachim Wiberg <[email protected]>
@mattiaswal mattiaswal self-requested a review September 27, 2024 15:04
Copy link
Contributor

@mattiaswal mattiaswal left a comment

Choose a reason for hiding this comment

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

Go go go! 💥

@troglobit troglobit self-assigned this Sep 27, 2024
@troglobit troglobit merged commit 40e4b16 into main Sep 27, 2024
6 checks passed
@troglobit troglobit deleted the veth-delete branch September 27, 2024 15:40
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.

3 participants