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)
| 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') |
no test coverage detected