Restarts the management server
(server)
| 82 | return res |
| 83 | |
| 84 | def restart_mgmt_server(server): |
| 85 | """Restarts the management server""" |
| 86 | |
| 87 | try: |
| 88 | # Get the SSH client |
| 89 | ssh = is_server_ssh_ready( |
| 90 | server["ipaddress"], |
| 91 | server["port"], |
| 92 | server["username"], |
| 93 | server["password"], |
| 94 | ) |
| 95 | result = ssh.execute("/etc/init.d/cloud-management restart") |
| 96 | res = str(result) |
| 97 | # Server Stop - OK |
| 98 | # Server Start - OK |
| 99 | if res.count("OK") != 2: |
| 100 | raise ("ErrorInReboot!") |
| 101 | except Exception as e: |
| 102 | raise e |
| 103 | return |
| 104 | |
| 105 | |
| 106 | def fetch_latest_mail(services, from_mail): |
nothing calls this directly
no test coverage detected