def _extract_source_labels(self, entity): labels = self._extract_labels(entity) return utils.flatten_dict(labels, sep=".")
def _extract_source_labels(self, entity): labels = entity['kubernetes'].copy() labels.pop('labels', None) labels.pop('annotations', None) return utils.flatten_dict(labels, sep=".")
def _build_property_filters(self, properties, handle): flatten_properties = utils.flatten_dict(properties, sep='.') filters = [] for key, value in flatten_properties.items(): filters.append('FILTER %s.%s == "%s"' % (handle, key, value)) return ' '.join(filters)
def _extract_source_labels(self, entity): return utils.flatten_dict(entity['output_fields'], sep=".")
def _build_filters(self, query, handle): flatten_query = utils.flatten_dict(query, sep='.') filters = [] for key, value in flatten_query.items(): filters.append('FILTER %s.%s == "%s"' % (handle, key, value)) return ' '.join(filters)