Add —all option to compose ls, listing non running projects.

Added e2e tests to stop, start, pause, unpause, ls —all, ps —all

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
Guillaume Tardif 2021-02-24 12:06:17 +01:00
parent 844e465a94
commit cba4f140ae
18 changed files with 211 additions and 83 deletions

View file

@ -48,7 +48,7 @@ type Service interface {
// Ps executes the equivalent to a `compose ps`
Ps(ctx context.Context, projectName string, options PsOptions) ([]ContainerSummary, error)
// List executes the equivalent to a `docker stack ls`
List(ctx context.Context) ([]Stack, error)
List(ctx context.Context, options ListOptions) ([]Stack, error)
// Convert translate compose model into backend's native format
Convert(ctx context.Context, project *types.Project, options ConvertOptions) ([]byte, error)
// Kill executes the equivalent to a `compose kill`
@ -165,6 +165,11 @@ func (opts *RunOptions) EnvironmentMap() types.MappingWithEquals {
return environment
}
// ListOptions group options of the ls API
type ListOptions struct {
All bool
}
// PsOptions group options of the Ps API
type PsOptions struct {
All bool