epicsarchiver_mgmt.commands.rename ================================== .. py:module:: epicsarchiver_mgmt.commands.rename .. autoapi-nested-parse:: Rename PVs in the archiver. Attributes ---------- .. autoapisummary:: epicsarchiver_mgmt.commands.rename.LOG epicsarchiver_mgmt.commands.rename.SIZE_KEY epicsarchiver_mgmt.commands.rename.NO_SIZE_VAL epicsarchiver_mgmt.commands.rename.MAX_STORAGE_MB Exceptions ---------- .. autoapisummary:: epicsarchiver_mgmt.commands.rename.TooMuchStoredDataError Functions --------- .. autoapisummary:: epicsarchiver_mgmt.commands.rename.rename epicsarchiver_mgmt.commands.rename._parallel_execute_rename epicsarchiver_mgmt.commands.rename.validate_size epicsarchiver_mgmt.commands.rename.rename_and_append epicsarchiver_mgmt.commands.rename._parallel_execute_rename_and_append Module Contents --------------- .. py:data:: LOG :type: logging.Logger .. py:data:: SIZE_KEY :value: 'Estimated storage rate (MB/day)' .. py:data:: NO_SIZE_VAL :value: 'Not enough info' .. py:data:: MAX_STORAGE_MB :value: 1000 .. py:function:: rename(archiver_fqdns: list[str], renames: collections.abc.Sequence[tuple[str, str]], *, dry_run: bool = False) -> None Rename PVs in the archiver, runs in parallel on multiple archivers. :param archiver_fqdns: The urls of the archivers. :type archiver_fqdns: list[str] :param renames: The PVs to rename. :type renames: Sequence[tuple[str, str]] :param dry_run: Whether to do a dry run or not. :type dry_run: bool :raises RequestHTTPError: If there is an error renaming the PVs. .. py:function:: _parallel_execute_rename(archivers: list[epicsarchiver_mgmt.archiver.mgmt.ArchiverMgmt], renames: collections.abc.Sequence[tuple[str, str]]) -> list[epicsarchiver_mgmt.archiver.mgmt.OperationResult] .. py:exception:: TooMuchStoredDataError(pv: str, storage: float) Bases: :py:obj:`epicsarchiver_mgmt.exceptions.BaseMgmtError` Exception for when the old PV has a lot of data stored. .. py:attribute:: pv .. py:attribute:: storage .. py:function:: validate_size(archiver: epicsarchiver_mgmt.archiver.info.ArchiverMgmtInfo, pvs: collections.abc.Sequence[str], max_storage: float = MAX_STORAGE_MB) -> None Validate the old PVs are not too large. :param archiver: The archiver. :type archiver: ArchiverMgmt :param pvs: The PVs to check. :type pvs: Sequence[str] :param max_storage: The maximum storage allowed in MB per day. :type max_storage: float :raises TooMuchStoredDataError: If the old and new PVs are the same. .. py:function:: rename_and_append(archiver_fqdns: list[str], renames: collections.abc.Sequence[tuple[str, str]], storage: epicsarchiver_mgmt.archiver.mgmt.Storage = Storage.MTS, *, dry_run: bool = False) -> None Rename and append PVs in the archiver, runs in parallel on multiple archivers. :param archiver_fqdns: The urls of the archivers. :type archiver_fqdns: list[str] :param renames: The PVs to rename. :type renames: Sequence[tuple[str, str]] :param storage: The storage to consolidate the data first. :type storage: Storage :param dry_run: Whether to do a dry run or not. :type dry_run: bool :raises RequestHTTPError: If there is an error renaming the PVs. .. py:function:: _parallel_execute_rename_and_append(archivers: list[epicsarchiver_mgmt.archiver.mgmt.ArchiverMgmt], renames: collections.abc.Sequence[tuple[str, str]], storage: epicsarchiver_mgmt.archiver.mgmt.Storage) -> list[epicsarchiver_mgmt.archiver.mgmt.OperationResult]