nvflare.fuel.hci.client.fl_admin_api_runner module

class FLAdminAPIRunner(username, admin_dir, poc=False, debug=False)[source]

Bases: object

Initializes and logs into an FLAdminAPI instance.

The default locations for certs, keys, and directories are used.

Parameters:
  • username – string of username to log in with

  • admin_dir – string of root admin dir containing the startup dir

  • poc – whether to run in poc mode without SSL certs

  • debug – whether to turn on debug mode

run(job_folder_name)[source]

An example script to upload, deploy, and start a specified app.

Note that the app folder must be in upload_dir already. Prints the command to be executed first so it is easy to follow along as the commands run.

Parameters:

job_folder_name – name of job folder to submit, either relative to the upload_dir specified in the fed_admin.json config, or absolute path

api_command_wrapper(api_command_result)[source]

Prints the result of the command and raises RuntimeError to interrupt command sequence if there is an error.

Parameters:

api_command_result – result of the api command