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

Method push_plugin

docker/api/plugin.py:185–205  ·  view source on GitHub ↗

Push a plugin to the registry. Args: name (string): Name of the plugin to upload. The ``:latest`` tag is optional, and is the default if omitted. Returns: ``True`` if successful

(self, name)

Source from the content-addressed store, hash-verified

183 @utils.minimum_version('1.25')
184 @utils.check_resource('name')
185 def push_plugin(self, name):
186 """
187 Push a plugin to the registry.
188
189 Args:
190 name (string): Name of the plugin to upload. The ``:latest``
191 tag is optional, and is the default if omitted.
192
193 Returns:
194 ``True`` if successful
195 """
196 url = self._url('/plugins/{0}/pull', name)
197
198 headers = {}
199 registry, repo_name = auth.resolve_repository_name(name)
200 header = auth.get_config_header(self, registry)
201 if header:
202 headers['X-Registry-Auth'] = header
203 res = self._post(url, headers=headers)
204 self._raise_for_status(res)
205 return self._stream_helper(res, decode=True)
206
207 @utils.minimum_version('1.25')
208 @utils.check_resource('name')

Callers 1

pushMethod · 0.80

Calls 4

_urlMethod · 0.80
_postMethod · 0.80
_raise_for_statusMethod · 0.80
_stream_helperMethod · 0.80

Tested by

no test coverage detected