epicsarchiver.mgmt.archive_files

Handle parsing files of lists of PVs to submit for archiver operations.

Attributes

LOG

Functions

parse_archive_file(...)

Parses an archive file.

_parse_rename_line(→ tuple[str, str] | None)

parse_rename_file(...)

Parses a file with a list of pv as old_pv_name new_pv_name.

get_pvs_from_files(→ list[dict[str, str]])

Return a list of PV (as dict) from a list of files.

get_rename_pvs_from_files(→ list[tuple[str, str]])

Return a list of (current, new) PV names from a list of files.

Module Contents

epicsarchiver.mgmt.archive_files.LOG: logging.Logger[source]
epicsarchiver.mgmt.archive_files.parse_archive_file(filename: pathlib.Path, appliance: str | None = None) collections.abc.Generator[dict[str, str], None, None][source]

Parses an archive file.

Archive file is a list of PVs with an archive policy name as optional arguement.

Parameters:
  • filename (str) – filename of archive file

  • appliance (str | None, optional) – archiver to archive pv in. Defaults to None.

Yields:

Generator[dict[str, str], None, None] – produces dictionary with keys {“pv”, “policy”, “appliance”}

epicsarchiver.mgmt.archive_files._parse_rename_line(line: str) tuple[str, str] | None[source]
epicsarchiver.mgmt.archive_files.parse_rename_file(filename: pathlib.Path) collections.abc.Generator[tuple[str, str], None, None][source]

Parses a file with a list of pv as old_pv_name new_pv_name.

Parameters:

filename (str) – filename of rename file

Yields:

Generator[tuple[str, str], None, None] – produces a pair old_pv_name, new_pv_name

epicsarchiver.mgmt.archive_files.get_pvs_from_files(files: list[pathlib.Path], appliance: str | None = None) list[dict[str, str]][source]

Return a list of PV (as dict) from a list of files.

epicsarchiver.mgmt.archive_files.get_rename_pvs_from_files(files: list[str] | list[pathlib.Path]) list[tuple[str, str]][source]

Return a list of (current, new) PV names from a list of files.