RepertoireBuilderWithSecrets#
- class rubin.repertoire.RepertoireBuilderWithSecrets(config, secrets_root)#
Bases:
RepertoireBuilderConstruct service discovery from configuration with secrets.
This class is identical to
RepertoireBuilderwith the addition of local secrets. This allows it to build discovery information that requires secrets, such as InfluxDB connection information with credentials.- Parameters:
config (
RepertoireSettings) – Repertoire configuration.secrets_root (
str|Path) – Root path to where Repertoire secrets are stored.
Methods Summary
build_influxdb_with_credentials(database)Construct InfluxDB discovery information with credentials.
Construct dictionary of all InfluxDB credential information.
Methods Documentation
- build_influxdb_with_credentials(database)#
Construct InfluxDB discovery information with credentials.
The files referenced in the password paths must exist locally when calling this method. This will be the case for the running Repertoire service but not when the library is being called outside of the service, such as when building static information.
- Parameters:
database (
str) – Name of the InfluxDB database.- Returns:
InfluxDB connection information or
Noneif no such InfluxDB database was found.- Return type:
InfluxDatabaseWithCredentials or None
- list_influxdb_with_credentials()#
Construct dictionary of all InfluxDB credential information.
The primary intent of this method is to allow users to download a JSON file containing a mapping of InfluxDB labels to connection information, with credentials, for all databases they have access to. This can, in turn, be used as data for other software that manages connections, such as lsst-efd-client.
The files referenced in the password paths must exist locally when calling this method. This will be the case for the running Repertoire service but not when the library is being called outside of the service, such as when building static information.
- Returns:
Mapping of label to InfluxDB discovery information, with credentials, for every known database.
- Return type: