Add VyOS API support for /configure and /config-file save#11
Open
mikehansen1970 wants to merge 1 commit intora-olg-ucentral-sdkfrom
Open
Add VyOS API support for /configure and /config-file save#11mikehansen1970 wants to merge 1 commit intora-olg-ucentral-sdkfrom
mikehansen1970 wants to merge 1 commit intora-olg-ucentral-sdkfrom
Conversation
Add support for: - /configure endpoint: set and delete operations - /config-file endpoint: save operation These operations are required for NAT persistence workaround where we explicitly delete old NAT rules and re-apply correct rules with br0 interface, then save to config.boot. Note: /configure endpoint only supports set/delete (not commit/save). Commit happens automatically, and save must use /config-file endpoint. Signed-off-by: Mike Hansen <mike.hansen@netexperience.com>
Contributor
|
These changes are not as per the initial design(retrieve + load) and apply a unified configuration each time from ucentral-client to Vyos . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add support for additional VyOS API operations required for NAT persistence workaround:
/configureendpoint:setanddeleteoperations/config-fileendpoint:saveoperationChanges in
https_server_api.uc1. Added
saveoperation to/config-fileendpoint (lines 32-44)/config/config.bootop: "save")2. Added
/configureendpoint support (lines 66-79)setanddeleteoperationspatharray parametersetoperation optionally acceptsvalueparameterTechnical Notes
/configureendpoint only supportsset/deleteoperations (notcommit/save)/config-fileendpoint withop: "save"Use Case
These operations are required for the NAT persistence workaround where we:
/configure delete nat source/configure set nat source rule X .../config-file saveThis ensures NAT rules use the correct bridge interface (
br0) and persist across VyOS reboots.Related PRs
This change is required by the companion PR in the
olg-ucentral-schemarepository that implements the NAT persistence fix.Testing
Tested on MinisForum MS-01 with VyOS VM:
/configure setsuccessfully creates NAT rules/configure deletesuccessfully removes NAT rules/config-file savesuccessfully persists to config.boot