Exemplo n.º 1
0
def Initialise(configFile):
	cfg=ottplib.LoadConfig(configFile,{'tolower':True})
	if (cfg == None):
		ErrorExit("Error loading " + configFile)
		
	# Check for required arguments
	reqd = ['main:data centres']
	for k in reqd:
		if (not cfg.has_key(k)):
			ErrorExit("The required configuration entry " + k + " is undefined")
		
	return cfg
Exemplo n.º 2
0
def LoadConfig(configFile, reqd):
    Debug('Opening ' + configFile)
    cfg = ottplib.LoadConfig(configFile, {'tolower': True})
    if (cfg == None):
        ErrorExit("Error loading " + configFile)

    # Check for required arguments
    for k in reqd:
        if (not cfg.has_key(k)):
            ErrorExit("The required configuration entry \'" + k +
                      "\' is undefined")

    return cfg
Exemplo n.º 3
0
def Initialise(configFile):
    cfg = ottplib.LoadConfig(configFile, {'tolower': True})
    if (cfg == None):
        ErrorExit("Error loading " + configFile)

    # Check for required arguments
    reqd = [
        'counter:logger', 'receiver:pps offset', 'delays:reference cable',
        'delays:antenna cable'
    ]
    for k in reqd:
        if (not cfg.has_key(k)):
            ErrorExit("The required configuration entry " + k +
                      " is undefined")

    return cfg
Exemplo n.º 4
0
def Initialise(configFile):
    cfg = ottplib.LoadConfig(configFile, {'tolower': True})
    if (cfg == None):
        ErrorExit("Error loading " + configFile)

    # Check for required arguments
    reqd = [
        'counter:port', 'paths:counter data', 'counter:file extension',
        'counter:lock file'
    ]
    for k in reqd:
        if (not cfg.has_key(k)):
            ErrorExit("The required configuration entry " + k +
                      " is undefined")

    return cfg