Skip to content

Conversation

@Pirols
Copy link
Contributor

@Pirols Pirols commented Nov 18, 2025

Both zfs get and zpool get have a -p option to request parsable (exact) output.

dpool   size    266287972352    -
dpool   size    248G    -
  • Pull request is based on the default branch (3.x at this time)
  • Pull request includes tests for any new/updated operations/facts
  • Pull request includes documentation for any new/updated operations/facts
  • Tests pass (see scripts/dev-test.sh)
  • Type checking & code style passes (see scripts/dev-lint.sh)

Both `zfs get` and `zpool get` have a `-p` option to request parsable (exact)
output.

```
dpool   size    266287972352    -
dpool   size    248G    -
```
Copy link
Member

@Fizzadar Fizzadar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small issue because the tests aren't updated to the new output format. Once fixed this means it's (annoyingly) a breaking change to the fact. One option is we could parse the exact (byte, I assume?) value and call it size_bytes and then we can generate size as a human friendly string from the bytes to maintain backwards compatibility. How does that sound?

requires_command: zfs
output: |
tank type filesystem -
tank size 2.71T -
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test isn't updated to match the change (same w/ others).

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