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


Python NailgunReceiver.transaction_resp方法代码示例

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


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

示例1: test_transaction_resp_update_transaction_status

# 需要导入模块: from nailgun.rpc.receiver import NailgunReceiver [as 别名]
# 或者: from nailgun.rpc.receiver.NailgunReceiver import transaction_resp [as 别名]
 def test_transaction_resp_update_transaction_status(self, _):
     task = self.env.create_task(
         name=consts.TASK_NAMES.deployment,
         status=consts.TASK_STATUSES.running,
         cluster_id=self.cluster.id
     )
     NailgunReceiver.transaction_resp(
         task_uuid=task.uuid,
         status=consts.TASK_STATUSES.ready
     )
     self.db.refresh(task)
     self.assertEqual(consts.TASK_STATUSES.ready, task.status)
开发者ID:openstack,项目名称:fuel-web,代码行数:14,代码来源:test_receiver.py

示例2: test_transaction_resp_update_node_attributes

# 需要导入模块: from nailgun.rpc.receiver import NailgunReceiver [as 别名]
# 或者: from nailgun.rpc.receiver.NailgunReceiver import transaction_resp [as 别名]
 def test_transaction_resp_update_node_attributes(self):
     task = self.env.create_task(
         name=consts.TASK_NAMES.deployment,
         status=consts.TASK_STATUSES.running,
         cluster_id=self.cluster.id
     )
     node = self.cluster.nodes[0]
     node.status = consts.NODE_STATUSES.provisioned
     node.progress = 1
     node.pending_addition = True
     NailgunReceiver.transaction_resp(
         task_uuid=task.uuid,
         nodes=[{
             'uid': node.uid, 'progress': 50, 'pending_addition': False
         }]
     )
     self.db.refresh(node)
     self.assertEqual(50, node.progress)
     self.assertFalse(node.pending_addition)
开发者ID:openstack,项目名称:fuel-web,代码行数:21,代码来源:test_receiver.py

示例3: test_transaction_resp_does_not_fail_on_virtual_nodes

# 需要导入模块: from nailgun.rpc.receiver import NailgunReceiver [as 别名]
# 或者: from nailgun.rpc.receiver.NailgunReceiver import transaction_resp [as 别名]
    def test_transaction_resp_does_not_fail_on_virtual_nodes(self):
        task = self.env.create_task(
            name=consts.TASK_NAMES.deployment,
            status=consts.TASK_STATUSES.running,
            cluster_id=self.cluster.id,
            dry_run=True
        )

        NailgunReceiver.transaction_resp(
            task_uuid=task.uuid,
            status=consts.TASK_STATUSES.running,
            nodes=[
                {
                    'uid': consts.MASTER_NODE_UID,
                    'status': consts.NODE_STATUSES.provisioned,
                },
                {
                    # cluster node uid is null
                    'uid': None,
                    'status': consts.NODE_STATUSES.provisioned,
                },
            ])
开发者ID:openstack,项目名称:fuel-web,代码行数:24,代码来源:test_receiver.py

示例4: test_transaction_resp_does_not_update_nodes_if_dry_run

# 需要导入模块: from nailgun.rpc.receiver import NailgunReceiver [as 别名]
# 或者: from nailgun.rpc.receiver.NailgunReceiver import transaction_resp [as 别名]
 def test_transaction_resp_does_not_update_nodes_if_dry_run(self, _):
     task = self.env.create_task(
         name=consts.TASK_NAMES.deployment,
         status=consts.TASK_STATUSES.running,
         cluster_id=self.cluster.id,
         dry_run=True
     )
     self.cluster.status = consts.CLUSTER_STATUSES.operational
     node = self.cluster.nodes[0]
     node.status = consts.NODE_STATUSES.provisioned
     NailgunReceiver.transaction_resp(
         task_uuid=task.uuid,
         status=consts.TASK_STATUSES.ready,
         nodes=[{'uid': node.uid, 'status': consts.NODE_STATUSES.ready}]
     )
     self.db.refresh(task)
     self.db.refresh(node)
     self.db.refresh(self.cluster)
     self.assertEqual(consts.TASK_STATUSES.ready, task.status)
     self.assertEqual(consts.NODE_STATUSES.provisioned, node.status)
     self.assertEqual(
         consts.CLUSTER_STATUSES.operational, self.cluster.status
     )
开发者ID:openstack,项目名称:fuel-web,代码行数:25,代码来源:test_receiver.py


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