Commit 781dac41 authored by Romain Courteaud's avatar Romain Courteaud

slapos_crm: do not create ticket if we do not have any information for the...

slapos_crm: do not create ticket if we do not have any information for the software installation status

This was the behaviour before the virtual master migration.
Restore it, to not create too many tickets for now.
parent 6e448d7c
......@@ -30,7 +30,9 @@ for software_installation in software_installation_list:
reference = software_installation.getReference()
d = software_installation.getAccessStatus()
if d.get("no_data", None) == 1:
should_notify = True
#should_notify = True
# We do not create if there is no information for the compilation
# it should be reported by more global alarm related to the compute node itself
last_contact = "No Contact Information"
ticket_title = "[MONITORING] No information for %s on %s" % (reference, compute_node_reference)
description = "The software release %s did not started to build on %s since %s" % \
......
......@@ -1596,11 +1596,10 @@ class TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation(SlapOSTestCase
self.start_requested_software_installation.getReference(),
compute_node.getReference()
)
if 0:
raise NotImplementedError(ticket_title)
ticket = self._getGeneratedSupportRequest(compute_node.getUid(), ticket_title)
self.assertNotEqual(ticket, None)
self.assertEqual(ticket, None)
"""
event_list = ticket.getFollowUpRelatedValueList()
self.assertEqual(len(event_list), 1)
event = event_list[0]
......@@ -1619,6 +1618,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation(SlapOSTestCase
self.assertEqual(ticket.getSimulationState(), "submitted")
self.assertEqual(event.getSimulationState(), "delivered")
self.assertEqual(event.getPortalType(), "Web Message")
"""
@simulate('ERP5Site_isSupportRequestCreationClosed', '*args, **kwargs','return 0')
@simulate('NotificationTool_getDocumentValue',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment