bec_lib.config_helper.ConfigHelper#
- class ConfigHelper(connector: RedisConnector, service_name: str = None)[source]#
Bases:
object
Config Helper
Helper class for updating and saving the BEC device configuration.
- Parameters:
connector (RedisConnector) – Redis connector.
service_name (str, optional) – Name of the service. Defaults to None.
Methods
Load BEC device demo_config.yaml for simulation.
Save the current session as a yaml file to disk.
send request to update config Returns:
Update the current session with a yaml file from disk.
wait for config reply
wait for service response
- save_current_session(file_path: str)[source]#
Save the current session as a yaml file to disk.
- Parameters:
file_path (str) – Full path to the yaml file.
- send_config_request(action: str = 'update', config=None) None [source]#
send request to update config Returns:
- update_session_with_file(file_path: str, save_recovery: bool = True) None [source]#
Update the current session with a yaml file from disk.
- Parameters:
file_path (str) – Full path to the yaml file.
save_recovery (bool, optional) – Save the current session before updating. Defaults to True.
- wait_for_config_reply(RID: str, timeout=10) RequestResponseMessage [source]#
wait for config reply
- Parameters:
RID (str) – request id
timeout (int, optional) – timeout in seconds. Defaults to 10.
- Returns:
reply message
- Return type:
- wait_for_service_response(RID: str, timeout=10) ServiceResponseMessage [source]#
wait for service response
- Parameters:
RID (str) – request id
timeout (int, optional) – timeout in seconds. Defaults to 10.
- Returns:
reply message
- Return type: