blob: 1e4041697b2d67d37e44a22cea2a7a5586fe4b6a [file] [log] [blame]
import json
import subprocess
import os
print("Clean old ric configurations in Consul config file")
p = os.path.abspath('..')
consul_config = p + '/consul_cbs' + '/config.json'
def write_json(data, filename=consul_config):
with open(filename, 'w') as f:
json.dump(data, f, indent=4)
with open(consul_config) as json_file:
clean = json.load(json_file)
clean['ric'] = []
write_json(clean)
print("Clean old ric configurations from Consul config file, done")