]> xenbits.xensource.com Git - osstest/openstack-nova.git/commit
move os_vif.initialize() to nova-compute start
authorSean Dague <sean@dague.net>
Wed, 21 Sep 2016 15:11:21 +0000 (11:11 -0400)
committerSean Dague <sean@dague.net>
Wed, 21 Sep 2016 20:49:50 +0000 (16:49 -0400)
commit735f710ae0c0e0037970796beacd3527e2a8ca8a
tree1ca015578ee5c2b39605ac53ae37bac32da324bb
parent10ee85c7256f5aa643dd874f17c9652f733a6396
move os_vif.initialize() to nova-compute start

os_vif.initialize() was previously executed during module load. This
means it was entirely possible that it was run before things like
logging were actually set up in the expected way. Move this back into
execution time instead of load time to ensure that logging is actually
setup.

Changes need to be made to tests which make assumptions about os_vif
objects to manually initialize os_vif when it will be used. os_vif
objects can't be created until it is initialized, so some delayed
object creation is also done in test_vif.py.

Closes-Bug: #1615676

Change-Id: I89fe5c5b3d762f3a3238b587685df85d15ee56c4
nova/cmd/compute.py
nova/network/os_vif_util.py
nova/tests/unit/virt/libvirt/test_driver.py
nova/tests/unit/virt/libvirt/test_vif.py