epicsarchiver.mgmt.archiver_mgmt_info
Archiver Mgmt information module.
Attributes
Classes
Enum of archiving status in the archiver. |
|
Mgmt Info EPICS Archiver Appliance client. |
Module Contents
- epicsarchiver.mgmt.archiver_mgmt_info.LOG: logging.Logger[source]
- class epicsarchiver.mgmt.archiver_mgmt_info.ArchivingStatus[source]
-
Enum of archiving status in the archiver.
- classmethod from_str(desc: str) ArchivingStatus | None[source]
Convert from a string to ArchivingStatus.
- Parameters:
desc (str) – input string
- Returns:
An enum representation.
- Return type:
ArchivingStatus | None
- class epicsarchiver.mgmt.archiver_mgmt_info.ArchiverMgmtInfo(hostname: str = 'localhost', port: int = 17665)[source]
Bases:
epicsarchiver.common.base_archiver.BaseArchiverApplianceMgmt Info EPICS Archiver Appliance client.
Hold a session to the Archiver Appliance web application and use the mgmt interface.
- Parameters:
hostname – EPICS Archiver Appliance hostname [default: localhost]
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*”)
- get_all_expanded_pvs() list[str][source]
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
- get_all_pvs(pv_query: str | None = None, regex: str | None = None, limit: int = 500) list[str][source]
Return all the PVs in the cluster.
- Parameters:
pv_query (str) – An optional argument that can contain a GLOB wildcard. Will return PVs that match this GLOB. For example: pv=KLYS*
regex (str) – An optional argument that can contain a Java regex wildcard. Will return PVs that match this regex.
limit (int) – 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.
- Returns:
list of PV names
- Return type:
- get_pv_status(pv: str | list[str]) InfoResultList[source]
Return the status of a PV.
- Parameters:
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
- get_archiving_status(pv: str) ArchivingStatus | None[source]
Return the status of a PV.
- Parameters:
pv – name of the pv.
- Returns:
string representing the status
- get_pv_details(pv: str | list[str]) InfoResultList[source]
Return the details of a PV.
- Parameters:
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
- get_pv_status_from_files(files: list[str], appliance: str | None = None) InfoResultList[source]
Return the status of PVs from a list of files.
- Parameters:
files – list of files in CSV format with PVs to archive.
appliance – optional appliance to use to archive PVs (in a cluster)
- Returns:
list of dict with the status of the matching PVs
- get_unarchived_pvs(pvs: str | list[str]) list[str][source]
Return the list of unarchived PVs out of PVs specified in pvs.
- Parameters:
pvs – a list of PVs either in CSV format or as a python string list
- Returns:
list of unarchived PV names
- get_archived_pvs(pvs: str | list[str]) list[str][source]
Return the list of unarchived PVs out of PVs specified in pvs.
- Parameters:
pvs – a list of PVs either in CSV format or as a python string list
- Returns:
list of unarchived PV names
- get_unarchived_pvs_from_files(files: list[str], appliance: str | None = None) list[str][source]
Return the list of unarchived PVs from a list of files.
- Parameters:
files – list of files in CSV format with PVs to archive.
appliance – optional appliance to use to archive PVs (in a cluster)
- Returns:
list of unarchived PV names