blob: 1e4041697b2d67d37e44a22cea2a7a5586fe4b6a [file] [log] [blame]
YongchaoWu4e489b02020-02-24 09:18:16 +01001import json
2import subprocess
3import os
4
5print("Clean old ric configurations in Consul config file")
6
7p = os.path.abspath('..')
8consul_config = p + '/consul_cbs' + '/config.json'
9
10
11def write_json(data, filename=consul_config):
12 with open(filename, 'w') as f:
13 json.dump(data, f, indent=4)
14
15
16with open(consul_config) as json_file:
17 clean = json.load(json_file)
18 clean['ric'] = []
19
20
21write_json(clean)
22print("Clean old ric configurations from Consul config file, done")
23
24