Commit Graph

30 Commits

Author SHA1 Message Date
b2ea4b4caf added unit tests for package cli/command/secret
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: d5dca7c687
Component: cli
2017-04-04 15:35:08 -04:00
1a3472a804 Merge pull request #30810 from allencloud/make-secret-ls-support-filter
make secret ls support filters in CLI
Upstream-commit: d14a4d4231
Component: cli
2017-03-28 13:43:19 +02:00
6445b15529 make secret ls support filters in CLI
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: d6490e5de9
Component: cli
2017-03-27 10:16:45 +08:00
25b1b9c3c2 Replace fmt.Errorf() with errors.Errorf() in the cli
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e9d6193dfd
Component: cli
2017-03-24 16:58:07 -04:00
70615a5680 Merge pull request #31552 from ripcurld0/add_format_secretls
Add format to secret ls
Upstream-commit: e1409013e5
Component: cli
2017-03-20 20:20:45 +01:00
bbac6dc261 Add format to secret ls
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 1bac314da5
Component: cli
2017-03-19 09:22:30 +02:00
c74c88f8f7 Add missing API version annotations to commands
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d5d0d7795b
Component: cli
2017-03-16 13:40:12 +01:00
c3e631a485 remove cli/command/secrets/utils.go
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: ca1e5ffeea
Component: cli
2017-01-29 13:32:49 +08:00
25a9f2a83b Move secret name or ID prefix resolving from client to daemon
This fix is a follow up for comment:
https://github.com/docker/docker/pull/28896#issuecomment-265392703

Currently secret name or ID prefix resolving is done at the client
side, which means different behavior of API and CMD.

This fix moves the resolving from client to daemon, with exactly the
same rule:
- Full ID
- Full Name
- Partial ID (prefix)

All existing tests should pass.

This fix is related to #288896, #28884 and may be related to #29125.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 383ed6f121
Component: cli
2017-01-27 10:40:05 -08:00
a568e7cd60 Add integration test for stack deploy with secrets.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4a1c23bc26
Component: cli
2017-01-26 11:33:15 -05:00
57533e2335 remove -f on secret create and unify usage with other commands
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 62cbb25a17
Component: cli
2017-01-06 14:07:48 -08:00
f912773c28 Clean some stuff from runconfig that are cli only…
… or could be in `opts` package. Having `runconfig/opts` and `opts`
doesn't really make sense and make it difficult to know where to put
some code.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6726879382
Component: cli
2016-12-24 13:16:00 +01:00
d0c6ebff61 Add --file flag for docker secret create command
This fix tries to address the issue raised in 28581 and 28927
where it is not possible to create a secret from a file (only
through STDIN).

This fix add a flag `--file` to `docker secret create` so that
it is possible to create a secret from a file with:
```
docker secret create --file secret.in secret.name
```

or
```
echo TEST | docker secret create --file - secret.name
```

Related docs has been updated.

An integration test has been added to cover the changes.

This fix fixes 28581.
This fix is related to 28927.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8e680c48f1
Component: cli
2016-12-13 07:35:45 -08:00
da195cdf4e Fix issue where secret ID is masked by name
This fix tries to address the issue in 28884 where
it is possible to mask the secret ID by name.

The reason was that searching a secret is based on name.
However, searching a secret should be done based on:
- Full ID
- Full Name
- Partial ID (prefix)

This fix addresses the issue by changing related implementation
in `getCliRequestedSecretIDs()`

An integration test has been added to cover the changes.

This fix fixes 28884

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: ff9ff6fdd2
Component: cli
2016-12-02 20:24:29 -08:00
dbb90de813 Merge pull request #28922 from yuexiao-wang/fix-secret
Fix the inconsistency for secret ls and secrect rm
Upstream-commit: ebd8ec6c3f
Component: cli
2016-12-01 11:29:58 +01:00
4919e4031c Fix the use for secret create
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: cd79095c81
Component: cli
2016-12-01 19:48:33 +08:00
85a1bbf9ec Fix the inconsistency for docker secret
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 7a9e414988
Component: cli
2016-11-30 17:23:39 +08:00
9d0522f784 change secret remove logic in cli
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 0227275b7f
Component: cli
2016-11-29 15:12:05 +08:00
0b6a55655e update secret command
Signed-off-by: erxian <evelynhsu21@gmail.com>
Upstream-commit: 0171a79c56
Component: cli
2016-11-23 10:07:09 -05:00
334864b168 Merge pull request #28716 from ehazlett/fix-multi-secret-inspect
Update secret inspect to support IDs
Upstream-commit: d8787ecd81
Component: cli
2016-11-22 17:39:48 -08:00
0adbcb7fcf Do not display the digest or size of swarm secrets
Signed-off-by: cyli <cyli@twistedmatrix.com>
Upstream-commit: 357cabef2d
Component: cli
2016-11-22 18:13:27 -05:00
fa382861cb update secret inspect to support IDs
This updates secret inspect to support inspect by ID in addition to name
as well as inspecting multiple secrets.  This also cleans up the
help text for consistency.

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 46cd1fa87b
Component: cli
2016-11-22 16:01:16 -05:00
7487e32054 refactor help func in CLI
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 55908f8a82
Component: cli
2016-11-17 10:54:10 -08:00
f1ed942575 context.Context should be the first parameter of a function
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
Upstream-commit: 0f6af2074c
Component: cli
2016-11-12 14:14:34 +08:00
90efedd5e2 fix manpages
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 96c16101dd
Component: cli
2016-11-09 17:11:14 -08:00
b1a6be626a use human readable units when listing secrets
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 06666a5a23
Component: cli
2016-11-09 14:27:46 -05:00
46910777dc support labels for secrets upon creation; review updates
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 0bda23ec2b
Component: cli
2016-11-09 14:27:45 -05:00
b5d5eec781 review updates
- use Filters instead of Filter for secret list
- UID, GID -> string
- getSecrets -> getSecretsByName
- updated test case for secrets with better source
- use golang.org/x/context instead of context
- for grpc conversion allocate with make
- check for nil with task.Spec.GetContainer()

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 9074333957
Component: cli
2016-11-09 14:27:45 -05:00
4cba6b316c secrets: enable secret inspect and rm by secret name
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: d22e1a91f6
Component: cli
2016-11-09 14:27:45 -05:00
a0307eb205 secrets: secret management for swarm
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

wip: use tmpfs for swarm secrets

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

wip: inject secrets from swarm secret store

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

secrets: use secret names in cli for service create

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

switch to use mounts instead of volumes

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

vendor: use ehazlett swarmkit

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

secrets: finish secret update

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 1be644fbcf
Component: cli
2016-11-09 14:27:43 -05:00