Fix remove_fixed_ip test with CastAsCall

If you enable CastAsCall, a bunch of issues with the remove_fixed_ip
API sample integration test crops up.

Firstly, the sample network is getting created with 'fake-mini' from
CONF.host as the network host rather than the host UUID generated for
the network service in start_service(). This results in
allocate_fixed_ip() attempting to invoke an RPC on a non-existant host.

Secondly, the test is attempting to remove a fixed IP which was never
allocated. Use the add_fixed_ip() test to allocate a fixed IP and then
remove that one, which is 10.0.0.3 rather than 10.0.0.2 which is the
IP reserved for VPN.

Lastly, disable the instance DNS manager because it seems this isn't
compatible with multinic. I was getting FloatingIpDNSExists raised.

blueprint: oslo-messaging
Related-Bug: #1213251
Change-Id: I9854863bbec8834c638c55832411f63da570f82d
This commit is contained in:
Mark McLoughlin
2013-08-16 22:28:44 +01:00
parent 1c093ec5a8
commit 48d0447ff6

View File

@@ -116,10 +116,13 @@ class SampleNetworks(fixtures.Fixture):
"""Create sample networks in the database."""
def __init__(self, host=None):
self.host = host
def setUp(self):
super(SampleNetworks, self).setUp()
ctxt = context.get_admin_context()
network = network_manager.VlanManager()
network = network_manager.VlanManager(host=self.host)
bridge_interface = CONF.flat_interface or CONF.vlan_interface
network.create_networks(ctxt,
label='test',