(dgs_host, json_file)
| 19 | |
| 20 | |
| 21 | def install(dgs_host, json_file): |
| 22 | url = dgs_host + "/admin/init" |
| 23 | |
| 24 | with open(json_file, 'r') as f: |
| 25 | install_query_req = json.loads(f.read()) |
| 26 | content_data = json.dumps(install_query_req) |
| 27 | |
| 28 | os.system("curl -X POST -H \"Content-Type: text/plain\" -d \'" + content_data + "\' " + url) |
| 29 | |
| 30 | |
| 31 | if __name__ == '__main__': |