parse_interface_accounting(output)

Parses the CLI output of ‘show interfaces port accounting’ into a dictionary.

Parameters:
  • output (str) –

    CLI output as a string.

Returns:
  • Dict[str, int]

    Dictionary mapping each metric to its integer value.

parse_interface_counters(output)

Parses ‘show interfaces port counters’ CLI output into a dictionary.

Parameters:
  • output (str) –

    CLI raw string from the command.

Returns:
  • Dict[str, int]

    Dictionary of counters with their values.

parse_interface_counters_errors(output)

Parses ‘show interfaces port counters errors’ CLI output into a dictionary.

Parameters:
  • output (str) –

    CLI output string.

Returns:
  • Dict[str, float]

    Dictionary with error counter names and numeric values (float or int).

parse_interface_detail(cli_output)

Parses ‘show interface detail’ CLI output including Rx and Tx subsections.

:param cli_output: Raw CLI output as a string :return: Dictionary with top-level and Rx/Tx values

parse_interface_status(cli_output)

Parses ‘show interfaces’ status CLI output.

:param cli_output: Raw CLI output as a string :return: List of dictionaries per interface row

parse_ip_interface_output(cli_output)

Parses the ‘show ip interface’ CLI output into a list of dictionaries.

:param cli_output: Raw CLI output as a string :return: List of dictionaries with parsed interface data

parse_output_json(output)

Parses CLI table output with headers and fixed-format rows.

:param output: Raw CLI output as a string :return: List of dictionaries mapping headers to values

parse_system_output_json(cli_output)

Parses CLI output with section headers and key-value pairs into a nested dictionary.

:param cli_output: Raw CLI output as a string :return: Dictionary representing parsed output

parse_vlan_output_json(output)

Parses VLAN CLI output in table format.

:param output: Raw CLI output as a string :return: List of dictionaries per VLAN entry