From 952196a533c3577945a2c4245436d09eb75e0eb6 Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Tue, 12 Jul 2011 19:12:21 -0400 Subject: Made sure the network manager accepts kwargs for FlatManager --- nova/network/manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/network/manager.py b/nova/network/manager.py index 21d151033..383fbd32f 100644 --- a/nova/network/manager.py +++ b/nova/network/manager.py @@ -696,7 +696,7 @@ class FlatManager(NetworkManager): timeout_fixed_ips = False - def _allocate_fixed_ips(self, context, instance_id, networks): + def _allocate_fixed_ips(self, context, instance_id, networks, **kwargs): """Calls allocate_fixed_ip once for each network.""" for network in networks: self.allocate_fixed_ip(context, instance_id, network) -- cgit From 7acb3d63cd2c487c78994e15f1e015d3b81febf8 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Tue, 12 Jul 2011 21:50:12 -0400 Subject: Don't pop 'vpn' on kwargs inside a loop in RPCAllocateFixedIP._allocate_fixed_ips (fixes KeyError's). Fix allocate_fixed_ip method signature for FlatDHCP. --- nova/network/manager.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nova/network/manager.py b/nova/network/manager.py index 383fbd32f..007766998 100644 --- a/nova/network/manager.py +++ b/nova/network/manager.py @@ -128,6 +128,7 @@ class RPCAllocateFixedIP(object): """Calls allocate_fixed_ip once for each network.""" green_pool = greenpool.GreenPool() + vpn = kwargs.pop('vpn') for network in networks: if network['host'] != self.host: # need to call allocate_fixed_ip to correct network host @@ -136,15 +137,14 @@ class RPCAllocateFixedIP(object): args = {} args['instance_id'] = instance_id args['network_id'] = network['id'] - args['vpn'] = kwargs.pop('vpn') + args['vpn'] = vpn green_pool.spawn_n(rpc.call, context, topic, {'method': '_rpc_allocate_fixed_ip', 'args': args}) else: # i am the correct host, run here - self.allocate_fixed_ip(context, instance_id, network, - vpn=kwargs.pop('vpn')) + self.allocate_fixed_ip(context, instance_id, network, vpn=vpn) # wait for all of the allocates (if any) to finish green_pool.waitall() @@ -753,7 +753,7 @@ class FlatDHCPManager(FloatingIP, RPCAllocateFixedIP, NetworkManager): self.driver.ensure_bridge(network['bridge'], network['bridge_interface']) - def allocate_fixed_ip(self, context, instance_id, network): + def allocate_fixed_ip(self, context, instance_id, network, **kwargs): """Allocate flat_network fixed_ip, then setup dhcp for this network.""" address = super(FlatDHCPManager, self).allocate_fixed_ip(context, instance_id, -- cgit From f794139e6ad70949bdaf26417989f3940e8af3b7 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Wed, 13 Jul 2011 08:34:41 -0400 Subject: Added Mohammed Naser to Authors file. --- Authors | 1 + 1 file changed, 1 insertion(+) diff --git a/Authors b/Authors index 4aa65eea2..2e50cfbe0 100644 --- a/Authors +++ b/Authors @@ -65,6 +65,7 @@ Masanori Itoh Matt Dietz Michael Gundlach Mike Scherbakov +Mohammed Naser Monsyne Dragon Monty Taylor MORITA Kazutaka -- cgit