Commit Graph

4 Commits

Author SHA1 Message Date
allencloud ac245e2845 use make slice to store objects to improve efficiency
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-04-14 11:02:28 +08:00
Aaron Lehmann 1d274e9acf Change "service inspect" to show defaults in place of empty fields
This adds a new parameter insertDefaults to /services/{id}. When this is
set, an empty field (such as UpdateConfig) will be populated with
default values in the API response. Make "service inspect" use this, so
that empty fields do not result in missing information when inspecting a
service.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-04-10 13:41:16 -07:00
Vincent Demeester 250e05e427
Add a lockedManagerAction method to Cluster…
… in order to remove duplication.
Each time we update a cluster object, we do some common
operations (lock, verify it's on a manager, get the request context,
and the update). This introduce a method and refactor few
update/remove method that allows to duplicate less code.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-02-28 11:12:11 +01:00
allencloud 6be675c752 create a new file task.go and move task part codes from cluster.go into tasks.go
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-02-12 02:45:00 +08:00