Don't bother splitting name_servers

This commit is contained in:
Joshua Boniface 2019-12-27 12:15:57 -05:00
parent bc22c008dd
commit e82b851643
2 changed files with 2 additions and 8 deletions

View File

@ -657,9 +657,6 @@ def net_add(vni, description, nettype, domain, name_servers,
"""
Add a virtual client network to the PVC cluster.
"""
if name_servers is not None:
name_servers = name_servers.split(',')
zk_conn = pvc_common.startZKConnection(config['coordinators'])
retflag, retdata = pvc_network.add_network(zk_conn, vni, description, nettype, domain, name_servers,
ip4_network, ip4_gateway, ip6_network, ip6_gateway,
@ -682,9 +679,6 @@ def net_modify(vni, description, domain, name_servers,
"""
Modify a virtual client network in the PVC cluster.
"""
if name_servers is not None:
name_servers = name_servers.split(',')
zk_conn = pvc_common.startZKConnection(config['coordinators'])
retflag, retdata = pvc_network.modify_network(zk_conn, vni, description, domain, name_servers,
ip4_network, ip4_gateway, ip6_network, ip6_gateway,

View File

@ -258,7 +258,7 @@ def add_network(zk_conn, vni, description, nettype,
'/networks/{}'.format(vni): description,
'/networks/{}/nettype'.format(vni): nettype,
'/networks/{}/domain'.format(vni): domain,
'/networks/{}/name_servers'.format(vni): ','.join(name_servers),
'/networks/{}/name_servers'.format(vni): name_servers,
'/networks/{}/ip6_network'.format(vni): ip6_network,
'/networks/{}/ip6_gateway'.format(vni): ip6_gateway,
'/networks/{}/dhcp6_flag'.format(vni): dhcp6_flag,
@ -284,7 +284,7 @@ def modify_network(zk_conn, vni, **parameters):
if parameters['domain']:
zk_data.update({'/networks/{}/domain'.format(vni): parameters['domain']})
if parameters['name_servers']:
zk_data.update({'/networks/{}/name_servers'.format(vni): ','.join(parameters['name_servers'])})
zk_data.update({'/networks/{}/name_servers'.format(vni): parameters['name_servers']})
if parameters['ip4_network']:
zk_data.update({'/networks/{}/ip4_network'.format(vni): parameters['ip4_network']})
if parameters['ip4_gateway']: