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

Method plugin_privileges

docker/api/plugin.py:155–181  ·  view source on GitHub ↗

Retrieve list of privileges to be granted to a plugin. Args: name (string): Name of the remote plugin to examine. The ``:latest`` tag is optional, and is the default if omitted. Returns: A list of dictionaries

(self, name)

Source from the content-addressed store, hash-verified

153
154 @utils.minimum_version('1.25')
155 def plugin_privileges(self, name):
156 """
157 Retrieve list of privileges to be granted to a plugin.
158
159 Args:
160 name (string): Name of the remote plugin to examine. The
161 ``:latest`` tag is optional, and is the default if omitted.
162
163 Returns:
164 A list of dictionaries representing the plugin's
165 permissions
166
167 """
168 params = {
169 'remote': name,
170 }
171
172 headers = {}
173 registry, repo_name = auth.resolve_repository_name(name)
174 header = auth.get_config_header(self, registry)
175 if header:
176 headers['X-Registry-Auth'] = header
177
178 url = self._url('/plugins/privileges')
179 return self._result(
180 self._get(url, params=params, headers=headers), True
181 )
182
183 @utils.minimum_version('1.25')
184 @utils.check_resource('name')

Callers 6

test_install_pluginMethod · 0.80
test_upgrade_pluginMethod · 0.80
upgradeMethod · 0.80
installMethod · 0.80

Calls 3

_urlMethod · 0.80
_resultMethod · 0.80
_getMethod · 0.80

Tested by 4

test_install_pluginMethod · 0.64
test_upgrade_pluginMethod · 0.64