nvflare.private.fed.server.cmd_utils module¶
- class CommandUtil[source]¶
Bases:
object
- ALL_SITES = '@ALL'¶
- JOB_ID = 'job_id'¶
- SITE_SERVER = 'server'¶
- TARGET_CLIENTS = 'target_clients'¶
- TARGET_CLIENT_NAMES = 'target_client_names'¶
- TARGET_CLIENT_TOKENS = 'target_client_tokens'¶
- TARGET_TYPE = 'target_type'¶
- TARGET_TYPE_ALL = 'all'¶
- TARGET_TYPE_CLIENT = 'client'¶
- TARGET_TYPE_SERVER = 'server'¶
- authorize_job_meta(conn: Connection, meta: dict, actions: List[str])[source]¶
- authorize_operate(conn: Connection, args: List[str])[source]¶
- authorize_train(conn: Connection, args: List[str])[source]¶
- authorize_view(conn: Connection, args: List[str])[source]¶
- process_replies_to_table(conn: Connection, replies)[source]¶
Process the clients’ replies and put in a table format.
- Parameters
conn – A Connection object.
replies – replies from clients
- validate_command_targets(conn: Connection, args: List[str]) str [source]¶
Validate specified args and determine and set target type and target names in the Connection.
The args must be like this:
target_type client_names …
where target_type is one of ‘all’, ‘client’, ‘server’
- Parameters
conn – A Connection object.
args – Specified arguments.
- Returns
An error message. It is empty “” if no error found.