Skip to content

Commit

Permalink
Rename default uris for special types
Browse files Browse the repository at this point in the history
  • Loading branch information
juan cañete committed Jun 2, 2017
1 parent ade5cf7 commit 352ca92
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/komlogd/api/protocol/model/types.py
Expand Up @@ -73,19 +73,19 @@ def __init__(self, uri):
class Anomaly(Datapoint):

def __init__(self, metric):
super().__init__(uri='.'.join((metric.uri,'_k.anomaly')))
super().__init__(uri='.'.join((metric.uri,'_anomaly')))

def __deepcopy__(self, memo):
uri = self.uri.split('._k.anomaly')[0]
uri = self.uri.split('._anomaly')[0]
return type(self)(Metric(deepcopy(uri, memo)))

class Filter(Datapoint):

def __init__(self, metric, key, value):
super().__init__(uri='.'.join((metric.uri,'_k.filters',key,value)))
super().__init__(uri='.'.join((metric.uri,'_filters',key,value)))

def __deepcopy__(self, memo):
uri,rest = self.uri.split('._k.filters.')[0:2]
uri,rest = self.uri.split('._filters.')[0:2]
key,value = rest.split('.')[0:2]
return type(self)(metric=Metric(deepcopy(uri, memo)),key=key, value=value)

Expand Down

0 comments on commit 352ca92

Please sign in to comment.