Improve NeutronFixture and remove unncessary stubbing

With a small improvement on NeutronFixture that allows creating more
than two ports we can let our tests to exercise and therefore cover
most of the neutronv2/api code as well. To do that this path removes a
lot of fake_network.set_stub_network_methods() calls from the tests.
The remaining calls are not that trivial to remove so those are left in
for a later patch.

The numa functional tests uses the libvirt fixture and during the guest
config xml generation it tries to instantiate OVOs from os_vif. To make
this work the libvirt fixture has to make sure that the
os_vif.initialize() is called as that call registers the OVOs.

Change-Id: I1dbccc2be6ba79bf267edac9208c80e187e6256a
This commit is contained in:
Balazs Gibizer
2018-07-31 15:04:04 +02:00
parent 25b3e2d69b
commit acd3216a8b
13 changed files with 47 additions and 52 deletions

View File

@@ -14,7 +14,6 @@
from nova.tests.functional.api import client
from nova.tests.functional import test_servers
from nova.tests.unit import fake_network
class InstanceActionsTestV2(test_servers.ServersTestBase):
@@ -28,9 +27,6 @@ class InstanceActionsTestV2(test_servers.ServersTestBase):
:returns: created server (dict)
"""
# TODO(mriedem): We should pull this up into the parent class so we
# don't have so much copy/paste in these functional tests.
fake_network.set_stub_network_methods(self)
# Create a server
server = self._build_minimal_create_server_request()