nvflare.fuel.hci.client.api_spec module¶
- class AdminAPISpec[source]¶
Bases:
ABC- abstract check_command(command: str) CommandInfo[source]¶
Checks the specified command for processing info. The command could be a client command or a server command.
- Parameters:
command – command to be checked
Returns: command processing info
- class AdminConfigKey[source]¶
Bases:
object- ADMIN = 'admin'¶
- AUTHENTICATE_MSG_TIMEOUT = 'authenticate_msg_timeout'¶
- CA_CERT = 'ca_cert'¶
- CLIENT_CERT = 'client_cert'¶
- CLIENT_KEY = 'client_key'¶
- CLI_HISTORY_SIZE = 'cli_history_size'¶
- CONNECTION_SCHEME = 'scheme'¶
- CONNECTION_SECURITY = 'connection_security'¶
- DOWNLOAD_DIR = 'download_dir'¶
- FILE_DOWNLOAD_PROGRESS_TIMEOUT = 'file_download_progress_timeout'¶
- HOST = 'host'¶
- IDENTITY = 'identity'¶
- IDLE_TIMEOUT = 'idle_timeout'¶
- LOGIN_TIMEOUT = 'login_timeout'¶
- PORT = 'port'¶
- PROJECT_NAME = 'project_name'¶
- PROMPT = 'prompt'¶
- SERVER_IDENTITY = 'server_identity'¶
- UID_SOURCE = 'uid_source'¶
- UPLOAD_DIR = 'upload_dir'¶
- USERNAME = 'username'¶
- WITH_DEBUG = 'with_debug'¶
- WITH_FILE_TRANSFER = 'with_file_transfer'¶
- class CommandContext[source]¶
Bases:
SimpleContextA simple context containing a props dictionary of key value pairs and convenience methods.
- class CommandCtxKey[source]¶
Bases:
object- API = 'api'¶
- CMD = 'cmd'¶
- CMD_ARGS = 'cmd_args'¶
- CMD_ENTRY = 'cmd_entry'¶
- CMD_HEADERS = 'cmd_headers'¶
- CMD_PROPS = 'cmd_props'¶
- CUSTOM_PROPS = 'custom_props'¶
- JSON_PROCESSOR = 'json_processor'¶
- META = 'meta'¶
- REPLY_PROCESSOR = 'reply_processor'¶
- REQUESTER = 'requester'¶
- RESULT = 'result'¶
- class CommandInfo(value)[source]¶
Bases:
EnumAn enumeration.
- AMBIGUOUS = 2¶
- CONFIRM_AUTH = 4¶
- CONFIRM_USER_NAME = 5¶
- CONFIRM_YN = 3¶
- OK = 0¶
- UNKNOWN = 1¶
- class ReplyProcessor[source]¶
Bases:
objectA base class for parsing server’s response.
- process_bytes(ctx: CommandContext)[source]¶
- process_dict(ctx: CommandContext, data: dict)[source]¶
- process_error(ctx: CommandContext, err: str)[source]¶
- process_shutdown(ctx: CommandContext, msg: str)[source]¶
- process_string(ctx: CommandContext, item: str)[source]¶
- process_success(ctx: CommandContext, item: str)[source]¶
- process_table(ctx: CommandContext, table: Table)[source]¶
- process_token(ctx: CommandContext, token: str)[source]¶
- protocol_error(ctx: CommandContext, err: str)[source]¶
- reply_done(ctx: CommandContext)[source]¶
- reply_start(ctx: CommandContext, reply_json)[source]¶