Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Leymonerie
slapos.core
Commits
960a4068
Commit
960a4068
authored
Sep 12, 2013
by
Vivien Alger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support Request generation: Alarm_checkCloudIsFull refactoring
parent
06c32a51
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
957 additions
and
134 deletions
+957
-134
master/bt5/slapos_crm/PathTemplateItem/person_module/allocation_tester.xml
..._crm/PathTemplateItem/person_module/allocation_tester.xml
+160
-0
master/bt5/slapos_crm/PathTemplateItem/support_request_module/slapos_crm_support_request_template_for_monitoring.xml
...le/slapos_crm_support_request_template_for_monitoring.xml
+88
-0
master/bt5/slapos_crm/PropertySheetTemplateItem/portal_property_sheets/SlapOSCRMSystemPreference/preferred_software_release_to_test_for_space_property.xml
...preferred_software_release_to_test_for_space_property.xml
+46
-0
master/bt5/slapos_crm/PropertySheetTemplateItem/portal_property_sheets/SlapOSCRMSystemPreference/preferred_support_request_resource_for_monitoring_property.xml
...rred_support_request_resource_for_monitoring_property.xml
+46
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Alarm_checkCloudIsFull.xml
...teItem/portal_skins/slapos_crm/Alarm_checkCloudIsFull.xml
+13
-11
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Base_generateSupportRequestForSlapOS.xml
...skins/slapos_crm/Base_generateSupportRequestForSlapOS.xml
+91
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Computer_checkSoftwareInstanceState.xml
..._skins/slapos_crm/Computer_checkSoftwareInstanceState.xml
+1
-1
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Computer_checkState.xml
...plateItem/portal_skins/slapos_crm/Computer_checkState.xml
+18
-8
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/SoftwareInstance_checkState.xml
...m/portal_skins/slapos_crm/SoftwareInstance_checkState.xml
+12
-8
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/SoftwareRelease_testForAllocation.xml
...al_skins/slapos_crm/SoftwareRelease_testForAllocation.xml
+93
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/SystemPreference_viewSlapOSCRM.xml
...ortal_skins/slapos_crm/SystemPreference_viewSlapOSCRM.xml
+2
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/SystemPreference_viewSlapOSCRM/my_preferred_software_release_to_test_for_space.xml
...OSCRM/my_preferred_software_release_to_test_for_space.xml
+96
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/SystemPreference_viewSlapOSCRM/my_preferred_support_request_resource_for_monitoring.xml
.../my_preferred_support_request_resource_for_monitoring.xml
+96
-0
master/bt5/slapos_crm/TestTemplateItem/testSlapOSCRMSupportRequestGeneration.py
...TestTemplateItem/testSlapOSCRMSupportRequestGeneration.py
+191
-104
master/bt5/slapos_crm/bt/revision
master/bt5/slapos_crm/bt/revision
+1
-1
master/bt5/slapos_crm/bt/template_path_list
master/bt5/slapos_crm/bt/template_path_list
+3
-1
No files found.
master/bt5/slapos_crm/PathTemplateItem/person_module/allocation_tester.xml
0 → 100644
View file @
960a4068
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Person"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</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>
Associate
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
__translation_dict
</string>
</key>
<value>
<dictionary/>
</value>
</item>
<item>
<key>
<string>
_count
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_mt_index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_tree
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
allocation_tester
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
first_name
</string>
</key>
<value>
<string>
Member
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
allocation_tester
</string>
</value>
</item>
<item>
<key>
<string>
last_name
</string>
</key>
<value>
<string>
Template
</string>
</value>
</item>
<item>
<key>
<string>
password
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Person
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Allocation tester
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Length"
module=
"BTrees.Length"
/>
</pickle>
<pickle>
<int>
0
</int>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string>
{SSHA}f1gAG3A53rfwjkLB/+Ex89MtocZz/4V9K4TZ
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/PathTemplateItem/support_request_module/slapos_crm_support_request_template_for_monitoring.xml
0 → 100644
View file @
960a4068
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Support Request"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</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>
_View_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>
source_section/organisation_module/slapos
</string>
<string>
source_trade/organisation_module/slapos
</string>
<string>
source/organisation_module/slapos
</string>
<string>
resource/service_module/slapos_crm_monitoring
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
SR-282
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
slapos_crm_support_request_template_for_monitoring
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Support Request
</string>
</value>
</item>
<item>
<key>
<string>
price
</string>
</key>
<value>
<float>
0.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Template Support Request For Monitoring
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/PropertySheetTemplateItem/portal_property_sheets/SlapOSCRMSystemPreference/preferred_software_release_to_test_for_space_property.xml
0 → 100644
View file @
960a4068
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_software_release_to_test_for_space_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<string>
python:\'\'
</string>
</value>
</item>
<item>
<key>
<string>
write_permission
</string>
</key>
<value>
<string>
Manage properties
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/PropertySheetTemplateItem/portal_property_sheets/SlapOSCRMSystemPreference/preferred_support_request_resource_for_monitoring_property.xml
0 → 100644
View file @
960a4068
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_support_request_resource_for_monitoring_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<string>
python:\'\'
</string>
</value>
</item>
<item>
<key>
<string>
write_permission
</string>
</key>
<value>
<string>
Manage properties
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Alarm_checkCloudIsFull.xml
View file @
960a4068
...
@@ -52,23 +52,25 @@
...
@@ -52,23 +52,25 @@
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
portal = context.getPortalObject()\n
<value>
<string>
portal = context.getPortalObject()\n
\n
\n
computer_list = portal.portal_catalog(\n
software_release_preference = portal.portal_preferences.getPreferredSoftwareReleaseToTestForSpace()\n
portal_type=\'Computer\',\n
validation_state = \'validated\',\n
capacity_scope = \'open\',\n
limit = 1\n
)\n
\n
\n
if len(computer_list) == 0:\n
if software_release_preference != \'\':\n
context.activate(tag=tag).Base_generateSupportRequestForSlapOS(\n
software_release_list = software_release_preference.split("\\n")\n
"VIFIB public cloud is full",\n
\n
"No more computer with open capacity scope, add more ASAP"\n
portal.portal_catalog.searchAndActivate(\n
portal_type = \'Software Release\',\n
url_string = software_release_list,\n
\n
method_id = \'SoftwareRelease_testForAllocation\',\n
activate_kw = {\'tag\':tag} \n
)\n
)\n
\n
context.activate(after_tag=tag).getId()\n
</string>
</value>
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
*args, **kw
</string>
</value>
<value>
<string>
tag, fixit, params
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Base_generateSupportRequestForSlapOS.xml
0 → 100644
View file @
960a4068
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
from DateTime import DateTime\n
\n
portal = context.getPortalObject()\n
\n
support_request_in_progress = portal.portal_catalog.getResultValue(\n
portal_type = \'Support Request\',\n
title = title,\n
simulation_state = ["validated","submitted","suspended"],\n
source_project_value = source_relative_url\n
)\n
\n
if support_request_in_progress is None:\n
support_request = portal.\\\n
support_request_module.\\\n
slapos_crm_support_request_template_for_monitoring.\\\n
Base_createCloneDocument(batch_mode=1)\n
support_request.edit(\n
title = title,\n
description = description,\n
start_date = DateTime(),\n
source_project_value = source_relative_url\n
)\n
support_request.validate()\n
\n
return support_request.getRelativeUrl()\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
title, description, source_relative_url
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_generateSupportRequestForSlapOS
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Computer_checkSoftwareInstanceState.xml
View file @
960a4068
...
@@ -58,7 +58,7 @@ partition_list = portal.portal_catalog(portal_type = \'Computer Partition\',\n
...
@@ -58,7 +58,7 @@ partition_list = portal.portal_catalog(portal_type = \'Computer Partition\',\n
)\n
)\n
\n
\n
for partition in partition_list:\n
for partition in partition_list:\n
instance = partition.getAggregateRelatedValue()\n
instance = partition.getAggregateRelatedValue(
portal_type=\'Software Instance\'
)\n
if instance is not None:\n
if instance is not None:\n
instance.activate().SoftwareInstance_checkState()\n
instance.activate().SoftwareInstance_checkState()\n
</string>
</value>
</string>
</value>
...
...
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Computer_checkState.xml
View file @
960a4068
...
@@ -53,19 +53,29 @@
...
@@ -53,19 +53,29 @@
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<value>
<string
encoding=
"cdata"
>
<![CDATA[
from DateTime import DateTime\n
from DateTime import DateTime\n
import json\n
\n
\n
portal = context.getPortalObject()\n
portal = context.getPortalObject()\n
\n
\n
last_contact = context.Computer_getLastestContactedDate()\n
reference = context.getReference()\n
reference = context.getReference()\n
memcached_dict = context.getPortalObject().portal_memcached.getMemcachedDict(\n
key_prefix=\'slap_tool\',\n
plugin_path=\'portal_memcached/default_memcached_plugin\')\n
\n
try:\n
d = memcached_dict[reference]\n
except KeyError:\n
return\n
\n
\n
if last_contact != "Computer didn\'t contact the server":\n
d = json.loads(d)\n
if (DateTime() - last_contact) >
1:\n
last_contact = DateTime(d.get(\'created_at\'))\n
tag = "Support Request generation for %s" % reference\n
\n
context.activate(tag=tag).Base_generateSupportRequestForSlapOS(\n
if (DateTime() - last_contact) >
1:\n
"Support Request for %s" % reference,\n
return context.Base_generateSupportRequestForSlapOS(\n
"%s has not contacted the server for more than 24 hours" % reference\n
"Lost contact with %s" % reference,\n
)\n
"%s has not contacted the server for more than 24 hours (last contact date: %s)" % (reference, last_contact),\n
context.getRelativeUrl()\n
)\n
]]>
</string>
</value>
]]>
</string>
</value>
...
...
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/SoftwareInstance_checkState.xml
View file @
960a4068
...
@@ -69,24 +69,28 @@ d = json.loads(d)\n
...
@@ -69,24 +69,28 @@ d = json.loads(d)\n
result = d[\'text\']\n
result = d[\'text\']\n
last_contact = DateTime(d.get(\'created_at\'))\n
last_contact = DateTime(d.get(\'created_at\'))\n
now = DateTime()\n
now = DateTime()\n
title = ""\n
\n
\n
if result.startswith(\'#error \'):\n
if result.startswith(\'#error \'):\n
# If no change in the last 2 hours generate a support request\n
# If no change in the last 2 hours generate a support request\n
if (now - last_contact) >
0.08:\n
if (now - last_contact) >
0.08:\n
tag = "Support Request generation for %s" % reference\n
tag = "Support Request generation for %s" % reference\n
context.activate(tag=tag).Base_generateSupportRequestForSlapOS(\n
title = "Instance %s in error state" % reference\n
"Support Request for %s" % reference,\n
description = "%s has been in error state for more than 2 hours (last contact date: %s)" % (reference, last_contact)\n
"%s has been in error state for more than 2 hours" % reference\n
)\n
\n
\n
elif result.startswith(\'#access \'):\n
elif result.startswith(\'#access \'):\n
# If there was no contact for more than one day generate a support request\n
# If there was no contact for more than one day generate a support request\n
if (now - last_contact) > 1:\n
if (now - last_contact) > 1:\n
tag = "Support Request generation for %s" % reference\n
tag = "Support Request generation for %s" % reference\n
context.activate(tag=tag).Base_generateSupportRequestForSlapOS(\n
title = "Instance %s in unknown state" % reference\n
"Support Request for %s" % reference,\n
description = "%s has not contacted the server for more than 24 hours (last contact date: %s)" % (reference, last_contact)\n
"%s has not contacted the server for more than 24 hours" % reference\n
\n
)\n
if title != "":\n
return context.Base_generateSupportRequestForSlapOS(\n
title,\n
description,\n
context.getRelativeUrl()\n
)\n
]]>
</string>
</value>
]]>
</string>
</value>
...
...
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/SoftwareRelease_testForAllocation.xml
0 → 100644
View file @
960a4068
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
portal = context.getPortalObject()\n
software_release = context\n
software_release_url = software_release.getUrlString()\n
\n
user = portal.person_module.allocation_tester\n
\n
result = user.Person_restrictMethodAsShadowUser(\n
shadow_document=user,\n
callable_object=user.Person_findPartition,\n
argument_list=[\n
software_release_url,\n
\'\',\n
\'Software Instance\',\n
{}\n
],\n
argument_dict={\n
\'test_mode\': True})\n
\n
if not result:\n
title = "Can\'t allocate new instances for software release %s" % software_release_url\n
description = "Need more public computers that can instanciate the software release %s" % software_release_url\n
\n
return software_release.Base_generateSupportRequestForSlapOS(\n
title,\n
description,\n
software_release.getRelativeUrl()\n
)\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SoftwareRelease_testForAllocation
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/SystemPreference_viewSlapOSCRM.xml
View file @
960a4068
...
@@ -97,6 +97,7 @@
...
@@ -97,6 +97,7 @@
<string>
my_preferred_support_request_template
</string>
<string>
my_preferred_support_request_template
</string>
<string>
my_preferred_web_message_template
</string>
<string>
my_preferred_web_message_template
</string>
<string>
my_preferred_slapos_web_site_url
</string>
<string>
my_preferred_slapos_web_site_url
</string>
<string>
my_preferred_support_request_resource_for_monitoring
</string>
</list>
</list>
</value>
</value>
</item>
</item>
...
@@ -106,6 +107,7 @@
...
@@ -106,6 +107,7 @@
<list>
<list>
<string>
my_preferred_regularisation_request_use_list
</string>
<string>
my_preferred_regularisation_request_use_list
</string>
<string>
my_preferred_regularisation_request_resource
</string>
<string>
my_preferred_regularisation_request_resource
</string>
<string>
my_preferred_software_release_to_test_for_space
</string>
</list>
</list>
</value>
</value>
</item>
</item>
...
...
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/SystemPreference_viewSlapOSCRM/my_preferred_software_release_to_test_for_space.xml
0 → 100644
View file @
960a4068
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_preferred_software_release_to_test_for_space
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_text_area_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Software Release To Test For Space
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/SystemPreference_viewSlapOSCRM/my_preferred_support_request_resource_for_monitoring.xml
0 → 100644
View file @
960a4068
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_preferred_support_request_resource_for_monitoring
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_string_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Resource For Monitoring Support Request
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/TestTemplateItem/testSlapOSCRMSupportRequestGeneration.py
View file @
960a4068
This diff is collapsed.
Click to expand it.
master/bt5/slapos_crm/bt/revision
View file @
960a4068
22
23
\ No newline at end of file
\ No newline at end of file
master/bt5/slapos_crm/bt/template_path_list
View file @
960a4068
event_module/slapos_crm_web_message_template
event_module/slapos_crm_web_message_template
person_module/allocation_tester
portal_alarms/slapos_check_cloud_is_full
portal_alarms/slapos_check_cloud_is_full
portal_alarms/slapos_check_computer_state
portal_alarms/slapos_check_computer_state
portal_alarms/slapos_check_software_instance_state
portal_alarms/slapos_check_software_instance_state
...
@@ -21,4 +22,5 @@ service_module/slapos_crm_invoice_cancellation
...
@@ -21,4 +22,5 @@ service_module/slapos_crm_invoice_cancellation
service_module/slapos_crm_spam
service_module/slapos_crm_spam
service_module/slapos_crm_stop_acknowledgement
service_module/slapos_crm_stop_acknowledgement
service_module/slapos_crm_stop_reminder
service_module/slapos_crm_stop_reminder
support_request_module/slapos_crm_support_request_template
support_request_module/slapos_crm_support_request_template
\ No newline at end of file
support_request_module/slapos_crm_support_request_template_for_monitoring
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment