From 13c316de692fb21521df5e019c65f9241f7ab52a Mon Sep 17 00:00:00 2001 From: Felipe Ruhland Date: Wed, 7 Apr 2021 22:55:23 +0200 Subject: 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 --- docker/api/swarm.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker/api/swarm.py b/docker/api/swarm.py index 897f08e..420529a 100644 --- a/docker/api/swarm.py +++ b/docker/api/swarm.py @@ -58,10 +58,10 @@ class SwarmApiMixin(object): Example: - >>> spec = client.create_swarm_spec( + >>> spec = client.api.create_swarm_spec( snapshot_interval=5000, log_entries_for_slow_followers=1200 ) - >>> client.init_swarm( + >>> client.api.init_swarm( advertise_addr='eth0', listen_addr='0.0.0.0:5000', force_new_cluster=False, swarm_spec=spec ) @@ -354,8 +354,8 @@ class SwarmApiMixin(object): Example: - >>> key = client.get_unlock_key() - >>> client.unlock_node(key) + >>> key = client.api.get_unlock_key() + >>> client.unlock_swarm(key) """ if isinstance(key, dict): @@ -396,7 +396,7 @@ class SwarmApiMixin(object): 'Role': 'manager', 'Labels': {'foo': 'bar'} } - >>> client.update_node(node_id='24ifsmvkjbyhk', version=8, + >>> client.api.update_node(node_id='24ifsmvkjbyhk', version=8, node_spec=node_spec) """ -- cgit v1.2.1