MCPcopy Index your code
hub / github.com/docker/docker-py / remove

Method remove

docker/models/nodes.py:44–61  ·  view source on GitHub ↗

Remove this node from the swarm. Args: force (bool): Force remove an active node. Default: `False` Returns: `True` if the request was successful. Raises: :py:class:`docker.errors.NotFound` If the node doesn't exi

(self, force=False)

Source from the content-addressed store, hash-verified

42 return self.client.api.update_node(self.id, self.version, node_spec)
43
44 def remove(self, force=False):
45 """
46 Remove this node from the swarm.
47
48 Args:
49 force (bool): Force remove an active node. Default: `False`
50
51 Returns:
52 `True` if the request was successful.
53
54 Raises:
55 :py:class:`docker.errors.NotFound`
56 If the node doesn't exist in the swarm.
57
58 :py:class:`docker.errors.APIError`
59 If the server returns an error.
60 """
61 return self.client.api.remove_node(self.id, force=force)
62
63
64class NodeCollection(Collection):

Callers 12

test_listMethod · 0.45
test_list_sparseMethod · 0.45
test_removeMethod · 0.45
test_tag_and_removeMethod · 0.45
test_list_removeMethod · 0.45
test_list_removeMethod · 0.45
test_list_removeMethod · 0.45
test_removeMethod · 0.45
test_removeMethod · 0.45
test_removeMethod · 0.45
test_removeMethod · 0.45

Calls 1

remove_nodeMethod · 0.80

Tested by 12

test_listMethod · 0.36
test_list_sparseMethod · 0.36
test_removeMethod · 0.36
test_tag_and_removeMethod · 0.36
test_list_removeMethod · 0.36
test_list_removeMethod · 0.36
test_list_removeMethod · 0.36
test_removeMethod · 0.36
test_removeMethod · 0.36
test_removeMethod · 0.36
test_removeMethod · 0.36