diff_device_revision
Compare a past FortiManager device DB revision against the current device configuration and return a unified diff showing changed lines; read-only.
Instructions
Diff a past device DB revision against the CURRENT device DB.
FortiManager has no native diff endpoint for device DB revisions (unlike ADOM DB revisions -- see diff_adom_revision). This instead fetches both the past revision's config text (checkout) and the current device DB export, then computes a client-side unified line diff. Read-only.
Note: The checkout half of this requires the device to have at least one device DB revision on record -- see the note on list_device_revisions.
Args: device: Managed device name revision: Revision number to compare against current (see list_device_revisions)
Returns: dict: status, device, revision, changed (bool), diff (unified diff text, empty string if unchanged; both sides are redacted of known secret-bearing directives before diffing -- see redact_config_text_secrets -- so a line whose only change is its secret value will not show as changed)
Example: >>> result = await diff_device_revision("hub2", revision=7) >>> if result["changed"]: ... print(result["diff"])
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | Yes | ||
| revision | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||