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 Gambier
slapos.core
Commits
47e340ef
Commit
47e340ef
authored
Sep 20, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Force allocation on public computer if user didn't explicitely request precise computer SLA
parent
2b80660d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
master/bt5/vifib_base/SkinTemplateItem/portal_skins/vifib_base/OpenSaleOrder_findPartition.xml
...m/portal_skins/vifib_base/OpenSaleOrder_findPartition.xml
+10
-1
master/bt5/vifib_base/bt/revision
master/bt5/vifib_base/bt/revision
+1
-1
No files found.
master/bt5/vifib_base/SkinTemplateItem/portal_skins/vifib_base/OpenSaleOrder_findPartition.xml
View file @
47e340ef
...
@@ -68,10 +68,17 @@ elif software_instance_portal_type == "Software Instance":\n
...
@@ -68,10 +68,17 @@ elif software_instance_portal_type == "Software Instance":\n
else:\n
else:\n
raise NotImplementedError, "Unknown portal type %s" % \\\n
raise NotImplementedError, "Unknown portal type %s" % \\\n
software_instance_portal_type \n
software_instance_portal_type \n
\n
# support SLA\n
# support SLA\n
\n
# Explicit location\n
explicit_location = False\n
if "computer_guid" in filter_kw:\n
if "computer_guid" in filter_kw:\n
explicit_location = True\n
query_kw["parent_reference"] = filter_kw.pop("computer_guid")\n
query_kw["parent_reference"] = filter_kw.pop("computer_guid")\n
\n
if "instance_guid" in filter_kw:\n
if "instance_guid" in filter_kw:\n
explicit_location = True\n
portal = context.getPortalObject()\n
portal = context.getPortalObject()\n
instance = portal.portal_catalog.getResultValue(portal_type="Software Instance", reference=filter_kw.pop("instance_guid"))\n
instance = portal.portal_catalog.getResultValue(portal_type="Software Instance", reference=filter_kw.pop("instance_guid"))\n
if instance is None:\n
if instance is None:\n
...
@@ -114,7 +121,9 @@ for base_category in computer_base_category_list:\n
...
@@ -114,7 +121,9 @@ for base_category in computer_base_category_list:\n
query_kw["%s_uid" % base_category] = category.getUid()\n
query_kw["%s_uid" % base_category] = category.getUid()\n
\n
\n
query_kw["capacity_scope_uid"] = context.getPortalObject().portal_categories.capacity_scope.open.getUid()\n
query_kw["capacity_scope_uid"] = context.getPortalObject().portal_categories.capacity_scope.open.getUid()\n
query_kw["allocation_scope_uid"] = context.getPortalObject().portal_categories.allocation_scope.open.getUid()\n
if not explicit_location:\n
# Only allocation on public computer\n
query_kw["allocation_scope_uid"] = context.getPortalObject().portal_categories.allocation_scope.open.public.getUid()\n
\n
\n
if filter_kw.keys():\n
if filter_kw.keys():\n
# XXX Drop all unexpected keys\n
# XXX Drop all unexpected keys\n
...
...
master/bt5/vifib_base/bt/revision
View file @
47e340ef
477
478
\ No newline at end of file
\ 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