示例#1
0
 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
0
 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()
     compute.id = 123
     compute.destroy(self.context)
示例#3
0
 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()
示例#4
0
 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)
示例#5
0
 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)
示例#6
0
 def destroy(self, context):
     db.compute_node_delete(context, self.id)
示例#7
0
 def destroy(self):
     db.compute_node_delete(self._context, self.id)
示例#8
0
 def destroy(self):
     db.compute_node_delete(self._context, self.id)
示例#9
0
 def destroy(self, context):
     db.compute_node_delete(context, self.id)