Skip to content

Commit

Permalink
fix file
Browse files Browse the repository at this point in the history
  • Loading branch information
nvkevlu committed Dec 17, 2024
1 parent d9acd68 commit f59eca6
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions nvflare/private/fed/server/job_cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,10 @@ def get_spec(self):
client_cmd=ftd.PULL_BINARY_FQN,
),
CommandSpec(
name=AdminCommandNames.DOWNLOAD_JOB_COMPONENT,
description="download a specified component for a specified job",
usage=f"{AdminCommandNames.DOWNLOAD_JOB_COMPONENT} job_id component_name",
handler_func=self.download_job_component,
authz_func=self.authorize_job_component,
name=AdminCommandNames.DOWNLOAD_JOB_COMPONENTS,
description="download additional components for a specified job",
usage=f"{AdminCommandNames.DOWNLOAD_JOB_COMPONENTS} job_id",
handler_func=self.download_job_components,
client_cmd=ftd.PULL_FOLDER_FQN,
),
CommandSpec(
Expand Down Expand Up @@ -244,20 +243,6 @@ def authorize_job(self, conn: Connection, args: List[str]):

return PreAuthzReturnCode.REQUIRE_AUTHZ

def authorize_job_component(self, conn: Connection, args: List[str]):
self.logger.error(f"authorize_job_component called for {args}")
rc = self.authorize_job_id(conn, args)
if rc == PreAuthzReturnCode.ERROR:
return rc

if len(args) > 2:
err = self.validate_command_targets(conn, args[2:])
if err:
conn.append_error(err, meta=make_meta(MetaStatusValue.INVALID_TARGET, err))
return PreAuthzReturnCode.ERROR

return PreAuthzReturnCode.REQUIRE_AUTHZ

def _start_app_on_clients(self, conn: Connection, job_id: str) -> bool:
engine = conn.app_ctx
client_names = conn.get_prop(self.TARGET_CLIENT_NAMES, None)
Expand Down

0 comments on commit f59eca6

Please sign in to comment.