def _check_consul_for_service(self):
        """Return true if the service expected to be running, is reported up
        in Consul by checking for all ip addresses to be present.

        :rtype: bool

        """
        version = 'version:{}'.format(self._version or 'latest')
        group = 'deploy:{}'.format(self._group) if self._group else None
        unit_name = utils.unit_name(self._name, None, self._group,
                                    self._version)
        state = self._fleet.state(True, unit_name)
        expected = set([s.ipaddr for s in state])
        LOGGER.debug('Checking to ensure service is up in consul for %i nodes',
                     len(expected))
        running = self._consul.catalog.service(self._name)
        actual = set()
        for node in running:
            if group and node['ServiceTags'] not in group:
                continue
            elif version not in node['ServiceTags']:
                continue
            else:
                actual.add(node['ServiceAddress'])
        LOGGER.debug('Found %i nodes running %s %s',
                     len(actual), self._name, version)
        return (expected & actual) == expected
dataset/ETHPy150Open aweber/houston/houston/controller.py/Controller._check_consul_for_service/swapped operands of `not in`