Commit 5079408b 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 52f62ad1
...@@ -30,7 +30,9 @@ for software_installation in software_installation_list: ...@@ -30,7 +30,9 @@ for software_installation in software_installation_list:
reference = software_installation.getReference() reference = software_installation.getReference()
d = software_installation.getAccessStatus() d = software_installation.getAccessStatus()
if d.get("no_data", None) == 1: 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" last_contact = "No Contact Information"
ticket_title = "[MONITORING] No information for %s on %s" % (reference, compute_node_reference) 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" % \ description = "The software release %s did not started to build on %s since %s" % \
......
...@@ -1596,11 +1596,10 @@ class TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation(SlapOSTestCase ...@@ -1596,11 +1596,10 @@ class TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation(SlapOSTestCase
self.start_requested_software_installation.getReference(), self.start_requested_software_installation.getReference(),
compute_node.getReference() compute_node.getReference()
) )
if 0:
raise NotImplementedError(ticket_title)
ticket = self._getGeneratedSupportRequest(compute_node.getUid(), ticket_title) ticket = self._getGeneratedSupportRequest(compute_node.getUid(), ticket_title)
self.assertNotEqual(ticket, None) self.assertEqual(ticket, None)
"""
event_list = ticket.getFollowUpRelatedValueList() event_list = ticket.getFollowUpRelatedValueList()
self.assertEqual(len(event_list), 1) self.assertEqual(len(event_list), 1)
event = event_list[0] event = event_list[0]
...@@ -1619,6 +1618,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation(SlapOSTestCase ...@@ -1619,6 +1618,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation(SlapOSTestCase
self.assertEqual(ticket.getSimulationState(), "submitted") self.assertEqual(ticket.getSimulationState(), "submitted")
self.assertEqual(event.getSimulationState(), "delivered") self.assertEqual(event.getSimulationState(), "delivered")
self.assertEqual(event.getPortalType(), "Web Message") self.assertEqual(event.getPortalType(), "Web Message")
"""
@simulate('ERP5Site_isSupportRequestCreationClosed', '*args, **kwargs','return 0') @simulate('ERP5Site_isSupportRequestCreationClosed', '*args, **kwargs','return 0')
@simulate('NotificationTool_getDocumentValue', @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