Skip to content

Add System HA Sync endpoint#901

Open
TechAsen wants to merge 1 commit into
pfrest:masterfrom
TechAsen:feature/system-hasync-endpoint
Open

Add System HA Sync endpoint#901
TechAsen wants to merge 1 commit into
pfrest:masterfrom
TechAsen:feature/system-hasync-endpoint

Conversation

@TechAsen
Copy link
Copy Markdown

Summary

Adds a new System / High Availability Sync REST API endpoint.

New endpoint:

  • GET /api/v2/system/hasync
  • PATCH /api/v2/system/hasync

Changes

  • Added RESTAPI\Models\HASync
  • Added RESTAPI\Endpoints\SystemHASyncEndpoint
  • Supports pfsync state sync settings
  • Supports XMLRPC config sync settings
  • Maps HA Sync boolean fields to on in config.xml
  • Maps API field password to pfSense config field passwordfld
  • Keeps password write-only and sensitive

Manual testing

Tested on a pfSense lab VM.

Validated:

  • pfsense-restapi buildendpoints
  • pfsense-restapi buildschemas
  • pfsense-restapi buildprivs
  • GET /api/v2/system/hasync
  • PATCH /api/v2/system/hasync
  • pfSense GUI reflects the updated HA Sync settings
  • Enabled checkbox values are written as on
  • XMLRPC sync password is written as passwordfld
  • Password is not returned by GET

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.

1 participant