virtual_printer.py 774 B

1234567891011121314151617181920212223
  1. """Schemas for virtual printer diagnostics."""
  2. from pydantic import BaseModel
  3. from backend.app.schemas.printer import DiagnosticCheck
  4. class VPDiagnosticResult(BaseModel):
  5. """Result of a virtual-printer setup diagnostic run.
  6. Mirrors ``PrinterDiagnosticResult`` but keyed to a virtual printer: the
  7. checks probe the VP's own bind IP and local services rather than a remote
  8. printer. ``checks[].id`` values are VP-specific (enabled, running,
  9. bind_interface, access_code, target_printer, port_ftps, port_mqtt,
  10. port_bind, certificate); the frontend renders the localized title and
  11. fix text from id + status.
  12. """
  13. vp_id: int
  14. vp_name: str
  15. mode: str
  16. overall: str # "ok" | "warnings" | "problems"
  17. checks: list[DiagnosticCheck]