File: media.py

package info (click to toggle)
zabbix-cli 3.5.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,860 kB
  • sloc: python: 18,557; makefile: 3
file content (20 lines) | stat: -rw-r--r-- 504 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""Commands for managing media."""

from __future__ import annotations

import typer

from zabbix_cli.app import app
from zabbix_cli.output.render import render_result

HELP_PANEL = "Media"


@app.command("show_media_types", rich_help_panel=HELP_PANEL)
def show_media_types(ctx: typer.Context) -> None:
    """Show all available media types."""
    from zabbix_cli.models import AggregateResult

    media_types = app.state.client.get_mediatypes()

    render_result(AggregateResult(result=media_types))