MCPcopy Create free account
hub / github.com/docker/docker-py / configure_plugin

Method configure_plugin

docker/api/plugin.py:7–25  ·  view source on GitHub ↗

Configure a plugin. Args: name (string): The name of the plugin. The ``:latest`` tag is optional, and is the default if omitted. options (dict): A key-value mapping of options Returns: ``True``

(self, name, options)

Source from the content-addressed store, hash-verified

5 @utils.minimum_version('1.25')
6 @utils.check_resource('name')
7 def configure_plugin(self, name, options):
8 """
9 Configure a plugin.
10
11 Args:
12 name (string): The name of the plugin. The ``:latest`` tag is
13 optional, and is the default if omitted.
14 options (dict): A key-value mapping of options
15
16 Returns:
17 ``True`` if successful
18 """
19 url = self._url('/plugins/{0}/set', name)
20 data = options
21 if isinstance(data, dict):
22 data = [f'{k}={v}' for k, v in data.items()]
23 res = self._post_json(url, data=data)
24 self._raise_for_status(res)
25 return True
26
27 @utils.minimum_version('1.25')
28 def create_plugin(self, name, plugin_data_dir, gzip=False):

Callers 2

test_configure_pluginMethod · 0.80
configureMethod · 0.80

Calls 3

_urlMethod · 0.80
_post_jsonMethod · 0.80
_raise_for_statusMethod · 0.80

Tested by 1

test_configure_pluginMethod · 0.64