Skip to content

[feat] Custom diff logic for RouterOS user commands#469

Open
vadvolo wants to merge 3 commits intoannetutil:mainfrom
vadvolo:mikrotik_user_diff
Open

[feat] Custom diff logic for RouterOS user commands#469
vadvolo wants to merge 3 commits intoannetutil:mainfrom
vadvolo:mikrotik_user_diff

Conversation

@vadvolo
Copy link

@vadvolo vadvolo commented Dec 2, 2025

Proposal

Custom diff logic for RouterOS user commands

Problem

RouterOS doesn't export passwords in config, causing permanent diffs when generators include password= parameter.

Solution
Add custom diff_logic that compares users by password hash in comment field instead of full command line.

Benefits

  • Idempotent user generation,
  • shows diffs only when passwords actually change

@denballakh
Copy link
Contributor

Would be nice to have a couple of tests for this logic.

-> https://github.com/annetutil/annet/tree/main/tests/annet/test_patch

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.

2 participants