Module ImportFrom alias ImportFrom alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str ListLoad Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Dict Str NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Return Call AttributeLoad Call AttributeLoad Call AttributeLoad Call NameLoad attr AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad attr decorator_list NameLoad decorator_list ClassDef bases NameLoad body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr keyword NameLoad NameLoad For TupleStore NameStore NameStore NameLoad body Assign NameStore Call NameLoad NameLoad keyword Lambda arguments args NameParam defaults Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad NameLoad attr For NameStore Call AttributeLoad NameLoad attr body For NameStore AttributeLoad NameLoad attr body If BoolOpAnd CompareEq NameLoad Call AttributeLoad NameLoad attr Str CompareEq NameLoad Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad keyword Lambda arguments args NameParam defaults AttributeLoad NameLoad attr decorator_list NameLoad decorator_list ClassDef bases NameLoad body Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr NameLoad NameLoad Call AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str For NameStore Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr NameLoad NameLoad Call AttributeLoad Call NameLoad attr AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad For NameStore Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Dict Str Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Dict If CompareIsNot NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad If CompareIsNot NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad Call NameLoad attr AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad attr NameLoad keyword Str Expr Call AttributeLoad Call NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad Call AttributeLoad Call AttributeLoad Call AttributeLoad Call NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad Call AttributeLoad Call AttributeLoad Call AttributeLoad Call NameLoad attr AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad Call AttributeLoad Call AttributeLoad Call AttributeLoad Call NameLoad attr AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad Call AttributeLoad Call AttributeLoad Call AttributeLoad Call AttributeLoad Call NameLoad attr AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call AttributeLoad Call AttributeLoad Call NameLoad attr AttributeLoad NameLoad attr attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Return Call AttributeLoad Call AttributeLoad Call NameLoad attr Call AttributeLoad NameLoad attr attr decorator_list NameLoad decorator_list
N/A distutils.version LooseVersion itertools groupby N/A operator N/A six nailgun.db db nailgun.db.sqlalchemy models nailgun.objects DeploymentGraph nailgun.objects NailgunCollection nailgun.objects NailgunObject nailgun.objects.serializers.plugin PluginSerializer nailgun.plugins.adapters wrap_plugin Plugin N/A NailgunObject N/A N/A model N/A models Plugin N/A serializer PluginSerializer create N/A N/A cls data N/A N/A N/A deployment_tasks N/A N/A data pop deployment_tasks N/A N/A new_plugin N/A N/A N/A super Plugin cls create data N/A N/A N/A DeploymentGraph create_for_model N/A tasks deployment_tasks new_plugin N/A plugin_adapter N/A wrap_plugin new_plugin N/A N/A N/A cls update new_plugin N/A N/A plugin_adapter get_metadata N/A N/A N/A ClusterPlugins add_compatible_clusters new_plugin N/A new_plugin N/A classmethod get_by_name_version N/A N/A cls name version N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A db query N/A cls model filter_by name name version version first N/A classmethod N/A PluginCollection N/A NailgunCollection N/A N/A single Plugin all_newest N/A N/A cls N/A N/A N/A Returns plugins in most recent versions

        Example:
        There are 4 plugins:
        - name: plugin_name, version: 1.0.0
        - name: plugin_name, version: 2.0.0
        - name: plugin_name, version: 0.1.0
        - name: plugin_another_name, version: 1.0.0
        In this case the method returns 2 plugins:
        - name: plugin_name, version: 2.0.0
        - name: plugin_another_name, version: 1.0.0

        :returns: list of Plugin models
         N/A newest_plugins N/A N/A get_name N/A N/A operator attrgetter name N/A grouped_by_name N/A groupby N/A sorted N/A N/A cls all key get_name get_name N/A N/A name plugins grouped_by_name N/A N/A newest_plugin N/A max plugins key N/A N/A N/A p N/A N/A LooseVersion N/A p version N/A N/A N/A newest_plugins append newest_plugin N/A newest_plugins N/A classmethod get_by_uids N/A N/A cls plugin_ids N/A N/A N/A Returns plugins by given IDs.

        :param plugin_ids: list of plugin IDs
        :type plugin_ids: list
        :returns: iterable (SQLAlchemy query)
         N/A N/A N/A cls filter_by_id_list N/A N/A cls all plugin_ids N/A classmethod get_by_release N/A N/A cls release N/A N/A N/A Returns plugins by given release

        :param release: Release instance
        :type release: Release DB model
        :returns: list -- list of sorted plugins
         N/A release_plugins N/A set N/A release_os N/A N/A N/A release operating_system lower N/A release_version N/A release version N/A plugin N/A N/A PluginCollection all N/A N/A plugin_release N/A plugin releases N/A N/A N/A N/A release_os N/A N/A plugin_release get os N/A release_version N/A N/A plugin_release get version N/A N/A N/A N/A release_plugins add plugin N/A N/A sorted release_plugins key N/A N/A N/A plugin N/A N/A plugin name N/A classmethod N/A ClusterPlugins N/A NailgunObject N/A N/A model N/A models ClusterPlugins is_compatible N/A N/A cls cluster plugin N/A N/A N/A Validates if plugin is compatible with cluster.

        :param cluster: A cluster instance
        :type cluster: nailgun.db.sqlalchemy.models.cluster.Cluster
        :param plugin: A plugin instance
        :type plugin: nailgun.db.sqlalchemy.models.plugins.Plugin
        :return: True if compatible, False if not
        :rtype: bool
         N/A plugin_adapter N/A wrap_plugin plugin N/A N/A N/A plugin_adapter validate_compatibility cluster N/A classmethod get_compatible_plugins N/A N/A cls cluster N/A N/A N/A Returns a list of plugins that are compatible with a given cluster.

        :param cluster: A cluster instance
        :type cluster: nailgun.db.sqlalchemy.models.cluster.Cluster
        :return: A list of plugin instances
        :rtype: list
         N/A N/A list N/A N/A N/A six moves filter N/A N/A N/A p N/A N/A N/A cls is_compatible cluster p N/A N/A PluginCollection all N/A classmethod add_compatible_plugins N/A N/A cls cluster N/A N/A N/A Populates 'cluster_plugins' table with compatible plugins.

        :param cluster: A cluster instance
        :type cluster: nailgun.db.sqlalchemy.models.cluster.Cluster
         N/A plugin N/A N/A cls get_compatible_plugins cluster N/A N/A plugin_attributes N/A dict N/A plugin attributes_metadata N/A N/A N/A plugin_attributes pop metadata None N/A N/A N/A cls create N/A cluster_id plugin_id enabled attributes N/A cluster id N/A plugin id False plugin_attributes N/A classmethod get_compatible_clusters N/A N/A cls plugin N/A N/A N/A Returns a list of clusters that are compatible with a given plugin.

        :param plugin: A plugin instance
        :type plugin: nailgun.db.sqlalchemy.models.plugins.Plugin
        :return: A list of cluster instances
        :rtype: list
         N/A N/A list N/A N/A N/A six moves filter N/A N/A N/A c N/A N/A N/A cls is_compatible c plugin N/A N/A N/A db query N/A models Cluster N/A classmethod add_compatible_clusters N/A N/A cls plugin N/A N/A N/A Populates 'cluster_plugins' table with compatible cluster.

        :param plugin: A plugin instance
        :type plugin: nailgun.db.sqlalchemy.models.plugins.Plugin
         N/A plugin_attributes N/A dict N/A plugin attributes_metadata N/A N/A N/A plugin_attributes pop metadata None N/A cluster N/A N/A cls get_compatible_clusters plugin N/A N/A N/A N/A cls create N/A cluster_id plugin_id enabled attributes N/A cluster id N/A plugin id False plugin_attributes N/A classmethod set_attributes N/A N/A cls cluster_id plugin_id enabled attrs N/A None None N/A N/A Sets plugin's attributes in cluster_plugins table.

        :param cluster_id: Cluster ID
        :type cluster_id: int
        :param plugin_id: Plugin ID
        :type plugin_id: int
        :param enabled: Enabled or disabled plugin for given cluster
        :type enabled: bool
        :param attrs: Plugin metadata
        :type attrs: dict
         N/A params N/A N/A N/A enabled None N/A N/A N/A params N/A enabled enabled N/A N/A attrs None N/A N/A N/A params N/A attributes attrs N/A N/A N/A N/A N/A N/A N/A N/A db query N/A cls model filter_by plugin_id plugin_id cluster_id cluster_id update params synchronize_session fetch N/A N/A N/A N/A db flush N/A classmethod get_connected_plugins_data N/A N/A cls cluster_id N/A N/A N/A Returns plugins and cluster_plugins data connected with cluster.

        :param cluster_id: Cluster ID
        :type cluster_id: int
        :returns: List of mixed data from plugins and cluster_plugins
        :rtype: iterable (SQLAlchemy query)
         N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A db query N/A N/A models Plugin id N/A N/A models Plugin name N/A N/A models Plugin title N/A N/A models Plugin version N/A N/A models Plugin is_hotpluggable N/A N/A models Plugin attributes_metadata N/A N/A cls model enabled N/A N/A cls model attributes join N/A cls model filter N/A N/A N/A cls model cluster_id cluster_id order_by N/A N/A models Plugin name N/A N/A models Plugin version N/A classmethod get_connected_plugins N/A N/A cls cluster plugin_ids N/A None N/A N/A Returns plugins connected with given cluster.

        :param cluster: Cluster instance
        :type cluster: Cluster SQLAlchemy model
        :param plugin_ids: List of specific plugins ids to chose from
        :type plugin_ids: list
        :returns: List of plugins
        :rtype: iterable (SQLAlchemy query)
         N/A plugins N/A N/A N/A N/A N/A N/A N/A N/A N/A db query N/A models Plugin join N/A cls model filter N/A N/A N/A cls model cluster_id N/A cluster id order_by N/A N/A models Plugin name N/A N/A models Plugin version N/A plugin_ids N/A N/A plugins N/A N/A plugins filter N/A N/A N/A N/A cls model plugin_id in_ plugin_ids N/A plugins N/A classmethod get_connected_clusters N/A N/A cls plugin_id N/A N/A N/A Returns clusters connected with given plugin.

        :param plugin_id: Plugin ID
        :type plugin_id: int
        :returns: List of clusters
        :rtype: iterable (SQLAlchemy query)
         N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A db query N/A models Cluster join N/A cls model filter N/A N/A N/A cls model plugin_id plugin_id order_by N/A N/A models Cluster name N/A classmethod get_enabled N/A N/A cls cluster_id N/A N/A N/A Returns a list of plugins enabled for a given cluster.

        :param cluster_id: Cluster ID
        :type cluster_id: int
        :returns: List of plugin instances
        :rtype: iterable (SQLAlchemy query)
         N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A db query N/A models Plugin join N/A cls model filter N/A N/A N/A cls model cluster_id cluster_id filter N/A N/A N/A N/A cls model enabled is_ True order_by N/A N/A models Plugin id N/A classmethod is_plugin_used N/A N/A cls plugin_id N/A N/A N/A Check if plugin is used for any cluster or not.

        :param plugin_id: Plugin ID
        :type plugin_id: int
        :return: True if some cluster uses this plugin
        :rtype: bool
         N/A q N/A N/A N/A N/A N/A N/A N/A db query N/A cls model filter N/A N/A N/A cls model plugin_id plugin_id filter N/A N/A N/A N/A cls model enabled is_ True N/A N/A N/A N/A N/A N/A db query N/A N/A q exists scalar N/A classmethod N/A