Commit e1f4878a authored by Rafael Monnerat's avatar Rafael Monnerat

Include new service shortcut section for request slapos master.

parent f100e1b4
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Section" 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>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>authorization_forced</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>custom_render_method_id</string> </key>
<value> <string>WebSection_orderVifibSlapOSMaster</string> </value>
</item>
<item>
<key> <string>default_page_displayed</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>slaposmaster</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Section</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>1</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
112
\ No newline at end of file
113
\ No newline at end of file
<?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 encoding="cdata"><![CDATA[
import json\n
portal = context.getPortalObject()\n
\n
instance_xml = """<?xml version="1.0" encoding="utf-8"?>\n
<instance>\n
<parameter id="json">%s</parameter>\n
</instance>\n
""" % (json.dumps({\n
"timezone": "Europe/Paris",\n
"site-id": "erp5",\n
"erp5-ca": {\n
"country-code": "FR",\n
"email": "admin@vifib.org",\n
"state": "Nord-Pas-de-Calais",\n
"city": "Lille",\n
"company": "ViFiB SARL"\n
},\n
"backend": {\n
"login": {\n
"zopecount": 1,\n
"access-control-string": "all",\n
"scheme": ["https"],\n
"maxconn": 1,\n
"thread-amount": 1},\n
"erp5": {\n
"zopecount": 1,\n
"access-control-string": "all",\n
"scheme": ["https"],\n
"maxconn": 1,\n
"thread-amount": 1},\n
"service": {\n
"no-timeout": True,\n
"http-cache": True,\n
"zopecount": 2,\n
"access-control-string": "all",\n
"scheme": ["https"],\n
"maxconn": 1,\n
"ssl-authentication": True,\n
"backend-path": "/%(site-id)s/portal_slap",\n
"thread-amount": 1},\n
"shacacheupload": {\n
"no-timeout": True,\n
"zopecount": 1,\n
"access-control-string": "all",\n
"scheme": ["https"],\n
"maxconn": 1,\n
"ssl-authentication": True,\n
"backend-path": "/%(site-id)s/web_site_module",\n
"thread-amount": 1},\n
"shacachedownload": {\n
"no-timeout": True,\n
"http-cache": True,\n
"zopecount": 1,\n
"access-control-string": "all",\n
"scheme": ["http"],\n
"maxconn": 1,\n
"backend-path": "/%(site-id)s/web_site_module",\n
"thread-amount": 1}\n
},\n
"zeo": {\n
"Zeo-Server-1": [{\n
"zodb-name": "main",\n
"serialize-path": "/%(site-id)s/account_module/",\n
"mount-point": "/",\n
"zope-cache-size": "2000",\n
"storage-name": "main",\n
"zeo-cache-size": "400MB"}]\n
},\n
"activity": {\n
"zopecount": 1,\n
"timerservice": True\n
}\n
}))\n
\n
url = "http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/heads/erp5-vifib:/software/erp5/software.cfg"\n
software_type = "production"\n
\n
person = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
\n
request_kw = {}\n
request_kw.update(\n
software_release=url,\n
software_title="SlapOS Master Instance 00-%i" % portal.portal_ids.generateNewId(id_group=("vifib", "kvm"), default=1),\n
software_type=software_type,\n
instance_xml=instance_xml,\n
sla_xml="",\n
shared=False,\n
state="started",\n
)\n
\n
person.requestSoftwareInstance(**request_kw)\n
\n
message = context.Base_translateString("Your instance is under creation. Please wait few minutes for partitions to appear.")\n
return context.REQUEST.get(\'request_hosting_subscription\').Base_redirect(keep_items={\'portal_status_message\': message})\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSection_orderVifibSlapOSMaster</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
478
\ No newline at end of file
479
\ No newline at end of file
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