ProviderTree.new_child: parent is either uuid or name
Change the signature of ProviderTree.new_child to accept either uuid or name for parent. This way virt drivers can easiy add new children in the provider tree having only a nodename. Change-Id: I30b9d5b97f014b38e6fe619e38aebab273525826
This commit is contained in:
@@ -56,7 +56,9 @@ class TestProviderTree(test.NoDBTestCase):
|
||||
self.assertEqual(set([cn1.uuid, cn2.uuid]), pt.get_provider_uuids())
|
||||
|
||||
numa_cell0_uuid = pt.new_child('numa_cell0', cn1.uuid)
|
||||
numa_cell1_uuid = pt.new_child('numa_cell1', cn1.uuid)
|
||||
numa_cell1_uuid = pt.new_child('numa_cell1', cn1.hypervisor_hostname)
|
||||
|
||||
self.assertEqual(cn1.uuid, pt.data(numa_cell1_uuid).parent_uuid)
|
||||
|
||||
self.assertTrue(pt.exists(numa_cell0_uuid))
|
||||
self.assertTrue(pt.exists('numa_cell0'))
|
||||
|
||||
Reference in New Issue
Block a user