docker / cli

The Docker CLI
Apache License 2.0
4.75k stars 1.88k forks source link

cli/command/network: some cleanup and pass smaller interfaces #5225

Closed thaJeztah closed 6 days ago

thaJeztah commented 1 week ago

cli/command/network: some cleanup and pass smaller interfaces

Pass the appropriate API-client where possible instead of all of DockerCLI, and some cleaning up.

cli/command/network: rewrite consolidateIpam to take an option-struct

Introduce a (non-exported) ipamOptions that collects all options for creating a network.IPAM, so that this utility is more atomic (potentially even could be moved to a separate package and exported).

- A picture of a cute animal (not mandatory but encouraged)

codecov-commenter commented 1 week ago

Codecov Report

Attention: Patch coverage is 82.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 61.47%. Comparing base (3837aa6) to head (10a015f).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #5225 +/- ## ========================================== + Coverage 61.01% 61.47% +0.45% ========================================== Files 295 298 +3 Lines 20799 20806 +7 ========================================== + Hits 12691 12790 +99 + Misses 7193 7104 -89 + Partials 915 912 -3 ```