From 82b47e837d8e83209417d0c39ee4850aefa2de21 Mon Sep 17 00:00:00 2001 From: GowthamShanmugam Date: Fri, 16 Mar 2018 23:43:20 +0530 Subject: [PATCH] Modified storing cluster node alert count logic tendrl-bug-id: Tendrl/commons#878 Signed-off-by: GowthamShanmugam --- tendrl/commons/objects/definition/master.yaml | 2 +- tendrl/commons/objects/node_alert_counters/__init__.py | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/tendrl/commons/objects/definition/master.yaml b/tendrl/commons/objects/definition/master.yaml index 7d48071e..8d8baf5c 100644 --- a/tendrl/commons/objects/definition/master.yaml +++ b/tendrl/commons/objects/definition/master.yaml @@ -1144,7 +1144,7 @@ namespace.tendrl: alert_count: help: "Count of alerts for the node" type: int - integration_id: + node_id: help: "Id of the node" type: String value: /nodes/{0}/alert_counters diff --git a/tendrl/commons/objects/node_alert_counters/__init__.py b/tendrl/commons/objects/node_alert_counters/__init__.py index d60de6fe..454985d9 100644 --- a/tendrl/commons/objects/node_alert_counters/__init__.py +++ b/tendrl/commons/objects/node_alert_counters/__init__.py @@ -19,12 +19,3 @@ def render(self): self.node_id or NS.node_context.node_id ) return super(NodeAlertCounters, self).render() - - def save(self, *args, **kwargs): - if NS.tendrl_context.integration_id: - NS.tendrl.objects.ClusterNodeAlertCounters( - alert_count=self.alert_count, - node_id=self.node_id, - integration_id=NS.tendrl_context.integration_id - ).save() - super(NodeAlertCounters, self).save(*args, **kwargs)