nvflare.lighter.utils module¶
- generate_cert(subject: Identity, issuer: Identity, signing_pri_key, subject_pub_key, valid_days=360, ca=False, server_default_host=None, server_additional_hosts=None)[source]¶
- update_server_default_host(project_config, default_host)[source]¶
Update the default_host property of the Server in the project config. If a client does not explicitly specify “connect_to”, it will use the default_host to connect to server. This is mainly used for POC, where the default_host is set to localhost.
- Parameters:
project_config – the project config dict
default_host – value of the default host
Returns: the updated project_config
- update_storage_locations(local_dir: str, workspace: str, default_resource_name: str = 'resources.json.default', job_storage_name: str = 'jobs-storage', snapshot_storage_name: str = 'snapshot-storage')[source]¶
Creates resources.json with snapshot-storage and jobs-storage set as folders directly under the workspace for the provided local_dir.