def get_cluster_plugins_with_tasks(cls, cluster): attr_plugins = [] for plugin_db in cluster.plugins: attr_pl = ClusterAttributesPlugin(plugin_db) attr_pl.set_cluster_tasks(cluster) attr_plugins.append(attr_pl) return attr_plugins
def get_plugin_attributes(cls, cluster): plugins_attrs = {} for plugin_db in PluginCollection.all_newest(): attr_plugin = ClusterAttributesPlugin(plugin_db) attrs = attr_plugin.get_plugin_attributes(cluster) plugins_attrs.update(attrs) return plugins_attrs
def process_cluster_attributes(cls, cluster, attrs, query=None): if query is None: query = PluginCollection.all() for plugin_db in query: attr_plugin = ClusterAttributesPlugin(plugin_db) attr_plugin.process_cluster_attributes(cluster, attrs)