Skip to content

http-api: T3955: add commit-confirm to endpoints /configure /config-file #4533

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

Open
wants to merge 1 commit into
base: current
Choose a base branch
from

Conversation

jestabro
Copy link
Contributor

@jestabro jestabro commented May 30, 2025

Change summary

Requests to the endpoints /configure and /config-file may include a field confirm_time of type int, which if > 0 will invoke commit-confirm with timeout := confirm_time on success of the request operation (set|delete|load|merge).

Confirming the operation is performed with a request containing 'op': 'confirm' to the respective endpoint.

An example for a list of set operations to endpoint /configure; other cases are analogous:

└──> curl -k -X POST -d '{"key": "baz", "commands": [{"op": "set", "path": ["interfaces", "ethernet", "eth1", "address", "192.168.2.137/24"]},{"op": "set", "path": ["interfaces", "ethernet", "eth1", "description", "test"]}], "confirm_time": 1}' https://192.168.122.230/configure
{"success": true, "data": "Initialized commit-confirm; 1 minutes to confirm before reload\n", "error": null}% 

└──> curl -k -X POST -d '{"key": "baz", "op": "confirm"}' https://192.168.122.230/configure
{"success": true, "data": "Reload timer stopped\n", "error": null}% 

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)

How to test / Smoketest result

Checklist:

@jestabro jestabro self-assigned this May 30, 2025
Copy link

github-actions bot commented May 30, 2025

👍
No issues in PR Title / Commit Title

@jestabro jestabro force-pushed the api-commit-confirm branch from 9953a1e to b73fc84 Compare May 30, 2025 03:10
Copy link

CI integration 👍 passed!

Details

CI logs

  • CLI Smoketests (no interfaces) 👍 passed
  • CLI Smoketests (interfaces only) 👍 passed
  • Config tests 👍 passed
  • RAID1 tests 👍 passed
  • TPM tests 👍 passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

1 participant