From 07987a0637d0213153a6b0cbc7166bdf44227f27 Mon Sep 17 00:00:00 2001 From: Thirumalesh Aaraveti Date: Fri, 2 Feb 2024 15:37:10 +0530 Subject: [PATCH] Fixed the ticket extend --- .../common/abstract_monitor_tickets.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cloud_governance/cloud_resource_orchestration/common/abstract_monitor_tickets.py b/cloud_governance/cloud_resource_orchestration/common/abstract_monitor_tickets.py index df6b93ee..b51fa108 100644 --- a/cloud_governance/cloud_resource_orchestration/common/abstract_monitor_tickets.py +++ b/cloud_governance/cloud_resource_orchestration/common/abstract_monitor_tickets.py @@ -209,7 +209,10 @@ def _monitor_ticket_budget(self, ticket_id: str, region_name: str, budget: int, used_budget=used_budget, remain_budget=remaining_budget) elif remaining_budget <= 0: - subject, body = self.__mail_message.cro_monitor_budget_remain_high_alert(user=user, budget=budget, + ticket_extended = self.extend_tickets_budget(ticket_id=ticket_id, region_name=region_name, + current_budget=budget) + if not ticket_extended: + subject, body = self.__mail_message.cro_monitor_budget_remain_high_alert(user=user, budget=budget, ticket_id=ticket_id, used_budget=used_budget, remain_budget=remaining_budget)