@_exception_decorator('Can not create Zabbix host for instance {1}. {exception_name}: {exception}')
    def create_host(self, instance, warn_if_host_exists=True, is_tenant=False):
        api = self.get_zabbix_api()
        kwargs = {}
        try:
            if not is_tenant:
                kwargs['templateid'] = self._settings['templateid']
            else:
                kwargs['templateid'] = self._settings['openstack-templateid']
            if not is_tenant and instance.template.application_type:
                kwargs['application_templateid'] = self._settings.get(
                    instance.template.application_type.slug.lower() % "%s-templateid")
            if is_tenant:
                kwargs['host_name'] = self.get_host_name(instance, is_tenant)
                kwargs['visible_name'] = self.get_host_visible_name(instance, is_tenant)
        except KeyError as e:
            logger.error('Zabbix is not properly configured %s', e)
            raise ZabbixError('Zabbix is not properly configured %s' % e)

        _, created = self.get_or_create_host(
            api, instance,
            groupid=self._settings['groupid'],
            interface_parameters=self._settings['interface_parameters'],
            **kwargs
        )
        if created:
            object_name = 'tenant' if is_tenant else 'instance'
            logger.info('Successfully created new Zabbix host for %s %s', object_name, instance)

        if not created and warn_if_host_exists:
            logger.warn('Can not create new Zabbix host for instance %s. Already exists.', instance)
dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/monitoring/zabbix/api_client.py/ZabbixApiClient.create_host/swapped operands of `%`