Revision 0fa42bc3
Added by Benoît PECCATTE about 7 years ago
rudder-server-relay/SOURCES/relay-api/relay_api/common.py | ||
---|---|---|
# Returns the parsed content of the nodeslist file
|
||
def get_nodes_list(nodeslist_file):
|
||
global NODES
|
||
if NODES is not None:
|
||
return NODES
|
||
## uncomment to enable nodeslist caching
|
||
#if NODES is not None:
|
||
# return NODES
|
||
fd = open(nodeslist_file, 'r')
|
||
NODES = json.load(fd)
|
||
fd.close()
|
Also available in: Unified diff
Fixes #10111: the relay api shoud read nodeslist on each call