moby--moby/api/types
Yong Tang 846baf1fd3 Add `--cpus` flag to control cpu resources
This fix tries to address the proposal raised in 27921 and add
`--cpus` flag for `docker run/create`.

Basically, `--cpus` will allow user to specify a number (possibly partial)
about how many CPUs the container will use. For example, on a 2-CPU system
`--cpus 1.5` means the container will take 75% (1.5/2) of the CPU share.

This fix adds a `NanoCPUs` field to `HostConfig` since swarmkit alreay
have a concept of NanoCPUs for tasks. The `--cpus` flag will translate
the number into reused `NanoCPUs` to be consistent.

This fix adds integration tests to cover the changes.

Related docs (`docker run` and Remote APIs) have been updated.

This fix fixes 27921.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-04 09:43:10 -07:00
..
backend record pid of exec'd process 2016-10-20 17:06:11 +02:00
blkiodev Add engine-api types to docker 2016-09-07 11:05:58 -07:00
container Add `--cpus` flag to control cpu resources 2016-11-04 09:43:10 -07:00
events Add engine-api types to docker 2016-09-07 11:05:58 -07:00
filters all: remove nil check for slices 2016-10-13 13:55:38 -07:00
mount api: add TypeTmpfs to api/types/mount 2016-10-28 08:38:32 +00:00
network Add engine-api types to docker 2016-09-07 11:05:58 -07:00
reference Add engine-api types to docker 2016-09-07 11:05:58 -07:00
registry generate AuthResponse type from swagger spec. 2016-10-31 11:16:03 -04:00
strslice Add engine-api types to docker 2016-09-07 11:05:58 -07:00
swarm Merge pull request #27857 from vasil-yordanov/docker-service-hostname-2 2016-11-04 15:22:55 +01:00
time Add engine-api types to docker 2016-09-07 11:05:58 -07:00
versions Move engine-api client package 2016-09-07 11:05:58 -07:00
volume Use a config to generate swagger api types 2016-10-31 11:13:41 -04:00
auth.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
client.go Replace all "Filter" field with "Filters" for consistency 2016-11-01 23:09:30 +08:00
configs.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
error_response.go Update to inline comments. 2016-10-31 11:13:41 -04:00
id_response.go Add an IDResponse type 2016-10-31 11:16:02 -04:00
image_summary.go Generate api/types:Image from the swagger spec 2016-10-20 13:24:23 -07:00
plugin.go Update volume type and regenerate types 2016-10-20 13:31:32 -07:00
plugin_device.go Generate plugin types from the swagger spec. 2016-10-20 13:24:23 -07:00
plugin_env.go Generate plugin types from the swagger spec. 2016-10-20 13:24:23 -07:00
plugin_interface_type.go Generate plugin types from the swagger spec. 2016-10-20 13:24:23 -07:00
plugin_mount.go Generate plugin types from the swagger spec. 2016-10-20 13:24:23 -07:00
plugin_responses.go Generate plugin types from the swagger spec. 2016-10-20 13:24:23 -07:00
port.go Generate api/types:Port from swagger spec. 2016-10-20 13:24:23 -07:00
seccomp.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
stats.go Windows: stats support 2016-09-16 11:56:15 -07:00
types.go daemon: add a flag to override the default seccomp profile 2016-11-02 21:41:29 +01:00
volume.go Update volume type and regenerate types 2016-10-20 13:31:32 -07:00