MCPcopy
hub / github.com/docker/docker-py / update

Method update

docker/models/nodes.py:17–42  ·  view source on GitHub ↗

Update the node's configuration. Args: node_spec (dict): Configuration settings to update. Any values not provided will be removed. Default: ``None`` Returns: `True` if the request went through. Raises: :py:class

(self, node_spec)

Source from the content-addressed store, hash-verified

15 return self.attrs.get('Version').get('Index')
16
17 def update(self, node_spec):
18 """
19 Update the node's configuration.
20
21 Args:
22 node_spec (dict): Configuration settings to update. Any values
23 not provided will be removed. Default: ``None``
24
25 Returns:
26 `True` if the request went through.
27
28 Raises:
29 :py:class:`docker.errors.APIError`
30 If the server returns an error.
31
32 Example:
33
34 >>> node_spec = {'Availability': 'active',
35 'Name': 'node-name',
36 'Role': 'manager',
37 'Labels': {'foo': 'bar'}
38 }
39 >>> node.update(node_spec)
40
41 """
42 return self.client.api.update_node(self.id, self.version, node_spec)
43
44 def remove(self, force=False):
45 """

Calls 1

update_nodeMethod · 0.80