当前位置: 首页>>代码示例>>Python>>正文


Python Release.get_deployment_tasks方法代码示例

本文整理汇总了Python中nailgun.objects.Release.get_deployment_tasks方法的典型用法代码示例。如果您正苦于以下问题:Python Release.get_deployment_tasks方法的具体用法?Python Release.get_deployment_tasks怎么用?Python Release.get_deployment_tasks使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在nailgun.objects.Release的用法示例。


在下文中一共展示了Release.get_deployment_tasks方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_deployment_tasks

# 需要导入模块: from nailgun.objects import Release [as 别名]
# 或者: from nailgun.objects.Release import get_deployment_tasks [as 别名]
    def get_deployment_tasks(cls, instance):
        """Return deployment graph for cluster based on cluster attributes

            - if there is deployment_graph defined by user - use it instead of
              defined
            - if instance assigned for patching - return custom patching graph
            - else return default for release deployment graph
        """
        if instance.deployment_tasks:
            return instance.deployment_tasks
        elif instance.pending_release_id:
            return yaml.load(graph_configuration.PATCHING)
        else:
            return Release.get_deployment_tasks(instance.release)
开发者ID:TorstenS73,项目名称:fuel-web,代码行数:16,代码来源:cluster.py

示例2: get_deployment_tasks

# 需要导入模块: from nailgun.objects import Release [as 别名]
# 或者: from nailgun.objects.Release import get_deployment_tasks [as 别名]
    def get_deployment_tasks(cls, instance):
        """Return deployment graph for cluster based on cluster attributes

            - if there is deployment_graph defined by user - use it instead of
              defined
            - if instance assigned for patching - return custom patching graph
            - else return default for release and enabled plugins
              deployment graph
        """
        if instance.deployment_tasks:
            return instance.deployment_tasks
        else:
            release_deployment_tasks = \
                Release.get_deployment_tasks(instance.release)
            plugin_deployment_tasks = \
                PluginManager.get_plugins_deployment_tasks(instance)
            return release_deployment_tasks + plugin_deployment_tasks
开发者ID:gdyuldin,项目名称:fuel-web,代码行数:19,代码来源:cluster.py


注:本文中的nailgun.objects.Release.get_deployment_tasks方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。