epicsarchiver.mgmt.archiver_mgmt_operations
Archiver Mgmt operations module.
Attributes
Classes
Represents the different storage levels of the archiver appliance. |
|
Represents the different types of put type info. |
|
Mgmt Operations EPICS Archiver Appliance client. |
Functions
|
Check a result returned by the Archiver Appliance. |
Module Contents
- epicsarchiver.mgmt.archiver_mgmt_operations.LOG: logging.Logger[source]
- class epicsarchiver.mgmt.archiver_mgmt_operations.Storage[source]
-
Represents the different storage levels of the archiver appliance.
- class epicsarchiver.mgmt.archiver_mgmt_operations.PutInfoType(*args, **kwds)[source]
Bases:
enum.EnumRepresents the different types of put type info.
- class epicsarchiver.mgmt.archiver_mgmt_operations.ArchiverMgmtOperations(hostname: str = 'localhost', port: int = 17665)[source]
Bases:
epicsarchiver.mgmt.archiver_mgmt_info.ArchiverMgmtInfoMgmt Operations 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:
from epicsarchiver.archiver.mgmt import ArchiverMgmtOperations archappl = ArchiverMgmtOperations("archiver-01.tn.esss.lu.se") print(archappl.version) archappl.archive_pv("PVNAME")
- archive_pv(pv: str, **kwargs: Any) OperationResultList[source]
Archive a PV.
- Parameters:
pv – name of the pv to be achived. Can be a comma separated list of names.
**kwargs – optional extra keyword arguments - samplingperiod - samplingmethod - controllingPV - policy - appliance
- Returns:
list of submitted PVs
- archive_pvs(pvs: OperationResultList) OperationResultList[source]
Archive a list of PVs.
- Parameters:
pvs – list of PVs (as dict) to archive
- Returns:
list of submitted PVs
- archive_pvs_from_files(files: list[str], appliance: str | None = None) OperationResultList[source]
Archive 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 submitted PVs
- pause_pv(pv: str) OperationResultList | OperationResult[source]
Pause the archiving of a PV(s).
- Parameters:
pv – name of the pv. Can be a GLOB wildcards or a list of comma separated names.
- Returns:
list of submitted PVs
- resume_pv(pv: str) OperationResultList | OperationResult[source]
Resume the archiving of a PV(s).
- Parameters:
pv – name of the pv. Can be a GLOB wildcards or a list of comma separated names.
- Returns:
list of submitted PVs
- abort_pv(pv: str) list[str][source]
Abort any pending requests for archiving this PV.
- Parameters:
pv – name of the pv.
- Returns:
list of submitted PVs
- add_alias(pv: str, alias_name: str) None[source]
Add an alias to a pv.
- Parameters:
pv – PV to add alias.
alias_name – name of alias to add to pv.
- delete_pv(pv: str, delete_data: bool = False) list[str][source]
Stop archiving the specified PV.
The PV needs to be paused first.
- Parameters:
pv – name of the pv.
delete_data – delete the data that has already been recorded. Default to False.
- Returns:
list of submitted PVs
- rename_pv(pv: str, newname: str) OperationResult[source]
Rename this pv to a new name.
The PV needs to be paused first.
- update_pv(pv: str, samplingperiod: float, samplingmethod: str | None = None) list[str][source]
Change the archival parameters for a PV.
- Parameters:
pv – name of the pv.
samplingperiod – the new sampling period in seconds.
samplingmethod – the new sampling method [SCAN|MONITOR]
- Returns:
list of submitted PV
- pause_rename_resume_pv(pv: str, new: str) None[source]
Pause, rename and resume a PV.
- Parameters:
pv – name of the pv
new – new name of the pv
- rename_pvs_from_files(files: list[str]) None[source]
Rename PVs from a list of files.
Each PV will be paused, renamed and resumed
- Parameters:
files – list of files in CSV format with PVs to rename.
- rename_and_append(old: str, new: str, storage: Storage) None[source]
Appends the data for an older PV into a newer PV.
The older PV is deleted and an alias mapping the older PV name to the new PV is added.
- change_type(pv: str, new_type: epicsarchiver.common.ArchDbrType) None[source]
Change the type of a pv to a new type.
- Parameters:
pv (str) – Name of the PV
new_type (ArchDbrType) – New DBR_TYPE
- put_pv_type_info(pv: str, type_info: TypeInfo, put_info_type: PutInfoType) TypeInfo[source]
Put the type info for a PV.
- Parameters:
pv (str) – Name of the PV
type_info (InfoResult) – Type info
put_info_type (PutInfoType) – Whether override or create new
- Returns:
The updated type info
- Return type:
OperationResult