Add message when starting DHCP server
This commit is contained in:
@ -78,6 +78,7 @@ class VXNetworkInstance():
|
||||
if data != None and self.dhcp_flag != data.decode('ascii'):
|
||||
self.dhcp_flag = ( data.decode('ascii') == 'True' )
|
||||
if self.dhcp_flag:
|
||||
ansiiprint.echo('Starting DHCP server for network "{}".'.format(self.ip_network), '', 'o')
|
||||
dhcp_config = DHCPServer.DHCPServerConfiguration(
|
||||
zk_conn=self.zk_conn,
|
||||
ipaddr=self.ip_gateway,
|
||||
@ -88,8 +89,9 @@ class VXNetworkInstance():
|
||||
dns_servers=[]
|
||||
)
|
||||
self.dhcp_instance = DHCPServer.DHCPServer(dhcp_config)
|
||||
self.dhcp_instance.start()
|
||||
else:
|
||||
self.dhcp_instance.remove()
|
||||
self.dhcp_instance.close()
|
||||
self.dhcp_instance = None
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user