Skip to content

Commit

Permalink
Merge pull request #879 from GowthamShanmugam/node_alert_obj_integrat…
Browse files Browse the repository at this point in the history
…ion_id

Modified storing cluster node alert count logic
  • Loading branch information
r0h4n authored Mar 20, 2018
2 parents c48a1fa + 82b47e8 commit 9451480
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion tendrl/commons/objects/definition/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions tendrl/commons/objects/node_alert_counters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 9451480

Please sign in to comment.