|
|
@ -140,6 +140,7 @@ def update_cine(request): |
|
|
|
print('git', e) |
|
|
|
print('git', e) |
|
|
|
cinema_update_status[cinema_ip]['git']['result'] = 'fail' |
|
|
|
cinema_update_status[cinema_ip]['git']['result'] = 'fail' |
|
|
|
cinema_update_status[cinema_ip]['git']['msg'] = str(e) |
|
|
|
cinema_update_status[cinema_ip]['git']['msg'] = str(e) |
|
|
|
|
|
|
|
return JsonResponse({'result': 'fail', 'ip': cinema_ip, 'msg': str(e)}) |
|
|
|
|
|
|
|
|
|
|
|
# 执行setup |
|
|
|
# 执行setup |
|
|
|
print('执行setup') |
|
|
|
print('执行setup') |
|
|
@ -154,6 +155,7 @@ def update_cine(request): |
|
|
|
print('setup', e) |
|
|
|
print('setup', e) |
|
|
|
cinema_update_status[cinema_ip]['setup']['result'] = 'fail' |
|
|
|
cinema_update_status[cinema_ip]['setup']['result'] = 'fail' |
|
|
|
cinema_update_status[cinema_ip]['setup']['msg'] = str(e) |
|
|
|
cinema_update_status[cinema_ip]['setup']['msg'] = str(e) |
|
|
|
|
|
|
|
return JsonResponse({'result': 'fail', 'ip': cinema_ip, 'msg': str(e)}) |
|
|
|
|
|
|
|
|
|
|
|
# 数据库对比 |
|
|
|
# 数据库对比 |
|
|
|
sql_list = list(set(cmd_list) & set(cmd_dict['sql'])) |
|
|
|
sql_list = list(set(cmd_list) & set(cmd_dict['sql'])) |
|
|
@ -169,6 +171,7 @@ def update_cine(request): |
|
|
|
print('sql', e) |
|
|
|
print('sql', e) |
|
|
|
cinema_update_status[cinema_ip]['sql']['result'] = 'fail' |
|
|
|
cinema_update_status[cinema_ip]['sql']['result'] = 'fail' |
|
|
|
cinema_update_status[cinema_ip]['sql']['msg'] = str(e) |
|
|
|
cinema_update_status[cinema_ip]['sql']['msg'] = str(e) |
|
|
|
|
|
|
|
return JsonResponse({'result': 'fail', 'ip': cinema_ip, 'msg': str(e)}) |
|
|
|
|
|
|
|
|
|
|
|
# 修改设置 |
|
|
|
# 修改设置 |
|
|
|
print('执行config(teardown前)') |
|
|
|
print('执行config(teardown前)') |
|
|
@ -183,6 +186,7 @@ def update_cine(request): |
|
|
|
print('config', e) |
|
|
|
print('config', e) |
|
|
|
cinema_update_status[cinema_ip]['config']['result'] = 'fail' |
|
|
|
cinema_update_status[cinema_ip]['config']['result'] = 'fail' |
|
|
|
cinema_update_status[cinema_ip]['config']['msg'] = str(e) |
|
|
|
cinema_update_status[cinema_ip]['config']['msg'] = str(e) |
|
|
|
|
|
|
|
return JsonResponse({'result': 'fail', 'ip': cinema_ip, 'msg': str(e)}) |
|
|
|
|
|
|
|
|
|
|
|
# 执行teardown |
|
|
|
# 执行teardown |
|
|
|
teardown_list = list(set(cmd_list) & set(cmd_dict['teardown'])) |
|
|
|
teardown_list = list(set(cmd_list) & set(cmd_dict['teardown'])) |
|
|
@ -198,6 +202,7 @@ def update_cine(request): |
|
|
|
print('teardown', e) |
|
|
|
print('teardown', e) |
|
|
|
cinema_update_status[cinema_ip]['teardown']['result'] = 'fail' |
|
|
|
cinema_update_status[cinema_ip]['teardown']['result'] = 'fail' |
|
|
|
cinema_update_status[cinema_ip]['teardown']['msg'] = str(e) |
|
|
|
cinema_update_status[cinema_ip]['teardown']['msg'] = str(e) |
|
|
|
|
|
|
|
return JsonResponse({'result': 'fail', 'ip': cinema_ip, 'msg': str(e)}) |
|
|
|
|
|
|
|
|
|
|
|
# 修改设置 |
|
|
|
# 修改设置 |
|
|
|
print('执行config(teardown后)') |
|
|
|
print('执行config(teardown后)') |
|
|
@ -212,6 +217,7 @@ def update_cine(request): |
|
|
|
print('config', e) |
|
|
|
print('config', e) |
|
|
|
cinema_update_status[cinema_ip]['config']['result'] = 'fail' |
|
|
|
cinema_update_status[cinema_ip]['config']['result'] = 'fail' |
|
|
|
cinema_update_status[cinema_ip]['config']['msg'] = update_status['config']['msg'] + '\n' + str(e) |
|
|
|
cinema_update_status[cinema_ip]['config']['msg'] = update_status['config']['msg'] + '\n' + str(e) |
|
|
|
|
|
|
|
return JsonResponse({'result': 'fail', 'ip': cinema_ip, 'msg': str(e)}) |
|
|
|
|
|
|
|
|
|
|
|
# 传输客户端 |
|
|
|
# 传输客户端 |
|
|
|
client_list = list(set(cmd_list) & set(cmd_dict['client'])) |
|
|
|
client_list = list(set(cmd_list) & set(cmd_dict['client'])) |
|
|
@ -226,9 +232,10 @@ def update_cine(request): |
|
|
|
print('client', e) |
|
|
|
print('client', e) |
|
|
|
cinema_update_status[cinema_ip]['client']['result'] = 'fail' |
|
|
|
cinema_update_status[cinema_ip]['client']['result'] = 'fail' |
|
|
|
cinema_update_status[cinema_ip]['client']['msg'] = str(e) |
|
|
|
cinema_update_status[cinema_ip]['client']['msg'] = str(e) |
|
|
|
|
|
|
|
return JsonResponse({'result': 'fail', 'ip': cinema_ip, 'msg': str(e)}) |
|
|
|
|
|
|
|
|
|
|
|
print(cinema_update_status[cinema_ip]) |
|
|
|
print(cinema_update_status[cinema_ip]) |
|
|
|
return JsonResponse({'result': 'success', 'ip': cinema_ip}) |
|
|
|
return JsonResponse({'result': 'success', 'ip': cinema_ip, 'msg': ''}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# # 测试用接口 |
|
|
|
# # 测试用接口 |
|
|
|