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

Method enable_plugin

docker/api/plugin.py:72–88  ·  view source on GitHub ↗

Enable an installed plugin. Args: name (string): The name of the plugin. The ``:latest`` tag is optional, and is the default if omitted. timeout (int): Operation timeout (in seconds). Default: 0 Returns:

(self, name, timeout=0)

Source from the content-addressed store, hash-verified

70
71 @utils.minimum_version('1.25')
72 def enable_plugin(self, name, timeout=0):
73 """
74 Enable an installed plugin.
75
76 Args:
77 name (string): The name of the plugin. The ``:latest`` tag is
78 optional, and is the default if omitted.
79 timeout (int): Operation timeout (in seconds). Default: 0
80
81 Returns:
82 ``True`` if successful
83 """
84 url = self._url('/plugins/{0}/enable', name)
85 params = {'timeout': timeout}
86 res = self._post(url, params=params)
87 self._raise_for_status(res)
88 return True
89
90 @utils.minimum_version('1.25')
91 def inspect_plugin(self, name):

Callers 6

test_enable_pluginMethod · 0.80
test_disable_pluginMethod · 0.80
test_install_pluginMethod · 0.80
test_upgrade_pluginMethod · 0.80
enableMethod · 0.80

Calls 3

_urlMethod · 0.80
_postMethod · 0.80
_raise_for_statusMethod · 0.80

Tested by 5

test_enable_pluginMethod · 0.64
test_disable_pluginMethod · 0.64
test_install_pluginMethod · 0.64
test_upgrade_pluginMethod · 0.64