diff --git a/climate/plugins/oshosts/host_plugin.py b/climate/plugins/oshosts/host_plugin.py index e230730..2846e72 100644 --- a/climate/plugins/oshosts/host_plugin.py +++ b/climate/plugins/oshosts/host_plugin.py @@ -315,10 +315,11 @@ class PhysicalHostPlugin(base.BasePlugin, nova.NovaClientWrapper): # TODO(sbauza): # - Check if no leases having this host scheduled inventory = nova_inventory.NovaInventory() - servers = inventory.get_servers_per_host(host_id) + servers = inventory.get_servers_per_host( + host['hypervisor_hostname']) if servers: - raise manager_ex.HostHavingServers(host=host_id, - servers=servers) + raise manager_ex.HostHavingServers( + host=host['hypervisor_hostname'], servers=servers) try: pool = rp.ReservationPool() pool.remove_computehost(self.freepool_name,