epicsarchiver.mgmt.archiver_mgmt_info ===================================== .. py:module:: epicsarchiver.mgmt.archiver_mgmt_info .. autoapi-nested-parse:: Archiver Mgmt information module. Attributes ---------- .. autoapisummary:: epicsarchiver.mgmt.archiver_mgmt_info.LOG epicsarchiver.mgmt.archiver_mgmt_info.InfoResult epicsarchiver.mgmt.archiver_mgmt_info.InfoResultList Classes ------- .. autoapisummary:: epicsarchiver.mgmt.archiver_mgmt_info.ArchivingStatus epicsarchiver.mgmt.archiver_mgmt_info.ArchiverMgmtInfo Module Contents --------------- .. py:data:: LOG :type: logging.Logger .. py:data:: InfoResult .. py:data:: InfoResultList .. py:class:: ArchivingStatus Bases: :py:obj:`str`, :py:obj:`enum.Enum` Enum of archiving status in the archiver. .. py:attribute:: Paused :value: 'Paused' .. py:attribute:: BeingArchived :value: 'Being archived' .. py:attribute:: NotBeingArchived :value: 'Not being archived' .. py:method:: from_str(desc: str) -> ArchivingStatus | None :classmethod: Convert from a string to ArchivingStatus. :param desc: input string :type desc: str :returns: An enum representation. :rtype: ArchivingStatus | None .. py:class:: ArchiverMgmtInfo(hostname: str = 'localhost', port: int = 17665) Bases: :py:obj:`epicsarchiver.common.base_archiver.BaseArchiverAppliance` Mgmt Info EPICS Archiver Appliance client. Hold a session to the Archiver Appliance web application and use the mgmt interface. :param hostname: EPICS Archiver Appliance hostname [default: localhost] :param port: EPICS Archiver Appliance management port [default: 17665] Examples: .. code-block:: python from epicsarchiver.archiver.mgmt import ArchiverMgmt archappl = ArchiverMgmt("archiver-01.tn.esss.lu.se") print(archappl.version) archappl.get_pv_status(pv="BPM*") .. py:method:: get_all_expanded_pvs() -> list[str] Return all expanded PV names in the cluster. This is targeted at automation and should return the PVs being archived, the fields, .VAL's, aliases and PV's in the archive workflow. Note this call can return 10's of millions of names. :returns: list of expanded PV names .. py:method:: get_all_pvs(pv_query: str | None = None, regex: str | None = None, limit: int = 500) -> list[str] Return all the PVs in the cluster. :param pv_query: An optional argument that can contain a GLOB wildcard. Will return PVs that match this GLOB. For example: pv=KLYS* :type pv_query: str :param regex: An optional argument that can contain a Java regex wildcard. Will return PVs that match this regex. :type regex: str :param limit: number of matched PV's that are returned. To get all the PV names, (potentially in the millions), set limit to -1. Default to 500. :type limit: int :returns: list of PV names :rtype: list[str] .. py:method:: get_pv_status(pv: str | list[str]) -> InfoResultList Return the status of a PV. :param pv: name(s) of the pv for which the status is to be determined. Can be a GLOB wildcards or multiple PVs as a comma separated list. :returns: list of dict with the status of the matching PVs .. py:method:: get_archiving_status(pv: str) -> ArchivingStatus | None Return the status of a PV. :param pv: name of the pv. :returns: string representing the status .. py:method:: get_pv_details(pv: str | list[str]) -> InfoResultList Return the details of a PV. :param pv: name(s) of the pv for which the details are to be determined. Can be a GLOB wildcards or multiple PVs as a comma separated list. :returns: list of dict with the details of the matching PVs .. py:method:: get_pv_status_from_files(files: list[str], appliance: str | None = None) -> InfoResultList Return the status of PVs from a list of files. :param files: list of files in CSV format with PVs to archive. :param appliance: optional appliance to use to archive PVs (in a cluster) :returns: list of dict with the status of the matching PVs .. py:method:: get_unarchived_pvs(pvs: str | list[str]) -> list[str] Return the list of unarchived PVs out of PVs specified in pvs. :param pvs: a list of PVs either in CSV format or as a python string list :returns: list of unarchived PV names .. py:method:: get_archived_pvs(pvs: str | list[str]) -> list[str] Return the list of unarchived PVs out of PVs specified in pvs. :param pvs: a list of PVs either in CSV format or as a python string list :returns: list of unarchived PV names .. py:method:: get_unarchived_pvs_from_files(files: list[str], appliance: str | None = None) -> list[str] Return the list of unarchived PVs from a list of files. :param files: list of files in CSV format with PVs to archive. :param appliance: optional appliance to use to archive PVs (in a cluster) :returns: list of unarchived PV names .. py:method:: get_pv_type_info(pv: str) -> epicsarchiver.mgmt.archiver_mgmt_operations.TypeInfo Return the type info of a PV. :param pv: name of the pv. :returns: dict with the type info of the matching PVs.