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
Carlos Ramos Carreño
slapos.core
Commits
e0d9cd4d
Commit
e0d9cd4d
authored
Oct 23, 2012
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Included shacache web site promise
parent
3214f428
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
307 additions
and
1 deletion
+307
-1
master/bt5/vifib_configurator/PathTemplateItem/portal_alarms/promise_vifib_shacache_website.xml
...lateItem/portal_alarms/promise_vifib_shacache_website.xml
+105
-0
master/bt5/vifib_configurator/SkinTemplateItem/portal_skins/vifib_promise/Alarm_checkPromiseShacacheWebSite.xml
...skins/vifib_promise/Alarm_checkPromiseShacacheWebSite.xml
+114
-0
master/bt5/vifib_configurator/SkinTemplateItem/portal_skins/vifib_promise/Alarm_installShacacheWebSite.xml
...rtal_skins/vifib_promise/Alarm_installShacacheWebSite.xml
+87
-0
master/bt5/vifib_configurator/bt/revision
master/bt5/vifib_configurator/bt/revision
+1
-1
No files found.
master/bt5/vifib_configurator/PathTemplateItem/portal_alarms/promise_vifib_shacache_website.xml
0 → 100644
View file @
e0d9cd4d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Alarm"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
active_sense_method_id
</string>
</key>
<value>
<string>
Alarm_checkPromiseShacacheWebSite
</string>
</value>
</item>
<item>
<key>
<string>
alarm_notification_mode
</string>
</key>
<value>
<tuple>
<string>
never
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
promise_vifib_shacache_website
</string>
</value>
</item>
<item>
<key>
<string>
periodicity_day_frequency
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
periodicity_hour
</string>
</key>
<value>
<tuple>
<int>
0
</int>
</tuple>
</value>
</item>
<item>
<key>
<string>
periodicity_minute
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_month
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_month_day
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_start_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
0.0
</float>
<string>
GMT
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
periodicity_week
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Alarm
</string>
</value>
</item>
<item>
<key>
<string>
solve_method_id
</string>
</key>
<value>
<string>
Alarm_installShacacheWebSite
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Shacache website Promise
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_configurator/SkinTemplateItem/portal_skins/vifib_promise/Alarm_checkPromiseShacacheWebSite.xml
0 → 100644
View file @
e0d9cd4d
<?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 Products.CMFActivity.ActiveResult import ActiveResult\n
\n
portal = context.getPortalObject()\n
web_site_module = getattr(portal, \'web_site_module\', None)\n
if web_site_module is None:\n
# web_site_module is not present yet, so it is impossible\n
# to keep the promise\n
return False\n
\n
shacache = getattr(web_site_module, \'shacache\', None)\n
shadir = getattr(web_site_module, \'shadir\', None)\n
\n
active_result = ActiveResult()\n
if shacache is None:\n
severity = 1\n
summary = "Shacache WebSite do not exist"\n
detail = ""\n
elif shadir is None:\n
severity = 1\n
summary = "Shadir WebSite do not exist"\n
detail = ""\n
elif shacache.getSkinSelectionName() != "SHACACHE":\n
severity = 1\n
summary = "shacache site don\'t have SHACACHE as skin selection name"\n
detail = ""\n
elif shadir.getSkinSelectionName() != "SHADIR":\n
severity = 1\n
summary = "shadir site don\'t have SHADIR as skin selection name"\n
detail = ""\n
elif shacache.getValidationState() != "published":\n
severity = 1\n
summary = "shacache site is not published"\n
detail = ""\n
elif shadir.getValidationState() != "published":\n
severity = 1\n
summary = "shadir site is not published"\n
detail = ""\n
else:\n
severity = 0\n
summary = "Nothing to do."\n
detail = ""\n
\n
active_result.edit(\n
summary=summary, \n
severity=severity,\n
detail=detail)\n
\n
context.newActiveProcess().postResult(active_result)\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
tag, fixit=False, **kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Alarm_checkPromiseShacacheWebSite
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_configurator/SkinTemplateItem/portal_skins/vifib_promise/Alarm_installShacacheWebSite.xml
0 → 100644
View file @
e0d9cd4d
<?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
shacache = getattr(portal.web_site_module, \'shacache\', None)\n
shadir = getattr(portal.web_site_module, \'shadir\', None)\n
\n
\n
if shacache is None:\n
shacache = portal.web_site_module.newContent(id=\'shacache\', \n
title="Shacache")\n
\n
if shadir is None:\n
shadir = portal.web_site_module.newContent(id=\'shadir\',\n
title="Shadir")\n
\n
shacache.setSkinSelectionName("SHACACHE")\n
shadir.setSkinSelectionName("SHADIR")\n
\n
if portal.portal_workflow.isTransitionPossible(shacache, "publish"):\n
shacache.publish()\n
\n
if portal.portal_workflow.isTransitionPossible(shadir, "publish"):\n
shadir.publish()\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Alarm_installShacacheWebSite
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_configurator/bt/revision
View file @
e0d9cd4d
34
\ No newline at end of file
36
\ 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