Skip to content

Commit

Permalink
[DM]: Fix for recent regression issue, ip_alloc param issue
Browse files Browse the repository at this point in the history
This is regression issue introduced after changing the prototype of ip_alloc API.

Change-Id: Icff7f9bb1b404863d2912adc99b82b1ac8d0a59e
Closes-Bug: #1646344
  • Loading branch information
sbalineni committed Dec 1, 2016
1 parent 786cd0e commit 90e5ed1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/config/device-manager/device_manager/db.py
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 90e5ed1

Please sign in to comment.