Skip to content

Commit

Permalink
Fix #323: Support additional parameters in swarm init
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Simbola committed Jul 23, 2021
1 parent 2edd03d commit e1efea8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions aiodocker/swarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ async def init(
self,
*,
advertise_addr: str = None,
data_path_port: int = None,
default_addr_pool: list = None,
listen_addr: str = "0.0.0.0:2377",
force_new_cluster: bool = False,
subnet_size: int = 24,
swarm_spec: Mapping = None,
) -> str:
"""
Expand All @@ -21,6 +24,9 @@ async def init(
Args:
ListenAddr: listen address used for inter-manager communication
AdvertiseAddr: address advertised to other nodes.
DataPathPort: address or interface to use for data path traffic
DefaultAddrPool: default subnet pools for global scope networks
SubnetSize: subnet size of the networks created from the default subnet pool
ForceNewCluster: Force creation of a new swarm.
SwarmSpec: User modifiable swarm configuration.
Expand All @@ -30,8 +36,11 @@ async def init(

data = {
"AdvertiseAddr": advertise_addr,
"DataPathPort": data_path_port,
"DefaultAddrPool": default_addr_pool,
"ListenAddr": listen_addr,
"ForceNewCluster": force_new_cluster,
"SubnetSize": subnet_size,
"Spec": swarm_spec,
}

Expand Down

0 comments on commit e1efea8

Please sign in to comment.