(self, instances)
return result
Generalize each (single) Istio instance into OpenMetricsBaseCheck instances.
Generalize each (single) Istio instance into OpenMetricsBaseCheck instances.
Generalize each ( single ) Istio instance into OpenMetricsBaseCheck instances .
def create_generic_instances(self, instances):
        """
        Generalize each (single) Istio instance into OpenMetricsBaseCheck instances.
        """
        result = []
        for instance in instances:
            exclude_labels = instance.get('exclude_labels', []) + BLACKLIST_LABELS
            instance.update({'exclude_labels': exclude_labels})

            if 'istio_mesh_endpoint' in instance:
                result.append(self._create_istio_mesh_instance(instance))
            if 'mixer_endpoint' in instance:
                result.append(self._create_process_mixer_instance(instance))
            if 'pilot_endpoint' in instance:
                result.append(self._create_process_pilot_instance(instance))
            if 'galley_endpoint' in instance:
                result.append(self._create_process_galley_instance(instance))
            if 'citadel_endpoint' in instance:
                result.append(self._create_process_citadel_instance(instance))
        return result
def create_generic_instances ( self , instances ) : result = [ ] for instance in instances : exclude_labels = instance . get ( 'exclude_labels' , [ ] ) + BLACKLIST_LABELS instance . update ( { 'exclude_labels' : exclude_labels } ) if 'istio_mesh_endpoint' in instance : result . append ( self . _create_istio_mesh_instance ( instance ) ) if 'mixer_endpoint' in instance : result . append ( self . _create_process_mixer_instance ( instance ) ) if 'pilot_endpoint' in instance : result . append ( self . _create_process_pilot_instance ( instance ) ) if 'galley_endpoint' in instance : result . append ( self . _create_process_galley_instance ( instance ) ) if 'citadel_endpoint' in instance : result . append ( self . _create_process_citadel_instance ( instance ) ) return result