Example #1
0
 def _extract_source_labels(self, entity):
     labels = self._extract_labels(entity)
     return utils.flatten_dict(labels, sep=".")
Example #2
0
 def _extract_source_labels(self, entity):
     labels = entity['kubernetes'].copy()
     labels.pop('labels', None)
     labels.pop('annotations', None)
     return utils.flatten_dict(labels, sep=".")
Example #3
0
 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)
Example #4
0
 def _extract_source_labels(self, entity):
     return utils.flatten_dict(entity['output_fields'], sep=".")
Example #5
0
 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)