本文整理汇总了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)
示例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