api: fix NanoCPUs casing in swagger
While the field in the Go struct is named `NanoCPUs`, it has a JSON label to
use `NanoCpus`, which was added in the original pull request (not clear what
the reason was); 846baf1fd3
Some notes:
- Golang processes field names case-insensitive, so when *using* the API,
both cases should work, but when inspecting a container, the field is
returned as `NanoCpus`.
- This only affects Containers.Resources. The `Limits` and `Reservation`
for SwarmKit services and SwarmKit "nodes" do not override the name
for JSON, so have the canonical (`NanoCPUs`) casing.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
1c39b1c44c
commit
2bd46ed7e5
1 changed files with 2 additions and 2 deletions
|
@ -560,7 +560,7 @@ definitions:
|
|||
format: "int64"
|
||||
minimum: 0
|
||||
maximum: 100
|
||||
NanoCPUs:
|
||||
NanoCpus:
|
||||
description: "CPU quota in units of 10<sup>-9</sup> CPUs."
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
|
@ -5466,7 +5466,7 @@ paths:
|
|||
MemorySwap: 0
|
||||
MemoryReservation: 0
|
||||
KernelMemory: 0
|
||||
NanoCPUs: 500000
|
||||
NanoCpus: 500000
|
||||
CpuPercent: 80
|
||||
CpuShares: 512
|
||||
CpuPeriod: 100000
|
||||
|
|
Loading…
Reference in a new issue