modified: ri_cmd.py
modified: ri_oper.py
modified: ri_tk.py
modified: ri_tk_cmd.py
modified: ri_widget.py
add network check ip and hostname update
This commit is contained in:
@@ -116,7 +116,7 @@ def network_init():
|
||||
display.var_dict['network_primary_dns']. set(value=ri_data.Network.primary_dns)
|
||||
display.var_dict['network_secondary_dns'].set(value=ri_data.Network.secondary_dns)
|
||||
|
||||
def network_quit(step=''):
|
||||
def network_quit():
|
||||
''' network quit '''
|
||||
ri_data.Network.hostname = display.var_dict['network_host_name'].get()
|
||||
ri_data.Network.configuration = display.var_dict['network_config_method'].get()
|
||||
@@ -127,15 +127,14 @@ def network_quit(step=''):
|
||||
ri_data.Network.primary_dns = display.var_dict['network_primary_dns'].get()
|
||||
ri_data.Network.secondary_dns = display.var_dict['network_secondary_dns'].get()
|
||||
|
||||
if step == "network":
|
||||
if not ri_data.Network.hostname:
|
||||
ri_widget.MessageBox.dict['check_ip_hostname'].show()
|
||||
if ri_data.Network.configuration == "static" and \
|
||||
not ri_data.Network.ip and \
|
||||
not ri_data.Network.mask and \
|
||||
not ri_data.Network.gateway and \
|
||||
not ri_data.Network.primary_dns :
|
||||
ri_widget.MessageBox.dict['check_ip_hostname'].show()
|
||||
if not ri_data.Network.hostname:
|
||||
ri_widget.MessageBox.dict['check_ip_hostname'].show()
|
||||
elif ri_data.Network.configuration == "static" and \
|
||||
(not ri_data.Network.ip or \
|
||||
not ri_data.Network.mask or \
|
||||
not ri_data.Network.gateway or \
|
||||
not ri_data.Network.primary_dns) :
|
||||
ri_widget.MessageBox.dict['check_ip_hostname'].show()
|
||||
|
||||
def ncm_dynamic():
|
||||
''' when radio button ncm dynamic is checked, several data entry will be set 'disable' '''
|
||||
|
||||
Reference in New Issue
Block a user