Граф коммитов

9126 Коммитов

Автор SHA1 Сообщение Дата
Vincent Demeester 349336715d
Update PluginInstall signature for consistency
This make PluginInstall a little bit more consistent with the rest of
the api code base:

- Make enable and acceptAllPermissions optional
- Adds PrivilegeFunc to make it ask for login if the daemon error is an
  HTTP Unauthorized (just like image pull/push).
- Add a AcceptPermissionsFunc and remove Reader/Writer from the
  signature. The idea is to not force interactive input/output and let
  the user of the API defines the behavior for accepting permissions.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-16 12:22:08 +02:00
Arnaud Porterie (icecrime) a0da8ddf4b
Modify `ServiceInspect` to return raw data
Modify `ServiceInspect` to `ServiceInspectWithRaw`, and have it returned
the raw bytes.

Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
2016-06-15 22:11:45 -07:00
David Calavera f50fbe5f9c Merge pull request #271 from yongtang/22471-daemon-shutdown-timeout
Add config parameter to change per-container stop timeout during daemon shutdown
2016-06-15 09:24:19 -07:00
David Calavera 534e42a119 Merge pull request #276 from vdemeester/add-some-plugin-test
Add some unit tests to Plugin* methods
2016-06-15 09:23:32 -07:00
David Calavera cf0f1d7b74 Merge pull request #278 from vieux/optional_secret
optional swarm secret
2016-06-15 09:23:08 -07:00
Vincent Demeester c1549dd086 Merge pull request #279 from vieux/storage_opts_omit
add omitempty to storageopts
2016-06-15 09:20:34 +02:00
Victor Vieux 66ac20d635 optional swarm secret
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-06-14 14:22:20 -07:00
Victor Vieux a54c250af7 add omitempty to storageopts
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-06-14 14:21:15 -07:00
Brian Goff de0bc7ec1a Merge pull request #275 from vdemeester/interface-split
Split CommonAPIClient interface into several smaller interfaces
2016-06-14 10:22:02 -04:00
Vincent Demeester 4194e78ccf
Add some unit tests to Plugin* methods
This also set the `experimental` build tag to `make test` in order to
build them too.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-14 16:12:52 +02:00
Vincent Demeester f3b5ad20d4 Merge pull request #274 from vdemeester/plugin-split
Split plugin.go into several files
2016-06-14 16:10:57 +02:00
Vincent Demeester 20d52fd675
Split CommonAPIClient interface into several smaller
This groups method definitions by "object" type (container, image, …)
into smaller interface and use composition to make CommonAPIClient and
APIClient the same as right now.

This also moves `Checkpoint*` methods to the *experimental* interface as
it will be enabled into experimental first.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-14 12:01:37 +02:00
Vincent Demeester bdf17766ce
Split plugin.go into several files
This is *just a nit*, but to be consistent with other "objects".

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-14 11:47:13 +02:00
Sebastiaan van Stijn 5fd66ece9e Merge pull request #273 from tiborvass/plugins
plugins: update APIClient interface
2016-06-14 09:38:47 +02:00
Tibor Vass 0543c48aad plugins: update APIClient interface
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2016-06-14 00:24:37 -07:00
Alexander Morozov 8e7bf86d99 Merge pull request #272 from tiborvass/plugins
plugins: add new types and client methods
2016-06-13 21:48:44 -07:00
Tibor Vass 408763fde9 plugins: add new types and client methods
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2016-06-13 21:31:24 -07:00
Yong Tang b9b962eaba Add config parameter to change per-container stop timeout during daemon shutdown
This fix tries to add config paramter to change per-contaienr stop timeout during
the daemon shutdown. As the part of the update, this fix also changes `docker restart`
and `docker stop` so that if `--time` is not specified, then the default stop timeout
(10s) will be used.

This fix is related to
https://github.com/docker/docker/pull/22566
https://github.com/docker/docker/issues/22471

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-13 19:08:23 -07:00
Arnaud Porterie 6b2f24f16a Merge pull request #265 from vieux/swarmkit
Add swarm management API endpoints
2016-06-13 23:11:34 +00:00
Madhu Venugopal bf992794fd Merge pull request #269 from aboch/ll
Add list of link-local IPs to EndpointIPAMConfig
2016-06-13 08:44:00 -07:00
Victor Vieux 2f9f0bff7a change node update and swarm update to specs
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-06-12 05:45:13 -07:00
Victor Vieux 690cb2d08c fix lowercase, remove eject and fix order type/consts
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-06-12 05:24:26 -07:00
Victor Vieux 10997922a2 remove IPAMConfigFamily
remove Reserved
add CACertHash
cleanup of types

Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-06-12 02:34:05 -07:00
Vincent Demeester a5e7f36af3 Add unit test for node endpoints
- NodeInspect
- NodeList
- NodeRemove
- NodeUpdate

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-09 00:55:05 -07:00
Vincent Demeester b0c1cb5c15 Add unit test for service endpoint
- ServiceCreate
- ServiceInspect
- ServiceList
- ServiceRemove
- ServiceUpdate

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-09 00:55:05 -07:00
Vincent Demeester d8a0f3efbe Add unit test for swarm endpoints
- SwarmInit
- SwarmInspect
- SwarmJoin
- SwarmLeave
- SwarmUpdate

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-09 00:55:05 -07:00
Vincent Demeester 418e265d9d Add unit test for task endpoints
- TaskInspect
- TaskList

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-09 00:55:05 -07:00
Victor Vieux 59bce4d452 remove MCSAaccessMode and split swarm.go and use NodeRole
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-06-09 00:55:05 -07:00
Victor Vieux 4eece3c2c5 Add swarmkit management API endpoints
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-06-09 00:55:05 -07:00
Alessandro Boch aa9e8e7ea8 Add list of link-local IPs to EndpointIPAMConfig
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-06-08 15:20:28 -07:00
Sebastiaan van Stijn d06b85b29e Merge pull request #267 from vdemeester/fix-client-tests
Fix TestNewEnvClient with default version
2016-06-08 18:28:35 +02:00
Vincent Demeester e22e8d0a75
Fix TestNewEnvClient with default version
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-08 18:24:19 +02:00
David Calavera c024c46c2a Merge pull request #252 from vdemeester/env-client-tests
Add unit tests for NewEnvClient
2016-06-08 09:13:44 -07:00
David Calavera 8d58f33176 Merge pull request #266 from vdemeester/versionned-json-error
Add a version check on client error handling
2016-06-08 09:11:43 -07:00
Vincent Demeester 5140421c5d
Add a version check on client error handling
In case the daemon API is older than 1.24 but the response has a
content-type of `application/json`, this make sure it's keeping the old
behavior before 1.24.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-08 11:04:56 +02:00
Vincent Demeester 3a30f2268c Merge pull request #264 from bfirsh/add-default-api-version
Add default version to NewEnvClient
2016-06-08 07:43:20 +02:00
Ben Firshman c822db730b Add warning about setting version in NewClient
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-06-07 15:22:30 -07:00
Ben Firshman ff58b66759 Add default version to NewEnvClient
Matches behaviour of CLI, and will stop apps breaking if they're
running off engine-api master, but not docker/docker master.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-06-07 15:22:30 -07:00
Morgan Bauer 39f9289421 Merge pull request #263 from vdemeester/revert-urls
Revert "Remove /json from API URLs"
2016-06-07 13:51:29 -07:00
Morgan Bauer cf94e9533d Merge pull request #261 from allencloud/change-Memory-type-in-ContainerNode
change Memory type to int64 in ContainerNode
2016-06-07 13:45:15 -07:00
Vincent Demeester 4065613c52
Revert "Remove /json from API URLs"
This reverts commit 73cef48eb7.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-07 21:04:50 +02:00
David Calavera 739ad1671b Merge pull request #255 from bfirsh/remove-json-from-api-urls
Remove /json from API URLs
2016-06-07 08:19:35 -07:00
David Calavera 8c2141e14b Merge pull request #235 from pdalpra/timeout-as-time.Duration
Use time.Duration as type for timeouts
2016-06-07 08:18:53 -07:00
Pierre Dal-Pra da7b0e73dd Use time.Duration as type for timeouts
Signed-off-by: Pierre Dal-Pra <dalpra.pierre@gmail.com>
2016-06-07 13:27:53 +02:00
Pierre Dal-Pra 2bb28fef8f Add helper to convert Duration to string
Signed-off-by: Pierre Dal-Pra <dalpra.pierre@gmail.com>
2016-06-07 13:27:37 +02:00
allencloud 31d0f31ae9 change Memory type to int64 in ContainerNode
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-06-07 11:48:08 +08:00
David Calavera 9245c24707 Merge pull request #238 from vdemeester/update-errors
Make NotFound Errors exportable
2016-06-06 18:18:15 -07:00
Sebastiaan van Stijn 8f30a1c59b Merge pull request #259 from joe2far/patch-1
Fixed typo in README
2016-06-05 19:12:17 +02:00
Joe Farrell 278b40576e Fixed typo in README
Signed-off-by: joe2far <joe2farrell@gmail.com>
2016-06-03 17:44:19 +01:00
Vincent Demeester 5156f5c311
Updates NotFound Errors to implement an interface
This makes it easier to mock then in unit-tests that use engine-api and
needs for some cases, generate a NotFound error.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-03 18:30:38 +02:00