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
353d25ea
Commit
353d25ea
authored
May 25, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop SoftwareInstance_getRootHostingSubscriptionUid
parent
198e2463
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
103 deletions
+4
-103
master/bt5/vifib_base/SkinTemplateItem/portal_skins/vifib_base/SoftwareInstance_getRootHostingSubscriptionUid.xml
...b_base/SoftwareInstance_getRootHostingSubscriptionUid.xml
+0
-99
master/bt5/vifib_base/bt/revision
master/bt5/vifib_base/bt/revision
+1
-1
master/bt5/vifib_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_software_instance_list.xml
...og/erp5_mysql_innodb/z_catalog_software_instance_list.xml
+2
-2
master/bt5/vifib_mysql_innodb_catalog/bt/revision
master/bt5/vifib_mysql_innodb_catalog/bt/revision
+1
-1
No files found.
master/bt5/vifib_base/SkinTemplateItem/portal_skins/vifib_base/SoftwareInstance_getRootHostingSubscriptionUid.xml
deleted
100644 → 0
View file @
198e2463
<?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>
# Did not import Products.ERP5Security.ERP5GroupManager\n
# because of semantic matter.\n
class ConsistencyError(Exception):\n
pass\n
\n
predecessor_software_instance = context\n
while (predecessor_software_instance is not None):\n
root_software_instance = predecessor_software_instance\n
predecessor_software_instance = predecessor_software_instance.getPredecessorRelatedValue(\n
portal_type=["Software Instance", "Slave Instance"])\n
\n
root_hosting_subscription = root_software_instance.getPredecessorRelatedValue(\n
portal_type="Hosting Subscription")\n
\n
# XXX-Antoine: As Romain wanted it, we raise an error if it\'s not attached to a\n
# root Hosting Subscription.\n
if root_hosting_subscription is None:\n
# last resort: try to find root hosting subscription by packing list\n
order_line = root_software_instance.getAggregateRelatedValue(portal_type=\'Sale Order Line\')\n
if order_line is not None:\n
root_hosting_subscription = order_line.getAggregateValue(portal_type=\'Hosting Subscription\')\n
else:\n
try:\n
instance_setup_line = root_software_instance.Item_getInstancePackingListLine()\n
except ValueError:\n
pass\n
else:\n
root_hosting_subscription = instance_setup_line.getAggregateValue(portal_type=\'Hosting Subscription\')\n
if root_hosting_subscription is None:\n
raise ConsistencyError(("Software instance %s has no hosting "\n
"subscription as root.") % context.getPath())\n
\n
return root_hosting_subscription.getUid()\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SoftwareInstance_getRootHostingSubscriptionUid
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_base/bt/revision
View file @
353d25ea
449
\ No newline at end of file
450
\ No newline at end of file
master/bt5/vifib_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_software_instance_list.xml
View file @
353d25ea
...
...
@@ -15,7 +15,7 @@
<item>
<key>
<string>
arguments_src
</string>
</key>
<value>
<string>
uid\r\n
SoftwareInstance_getRootHostingSubscription
Uid
</string>
</value>
getSpecialise
Uid
</string>
</value>
</item>
<item>
<key>
<string>
cache_time_
</string>
</key>
...
...
@@ -69,7 +69,7 @@ WHERE\n
<dtml-in
prefix=
"loop"
expr=
"_.range(_.len(uid))"
>
\n
<dtml-call
expr=
"row_list.append([\n
uid[loop_item],\n
SoftwareInstance_getRootHostingSubscription
Uid[loop_item]])"
>
\n
getSpecialise
Uid[loop_item]])"
>
\n
</dtml-in>
\n
\n
<dtml-if
"row_list"
>
\n
...
...
master/bt5/vifib_mysql_innodb_catalog/bt/revision
View file @
353d25ea
37
\ No newline at end of file
38
\ 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