Disable an installed plugin. Args: name (string): The name of the plugin. The ``:latest`` tag is optional, and is the default if omitted. force (bool): To enable the force query parameter. Returns:
(self, name, force=False)
| 52 | |
| 53 | @utils.minimum_version('1.25') |
| 54 | def disable_plugin(self, name, force=False): |
| 55 | """ |
| 56 | Disable an installed plugin. |
| 57 | |
| 58 | Args: |
| 59 | name (string): The name of the plugin. The ``:latest`` tag is |
| 60 | optional, and is the default if omitted. |
| 61 | force (bool): To enable the force query parameter. |
| 62 | |
| 63 | Returns: |
| 64 | ``True`` if successful |
| 65 | """ |
| 66 | url = self._url('/plugins/{0}/disable', name) |
| 67 | res = self._post(url, params={'force': force}) |
| 68 | self._raise_for_status(res) |
| 69 | return True |
| 70 | |
| 71 | @utils.minimum_version('1.25') |
| 72 | def enable_plugin(self, name, timeout=0): |