Commit 14803a0e authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_[category/jo]: Include allocation_scope/close/noallocation

See merge request !487
parents 0f7c72df bb5c1a58
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>allocation_scope/close/outdated</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Allocation of services is closed because user dont want new instances be allocated on the server anymore for the time been</string> </value>
</item>
<item>
<key> <string>effective_date</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>noallocation</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Closed by User</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -555,6 +555,10 @@ class TestSlapOSCrmMonitoringCheckComputeNodeState(SlapOSTestCaseMixinWithAbort)
self._test_alarm_check_compute_node_state_selected(
allocation_scope='close/termination')
def test_alarm_check_compute_node_state_closed_noallocation_compute_node(self):
self._test_alarm_check_compute_node_state_selected(
allocation_scope='close/noallocation')
class TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation(SlapOSTestCaseMixinWithAbort):
def test_alarm_run_on_open_public(self):
......@@ -647,6 +651,9 @@ class TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation(SlapOSTestCase
def test_alarm_not_run_on_close_termination(self):
self._test_alarm_not_run_on_close('close/termination', monitor_scope="disabled")
def test_alarm_not_run_on_close_noallocation(self):
self._test_alarm_not_run_on_close('close/noallocation', monitor_scope="disabled")
def test_alarm_run_on_close_maintainence(self):
self._test_alarm_run_on_close('close/maintenence')
......@@ -656,6 +663,9 @@ class TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation(SlapOSTestCase
def test_alarm_run_on_close_termination(self):
self._test_alarm_run_on_close('close/termination')
def test_alarm_run_on_close_noallocation(self):
self._test_alarm_run_on_close('close/noallocation')
class TestSlapOSCrmMonitoringCheckInstanceInError(SlapOSTestCaseMixinWithAbort):
......
......@@ -300,6 +300,24 @@ class TestSlapOSERP5InteractionWorkflowComputeNodeSetAllocationScope(
allocation_scope="close/maintenance",
source_administration=person.getRelativeUrl())
self.assertEqual(compute_node.getSubjectList(), [person.getDefaultEmailCoordinateText()])
self.assertEqual(compute_node.getDestinationSectionList(),
[person.getRelativeUrl()])
def test_ComputeNode_setAllocationScope_closed_noallocation_no_source_adm(self):
self._test_ComputeNode_setAllocationScope_closed(
allocation_scope="close/noallocation",
)
def test_ComputeNode_setAllocationScope_closed_noallocation_with_source_adm(self):
person = self.makePerson()
self.tic()
self.assertNotIn(person.getDefaultEmailCoordinateText(), [None, ""])
compute_node = self._test_ComputeNode_setAllocationScope_closed(
allocation_scope="close/noallocation",
source_administration=person.getRelativeUrl())
self.assertEqual(compute_node.getSubjectList(), [person.getDefaultEmailCoordinateText()])
self.assertEqual(compute_node.getDestinationSectionList(),
[person.getRelativeUrl()])
\ No newline at end of file
......@@ -34,6 +34,7 @@
data-i18n=Supplied Softwares
data-i18n=Compute Node:
data-i18n=Associated Tickets
data-i18n=Closed by user
-->
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
......
......@@ -240,7 +240,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>983.7927.45169.51575</string> </value>
<value> <string>1006.16760.1803.58777</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -258,7 +258,7 @@
</tuple>
<state>
<tuple>
<float>1588211147.74</float>
<float>1675971376.31</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -120,7 +120,8 @@
"Monitoring Status",
"Supplied Softwares",
"Compute Node:",
"Associated Tickets"
"Associated Tickets",
"Closed by user"
];
// Follow up changeState API but it is requires to actually
......@@ -171,6 +172,7 @@
[results[2][14], 'close/termination'],
[results[2][15], 'close/forever'],
[results[2][16], 'close/outdated'],
[results[2][33], 'close/noallocation'],
[results[2][17], 'open/friend'],
[results[2][18], 'open/personal'],
[results[2][19], 'open/public'],
......
......@@ -263,7 +263,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1000.58064.4435.24422</string> </value>
<value> <string>1006.16758.53785.31334</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -281,7 +281,7 @@
</tuple>
<state>
<tuple>
<float>1656716026.45</float>
<float>1675971435.26</float>
<string>UTC</string>
</tuple>
</state>
......
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