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)
| 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 | |
| 64 | class NodeCollection(Collection): |