Skip to content

Commit 13c316d

Browse files
committed
Fix swarm low-level documentation examples
I realize that low-level documentation has outdated examples, so I created issue #2800 to fix that Signed-off-by: Felipe Ruhland <[email protected]>
1 parent 96c1272 commit 13c316d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docker/api/swarm.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ def create_swarm_spec(self, *args, **kwargs):
5858
5959
Example:
6060
61-
>>> spec = client.create_swarm_spec(
61+
>>> spec = client.api.create_swarm_spec(
6262
snapshot_interval=5000, log_entries_for_slow_followers=1200
6363
)
64-
>>> client.init_swarm(
64+
>>> client.api.init_swarm(
6565
advertise_addr='eth0', listen_addr='0.0.0.0:5000',
6666
force_new_cluster=False, swarm_spec=spec
6767
)
@@ -354,8 +354,8 @@ def unlock_swarm(self, key):
354354
355355
Example:
356356
357-
>>> key = client.get_unlock_key()
358-
>>> client.unlock_node(key)
357+
>>> key = client.api.get_unlock_key()
358+
>>> client.unlock_swarm(key)
359359
360360
"""
361361
if isinstance(key, dict):
@@ -396,7 +396,7 @@ def update_node(self, node_id, version, node_spec=None):
396396
'Role': 'manager',
397397
'Labels': {'foo': 'bar'}
398398
}
399-
>>> client.update_node(node_id='24ifsmvkjbyhk', version=8,
399+
>>> client.api.update_node(node_id='24ifsmvkjbyhk', version=8,
400400
node_spec=node_spec)
401401
402402
"""

0 commit comments

Comments
 (0)