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
Nicolas Wavrant
slapos.core
Commits
19965ffb
Commit
19965ffb
authored
Feb 04, 2014
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add webservice links custom to slapos.org website.
This is just a proof of concept without genericity.
parent
72b31104
Changes
16
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
1203 additions
and
18 deletions
+1203
-18
master/bt5/slapos_jio/ExtensionTemplateItem/HalStyle.py
master/bt5/slapos_jio/ExtensionTemplateItem/HalStyle.py
+10
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/Base_redirect.xml
...teItem/portal_skins/erp5_hal_json_style/Base_redirect.xml
+1
-1
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/Computer_requestInstallationFromJio.xml
...p5_hal_json_style/Computer_requestInstallationFromJio.xml
+74
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/Computer_requestNewComputerCertificateFromJio.xml
...n_style/Computer_requestNewComputerCertificateFromJio.xml
+84
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/Computer_revokeComputerCertificateFromJio.xml
..._json_style/Computer_revokeComputerCertificateFromJio.xml
+77
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/Computer_updateAllocationScopeFromJio.xml
..._hal_json_style/Computer_updateAllocationScopeFromJio.xml
+106
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.xml
...tal_skins/erp5_hal_json_style/ERP5Document_getHateoas.xml
+252
-16
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/HostingSubscription_changeRequestedStateFromJio.xml
...style/HostingSubscription_changeRequestedStateFromJio.xml
+85
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/Person_requestComputerFromJio.xml
...ins/erp5_hal_json_style/Person_requestComputerFromJio.xml
+74
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/Person_requestComputerNetworkFromJio.xml
...5_hal_json_style/Person_requestComputerNetworkFromJio.xml
+88
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/Person_requestInstanceFromJio.xml
...ins/erp5_hal_json_style/Person_requestInstanceFromJio.xml
+82
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/Person_requestTicketFromJio.xml
...skins/erp5_hal_json_style/Person_requestTicketFromJio.xml
+102
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/SoftwareInstallation_destroyFromJio.xml
...p5_hal_json_style/SoftwareInstallation_destroyFromJio.xml
+73
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/Ticket_updateFromJio.xml
...portal_skins/erp5_hal_json_style/Ticket_updateFromJio.xml
+93
-0
master/bt5/slapos_jio/bt/revision
master/bt5/slapos_jio/bt/revision
+1
-1
master/bt5/slapos_jio/bt/template_extension_id_list
master/bt5/slapos_jio/bt/template_extension_id_list
+1
-0
No files found.
master/bt5/slapos_jio/ExtensionTemplateItem/HalStyle.py
0 → 100644
View file @
19965ffb
def
Listbox_getListMethodName
(
self
,
field
):
""" XXXX"""
list_method
=
field
.
get_value
(
'list_method'
)
try
:
list_method_name
=
getattr
(
list_method
,
'method_name'
)
except
AttributeError
:
list_method_name
=
list_method
return
list_method_name
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/Base_redirect.xml
View file @
19965ffb
...
@@ -67,7 +67,7 @@ request_form = context.ERP5Site_filterParameterList(request_form)\n
...
@@ -67,7 +67,7 @@ request_form = context.ERP5Site_filterParameterList(request_form)\n
request_form.update(keep_items)\n
request_form.update(keep_items)\n
\n
\n
if form_id == \'view\':\n
if form_id == \'view\':\n
redirect_url = context.absolute_url()\n
redirect_url =
"%s/ERP5Document_getHateoas" %
context.absolute_url()\n
else:\n
else:\n
redirect_url = \'%s/%s\' % (context.absolute_url(), form_id)\n
redirect_url = \'%s/%s\' % (context.absolute_url(), form_id)\n
\n
\n
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/Computer_requestInstallationFromJio.xml
0 → 100644
View file @
19965ffb
<?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>
if REQUEST.other[\'method\'] != "POST":\n
response.setStatus(405)\n
return ""\n
\n
computer = context\n
computer.requestSoftwareRelease(software_release_url=software_release, state=\'available\')\n
\n
return context.REQUEST.get(\'software_installation_url\').Base_redirect()\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
software_release, REQUEST=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Computer_requestInstallationFromJio
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/Computer_requestNewComputerCertificateFromJio.xml
0 → 100644
View file @
19965ffb
<?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>
if REQUEST.other[\'method\'] != "POST":\n
response.setStatus(405)\n
return ""\n
\n
import json\n
\n
computer = context\n
request = context.REQUEST\n
response = REQUEST.RESPONSE\n
\n
context.Base_prepareCorsResponse(RESPONSE=response)\n
\n
computer.generateCertificate()\n
\n
return json.dumps({\n
\'certificate\': request.get(\'computer_certificate\'),\n
\'key\': request.get(\'computer_key\')\n
}, indent=2)\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
REQUEST=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Computer_requestNewComputerCertificateFromJio
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/Computer_revokeComputerCertificateFromJio.xml
0 → 100644
View file @
19965ffb
<?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>
if REQUEST.other[\'method\'] != "POST":\n
response.setStatus(405)\n
return ""\n
\n
computer = context\n
response = REQUEST.RESPONSE\n
context.Base_prepareCorsResponse(RESPONSE=response)\n
\n
computer.revokeCertificate()\n
\n
return ""\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
REQUEST=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Computer_revokeComputerCertificateFromJio
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/Computer_updateAllocationScopeFromJio.xml
0 → 100644
View file @
19965ffb
<?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>
if REQUEST.other[\'method\'] != "POST":\n
response.setStatus(405)\n
return ""\n
\n
portal = context.getPortalObject()\n
computer = context\n
\n
if allocation_scope == \'open/public\':\n
# Public computer capacity is handle by an alarm\n
capacity_scope = \'close\'\n
elif allocation_scope.startswith(\'open\'):\n
# Capacity is not handled for \'private\' computers\n
capacity_scope = \'open\'\n
else:\n
capacity_scope = \'close\'\n
\n
edit_kw = {\n
\'allocation_scope\': allocation_scope,\n
\'capacity_scope\': capacity_scope,\n
}\n
\n
self_person = computer.getSourceAdministrationValue(portal_type="Person")\n
self_email = self_person.getDefaultEmailCoordinateText()\n
if allocation_scope == \'open/public\':\n
# reset friends and update in place\n
edit_kw[\'subject_list\'] = [\'\']\n
edit_kw[\'destination_section\'] = None\n
elif allocation_scope == \'open/personal\':\n
# reset friends to self and update in place\n
edit_kw[\'subject_list\'] = [self_email]\n
edit_kw[\'destination_section_value\'] = self_person\n
else:\n
if self_email not in subject_list:\n
# add self as friend\n
subject_list.append(self_email)\n
edit_kw[\'subject_list\'] = subject_list\n
\n
computer.edit(**edit_kw)\n
\n
return ""\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
allocation_scope, subject_list, REQUEST=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Computer_updateAllocationScopeFromJio
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.xml
View file @
19965ffb
This diff is collapsed.
Click to expand it.
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/HostingSubscription_changeRequestedStateFromJio.xml
0 → 100644
View file @
19965ffb
<?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>
if REQUEST.other[\'method\'] != "POST":\n
response.setStatus(405)\n
return ""\n
\n
if action not in ("started", "stopped", "destroyed"):\n
raise NotImplementedError, "Unknown action %s" % action\n
\n
person = context.getDestinationSectionValue()\n
person.requestSoftwareInstance(\n
state=action,\n
software_release=context.getUrlString(),\n
software_title=context.getTitle(),\n
software_type=context.getSourceReference(),\n
instance_xml=context.getTextContent(),\n
sla_xml=context.getSlaXml(),\n
shared=context.isRootSlave()\n
)\n
\n
context.Base_redirect()\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
action, REQUEST=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
HostingSubscription_changeRequestedStateFromJio
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/Person_requestComputerFromJio.xml
0 → 100644
View file @
19965ffb
<?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>
if REQUEST.other[\'method\'] != "POST":\n
response.setStatus(405)\n
return ""\n
\n
person = context\n
\n
person.requestComputer(computer_title=computer_title)\n
return context.getPortalObject().restrictedTraverse(context.REQUEST.get(\'computer\')).Base_redirect()\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
computer_title, REQUEST=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Person_requestComputerFromJio
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/Person_requestComputerNetworkFromJio.xml
0 → 100644
View file @
19965ffb
<?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>
if REQUEST.other[\'method\'] != "POST":\n
response.setStatus(405)\n
return ""\n
\n
portal = context.getPortalObject()\n
\n
network_portal_type = "Computer Network"\n
\n
reference = "NET-%s" % portal.portal_ids.generateNewId(\n
id_group=\'slap_network_reference\',\n
id_generator=\'uid\')\n
\n
module = portal.getDefaultModule(portal_type=network_portal_type)\n
network = module.newContent(\n
portal_type=network_portal_type,\n
title=network_title,\n
reference=reference,\n
source_administration=context.getRelativeUrl()\n
)\n
network.validate()\n
\n
return network.Base_redirect()\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
network_title, REQUEST=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Person_requestComputerNetworkFromJio
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/Person_requestInstanceFromJio.xml
0 → 100644
View file @
19965ffb
<?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>
if REQUEST.other[\'method\'] != "POST":\n
response.setStatus(405)\n
return ""\n
\n
person = context\n
person.requestSoftwareInstance(\n
state=state,\n
software_release=software_release,\n
software_title=software_title,\n
software_type=software_type,\n
instance_xml=instance_xml,\n
sla_xml=sla_xml,\n
shared=int(shared)\n
)\n
\n
return context.REQUEST.get(\'request_hosting_subscription\').Base_redirect()\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
state, software_release, software_title, software_type, instance_xml, sla_xml, shared, REQUEST=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Person_requestInstanceFromJio
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/Person_requestTicketFromJio.xml
0 → 100644
View file @
19965ffb
<?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>
if REQUEST.other[\'method\'] != "POST":\n
response.setStatus(405)\n
return ""\n
\n
person = context\n
portal = person.getPortalObject()\n
\n
support_request_template = portal.restrictedTraverse(\n
portal.portal_preferences.getPreferredSupportRequestTemplate())\n
support_request = support_request_template.Base_createCloneDocument(batch_mode=1)\n
\n
support_request.edit(\n
title=title,\n
destination_decision_value=person,\n
resource=resource,\n
start_date=DateTime(),\n
)\n
support_request.validate(comment="Submitted from the web site contact form")\n
\n
web_message_template = portal.restrictedTraverse(\n
portal.portal_preferences.getPreferredWebMessageTemplate())\n
web_message = web_message_template.Base_createCloneDocument(batch_mode=1)\n
# XXX init script is not called when cloning?\n
web_message.Event_init()\n
web_message.edit(\n
title=title,\n
content_type="text/plain",\n
text_content=description,\n
source_value=person,\n
resource=resource,\n
start_date=DateTime(),\n
follow_up_value=support_request,\n
)\n
web_message.stop(comment="Submitted from the web site contact form")\n
\n
return support_request.Base_redirect()\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
title, resource, description, REQUEST=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Person_requestTicketFromJio
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/SoftwareInstallation_destroyFromJio.xml
0 → 100644
View file @
19965ffb
<?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>
if REQUEST.other[\'method\'] != "POST":\n
response.setStatus(405)\n
return ""\n
\n
context.getAggregateValue(portal_type=\'Computer\').requestSoftwareRelease(software_release_url=context.getUrlString(), state=\'destroyed\')\n
\n
return ""\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
REQUEST=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SoftwareInstallation_destroyFromJio
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/erp5_hal_json_style/Ticket_updateFromJio.xml
0 → 100644
View file @
19965ffb
<?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>
if REQUEST.other[\'method\'] != "POST":\n
response.setStatus(405)\n
return ""\n
\n
ticket = context\n
portal = ticket.getPortalObject()\n
person = ticket.getDestinationDecisionValue()\n
\n
web_message_template = portal.restrictedTraverse(\n
portal.portal_preferences.getPreferredWebMessageTemplate())\n
web_message = web_message_template.Base_createCloneDocument(batch_mode=1)\n
# XXX init script is not called when cloning?\n
web_message.Event_init()\n
web_message.edit(\n
title="Re: %s" % context.getTitle(),\n
content_type="text/plain",\n
text_content=description,\n
source_value=person,\n
resource=ticket.getResource(),\n
start_date=DateTime(),\n
follow_up_value=ticket,\n
)\n
web_message.stop(comment="Submitted from the web site contact form")\n
if portal.portal_workflow.isTransitionPossible(context, "validate"):\n
context.validate(comment="See %s" % web_message.getRelativeUrl())\n
\n
return ""\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
description, REQUEST=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Ticket_updateFromJio
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/bt/revision
View file @
19965ffb
1
2
\ No newline at end of file
\ No newline at end of file
master/bt5/slapos_jio/bt/template_extension_id_list
0 → 100644
View file @
19965ffb
HalStyle
\ 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