HomeFreeBSD

JSON output support for zfs version and zfs get

Description

JSON output support for zfs version and zfs get

This commit adds support for JSON output for zfs version and zfs get
commands. '-j' flag can be used to get output in JSON format.

Information is collected in nvlist objects which is later printed in
JSON format. Existing options that work for zfs get and zfs version
also work with '-j' flag.

man pages for zfs get and zfs version are updated accordingly.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Ameer Hamza <ahamza@ixsystems.com>
Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
Closes #16217

Details

Provenance
Umer Saleem <usaleem@ixsystems.com>Authored on Apr 5 2024, 4:02 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Aug 6 2024, 7:45 PM
Parents
rG6c7d41a64373: ZTS: remove skips for zvol_misc tests
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGaa15b60e5859: JSON output support for zfs version and zfs get (authored by Umer Saleem <usaleem@ixsystems.com>).Aug 6 2024, 7:45 PM