本文整理汇总了Python中nova.db.compute_node_delete函数的典型用法代码示例。如果您正苦于以下问题:Python compute_node_delete函数的具体用法?Python compute_node_delete怎么用?Python compute_node_delete使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了compute_node_delete函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_compute_node_delete
def test_compute_node_delete(self):
node = {'id': 'fake-id'}
self.mox.StubOutWithMock(db, 'compute_node_delete')
db.compute_node_delete(self.context, node['id']).AndReturn(None)
self.mox.ReplayAll()
result = self.conductor.compute_node_delete(self.context, node)
self.assertEqual(result, None)
示例2: test_destroy
def test_destroy(self):
self.mox.StubOutWithMock(db, "compute_node_delete")
db.compute_node_delete(self.context, 123)
self.mox.ReplayAll()
compute = compute_node.ComputeNode(context=self.context)
compute.id = 123
compute.destroy()
示例3: test_destroy
def test_destroy(self):
ctxt = context.get_admin_context()
self.mox.StubOutWithMock(db, 'compute_node_delete')
db.compute_node_delete(ctxt, 123)
self.mox.ReplayAll()
compute = compute_node.ComputeNode()
compute.id = 123
compute.destroy(ctxt)
示例4: destroy
def destroy(self, context):
db.compute_node_delete(context, self.id)
示例5: destroy
def destroy(self):
db.compute_node_delete(self._context, self.id)