capping funciton now returns which zones were sucessfully capped and which zones could not be capped. This information is now returned to the caller of the HTTP api.

This commit is contained in:
Renan DelValle 2020-01-18 20:11:44 -08:00
parent bcd25c805a
commit 5e4ba5a933
No known key found for this signature in database
GPG key ID: 3895800E03F17676
4 changed files with 86 additions and 21 deletions

View file

@ -11,3 +11,29 @@ on all worker nodes.
--data '{"percentage":75}' \
http://localhost:9090/powercap
```
### Payload
```json
{
"percentage":75
}
```
### Response
The daemon will respond with a json payload containing zones that were
successfully capped as well as the zones that were not capped.
```json
{
"cappedZones": null,
"failedZones": [
"intel-rapl:0",
"intel-rapl:1"
],
"error": "some zones were not able to be powercapped"
}
```
Field error will not exist if failed zones is empty.