def _check_host_is_up(self, host):
    try:
        service = objects.Service.get_by_compute_host(self.context, host)
    except exception.NotFound:
        raise exception.ComputeServiceUnavailable(host=host)
    if (not self.servicegroup_api.service_is_up(service)):
        raise exception.ComputeServiceUnavailable(host=host)
def _check_host_is_up(self, host):
    try:
        service = objects.Service.get_by_compute_host(self.context, host)
    except exception.NotFound:
        raise exception.ComputeServiceUnavailable(host=host)
    if (not self.servicegroup_api.service_is_up(service)):
        raise exception.ComputeServiceUnavailable(host=host)