From 21d795b8a9eaac3b1887cec4fb6150f3536c1552 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Thu, 29 Sep 2016 17:31:46 +0200 Subject: [PATCH] Fix bug in vimconn_openstack related to dhcp_count Change-Id: Ib9ffc7034f413230ede334735380dea7cf93744a Signed-off-by: garciadeblas --- vimconn_openstack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimconn_openstack.py b/vimconn_openstack.py index 6396b77a..0fc5bbda 100644 --- a/vimconn_openstack.py +++ b/vimconn_openstack.py @@ -273,7 +273,7 @@ class vimconnector(vimconn.vimconnector): #parts = ip_profile['dhcp_start_address'].split('.') #ip_int = (int(parts[0]) << 24) + (int(parts[1]) << 16) + (int(parts[2]) << 8) + int(parts[3]) ip_int = int(netaddr.IPAddress(ip_profile['dhcp_start_address'])) - ip_int += ip_profile['dhcp_count'] + ip_int += ip_profile['dhcp_count'] - 1 ip_str = str(netaddr.IPAddress(ip_int)) subnet['allocation_pools'][0]['end'] = ip_str #self.logger.debug(">>>>>>>>>>>>>>>>>> Subnet: %s", str(subnet)) -- 2.25.1