1 from fabric.api import *
2 from fabric.context_managers import *
5 res = run('cat /proc/uptime')
11 def upgrade_docker(server_name, my_env):
12 server_name=server_name.split("-")[1]
13 if server_name in "message-router":
14 execute_file = "/opt/mr_vm_init.sh"
15 elif server_name in "dcae-controller":
16 execute_file = "/opt/dcae2_vm_init.sh"
17 elif server_name in "multiserv-server":
18 execute_file = "/opt/multiserv_all_serv.sh"
19 elif server_name in "dns":
22 execute_file = "/opt/" + server_name + "_vm_init.sh"
23 print "Executing file %s" % execute_file
25 with settings( warn_only=True, key_filename=my_env['key_filename'], user=my_env['user']):
28 def health_checks_robot(my_env):
29 with settings( warn_only=True, key_filename=my_env['key_filename'], user=my_env['user']):
31 sudo('./ete.sh health')