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

Method install

docker/models/plugins.py:170–192  ·  view source on GitHub ↗

Pull and install a plugin. Args: remote_name (string): Remote reference for the plugin to install. The ``:latest`` tag is optional, and is the default if omitted. local_name (string): Local name for the

(self, remote_name, local_name=None)

Source from the content-addressed store, hash-verified

168 return self.prepare_model(self.client.api.inspect_plugin(name))
169
170 def install(self, remote_name, local_name=None):
171 """
172 Pull and install a plugin.
173
174 Args:
175 remote_name (string): Remote reference for the plugin to
176 install. The ``:latest`` tag is optional, and is the
177 default if omitted.
178 local_name (string): Local name for the pulled plugin.
179 The ``:latest`` tag is optional, and is the default if
180 omitted. Optional.
181
182 Returns:
183 (:py:class:`Plugin`): The installed plugin
184 Raises:
185 :py:class:`docker.errors.APIError`
186 If the server returns an error.
187 """
188 privileges = self.client.api.plugin_privileges(remote_name)
189 it = self.client.api.pull_plugin(remote_name, privileges, local_name)
190 for _data in it:
191 pass
192 return self.get(local_name or remote_name)
193
194 def list(self):
195 """

Callers

nothing calls this directly

Calls 3

getMethod · 0.95
plugin_privilegesMethod · 0.80
pull_pluginMethod · 0.80

Tested by

no test coverage detected