Get plugin information
556093
def get_plugin_info(self, plugin_name):
        """"""
        if plugin_name:
            for i in self.get_all_plugins:
                if i["plugin_name"] == plugin_name:
                    return i
58400
def get_pluggable_module_information(self, id_or_uri):
        
        uri = self._client.build_uri(id_or_uri) + "/pluggableModuleInformation"
        return self._client.get(uri)
707790
def get_plugins(cls, *args, **kwargs):
        
        return [plugin(*args, **kwargs) for plugin in cls.plugins]
879225
def get_plugin(self, method):
        
        all_plugins = []
        for entry_point in pkg_resources.iter_entry_points('yolk.plugins'):
            plugin_obj = entry_point.load()
            plugin = plugin_obj()
            plugin.configure(self.options, None)
            if plugin.enabled:
                if not hasattr(plugin, method):
                    self.logger.warn("Error: plugin has no method: %s" % method)
                    plugin = None
                else:
                    all_plugins.append(plugin)
        return all_plugins
247448
def list_plugins(directory=None):
    """"""
    repo = require_repo(directory)
    plugins = get_value(repo, 'plugins')
    if not plugins or not isinstance(plugins, dict):
        return None
    return plugins.keys()
1366642
function () {
        var plugins = this.doc.findall('plugin');
        var result = plugins.map(function(plugin){
            return plugin.attrib.name;
        });
        var features = this.doc.findall('feature');
        features.forEach(function(element ){
            var idTag = element.find('./param[@name="id"]');
            if(idTag){
                result.push(idTag.attrib.value);
            }
        });
        return result;
    }
639273
def _GetPluginData(self):
    
    return_dict = {}

    return_dict['Versions'] = [
        ('plaso engine', plaso.__version__),
        ('python', sys.version)]

    hashers_information = hashers_manager.HashersManager.GetHashersInformation()
    parsers_information = parsers_manager.ParsersManager.GetParsersInformation()
    plugins_information = (
        parsers_manager.ParsersManager.GetParserPluginsInformation())
    presets_information = parsers_manager.ParsersManager.GetPresetsInformation()

    return_dict['Hashers'] = hashers_information
    return_dict['Parsers'] = parsers_information
    return_dict['Parser Plugins'] = plugins_information
    return_dict['Parser Presets'] = presets_information

    return return_dict
885748
def get_info(self):
        
        plugin_infos = {}
        for pc in self.plugins:
            plugin_infos.update(pc.get_info())
        return {
            self.get_plugin_name() : {
                "version"     : self.get_version(),
                "sub-plugins" : plugin_infos,
                "params" : {
                    "multi_plugins" : self.conf['multi_plugins']
                },
            }
        }
505024
private function parse_settings( &$plugin_info ) {
            $this->_logger->entrance();

            $id          = $this->get_numeric_option( $plugin_info, 'id', false );
            $public_key  = $this->get_option( $plugin_info, 'public_key', false );
            $secret_key  = $this->get_option( $plugin_info, 'secret_key', null );
            $parent_id   = $this->get_numeric_option( $plugin_info, 'parent_id', null );
            $parent_name = $this->get_option( $plugin_info, 'parent_name', null );

            /**
             * @author Vova Feldman (@svovaf)
             * @since  1.1.9 Try to pull secret key from external config.
             */
            if ( is_null( $secret_key ) && defined( "WP_FS__{$this->_slug}_SECRET_KEY" ) ) {
                $secret_key = constant( "WP_FS__{$this->_slug}_SECRET_KEY" );
            }

            if ( isset( $plugin_info['parent'] ) ) {
                $parent_id = $this->get_numeric_option( $plugin_info['parent'], 'id', null );
//				$parent_slug       = $this->get_option( $plugin_info['parent'], 'slug', null );
//				$parent_public_key = $this->get_option( $plugin_info['parent'], 'public_key', null );
//				$parent_name = $this->get_option( $plugin_info['parent'], 'name', null );
            }

            if ( false === $id ) {
                throw new Freemius_Exception( array(
                    'error' => array(
                        'type'    => 'ParameterNotSet',
                        'message' => 'Plugin id parameter is not set.',
                        'code'    => 'plugin_id_not_set',
                        'http'    => 500,
                    )
                ) );
            }
            if ( false === $public_key ) {
                throw new Freemius_Exception( array(
                    'error' => array(
                        'type'    => 'ParameterNotSet',
                        'message' => 'Plugin public_key parameter is not set.',
                        'code'    => 'plugin_public_key_not_set',
                        'http'    => 500,
                    )
                ) );
            }

            $plugin = ( $this->_plugin instanceof FS_Plugin ) ?
                $this->_plugin :
                new FS_Plugin();

            $premium_suffix = $this->get_option( $plugin_info, 'premium_suffix', '(Premium)' );

            $plugin->update( array(
                'id'                   => $id,
                'type'                 => $this->get_option( $plugin_info, 'type', $this->_module_type ),
                'public_key'           => $public_key,
                'slug'                 => $this->_slug,
                'premium_slug'         => $this->get_option( $plugin_info, 'premium_slug', "{$this->_slug}-premium" ),
                'parent_plugin_id'     => $parent_id,
                'version'              => $this->get_plugin_version(),
                'title'                => $this->get_plugin_name( $premium_suffix ),
                'file'                 => $this->_plugin_basename,
                'is_premium'           => $this->get_bool_option( $plugin_info, 'is_premium', true ),
                'premium_suffix'       => $premium_suffix,
                'is_live'              => $this->get_bool_option( $plugin_info, 'is_live', true ),
                'affiliate_moderation' => $this->get_option( $plugin_info, 'has_affiliation' ),
            ) );

            if ( $plugin->is_updated() ) {
                // Update plugin details.
                $this->_plugin = FS_Plugin_Manager::instance( $this->_module_id )->store( $plugin );
            }
            // Set the secret key after storing the plugin, we don't want to store the key in the storage.
            $this->_plugin->secret_key = $secret_key;

            if ( ! isset( $plugin_info['menu'] ) ) {
                $plugin_info['menu'] = array();

                if ( ! empty( $this->_storage->sdk_last_version ) &&
                     version_compare( $this->_storage->sdk_last_version, '1.1.2', '<=' )
                ) {
                    // Backward compatibility to 1.1.2
                    $plugin_info['menu']['slug'] = isset( $plugin_info['menu_slug'] ) ?
                        $plugin_info['menu_slug'] :
                        $this->_slug;
                }
            }

            $this->_menu = FS_Admin_Menu_Manager::instance(
                $this->_module_id,
                $this->_module_type,
                $this->get_unique_affix()
            );

            $this->_menu->init( $plugin_info['menu'], $this->is_addon() );

            $this->_has_addons          = $this->get_bool_option( $plugin_info, 'has_addons', false );
            $this->_has_paid_plans      = $this->get_bool_option( $plugin_info, 'has_paid_plans', true );
            $this->_has_premium_version = $this->get_bool_option( $plugin_info, 'has_premium_version', $this->_has_paid_plans );
            $this->_ignore_pending_mode = $this->get_bool_option( $plugin_info, 'ignore_pending_mode', false );
            $this->_is_org_compliant    = $this->get_bool_option( $plugin_info, 'is_org_compliant', true );
            $this->_is_premium_only     = $this->get_bool_option( $plugin_info, 'is_premium_only', false );
            if ( $this->_is_premium_only ) {
                // If premium only plugin, disable anonymous mode.
                $this->_enable_anonymous = false;
                $this->_anonymous_mode   = false;
            } else {
                $this->_enable_anonymous = $this->get_bool_option( $plugin_info, 'enable_anonymous', true );
                $this->_anonymous_mode   = $this->get_bool_option( $plugin_info, 'anonymous_mode', false );
            }
            $this->_permissions = $this->get_option( $plugin_info, 'permissions', array() );

            if ( ! empty( $plugin_info['trial'] ) ) {
                $this->_trial_days = $this->get_numeric_option(
                    $plugin_info['trial'],
                    'days',
                    // Default to 0 - trial without days specification.
                    0
                );

                $this->_is_trial_require_payment = $this->get_bool_option( $plugin_info['trial'], 'is_require_payment', false );
            }
        }
610876
def plugins(self):
        
        url = self._url('/plugins')
        return self._result(self._get(url), True)
426057
def plugin_info(self):
        
        if self._plugin_info_manager is None:
            self._plugin_info_manager = PluginInfoManager(session=self._session)
        return self._plugin_info_manager
622877
public function get_plugin_info( $field = null ) {
		$info = get_plugin_data( $this->plugin_file );
		if ( null !== $field && isset( $info[ $field ] ) ) {
			return $info[ $field ];
		}

		return $info;
	}
1139645
def plugin_info_by_id(plugin_id, opts={})
      found = all_plugins.find {|pe|
        pe.respond_to?(:plugin_id) && pe.plugin_id.to_s == plugin_id
      }
      if found
        get_monitor_info(found, opts)
      else
        nil
      end
    end
614437
public function getPluginsInformation()
    {
        if (count($this->pluginsData) == 0) {
            $url = $this->_constructUrl(self::PLUGINS_SERVLET, ['wt' => 'json']);
            $pluginsInformation = $this->_sendRawGet($url);

            // access a random property to trigger response parsing
            $pluginsInformation->responseHeader;
            $this->pluginsData = $pluginsInformation;
        }

        return $this->pluginsData;
    }
658228
def get_summary_string(self):
        """"""
        rows = [["PLUGIN TYPE", "NAME", "DESCRIPTION", "STATUS"],
                ["-----------", "----", "-----------", "------"]]
        for plugin_type in sorted(self.get_plugin_types()):
            type_name = plugin_type.replace('_', ' ')
            for name in sorted(self.get_plugins(plugin_type)):
                module = self.get_plugin_module(plugin_type, name)
                desc = (getattr(module, "__doc__", None) or '').strip()
                rows.append((type_name, name, desc, "loaded"))
            for (name, reason) in sorted(self.get_failed_plugins(plugin_type)):
                msg = "FAILED: %s" % reason
                rows.append((type_name, name, '', msg))
        return '\n'.join(columnise(rows))
854702
def plugin(cls, name):
        
        cls.loadPlugins()
        plugs = getattr(cls, '_%s__plugins' % cls.__name__, {})
        return plugs.get(nstr(name))
368843
def data(self):
        
        d = {}
        for key in self._data:
            if key == "plugins":
                d[key] = self.plugins.data()
            else:
                try:
                    d[key] = getattr(self, key)
                except AttributeError:
                    pass  # unknown key, just leave it unchanged
        return d