Improve libzfs api for zfs diff and add JSON support#18299
Open
anodos325 wants to merge 1 commit intoopenzfs:masterfrom
Open
Improve libzfs api for zfs diff and add JSON support#18299anodos325 wants to merge 1 commit intoopenzfs:masterfrom
anodos325 wants to merge 1 commit intoopenzfs:masterfrom
Conversation
This commit adds json output support for zfs-diff and expands the libzfs API to include an easier-to-use function for generating a diff programmatically. JSON zfs-diff streams output with one JSON object per line. Signed-off-by: Andrew Walker <andrew.walker@truenas.com>
Contributor
Author
^^^ sample output. I included what additional information I could glean with existing diff ioctl into the JSON output. This means catching:
This was mainly an exercise in getting zfs diff output available in a useful way for truenas_pylibzfs, but I thought having JSON output implemented would provide better test coverage of the libzfs_iter_diffs (new function) and give some new useful knobs for regular consumers of zfs-diff. |
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.
This commit adds json output support for zfs-diff and expands the libzfs API to include an easier-to-use function for generating a diff programmatically. JSON zfs-diff streams output with one JSON object per line.
Motivation and Context
Description
How Has This Been Tested?
Types of changes
Checklist:
Signed-off-by.