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

Method ensure_plugin_installed

tests/integration/api_plugin_test.py:38–45  ·  view source on GitHub ↗
(self, plugin_name)

Source from the content-addressed store, hash-verified

36 client.close()
37
38 def ensure_plugin_installed(self, plugin_name):
39 try:
40 return self.client.inspect_plugin(plugin_name)
41 except docker.errors.NotFound:
42 prv = self.client.plugin_privileges(plugin_name)
43 for _d in self.client.pull_plugin(plugin_name, prv):
44 pass
45 return self.client.inspect_plugin(plugin_name)
46
47 def test_enable_plugin(self):
48 pl_data = self.ensure_plugin_installed(SSHFS)

Callers 8

test_enable_pluginMethod · 0.95
test_disable_pluginMethod · 0.95
test_inspect_pluginMethod · 0.95
test_list_pluginsMethod · 0.95
test_configure_pluginMethod · 0.95
test_remove_pluginMethod · 0.95
test_upgrade_pluginMethod · 0.95

Calls 3

inspect_pluginMethod · 0.80
plugin_privilegesMethod · 0.80
pull_pluginMethod · 0.80

Tested by

no test coverage detected