HomeFreeBSD

JSON output support for zpool list

Description

JSON output support for zpool list

This commit adds support for zpool list command to output the list of
ZFS pools in JSON format using '-j' option.. Information about available
pools is collected in nvlist which is later printed to stdout in JSON
format.

Existing options for zfs list command work with '-j' flag. man page for
zpool list is 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 25 2024, 12:59 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Aug 6 2024, 7:47 PM
Parents
rGeb2b824bdec9: JSON output support for zpool get
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG4e6b3f7e1d42: JSON output support for zpool list (authored by Umer Saleem <usaleem@ixsystems.com>).Aug 6 2024, 7:47 PM