From 90e5ed19264424cef9575cbf7930f11067ed057c Mon Sep 17 00:00:00 2001 From: sbalineni Date: Wed, 30 Nov 2016 20:38:17 -0800 Subject: [PATCH] [DM]: Fix for recent regression issue, ip_alloc param issue This is regression issue introduced after changing the prototype of ip_alloc API. Change-Id: Icff7f9bb1b404863d2912adc99b82b1ac8d0a59e Closes-Bug: #1646344 --- src/config/device-manager/device_manager/db.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config/device-manager/device_manager/db.py b/src/config/device-manager/device_manager/db.py index c99f3f4c114..d1d77af7bff 100644 --- a/src/config/device-manager/device_manager/db.py +++ b/src/config/device-manager/device_manager/db.py @@ -216,7 +216,7 @@ def reserve_ip(self, vn_uuid, subnet_uuid): vn.set_uuid(vn_uuid) ip_addr = self._manager._vnc_lib.virtual_network_ip_alloc( vn, - subnet_uuid=subnet_uuid) + subnet=subnet_uuid) if ip_addr: return ip_addr[0] # ip_alloc default ip count is 1 except Exception as e: @@ -286,6 +286,7 @@ def evaluate_vn_irb_ip_map(self, vn_set): for vn_subnet in create_set: (vn_uuid, subnet_prefix) = vn_subnet.split(':', 1) + vn = VirtualNetworkDM.get(vn_uuid) subnet_uuid = vn.gateways[subnet_prefix].get('subnet_uuid') (sub, length) = subnet_prefix.split('/') ip_addr = self.reserve_ip(vn_uuid, subnet_uuid)