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
Léo-Paul Géneau
slapos.core
Commits
46f825fe
Commit
46f825fe
authored
Aug 16, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement promise check.
parent
4d1e5b9a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
+19
-2
master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_promise/Alarm_checkPromiseVifibPAS.xml
...portal_skins/vifib_promise/Alarm_checkPromiseVifibPAS.xml
+18
-1
master/bt5/vifib_upgrader/bt/revision
master/bt5/vifib_upgrader/bt/revision
+1
-1
No files found.
master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_promise/Alarm_checkPromiseVifibPAS.xml
View file @
46f825fe
...
...
@@ -55,7 +55,24 @@
portal = context.getPortalObject()\n
\n
def getPASDictDifference(portal, d):\n
raise NotImplementedError\n
error_list = []\n
pas_list = portal.acl_users.objectValues()\n
pas_meta_type_set = set([q.meta_type for q in pas_list])\n
for meta_type, plugin_list in d.iteritems():\n
if meta_type not in pas_meta_type_set:\n
error_list.append(\'Missing plugin %r.\' % meta_type)\n
else:\n
plugin = [q for q in pas_list if q.meta_type==meta_type][0]\n
active_list = []\n
for plugin_type_info in plugin.plugins.listPluginTypeInfo():\n
interface_name = plugin_type_info[\'id\']\n
interface = plugin_type_info[\'interface\']\n
if plugin.testImplements(interface):\n
if plugin.getId() in [q[0] for q in plugin.plugins.listPlugins(interface)]:\n
active_list.append(interface_name)\n
if plugin_list != active_list:\n
error_list.append(\'%r missing activation, expeced %s got %s.\' % (meta_type, \', \'.join(plugin_list), \', \'.join(active_list)))\n
return error_list\n
\n
def mergePASDict(portal, s):\n
raise NotImplementedError\n
...
...
master/bt5/vifib_upgrader/bt/revision
View file @
46f825fe
123
\ No newline at end of file
124
\ 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