aiodocker icon indicating copy to clipboard operation
aiodocker copied to clipboard

Support additional parameters in swarm init

Open SoerenBusse opened this issue 5 years ago • 1 comments

Long story short

Currently there is no way to set some additional parameters when creating a swarm. For example "DefaultAddrPool" is missing as it exists in the documentation: https://docs.docker.com/engine/api/v1.40/#operation/SwarmInit

The code only allows some predefined parameters: https://github.com/aio-libs/aiodocker/blob/335acade67eea409bc09a51309123134f3a3c57a/aiodocker/swarm.py#L31-L36

Maybe it would be possible to allow kwargs to specify custom parameters?

SoerenBusse avatar Sep 16 '19 11:09 SoerenBusse

Sorry, **kwargs is a bad option for many reasons, the lack of typing info is on the list. Please enumerate all missing args explicitly as we do already for a few, e.g. advertise_addr.

The test is welcome!

asvetlov avatar Sep 17 '19 09:09 asvetlov