epicsarchiver_mgmt.command
Command line tool for doing mgmt operations with the archiver.
Attributes
Functions
|
Check if the command input is provided. |
|
Check if the command input is provided. |
|
Command line tool for doing mgmt operations with the archiver. |
|
Pause PVs in the archiver. |
|
Abort PVs from the connection queue in the archiver. |
|
Delete PVs in the archiver. |
|
Get the status of PVs in the archiver. |
|
Rename PVs in the archiver. |
|
Resume Archiving PVs in the archiver. |
|
Archive PVs in the archiver. |
|
Change the type of PVs in the archiver. |
|
Change the protocol of PVs in the archiver. |
|
Re choose the policy of PVs in the archiver. |
|
Change the archiving parameters of PVs in the archiver. |
|
Clear Queue of already archiving PVs in the archiver. |
|
Alias PVs in the archiver. |
|
Add alias to PVs in the archiver. |
|
Remove aliases to PVs in the archiver. |
|
Convert a ParseCSVRowError to a click.BadParameter. |
Module Contents
- epicsarchiver_mgmt.command.LOG: logging.Logger[source]
- epicsarchiver_mgmt.command.validate_str_input(ctx: click.Context, param: click.Parameter, value: str | None) str[source]
Check if the command input is provided.
- Parameters:
ctx (click.Context) – The click context.
param (click.Parameter) – The click parameter.
value (str | None) – The value of the parameter.
- Returns:
The value if it is valid, otherwise raises click.BadParameter.
- Return type:
str | None
- Raises:
click.BadParameter – If the value is None or empty.
- epicsarchiver_mgmt.command.validate_file_input(ctx: click.Context, param: click.Parameter, value: io.TextIOWrapper) io.TextIOWrapper[source]
Check if the command input is provided.
- Parameters:
ctx (click.Context) – The click context.
param (click.Parameter) – The click parameter.
value (str | None) – The value of the parameter.
- Returns:
The value if it is valid, otherwise raises click.BadParameter.
- Return type:
str | None
- Raises:
click.BadParameter – If the value is None or empty.
- epicsarchiver_mgmt.command.cli() None[source]
Command line tool for doing mgmt operations with the archiver.
- epicsarchiver_mgmt.command.pause(ctx: click.Context, archiver_fqdn: list[str], file: io.TextIOWrapper) None[source]
Pause PVs in the archiver.
ARGUMENT file csv file of what pvs to pause.
Example usage:
arch-mgmt pause -a archiver.example.com pvs.csv
- epicsarchiver_mgmt.command.abort(ctx: click.Context, archiver_fqdn: list[str], file: io.TextIOWrapper) None[source]
Abort PVs from the connection queue in the archiver.
ARGUMENT file csv file of what pvs to abort.
Example usage:
arch-mgmt abort -a archiver.example.com pvs.csv
- epicsarchiver_mgmt.command.delete(ctx: click.Context, archiver_fqdn: list[str], file: io.TextIOWrapper) None[source]
Delete PVs in the archiver.
ARGUMENT file csv file of what pvs to delete.
Example usage:
arch-mgmt delete -a archiver.example.com pvs.csv
- epicsarchiver_mgmt.command.statuses(ctx: click.Context, archiver_fqdn: str, file: io.TextIOWrapper, output_file: io.TextIOWrapper) None[source]
Get the status of PVs in the archiver.
ARGUMENT file csv file of what pvs to get status.
Example usage:
arch-mgmt statuses -a archiver.example.com pvs.csv
- epicsarchiver_mgmt.command.rename(ctx: click.Context, archiver_fqdn: list[str], file: io.TextIOWrapper, and_append: bool = False, dry_run: bool = False) None[source]
Rename PVs in the archiver.
ARGUMENT file csv file of what pvs to rename.
Example file:
old_pv,new_pv pv1,pv2 pv3,pv4
Example usage:
arch-mgmt rename -a archiver.example.com -a archiver.example.com pvs.csv
- epicsarchiver_mgmt.command.resume(ctx: click.Context, archiver_fqdn: list[str], file: io.TextIOWrapper) None[source]
Resume Archiving PVs in the archiver.
ARGUMENT file csv file of what pvs to resume.
Example usage:
arch-mgmt resume -a archiver.example.com pvs.csv
- epicsarchiver_mgmt.command._parse_archive_requests(file: TextIO, appliance: str | None) list[epicsarchiver_mgmt.archiver.mgmt.ArchivePVRequest][source]
- epicsarchiver_mgmt.command.archive(ctx: click.Context, archiver_fqdn: str, dry_run: bool, appliance: str | None, file: io.TextIOWrapper) None[source]
Archive PVs in the archiver.
ARGUMENT file csv file of what pvs to archive. The csv file should have the following format:
Example: PV,policy mypv1, mypv2,1Hz mypv3,1HzSCAN
Policy is optional. If not provided, the default policy will be used. You can find the options at archiver.example.com/mgmt/bpl/getPolicyList.
Example usage:
arch-mgmt archive -a archiver.example.com pvs.csv- Raises:
click.BadParameter – If no PVs are found in the input file.
- epicsarchiver_mgmt.command.change_type(ctx: click.Context, archiver_fqdn: str, file: io.TextIOWrapper, new_type: epicsarchiver_mgmt.archiver.mgmt.ArchDbrType | None) None[source]
Change the type of PVs in the archiver.
ARGUMENT file csv file of what pvs to change type.
Example usage:
arch-mgmt change-type -a archiver.example.com --new-type DBR_SCALAR_DOUBLE pvs.csv
- epicsarchiver_mgmt.command.change_protocol(ctx: click.Context, archiver_fqdn: str, file: io.TextIOWrapper, protocol: epicsarchiver_mgmt.archiver.mgmt.EpicsProto | None) None[source]
Change the protocol of PVs in the archiver.
ARGUMENT file csv file of what pvs to change protocol.
Example usage:
arch-mgmt change-protocol -a archiver.example.com --new-protocol ca pvs.csv
- epicsarchiver_mgmt.command.repolicy(ctx: click.Context, archiver_fqdn: str, file: io.TextIOWrapper) None[source]
Re choose the policy of PVs in the archiver.
ARGUMENT file csv file of what pvs to change protocol.
Example usage:
arch-mgmt repolicy -a archiver.example.com pvs.csv
- epicsarchiver_mgmt.command.change_parameter(ctx: click.Context, archiver_fqdn: str, file: io.TextIOWrapper, method: epicsarchiver_mgmt.archiver.mgmt.SamplingMethod | None, period: float | None) None[source]
Change the archiving parameters of PVs in the archiver.
ARGUMENT file csv file of what pvs to change archiving parameters.
Example usage:
arch-mgmt change-parameter -a archiver.example.com --method SCAN --period 10.0 pvs.csv- Raises:
click.BadParameter – If neither method nor period is provided.
- epicsarchiver_mgmt.command.clear_queue(ctx: click.Context, archiver_fqdn: str, old_time: int, queue_filter: epicsarchiver_mgmt.commands.clear_queue.QueueFilter) None[source]
Clear Queue of already archiving PVs in the archiver.
Example usage:
arch-mgmt clear-queue -a archiver.example.com
- epicsarchiver_mgmt.command.add_alias(ctx: click.Context, archiver_fqdn: str, file: io.TextIOWrapper) None[source]
Add alias to PVs in the archiver.
ARGUMENT file csv file of what pvs to alias.
Example file:
original_pv,alias_pv_name pv1,pv2 pv3,pv4
Example usage:
arch-mgmt alias add -a archiver.example.com pvs.csv
- epicsarchiver_mgmt.command.remove_alias(ctx: click.Context, archiver_fqdn: str, file: io.TextIOWrapper) None[source]
Remove aliases to PVs in the archiver.
ARGUMENT file csv file of what pvs to alias.
Example file:
original_pv,alias_pv_name pv1,pv2 pv3,pv4
Example usage:
arch-mgmt alias remove -a archiver.example.com pvs.csv
- epicsarchiver_mgmt.command._parse_error_to_bad_param(ctx: click.Context, err: epicsarchiver_mgmt.input_parsing.ParseCSVRowError) None[source]
Convert a ParseCSVRowError to a click.BadParameter.
- Parameters:
ctx (click.Context) – The click context.
err (ParseCSVRowError) – The error to convert.
- Raises:
click.BadParameter – If the error is a ParseCSVRowError.