nat.cli.commands.configure.telemetry#
nat configure telemetry — manage the user’s telemetry consent decision.
Three modes:
--enable: persist consent as enabled.--disable: persist consent as disabled.--status(default if no flag): print the current effective state and the source that determined it (env var, persisted file, or default).
Functions#
|
Manage NAT telemetry consent. |
|
Persist |
|
If |
Module Contents#
- _persist_and_verify( ) None#
Persist
stateand read it back to confirm it actually landed.write_persisted_consentswallows write failures by design (the interactive consent flow can tolerate a re-prompt next run). The explicitnat configure telemetry --enable | --disablepath cannot tolerate that: a failed write would leave the user confidently believing they opted out while the next invocation still emits. Verify the readback and surface a hard error if the state did not land.A readback mismatch usually means filesystem permission issues, a full disk, or an env var overriding the persisted decision (we don’t fail on env override — that’s reported separately by
_warn_on_env_var_override; we only fail on outright persistence failure).