Allow specifying job names for benchmarks

This commit is contained in:
2024-09-18 14:55:12 -04:00
parent 736762901c
commit 41cd34ba4d
5 changed files with 39 additions and 13 deletions

View File

@ -5069,6 +5069,10 @@ class API_Storage_Ceph_Benchmark(Resource):
"required": True,
"helptext": "A valid pool must be specified.",
},
{
"name": "name",
"required": False,
},
]
)
@Authenticator
@ -5084,6 +5088,11 @@ class API_Storage_Ceph_Benchmark(Resource):
type: string
required: true
description: The PVC storage pool to benchmark
- in: query
name: name
type: string
required: false
description: An optional override name for the job
responses:
200:
description: OK
@ -5101,7 +5110,10 @@ class API_Storage_Ceph_Benchmark(Resource):
}, 400
task = run_celery_task(
"storage.benchmark", pool=reqargs.get("pool", None), run_on="primary"
"storage.benchmark",
pool=reqargs.get("pool", None),
name=reqargs.get("name", None),
run_on="primary",
)
return (
{