- self.disable_compute_host(hostname)
-
- def disable_compute_host(self, hostname):
- threads = []
- if len(self.servers[hostname]) > self.NUMBER_OF_CLIENTS:
- # TODO(tojuvone): This could be enhanced in future with dynamic
- # reuse of self.novaclients when all threads in use
- self.log.error('%d servers in %s. Can handle only %d'%(
- self.servers[hostname], hostname, self.NUMBER_OF_CLIENTS))
- for nova, server in zip(self.novaclients, self.servers[hostname]):
- t = ThreadedResetState(nova, "error", server, self.log)
- t.start()
- threads.append(t)
- for t in threads:
- t.join()
+ thr1 = self._disable_compute_host(hostname)
+ thr2 = self._vms_reset_state('error', hostname)
+ thr3 = self._set_ports_data_plane_status('DOWN', hostname)
+ thr1.join()
+ thr2.join()
+ thr3.join()
+
+ @utils.run_async
+ def _disable_compute_host(self, hostname):