@classmethod
    def _sentry_validation(cls, cluster):

        snt_count = cls._get_inst_count(cluster, 'SENTRY_SERVER')
        dn_count = cls._get_inst_count(cluster, 'HDFS_DATANODE')
        zk_count = cls._get_inst_count(cluster, 'ZOOKEEPER_SERVER')

        if snt_count > 1:
            raise ex.InvalidComponentCountException(
                'SENTRY_SERVER', _('0 or 1'), snt_count)
        if snt_count == 1:
            if dn_count < 1:
                raise ex.RequiredServiceMissingException(
                    'HDFS_DATANODE', required_by='SENTRY_SERVER')
            if zk_count < 1:
                raise ex.RequiredServiceMissingException(
                    'ZOOKEEPER', required_by='SENTRY_SERVER')
dataset/ETHPy150Open openstack/sahara/sahara/plugins/cdh/v5_3_0/validation.py/ValidatorV530._sentry_validation/original