Function return all hosts all vds on host
(computes)
| 25 | return HttpResponseRedirect(reverse('index')) |
| 26 | |
| 27 | def get_hosts_status(computes): |
| 28 | """ |
| 29 | Function return all hosts all vds on host |
| 30 | """ |
| 31 | compute_data = [] |
| 32 | for compute in computes: |
| 33 | compute_data.append({'id': compute.id, |
| 34 | 'name': compute.name, |
| 35 | 'hostname': compute.hostname, |
| 36 | 'status': connection_manager.host_is_up(compute.type, compute.hostname), |
| 37 | 'type': compute.type, |
| 38 | 'login': compute.login, |
| 39 | 'password': compute.password |
| 40 | }) |
| 41 | return compute_data |
| 42 | |
| 43 | error_messages = [] |
| 44 | computes = Compute.objects.filter() |