Skip to content

Commit

Permalink
Fix --name param for job execution show and job execution cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
jiec-msft committed Apr 28, 2024
1 parent dcb820c commit 702d024
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/spring/azext_spring/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -1277,9 +1277,12 @@ def prepare_common_logs_argument(c):
for scope in ['job execution list', 'job execution show', 'job execution cancel']:
with self.argument_context(f"spring {scope}") as c:
c.argument('service', service_name_type)
c.argument('job', help='The name of job running in the specified Azure Spring Apps instance.')

for scope in ['job execution show', 'job execution cancel']:
with self.argument_context(f"spring {scope}") as c:
c.argument('name', name_type,
help='The name of job execution running in the specified Azure Spring Apps instance.')
c.argument('job', help='The name of job running in the specified Azure Spring Apps instance.')

with self.argument_context('spring job execution instance list') as c:
c.argument('service', service_name_type)
Expand Down
8 changes: 4 additions & 4 deletions src/spring/azext_spring/jobs/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,14 @@ def job_execution_cancel(cmd, client,
resource_group,
service,
job,
execution,
name, # execution name
no_wait=False):
return sdk_no_wait(no_wait, client.job_execution.begin_cancel,
resource_group, service, job, execution)
resource_group, service, job, name)


def job_execution_get(cmd, client, resource_group, service, job, execution):
return client.job_execution.get(resource_group, service, job, execution)
def job_execution_get(cmd, client, resource_group, service, job, name):
return client.job_execution.get(resource_group, service, job, name)


def job_execution_list(cmd, client, resource_group, service, job):
Expand Down

0 comments on commit 702d024

Please sign in to comment.