aiodocker
aiodocker copied to clipboard
Support additional parameters in swarm init
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?
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!