Skip to content

Commit

Permalink
Merge branch 'RESTAPI-952-params-description' into 'master'
Browse files Browse the repository at this point in the history
Add description in parameters

See merge request firecrest/firecrest!246
  • Loading branch information
Juan Pablo Dorsch committed Nov 6, 2023
2 parents c54a310 + e9b7cc5 commit 3d7d1ff
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add constraint in xfer-internal job script when provided by the configuration. The associated environment variable is `F7T_XFER_CONSTRAINT` and can be empty, when no machine needs it. Otherwise, the different constraints should be separated by `;`.
- Support passing environment variables when submitting a job.
- Support listing directories without resolving UID/GID.
- Add description for each parameter in `GET /status/parameters` response.

## [1.13.1]

Expand Down
4 changes: 4 additions & 0 deletions doc/openapi/firecrest-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2616,6 +2616,8 @@ components:
type: string
unit:
type: string
description:
type: string
utilities:
type: object
properties:
Expand All @@ -2625,6 +2627,8 @@ components:
type: string
unit:
type: string
description:
type: string
Service:
required:
- service
Expand Down
4 changes: 4 additions & 0 deletions doc/openapi/firecrest-developers-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2782,6 +2782,8 @@ components:
type: string
unit:
type: string
description:
type: string
utilities:
type: object
properties:
Expand All @@ -2791,6 +2793,8 @@ components:
type: string
unit:
type: string
description:
type: string
Service:
required:
- service
Expand Down
55 changes: 44 additions & 11 deletions src/status/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,17 +449,50 @@ def parameters():



parameters_list = { "utilities": [
{"name": "UTILITIES_MAX_FILE_SIZE", "value": UTILITIES_MAX_FILE_SIZE, "unit": "MB" },
{"name" : "UTILITIES_TIMEOUT", "value": UTILITIES_TIMEOUT, "unit": "seconds"}
] ,
"storage": [
{"name":"OBJECT_STORAGE" ,"value":OBJECT_STORAGE, "unit": ""},
{"name":"STORAGE_TEMPURL_EXP_TIME", "value":STORAGE_TEMPURL_EXP_TIME, "unit": "seconds"},
{"name":"STORAGE_MAX_FILE_SIZE", "value":STORAGE_MAX_FILE_SIZE, "unit": "MB"},
{"name":"FILESYSTEMS", "value":fs_list, "unit": ""}
]
}
parameters_list = {
"utilities": [
{
"name": "UTILITIES_MAX_FILE_SIZE",
"value": UTILITIES_MAX_FILE_SIZE,
"unit": "MB",
"description": "The maximum allowable file size for various operations "
"of the utilities microservice"
},
{
"name": "UTILITIES_TIMEOUT",
"value": UTILITIES_TIMEOUT,
"unit": "seconds",
"description": "Maximum time duration for executing the commands in "
"the cluster for the utilities microservice."
}
] ,
"storage": [
{
"name": "OBJECT_STORAGE",
"value": OBJECT_STORAGE,
"unit": "",
"description": "Type of object storage, like `swift`, `s3v2` or `s3v4`."
},
{
"name": "STORAGE_TEMPURL_EXP_TIME",
"value": STORAGE_TEMPURL_EXP_TIME,
"unit": "seconds",
"description": "Expiration time for temp URLs."
},
{
"name": "STORAGE_MAX_FILE_SIZE",
"value": STORAGE_MAX_FILE_SIZE,
"unit": "MB",
"description": "Maximum file size for temp URLs."
},
{
"name": "FILESYSTEMS",
"value": fs_list,
"unit": "",
"description": "Default filesystem for job submission."
}
]
}

return jsonify(description="Firecrest's parameters", out=parameters_list), 200

Expand Down

0 comments on commit 3d7d1ff

Please sign in to comment.