import BootServerRequest
import BootAPI
import notify_messages
-import UpdateBootStateWithPLC
+import UpdateRunLevelWithPLC
+import ModelOptions
# two possible names of the configuration files
log.write( "Configuration file does not contain the node_id value.\n" )
log.write( "Querying PLC for node_id.\n" )
- bs_request= BootServerRequest.BootServerRequest()
+ bs_request= BootServerRequest.BootServerRequest(vars)
postVars= {"mac_addr" : INTERFACE_SETTINGS["mac"]}
result= bs_request.DownloadFile( "%s/getnodeid.php" %
vars["INTERFACE_SETTINGS"]= INTERFACE_SETTINGS
- if not hostname_resolve_ok and not vars['DISCONNECTED_OPERATION']:
+ if (not hostname_resolve_ok and not vars['DISCONNECTED_OPERATION'] and
+ (vars['NODE_MODEL_OPTIONS'] & ModelOptions.NAT) == 0):
log.write( "Hostname does not resolve correctly, will not continue.\n" )
if can_make_api_call:
log.write( "Notifying contacts of problem.\n" )
- vars['BOOT_STATE']= 'failboot'
+ vars['RUN_LEVEL']= 'failboot'
vars['STATE_CHANGE_NOTIFY']= 1
vars['STATE_CHANGE_NOTIFY_MESSAGE']= \
notify_messages.MSG_HOSTNAME_NOT_RESOLVE
- UpdateBootStateWithPLC.Run( vars, log )
+ UpdateRunLevelWithPLC.Run( vars, log )
log.write( "\n\n" )
log.write( "The hostname and/or ip in the network configuration\n" )