From a2e4c2c0a4758e1ecf26ca0e6e37e18c65ad2d61 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Tue, 12 Feb 2013 16:00:55 -0500 Subject: Fix passing conductor to get_instance_nw_info() The recent metadata patch missed this one spot, which wasn't caught because the network stubs weren't updated for the signature change. Fixes bug 1123435 Change-Id: Iebeb98bba62189476af2c0b85615ea407a8b2ecd --- nova/api/metadata/base.py | 3 ++- nova/tests/fake_network.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nova/api/metadata/base.py b/nova/api/metadata/base.py index 275af2b32..fca580b29 100644 --- a/nova/api/metadata/base.py +++ b/nova/api/metadata/base.py @@ -139,7 +139,8 @@ class InstanceMetadata(): # get network info, and the rendered network template ctxt = context.get_admin_context() - network_info = network.API().get_instance_nw_info(ctxt, instance) + network_info = network.API().get_instance_nw_info(ctxt, instance, + conductor_api=capi) self.network_config = None cfg = netutils.get_injected_network_template(network_info) diff --git a/nova/tests/fake_network.py b/nova/tests/fake_network.py index 883466cd6..5de72b58d 100644 --- a/nova/tests/fake_network.py +++ b/nova/tests/fake_network.py @@ -372,7 +372,7 @@ def stub_out_nw_api_get_instance_nw_info(stubs, func=None, floating_ips_per_fixed_ip=0, spectacular=False): - def get_instance_nw_info(self, context, instance): + def get_instance_nw_info(self, context, instance, conductor_api=None): return fake_get_instance_nw_info(stubs, num_networks=num_networks, ips_per_vif=ips_per_vif, floating_ips_per_fixed_ip=floating_ips_per_fixed_ip, -- cgit