Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dockerapi: Migrated ContainerList to Docker SDK #1482

Merged
merged 1 commit into from
Jul 27, 2018
Merged

dockerapi: Migrated ContainerList to Docker SDK #1482

merged 1 commit into from
Jul 27, 2018

Conversation

voorka
Copy link
Contributor

@voorka voorka commented Jul 27, 2018

Summary

Migration for ContainerList to the Docker SDK

Implementation details

Changes were implemented by swapping API calls to new SDK Client. All changes could be done under the DockerClient interface making this migration fairly straightforward.

'All' field is set to true to perform same functionality as under the go-dockerclient function for listing containers.

Testing

  • Builds on Linux (make release)
  • Builds on Windows (go build -out amazon-ecs-agent.exe ./agent)
  • Unit tests on Linux (make test) pass
  • Unit tests on Windows (go test -timeout=25s ./agent/...) pass
  • Integration tests on Linux (make run-integ-tests) pass
  • Integration tests on Windows (.\scripts\run-integ-tests.ps1) pass
  • Functional tests on Linux (make run-functional-tests) pass
  • Functional tests on Windows (.\scripts\run-functional-tests.ps1) pass

New tests cover the changes: yes

Description for the changelog

Enhancement - ContainerList migrated to Docker SDK

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@voorka voorka requested review from a team and removed request for a team July 27, 2018 20:51
All: all,
Context: ctx,
containers, err := client.ContainerList(ctx, types.ContainerListOptions{
All: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not All: all,?

@@ -43,6 +43,7 @@ import (
"github.com/cihub/seelog"
"github.com/docker/docker/api/types/volume"
docker "github.com/fsouza/go-dockerclient"
"github.com/docker/docker/api/types"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "github.com/docker/docker/api/types" should be grouped together with "github.com/docker/docker/api/types/volume"

@voorka voorka merged commit 631a482 into aws:moby Jul 27, 2018
@voorka voorka deleted the containerList branch July 28, 2018 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants