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); 846baf1fd3efcbfbf9d3eb99e436ca9a59d3e185
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>
(cherry picked from commit 2bd46ed7e5a016f21b9259cec269340420fa7a63)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -560,7 +560,7 @@ definitions: |
| 560 | 560 |
format: "int64" |
| 561 | 561 |
minimum: 0 |
| 562 | 562 |
maximum: 100 |
| 563 |
- NanoCPUs: |
|
| 563 |
+ NanoCpus: |
|
| 564 | 564 |
description: "CPU quota in units of 10<sup>-9</sup> CPUs." |
| 565 | 565 |
type: "integer" |
| 566 | 566 |
format: "int64" |
| ... | ... |
@@ -5466,7 +5466,7 @@ paths: |
| 5466 | 5466 |
MemorySwap: 0 |
| 5467 | 5467 |
MemoryReservation: 0 |
| 5468 | 5468 |
KernelMemory: 0 |
| 5469 |
- NanoCPUs: 500000 |
|
| 5469 |
+ NanoCpus: 500000 |
|
| 5470 | 5470 |
CpuPercent: 80 |
| 5471 | 5471 |
CpuShares: 512 |
| 5472 | 5472 |
CpuPeriod: 100000 |