Make sure dhcp4_flag is boolean

This commit is contained in:
Joshua Boniface 2020-01-06 15:03:24 -05:00
parent 7b3e267f7a
commit 65be917542
1 changed files with 4 additions and 0 deletions

View File

@ -253,6 +253,10 @@ def add_network(zk_conn, vni, description, nettype,
if not domain: if not domain:
domain = '{}.local'.format(description) domain = '{}.local'.format(description)
# Make sure the DHCP4 flag is always boolean
if dhcp4_flag is None:
dhcp4_flag = False
# Add the new network to Zookeeper # Add the new network to Zookeeper
zkhandler.writedata(zk_conn, { zkhandler.writedata(zk_conn, {
'/networks/{}'.format(vni): description, '/networks/{}'.format(vni): description,