本文整理汇总了Python中nailgun.task.task.CheckBeforeDeploymentTask类的典型用法代码示例。如果您正苦于以下问题:Python CheckBeforeDeploymentTask类的具体用法?Python CheckBeforeDeploymentTask怎么用?Python CheckBeforeDeploymentTask使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CheckBeforeDeploymentTask类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_ext_mongo_without_mongo_node
def test_ext_mongo_without_mongo_node(self):
cluster = self.env.create(
release_kwargs={
'attributes_metadata': self.get_custom_meta(True, True)},
nodes_kwargs=[]
)
task = Task(name=TASK_NAMES.deploy, cluster=cluster)
CheckBeforeDeploymentTask._check_mongo_nodes(task)
开发者ID:ekorekin,项目名称:fuel-web,代码行数:8,代码来源:test_mongo_nodes.py
示例2: test_mongo_node_without_ext_mongo
def test_mongo_node_without_ext_mongo(self):
cluster = self.env.create(
release_kwargs={
'attributes_metadata': self.get_custom_meta(True, False)},
nodes_kwargs=[
{'pending_roles': ['mongo'],
'status': 'discover',
'pending_addition': True}
]
)
task = Task(name=TASK_NAMES.deploy, cluster=cluster)
CheckBeforeDeploymentTask._check_mongo_nodes(task)
开发者ID:ekorekin,项目名称:fuel-web,代码行数:12,代码来源:test_mongo_nodes.py
示例3: test_check_volumes_and_disks_do_not_run_if_node_ready
def test_check_volumes_and_disks_do_not_run_if_node_ready(self):
self.set_node_status('ready')
with patch.object(
VolumeManager,
'check_disk_space_for_deployment') as check_mock:
CheckBeforeDeploymentTask._check_disks(self.task)
self.assertFalse(check_mock.called)
with patch.object(
VolumeManager,
'check_volume_sizes_for_deployment') as check_mock:
CheckBeforeDeploymentTask._check_volumes(self.task)
self.assertFalse(check_mock.called)
开发者ID:thefuyang,项目名称:fuel-web,代码行数:14,代码来源:test_task.py
示例4: test_check_volumes_and_disks_run_if_node_not_ready
def test_check_volumes_and_disks_run_if_node_not_ready(self):
self.set_node_status('discover')
with patch.object(
VolumeManager,
'check_disk_space_for_deployment') as check_mock:
CheckBeforeDeploymentTask._check_disks(self.task)
self.assertEqual(check_mock.call_count, 1)
with patch.object(
VolumeManager,
'check_volume_sizes_for_deployment') as check_mock:
CheckBeforeDeploymentTask._check_volumes(self.task)
self.assertEqual(check_mock.call_count, 1)
开发者ID:thefuyang,项目名称:fuel-web,代码行数:16,代码来源:test_task.py
示例5: test_check_nodes_online_do_not_raise_exception_node_to_deletion
def test_check_nodes_online_do_not_raise_exception_node_to_deletion(self):
self.node.online = False
self.node.pending_deletion = True
self.env.db.commit()
CheckBeforeDeploymentTask._check_nodes_are_online(self.task)
开发者ID:thefuyang,项目名称:fuel-web,代码行数:6,代码来源:test_task.py
示例6: is_checking_required
def is_checking_required(self):
return CheckBeforeDeploymentTask._is_disk_checking_required(self.node)
开发者ID:thefuyang,项目名称:fuel-web,代码行数:2,代码来源:test_task.py
注:本文中的nailgun.task.task.CheckBeforeDeploymentTask类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论