Disable an installed plugin.

            Args:
                name (string): The name of the plugin. The ``:latest`` tag is
                    optional, and is the default if omitted.

            Returns:
                ``True`` if successful
165630
def disable_plugin(self, name):
        
        url = self._url('/plugins/{0}/disable', name)
        res = self._post(url)
        self._raise_for_status(res)
        return True
650933
def push_plugin(self, name):
        
        url = self._url('/plugins/{0}/pull', name)

        headers = {}
        registry, repo_name = auth.resolve_repository_name(name)
        header = auth.get_config_header(self, registry)
        if header:
            headers['X-Registry-Auth'] = header
        res = self._post(url, headers=headers)
        self._raise_for_status(res)
        return self._stream_helper(res, decode=True)
1237022
protected function unregisterPlugin($name)
    {
        $plugins = $this->loadPlugins();

        if (!isset($plugins[$name])) {
            return null;
        }

        $plugin = $plugins[$name];
        unset($plugins[$name]);
        $this->savePlugins($plugins);
        return $plugin;
    }
867385
def yank_version(name, version, options = {})
      ensure_ready!(:authorization)
      url = "gems/#{escape(name)}/versions/#{escape(version)}"
      response = connection.delete(url, options)
      checked_response_body(response)
    end
292649
def unregister(self, name, func):
        
        try:
            templatehook = self._registry[name]
        except KeyError:
            return

        templatehook.unregister(func)
1120147
def remove_plugin(self, f):
        
        if f.endswith('.py'):
            plugin_name = os.path.splitext(os.path.basename(f))[0]
            print '- %s %sREMOVED' % (plugin_name, color.Red)
            print '\t%sNote: still in memory, restart Workbench to remove...%s' % \
                  (color.Yellow, color.Normal)
1140518
def is_plugin_installed(name):
    
    for directory in plugin_paths:
        if isdir(join(directory, name)):
            return True
    return False
578748
function (name, type) {
                logger.debug("Attempting to remove plugin: " + name);
                var index, plug, plugs = this.config.plugins;
                for (index = 0; index < plugs.length; index += 1) {
                    plug = plugs[index];
                    if (plug.name === name && plug.type === type) {
                        plugs.splice(index, 1);
                        logger.debug("Plugin: " + name + " has been removed");
                        break;
                    }
                }
            }
582213
def enabled(name, runas=None):
    '''
    
    '''

    ret = {'name': name, 'result': True, 'comment': '', 'changes': {}}

    try:
        plugin_enabled = __salt__['rabbitmq.plugin_is_enabled'](name, runas=runas)
    except CommandExecutionError as err:
        ret['result'] = False
        ret['comment'] = 'Error: {0}'.format(err)
        return ret

    if plugin_enabled:
        ret['comment'] = 'Plugin \'{0}\' is already enabled.'.format(name)
        return ret

    if not __opts__['test']:
        try:
            __salt__['rabbitmq.enable_plugin'](name, runas=runas)
        except CommandExecutionError as err:
            ret['result'] = False
            ret['comment'] = 'Error: {0}'.format(err)
            return ret
    ret['changes'].update({'old': '', 'new': name})

    if __opts__['test'] and ret['changes']:
        ret['result'] = None
        ret['comment'] = 'Plugin \'{0}\' is set to be enabled.'.format(name)
        return ret

    ret['comment'] = 'Plugin \'{0}\' was enabled.'.format(name)
    return ret
754632
def deregister(cls, name: str) -> None:
        
        if name not in cls.available:
            raise ConnectionPluginNotRegistered(
                f"Connection {name!r} is not registered"
            )
        cls.available.pop(name)
1247510
def delete(self, name):
        
        if name in self._cache:
            del self._cache[name]
            self.writeCache()
            # TODO clean files
            return True
        return False
496400
def get_plugin(self, name):
        
        for plugin in self.plugins:
            if plugin.name == name:
                return plugin

        raise PluginDoesNotExistError("Plugin '{}' not found".format(name))
409532
function ignorePlugins(plugins, currentPlugin) {
  return plugins.reduce(function (acc, plugin) {
    if (currentPlugin && currentPlugin.indexOf(plugin) > -1) {
      return true;
    }

    return acc;
  }, false);
}
320676
def clear_header(self, name: str) -> None:
        
        if name in self._headers:
            del self._headers[name]
1317450
def plugin_is_enabled(name, runas=None):
    '''
    
    '''
    if runas is None and not salt.utils.platform.is_windows():
        runas = salt.utils.user.get_user()
    return name in list_enabled_plugins(runas)
1039796
def unload_plug_in(self, name):
        
        if not isinstance(name, basestring):
            raise TypeError("name can only be an instance of type basestring")
        self._call("unloadPlugIn",
                     in_p=[name])
466073
def is_enable(self, plugin_name=None):
        """"""
        if not plugin_name:
            plugin_name = self.plugin_name
        try:
            d = getattr(self.args, 'disable_' + plugin_name)
        except AttributeError:
            return True
        else:
            return d is False