Change-Id: Ied2d6b244aecb703c4808eeeabd177d02a21d0b6
Issue-ID: VFC-1625
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
if "ip_version" in subnet and subnet["ip_version"]:
subnet_data["ipVersion"] = int(subnet["ip_version"])
if "enable_dhcp" in subnet and subnet["enable_dhcp"]:
+ if isinstance(subnet["enable_dhcp"], str):
+ subnet["enable_dhcp"] = (subnet["enable_dhcp"]).strip().lower() in "true"
subnet_data["enableDhcp"] = int(subnet["enable_dhcp"]) == const.ENABLE_DHCP
if "gateway_ip" in subnet and subnet["gateway_ip"]:
subnet_data["gatewayIp"] = subnet["gateway_ip"]