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

configverify: T6642: verify_interface_exists requires config_dict arg (backport #3961) #3973

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 13, 2024

Change Summary

The function verify_interface_exists requires access to the ambient config_dict, rather than its own instantiation using ConfigTreeQuery, in order to get the correct working config representation under configd and at boot. Including the root path 'interfaces' for the syntactical verification test as a config_dict key similar to the case of with_pki would interfere with script-specific path searches (e.g. interfaces_bonding.py); consequently, the dict of path 'interfaces' is included as an attribute of the class ConfigDict.

This construction appears redundant in the case of, say, interfaces_ethernet.py, but is of the right generality to cover all cases.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

#3960

Component(s) name

Proposed changes

How to test

Smoketest result

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

This is an automatic backport of pull request #3961 done by [Mergify](https://mergify.com).

The function verify_interface_exists requires a reference to the ambient
config_dict rather than creating an instance. As access is required to
the 'interfaces' path, provide as attribute of class ConfigDict, so as
not to confuse path searches of script-specific config_dict instances.

(cherry picked from commit 5f23b72)
@mergify mergify bot requested a review from a team as a code owner August 13, 2024 00:43
@github-actions github-actions bot added the sagitta VyOS 1.4 LTS label Aug 13, 2024
Copy link

👍
No issues in PR Title / Commit Title

Copy link

👍
No issues in unused-imports

@c-po c-po enabled auto-merge August 17, 2024 07:00
@c-po c-po merged commit 827fcb2 into sagitta Aug 19, 2024
8 checks passed
@mergify mergify bot deleted the mergify/bp/sagitta/pr-3961 branch August 19, 2024 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sagitta VyOS 1.4 LTS
Development

Successfully merging this pull request may close these issues.

3 participants