nadzoring.commands.dns_commands module

DNS-related CLI commands.

nadzoring.commands.dns_commands._aggregate_log(cycles: list[dict[str, Any]], server_filter: str | None) list[dict[str, Any]][source]

Aggregate per-server statistics from raw cycle dictionaries.

Parameters:
  • cycles – List of cycle-result dictionaries from load_log().

  • server_filter – When set, only include data for this server IP.

Returns:

List of aggregated per-server statistic rows.

nadzoring.commands.dns_commands._expand_record_types(record_types: tuple[str, ...]) list[RecordType][source]

Expand a tuple of CLI record type tokens into a concrete list.

Replaces the special ALL token with every queryable record type (i.e. all types except PTR).

Parameters:

record_types – Tuple of record type strings as received from Click.

Returns:

Flat list of concrete DNS record type strings.

nadzoring.commands.dns_commands._make_pbar(total: int, desc: str, unit: str, *, quiet: bool) tqdm | None[source]

Create a tqdm progress bar or return None when in quiet mode.

Parameters:
  • total – Total number of steps.

  • desc – Initial description label.

  • unit – Unit label for the progress bar.

  • quiet – When True, no progress bar is created.

Returns:

A tqdm instance, or None if quiet is True.